void-packages/srcpkgs/mozjs52/template

59 lines
2.0 KiB
Bash
Raw Normal View History

2017-09-15 11:03:26 +02:00
# Template file for 'mozjs52'
pkgname=mozjs52
version=52.3.0
revision=2
2017-09-15 11:03:26 +02:00
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"
# 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
2017-11-21 01:09:03 +01:00
touch ${wrksrc}/js/src/configure
2017-09-15 11:03:26 +02:00
SHELL=/bin/bash PYTHON=/usr/bin/python2 ./configure --prefix=/usr \
2017-11-21 01:09:03 +01:00
--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}
2017-09-15 11:03:26 +02:00
}
post_install() {
2017-11-21 01:09:03 +01:00
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
2017-09-15 11:03:26 +02:00
}
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"
2017-09-15 11:03:26 +02:00
vmove usr/lib/pkgconfig
}
}