59 lines
2.0 KiB
Bash
59 lines
2.0 KiB
Bash
# Template file for 'mozjs52'
|
|
pkgname=mozjs52
|
|
version=52.3.0
|
|
revision=2
|
|
wrksrc="firefox-${version}esr"
|
|
build_wrksrc="js/src"
|
|
build_style=gnu-configure
|
|
hostmakedepends="perl python pkg-config automake autoconf213 autoconf-archive"
|
|
makedepends="icu-devel libffi-devel nspr-devel zlib-devel readline-devel"
|
|
short_desc="Mozilla JavaScript interpreter and library (52.x series)"
|
|
homepage="http://www.mozilla.org/js/"
|
|
license="MPL-1.1, GPL-2, LGPL-2.1"
|
|
maintainer="Enno Boland <gottox@voidlinux.eu>"
|
|
distfiles="${MOZILLA_SITE}/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz"
|
|
checksum=c16bc86d6cb8c2199ed1435ab80a9ae65f9324c820ea0eeb38bf89a97d253b5b
|
|
patch_args="-Np1"
|
|
nopie=yes
|
|
|
|
# Flags for gcc6.3 conceived by Arch Linux developers
|
|
CFLAGS="-fpermissive -fno-delete-null-pointer-checks -fno-tree-vrp -fno-strict-aliasing"
|
|
CXXFLAGS="-fpermissive -fno-delete-null-pointer-checks -fno-tree-vrp -fno-strict-aliasing"
|
|
# Use BFD linker to avoid erroneous detection of llvm pr8927 with *-musl
|
|
LDFLAGS="-fuse-ld=bfd"
|
|
|
|
do_configure() {
|
|
local _args
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
export HOST_CFLAGS="-Os"
|
|
export HOST_CXXFLAGS="-Os"
|
|
_args+=" --target=$XBPS_CROSS_TRIPLET"
|
|
fi
|
|
|
|
SHELL=/bin/bash PYTHON=/usr/bin/python2 ./configure --prefix=/usr \
|
|
--disable-jemalloc --disable-optimize --enable-ctypes \
|
|
--enable-gcgenerational --enable-pie --enable-readline \
|
|
--enable-shared-js --enable-system-ffi --enable-tests \
|
|
--enable-threadsafe --enable-xterm-updates --with-intl-api \
|
|
--with-system-icu --with-system-nspr --with-system-zlib \
|
|
${_args}
|
|
}
|
|
|
|
post_install() {
|
|
mv $DESTDIR/usr/lib/libmozjs-52.so $DESTDIR/usr/lib/libmozjs-52.so.0
|
|
ln -sr $DESTDIR/usr/lib/libmozjs-52.so.0 $DESTDIR/usr/lib/libmozjs-52.so
|
|
}
|
|
|
|
mozjs52-devel_package() {
|
|
depends="nspr-devel ${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/bin/js52-config
|
|
vmove usr/include
|
|
vmove "usr/lib/*.so"
|
|
vmove "usr/lib/*.ajs"
|
|
vmove usr/lib/pkgconfig
|
|
}
|
|
}
|