dev-util/netsurf-buildsystem: new package
authorVirgil Dupras <vdupras@gentoo.org>
Tue, 13 Nov 2018 16:09:03 +0000 (11:09 -0500)
committerVirgil Dupras <vdupras@gentoo.org>
Tue, 13 Nov 2018 18:04:19 +0000 (13:04 -0500)
This replaces the netsurf eclass which not necessary and too complex for
its own need. Being an eclass makes modifying it too heavy a process.

Most of netsurf.eclass' purpose was to wrap netsurf's build system,
which is now what we do in this package. In addition to installing it as
a normal package, we add a helper shell script that can then be loaded
in consumer ebuilds.

Signed-off-by: Virgil Dupras <vdupras@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

dev-util/netsurf-buildsystem/Manifest [new file with mode: 0644]
dev-util/netsurf-buildsystem/files/gentoo-helpers.sh [new file with mode: 0644]
dev-util/netsurf-buildsystem/metadata.xml [new file with mode: 0644]
dev-util/netsurf-buildsystem/netsurf-buildsystem-1.7.ebuild [new file with mode: 0644]

diff --git a/dev-util/netsurf-buildsystem/Manifest b/dev-util/netsurf-buildsystem/Manifest
new file mode 100644 (file)
index 0000000..a3735c4
--- /dev/null
@@ -0,0 +1 @@
+DIST buildsystem-1.7.tar.gz 38597 BLAKE2B d0981ef282ac0d93d81a1a6a6bee1fc2a0151c962be6ce2900a67843ba8ebc67e00508cded2a7375f6bbe0d45572690f127872936a282de80eb08655ac571603 SHA512 f6a46ac25f41e695ec13d7b2b564250c4cc44a40a688904eb17aa4b547c2df0102cc0effb7a23a2ffa6b9178ae5cf452b63980caf26e06e479168c85803f1e58
diff --git a/dev-util/netsurf-buildsystem/files/gentoo-helpers.sh b/dev-util/netsurf-buildsystem/files/gentoo-helpers.sh
new file mode 100644 (file)
index 0000000..e033a53
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+netsurf_define_makeconf() {
+       NETSURF_MAKECONF=(
+               NSSHARED=/usr/share/netsurf-buildsystem
+               LIBDIR="$(get_libdir)"
+               PREFIX="${EROOT}/usr"
+               Q=
+               CC="$(tc-getCC)"
+               LD="$(tc-getLD)"
+               HOST_CC="\$(CC)"
+               CCOPT=
+               CCNOOPT=
+               CCDBG=
+               LDDBG=
+               AR="$(tc-getAR)"
+       )
+}
diff --git a/dev-util/netsurf-buildsystem/metadata.xml b/dev-util/netsurf-buildsystem/metadata.xml
new file mode 100644 (file)
index 0000000..88de5fc
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="person">
+               <email>vdupras@gentoo.org</email>
+               <name>Virgil Dupras</name>
+       </maintainer>
+</pkgmetadata>
diff --git a/dev-util/netsurf-buildsystem/netsurf-buildsystem-1.7.ebuild b/dev-util/netsurf-buildsystem/netsurf-buildsystem-1.7.ebuild
new file mode 100644 (file)
index 0000000..f8dd03f
--- /dev/null
@@ -0,0 +1,26 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_P="buildsystem-${PV}"
+DESCRIPTION="Build system used for netsurf and its libs"
+HOMEPAGE="https://www.netsurf-browser.org"
+SRC_URI="https://download.netsurf-browser.org/libs/releases/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~m68k-mint"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+       default
+       sed -e 's:/bin/which:which:' -i "makefiles/Makefile.tools" || die
+}
+
+src_install() {
+       emake DESTDIR="${ED}" PREFIX=/usr install
+       insinto /usr/share/netsurf-buildsystem
+       doins "${FILESDIR}/gentoo-helpers.sh"
+}