mirror of
https://gitdl.cn/https://github.com/chakralinux/lib32.git
synced 2025-02-03 14:07:16 +08:00
72 lines
2.0 KiB
Bash
72 lines
2.0 KiB
Bash
# Lib32 Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# Maintainer: AlmAck <almack@chakra-project.org>
|
|
# Contributor: jtts
|
|
|
|
_pkgbasename=js
|
|
pkgname=lib32-$_pkgbasename
|
|
pkgver=1.8.5
|
|
pkgrel=2
|
|
pkgdesc="JavaScript interpreter and libraries (32 bit)"
|
|
arch=(x86_64)
|
|
url="https://developer.mozilla.org/En/SpiderMonkey/1.8.5"
|
|
license=('GPL2')
|
|
depends=('lib32-nspr' 'gcc-libs-multilib' 'lib32-libstdc++5' $_pkgbasename=$pkgver)
|
|
makedepends=('python2' 'zip')
|
|
source=(http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz
|
|
js185-destdir.patch)
|
|
sha256sums=('5d12f7e1f5b4a99436685d97b9b7b75f094d33580227aa998c406bbae6f2a687'
|
|
'813e5e7e837e8057734b08a999f50b3eef002be8c37f3f4cb5df4435806e1da1')
|
|
|
|
build() {
|
|
unset CPPFLAGS
|
|
|
|
export CC='gcc -m32'
|
|
export CXX='g++ -m32'
|
|
|
|
export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
|
|
|
|
# The configure-script tries to look these as i686-pc-linux-gnu-$TOOLNAME
|
|
# and fails miserably. Define the variables here.
|
|
export RANLIB=ranlib
|
|
export AR=ar
|
|
export AS=as
|
|
export LD=ld
|
|
export STRIP=strip
|
|
|
|
cd "$srcdir/$_pkgbasename-$pkgver/js/src"
|
|
|
|
patch -Np0 -i $srcdir/js185-destdir.patch
|
|
|
|
# These configure options do not work, since Arclinux doesn't have
|
|
# a 32 bit nspr-config. We have to pass nspr-cflags and nspr-libs
|
|
# variables manually to the configure script.
|
|
# --with-system-nspr
|
|
# --with-nspr-exec-prefix=/usr/lib32
|
|
# --with-nspr-prefix=/usr/lib32
|
|
./configure --prefix=/usr \
|
|
--target=i686-pc-linux-gnu \
|
|
--libdir=/usr/lib32 \
|
|
--with-nspr-cflags="-I/usr/include/nspr" \
|
|
--with-nspr-libs="-L/usr/lib32 -lplds4 -lplc4 -lnspr4 -lpthread -ldl" \
|
|
--enable-threadsafe
|
|
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir/$_pkgbasename-$pkgver/js/src"
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
# Not needed. This is a lib32-package.
|
|
#install -m 0755 shell/js ${pkgdir}/usr/bin
|
|
|
|
#cleanup
|
|
rm -f "${pkgdir}/usr/lib32/libmozjs185-1.0.a"
|
|
|
|
# cleanup for lib32 package
|
|
rm -rf "${pkgdir}"/{etc,sbin,usr/bin,usr/{include,share}}
|
|
}
|
|
|
|
# vim:set ts=2 sw=2 et:
|