commit:     3cceefe1fc1dc6b91a550a4cbf079f99095f780c
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Wed Jan 13 19:47:05 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Wed Jan 13 19:47:05 2021 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=3cceefe1

dev-util/waf: new builder for dev-libs/tut

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 dev-util/waf/metadata.xml      |  8 ++++++
 dev-util/waf/waf-2.0.21.ebuild | 64 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+)

diff --git a/dev-util/waf/metadata.xml b/dev-util/waf/metadata.xml
new file mode 100644
index 000000000..026cdb22b
--- /dev/null
+++ b/dev-util/waf/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="project">
+               <email>[email protected]</email>
+               <name>Gentoo Science Project</name>
+       </maintainer>
+</pkgmetadata>

diff --git a/dev-util/waf/waf-2.0.21.ebuild b/dev-util/waf/waf-2.0.21.ebuild
new file mode 100644
index 000000000..91e9f7fb1
--- /dev/null
+++ b/dev-util/waf/waf-2.0.21.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit python-single-r1
+
+DESCRIPTION="Piece of software used to help building software projects"
+HOMEPAGE="https://waf.io/";
+SRC_URI="https://waf.io/${P}.tar.bz2";
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="doc examples"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+BDEPEND="doc? ( $(python_gen_cond_dep \
+       'dev-python/sphinx[${PYTHON_USEDEP}]' )
+)"
+DEPEND="${PYTHON_DEPS}"
+
+src_prepare() {
+       rm waf || die
+
+       default
+}
+
+src_configure() {
+       ${EPYTHON} ./waf-light configure || die "waf configure failed"
+}
+
+src_compile() {
+       ${EPYTHON} ./waf-light build || die "waf build failed"
+       use doc && build_sphinx docs/sphinx
+}
+
+src_install() {
+       default
+
+       # Set INSTALL to EPREFIX
+       # Set REVISION to PR
+       # set dirname to empty because python_get_sitedir
+       # installs directly to a dir with the correct name
+       # Set location of waflib to location of Gentoo
+       # Python sitedir
+       sed -e "/INSTALL=/s:=.*:='${EPREFIX}':" \
+               -e "/REVISION=/s:=.*:='${PR}':" \
+               -e "/dirname =/s:=.*:= '':" \
+               -e "s:/lib/:$(python_get_sitedir)/:" \
+               -e "/^#\(==>\|BZ\|<==\)/d" \
+               -i waf || die
+       python_doscript waf
+
+       python_domodule waflib
+
+       if use examples ; then
+               dodoc -r demos
+       fi
+}

Reply via email to