From 26fcbf1f03e9ce9a3669ffee016f194312e627ac Mon Sep 17 00:00:00 2001 From: layman Date: Tue, 2 Jun 2015 21:21:18 +0200 Subject: [PATCH] Add custom surf ebuild --- www-client/surf/metadata.xml | 10 ++++++ www-client/surf/surf-9999.ebuild | 60 ++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 www-client/surf/metadata.xml create mode 100644 www-client/surf/surf-9999.ebuild diff --git a/www-client/surf/metadata.xml b/www-client/surf/metadata.xml new file mode 100644 index 0000000..a30445e --- /dev/null +++ b/www-client/surf/metadata.xml @@ -0,0 +1,10 @@ + + + + +jer@gentoo.org + + +Without a saved config.h, this package depends on net-misc/curl and x11-terms/st for a default download mechanism + + diff --git a/www-client/surf/surf-9999.ebuild b/www-client/surf/surf-9999.ebuild new file mode 100644 index 0000000..61808ea --- /dev/null +++ b/www-client/surf/surf-9999.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-client/surf/surf-9999.ebuild,v 1.3 2014/09/16 19:23:43 jer Exp $ + +EAPI=5 +inherit eutils git-2 savedconfig toolchain-funcs + +DESCRIPTION="a simple web browser based on WebKit/GTK+" +HOMEPAGE="http://surf.suckless.org/" +EGIT_REPO_URI="https://lab.cherboiche.org/gentoo/surf.git" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="" + +COMMON_DEPEND=" + dev-libs/glib + net-libs/libsoup + net-libs/webkit-gtk:3 + x11-libs/gtk+:3 + x11-libs/libX11 +" +DEPEND=" + ${COMMON_DEPEND} + virtual/pkgconfig +" +RDEPEND=" + !sci-chemistry/surf + ${COMMON_DEPEND} + x11-apps/xprop + x11-misc/dmenu + !savedconfig? ( + net-misc/curl + x11-terms/st + ) +" + +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() { + epatch_user + restore_config config.h + tc-export CC PKG_CONFIG +} + +src_install() { + default + save_config config.h +}