diff options
author | Christian Krause | 2015-06-13 11:55:48 +0200 |
---|---|---|
committer | Christian Krause | 2015-06-13 11:55:48 +0200 |
commit | 2cb27ddbe7c4bc0a7ab8be20e8f9d2d5e7d93819 (patch) | |
tree | a4befcf4df23737795012117ff8a88bf832b7c07 | |
download | aur-lib32-js.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 69 |
2 files changed, 91 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..038895c1459f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = lib32-js + pkgdesc = JavaScript interpreter and libraries (32-bit) + pkgver = 24.2.0 + pkgrel = 2 + url = https://developer.mozilla.org/En/SpiderMonkey/24 + arch = x86_64 + license = MPL + makedepends = python2 + makedepends = zip + makedepends = lib32-libffi + makedepends = gcc-multilib + depends = js + depends = lib32-nspr + depends = lib32-readline + depends = lib32-zlib + depends = gcc-libs-multilib + options = !staticlibs + source = http://ftp.mozilla.org/pub/mozilla.org/js/mozjs-24.2.0.tar.bz2 + sha1sums = ce779081cc11bd0c871c6f303fc4a0091cf4fe66 + +pkgname = lib32-js + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e49e8246280f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,69 @@ +# Maintainer: Christian Krause ("wookietreiber") <kizkizzbangbang@googlemail.com> +# Contributor: jtts +# Contributor: Ionut Biru <ibiru@archlinux.org> + +_pkgname_base=js +pkgname=lib32-$_pkgname_base + +_pkgver_major=24 +pkgver=$_pkgver_major.2.0 + +pkgrel=2 +pkgdesc="JavaScript interpreter and libraries (32-bit)" +arch=('x86_64') +url="https://developer.mozilla.org/En/SpiderMonkey/$_pkgver_major" +license=(MPL) +depends=($_pkgname_base lib32-nspr lib32-readline lib32-zlib gcc-libs-multilib) +makedepends=(python2 zip lib32-libffi gcc-multilib) +options=(!staticlibs) +source=(http://ftp.mozilla.org/pub/mozilla.org/js/mozjs-$pkgver.tar.bz2) +sha1sums=('ce779081cc11bd0c871c6f303fc4a0091cf4fe66') + +prepare() { + rm -rf mozjs-$pkgver/js/src/editline + rm -rf mozjs-$pkgver/js/src/ctypes/libffi +} + +build() { + cd mozjs-$pkgver/js/src + + export CC='gcc -m32' + export CXX='g++ -m32' + export PKG_CONFIG_LIBDIR=/usr/lib32/pkgconfig + export AR=ar + + # FORTIFY_SOURCE causes errors + export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=+([0-9])/}" + export CPPFLAGS="${CPPFLAGS/-D_FORTIFY_SOURCE=+([0-9])/}" + export CXXFLAGS="${CXXFLAGS/-D_FORTIFY_SOURCE=+([0-9])/}" + + # there is no 32-bit nspr-config, so manual cflags and libs + # TODO update once in a while + ./configure --prefix=/usr \ + --target=i686-pc-linux \ + --libdir=/usr/lib32 \ + --with-nspr-cflags='-I/usr/include/nspr' \ + --with-nspr-libs='-L/usr/lib32 -lplds4 -lplc4 -lnspr4 -lpthread' \ + --with-system-ffi \ + --enable-readline \ + --enable-threadsafe + + make +} + +check() { + cd mozjs-$pkgver/js/src + + make check +} + +package() { + cd mozjs-$pkgver/js/src + + make DESTDIR="$pkgdir" install + + find "$pkgdir"/usr/{lib32/pkgconfig,include} -type f -exec chmod -x {} + + + # cleanup for lib32 package + rm -rf "${pkgdir}"/{etc,sbin,usr/bin,usr/{include,share}} +} |