summaryrefslogtreecommitdiff
path: root/pcr/waf
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2018-01-23 05:38:08 +0100
committerAndreas Grapentin <andreas@grapentin.org>2018-01-23 05:38:08 +0100
commit7f51bf94108bfabf5a8b619134dd69d020dd4b4e (patch)
tree56928e99d11f97373ce6149465e4eb33c4da5c13 /pcr/waf
parent3296af8ee6028bb02aa4833848ddc4917053bf38 (diff)
downloadabslibre-7f51bf94108bfabf5a8b619134dd69d020dd4b4e.tar.gz
abslibre-7f51bf94108bfabf5a8b619134dd69d020dd4b4e.tar.bz2
abslibre-7f51bf94108bfabf5a8b619134dd69d020dd4b4e.zip
pcr/waf: updated to 1.9.11
Diffstat (limited to 'pcr/waf')
-rw-r--r--pcr/waf/PKGBUILD83
-rw-r--r--pcr/waf/building-waf.md14
-rw-r--r--pcr/waf/wafdir.patch16
3 files changed, 86 insertions, 27 deletions
diff --git a/pcr/waf/PKGBUILD b/pcr/waf/PKGBUILD
index 33f098bff..6a6af5551 100644
--- a/pcr/waf/PKGBUILD
+++ b/pcr/waf/PKGBUILD
@@ -1,39 +1,68 @@
-# Maintainer: Márcio Silva <coadde@hyperbola.info>
+# Maintainer (AUR): XZS <d dot f dot fischer at web dot de>
+# Contributor (AUR): Alexander Rødseth <rodseth@gmail.com>
+# Contributor (AUR): Sebastien Binet <binet@cern.ch>
+# Contributor: Márcio Silva <coadde@hyperbola.info>
-pkgbase=waf
-pkgname=('waf' 'waf2')
-pkgver=1.8.20
+# parabola changes and rationale:
+# - corrected license
+
+pkgname=waf
+pkgver=1.9.11
pkgrel=1
-pkgdesc='The meta build system'
+pkgdesc='General-purpose build system modelled after Scons'
+url='http://waf.io/'
arch=('any')
-url="https://$pkgbase.io"
license=('BSD3')
-makedepends=('python' 'python2')
-source=("$url/$pkgbase-$pkgver.tar.bz2"{,.asc})
-md5sums=('1e188c5179f47964050b08863e9026a0'
- 'SKIP')
-validpgpkeys=('E6EEAF4A06B3C4CDAC71D4DE67A565EDFDF90E64')
+depends=('python')
+makedepends=('unzip')
+provides=('python-waf')
+source=("https://waf.io/${pkgname}-${pkgver}.tar.bz2"
+ 'wafdir.patch'
+ 'building-waf.md')
+md5sums=('ba28942df5d03a2e411de16865d36a71'
+ 'ff472805caa81e02cb15bcf87031f722'
+ '93fd94b3dc4616c35e9bf13adc63b23c')
+sha256sums=('a13432143010b4aaa014431dbe3a35150a9e46a5668773893d28d72a38c7a1e5'
+ '432fb8e21fe31047e16ac068b761961f1a3965785e570bf54aca1c4c07d253f4'
+ '3103524b61ac3f3af9bb71f1ac8fcb836a1e67e2bfcf59150f08dbf70a595675')
-build() {
- cd $srcdir/$pkgbase-$pkgver
- ./configure
+prepare() {
+ cd "$pkgname-$pkgver"
+
+ patch -p1 -i ../wafdir.patch
+
+ # Extract license
+ head -n 30 waf | tail -n 25 > LICENSE
+
+ # Python 3 fix
+ sed -i '0,/env python/s//python3/' waf
}
-package_waf() {
- pkgdesc='The meta build system (Python 3)'
- depends=('python')
+build() {
+ cd "$pkgname-$pkgver"
+ ./waf-light \
+ configure --prefix=/usr \
+ build --make-waf --tools='compat,compat15,ocaml,go,cython,scala,erlang,cuda,gcj,boost,pep8,eclipse,qt4,kde4'
- cd $srcdir/$pkgbase-$pkgver
- mkdir -pvm 755 $pkgdir/usr/bin
- cp -va waf $pkgdir/usr/bin/waf
+ # Strip packed library from binary. The plain files are installed separately.
+ sed -i '/^#==>$/,/^#<==$/d' waf
}
-package_waf2() {
- pkgdesc='The meta build system (Python 2)'
- depends=('python2')
+package() {
+ install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname" building-waf.md
+
+ cd "$pkgname-$pkgver"
+ install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
+ install -Dt "$pkgdir/usr/bin" waf
+ install -Dm644 -t "$pkgdir/usr/share/$pkgname" wscript
- cd $srcdir/$pkgbase-$pkgver
- sed -i 's|/usr/bin/env python|/usr/bin/env python2|' waf
- mkdir -pvm 755 $pkgdir/usr/bin
- cp -va waf $pkgdir/usr/bin/waf2
+ # Place waf library and tools.
+ local wafdir="$pkgdir/usr/lib/waf"
+ install -d "$wafdir"
+ bsdtar -xf zip/waflib.zip -C "$wafdir"
+
+ # compile all python sources for once to be used after installation.
+ python -OOm compileall "$wafdir"
}
+
+# vim:set ts=2 sw=2 et:
diff --git a/pcr/waf/building-waf.md b/pcr/waf/building-waf.md
new file mode 100644
index 000000000..3cbe1a0e2
--- /dev/null
+++ b/pcr/waf/building-waf.md
@@ -0,0 +1,14 @@
+# Building a custom waf binary
+
+Waf is primarily intended to be distributed with the project using it. The Arch Linux package makes waf usable directly, but also brings all files necessary to compose a custom binary for your project. To do so, create a temporary directory, link all the necessary resources together and build it.
+
+cd $(mktemp -d)
+ln -s /usr/share/waf/wscript .
+ln -s /usr/bin/waf waf-light
+ln -s /usr/lib/waf/waflib .
+mkdir zip
+waf configure build --make-waf --tools=''
+
+The last line allows you to choose tools to include.
+
+After this process, there should be a `waf` binary ready in the current working directory.
diff --git a/pcr/waf/wafdir.patch b/pcr/waf/wafdir.patch
new file mode 100644
index 000000000..344738adf
--- /dev/null
+++ b/pcr/waf/wafdir.patch
@@ -0,0 +1,16 @@
+diff --git a/waf-light b/waf-light
+index 308eaae..2c75d2e 100755
+--- a/waf-light
++++ b/waf-light
+@@ -146,8 +146,9 @@ def find_lib():
+
+ dirname = '%s-%s-%s' % (WAF, VERSION, REVISION)
+ for i in (INSTALL,'/usr','/usr/local','/opt'):
+- w = test(i + '/lib/' + dirname)
+- if w: return w
++ for wafdir in ('waf', dirname):
++ w = test(i + '/lib/' + wafdir)
++ if w: return w
+
+ #waf-local
+ dir = join(base, (sys.platform != 'win32' and '.' or '') + dirname)