www-client/surf: add ebuild for my surf fork
This commit is contained in:
parent
c9dbd7a009
commit
525e1b01c0
|
@ -0,0 +1,31 @@
|
|||
diff --git a/config.mk b/config.mk
|
||||
index 5e68e38..fa45b55 100644
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -4,18 +4,18 @@ VERSION = 2.0
|
||||
# Customize below to fit your system
|
||||
|
||||
# paths
|
||||
-PREFIX = /usr/local
|
||||
+PREFIX = /usr
|
||||
MANPREFIX = $(PREFIX)/share/man
|
||||
LIBPREFIX = $(PREFIX)/lib
|
||||
LIBDIR = $(LIBPREFIX)/surf
|
||||
|
||||
-X11INC = `pkg-config --cflags x11`
|
||||
-X11LIB = `pkg-config --libs x11`
|
||||
+X11INC = $(shell $(PKG_CONFIG) --cflags x11)
|
||||
+X11LIB = $(shell $(PKG_CONFIG) --libs x11)
|
||||
|
||||
-GTKINC = `pkg-config --cflags gtk+-3.0 gcr-3 webkit2gtk-4.0`
|
||||
-GTKLIB = `pkg-config --libs gtk+-3.0 gcr-3 webkit2gtk-4.0`
|
||||
-WEBEXTINC = `pkg-config --cflags webkit2gtk-4.0 webkit2gtk-web-extension-4.0`
|
||||
-WEBEXTLIBS = `pkg-config --libs webkit2gtk-4.0 webkit2gtk-web-extension-4.0`
|
||||
+GTKINC = $(shell $(PKG_CONFIG) --cflags gtk+-3.0 gcr-3 webkit2gtk-4.0)
|
||||
+GTKLIB = $(shell $(PKG_CONFIG) --libs gtk+-3.0 gcr-3 webkit2gtk-4.0)
|
||||
+WEBEXTINC = $(shell $(PKG_CONFIG) --cflags webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
|
||||
+WEBEXTLIBS = $(shell $(PKG_CONFIG) --libs webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
|
||||
|
||||
# includes and libs
|
||||
INCS = $(X11INC) $(GTKINC)
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>jer@gentoo.org</email>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="savedconfig">Without a saved config.h, this package depends on <pkg>net-misc/curl</pkg> and <pkg>x11-terms/st</pkg> for a default download mechanism</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
|
@ -0,0 +1,66 @@
|
|||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
inherit git-r3 savedconfig toolchain-funcs
|
||||
|
||||
DESCRIPTION="a simple web browser based on WebKit/GTK+"
|
||||
HOMEPAGE="https://surf.suckless.org/"
|
||||
EGIT_REPO_URI="https://git.odrling.xyz/odrling/surf.git"
|
||||
EGIT_BRANCH="surf-webkit2"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
|
||||
COMMON_DEPEND="
|
||||
app-crypt/gcr[gtk]
|
||||
dev-libs/glib:2
|
||||
net-libs/webkit-gtk:4
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/libX11
|
||||
"
|
||||
DEPEND="
|
||||
${COMMON_DEPEND}
|
||||
virtual/pkgconfig
|
||||
"
|
||||
RDEPEND="
|
||||
!sci-chemistry/surf
|
||||
${COMMON_DEPEND}
|
||||
!savedconfig? (
|
||||
>=x11-misc/dmenu-4.7
|
||||
net-misc/curl
|
||||
x11-apps/xprop
|
||||
x11-terms/st
|
||||
)
|
||||
"
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-9999-gentoo.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
if ! use savedconfig; then
|
||||
elog "The default config.h assumes you have"
|
||||
elog " net-misc/curl"
|
||||
elog " x11-terms/st"
|
||||
elog "installed to support the download function."
|
||||
elog "Without those, downloads will fail (gracefully)."
|
||||
elog "You can fix this by:"
|
||||
elog "1) Installing these packages, or"
|
||||
elog "2) Setting USE=savedconfig and changing config.h accordingly."
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
restore_config config.h
|
||||
|
||||
tc-export CC PKG_CONFIG
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
save_config config.h
|
||||
}
|
Loading…
Reference in New Issue