Hello,

When trying to emerge media-libs/libnsgif (or other netsurf build system
using packages) in prefix the compilation fails because the ebuilds are
sourcing a bash script directly from
/usr/share/netsurf-buildsystem/gentoo-helpers.sh

This patch is replacing gentoo-helpers.sh with an eclass which is then used
in all ebuilds which are now sourcing gentoo-helpers.sh for more details
please see PR 16702 on github https://github.com/gentoo/gentoo/pull/16702

Thanks
Lucas
From e07bb519a9837d0888c5db49bec839e99d8bfb03 Mon Sep 17 00:00:00 2001
From: Lukas Vacek <lucas.va...@gmail.com>
Date: Sat, 25 Jul 2020 04:32:00 +0800
Subject: [PATCH 1/3] Add new class netsurf.eclass for netsurf build

This eclass contains one new function netsurf_define_makeconf which
should be used in ebuilds instead ouf sourcing netsurf-buildsystem/gentoo-helpers.sh
---
 eclass/netsurf.eclass | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 eclass/netsurf.eclass

diff --git a/eclass/netsurf.eclass b/eclass/netsurf.eclass
new file mode 100644
index 00000000000..67d9837147b
--- /dev/null
+++ b/eclass/netsurf.eclass
@@ -0,0 +1,43 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: netsurf.eclass
+# @MAINTAINER:
+# maintainer-nee...@gentoo.org
+# @SUPPORTED_EAPIS: 5 6 7
+# @BLURB: Handle buildsystem of www.netsurf-browser.org components
+# @DESCRIPTION:
+# Handle settings build environment for netsurf build system
+#
+# Supports PATCHES and DOCS as in base.eclass
+
+if [[ -z ${_NETSURF_ECLASS} ]]; then
+_NETSURF_ECLASS=1
+
+inherit toolchain-funcs
+
+# @FUNCTION: netsurf_define_makeconf
+# @DESCRIPTION:
+# This function sets NETSURF_MAKECONF as needed by netsurf build system
+netsurf_define_makeconf() {
+	NETSURF_MAKECONF=(
+		PREFIX="${EPREFIX}/usr"
+		NSSHARED="${EPREFIX}/usr/share/netsurf-buildsystem"
+		LIBDIR="$(get_libdir)"
+		Q=
+		CC="$(tc-getCC)"
+		LD="$(tc-getLD)"
+		HOST_CC="\$(CC)"
+		BUILD_CC="$(tc-getBUILD_CC)"
+		CXX="$(tc-getCXX)"
+		BUILD_CXX="$(tc-getBUILD_CXX)"
+		CCOPT=
+		CCNOOPT=
+		CCDBG=
+		LDDBG=
+		AR="$(tc-getAR)"
+		WARNFLAGS=
+	)
+}
+
+fi
-- 
2.17.1

Reply via email to