From b0bab803d2f1c96af5760374e2684f9a85591916 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 2 Oct 2022 01:11:51 +0100 Subject: gentoo auto-resync : 02:10:2022 - 01:11:51 --- www-client/surf/surf-2.1-r2.ebuild | 98 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 www-client/surf/surf-2.1-r2.ebuild (limited to 'www-client/surf/surf-2.1-r2.ebuild') diff --git a/www-client/surf/surf-2.1-r2.ebuild b/www-client/surf/surf-2.1-r2.ebuild new file mode 100644 index 000000000000..796e5b7dcbb9 --- /dev/null +++ b/www-client/surf/surf-2.1-r2.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop savedconfig toolchain-funcs xdg + +DESCRIPTION="A simple web browser based on WebKit/GTK+" +HOMEPAGE="https://surf.suckless.org/" + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://git.suckless.org/surf" + EGIT_BRANCH="surf-webkit2" +else + SRC_URI="https://dl.suckless.org/${PN}/${P}.tar.gz" + KEYWORDS="amd64 ~riscv x86" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="tabbed" + +DEPEND=" + app-crypt/gcr:0=[gtk] + dev-libs/glib:2 + net-libs/webkit-gtk:4 + x11-libs/gtk+:3 + x11-libs/libX11 +" +RDEPEND="${DEPEND} + !sci-chemistry/surf + !savedconfig? ( + net-misc/curl + x11-apps/xprop + x11-misc/dmenu + x11-terms/st + ) + tabbed? ( x11-misc/tabbed ) +" +BDEPEND=" + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${P}-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 + + if use tabbed; then + dobin surf-open.sh + fi + + save_config config.h + + newicon "${S}/${PN}.png" "${PN}.png" + + local mime_types="text/html;text/xml;application/xhtml+xml;" + mime_types+="x-scheme-handler/http;x-scheme-handler/https;" + make_desktop_entry \ + "surf %u" \ + "Surf" \ + "surf" \ + "Network;WebBrowser" \ + "MimeType=${mime_types}\nStartupWMClass=surf" +} + +pkg_postinst() { + xdg_desktop_database_update + xdg_icon_cache_update +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_icon_cache_update +} -- cgit v1.2.3