2017-04-09 23:18:56 +00:00
|
|
|
# Template file for 'mozjs38'
|
|
|
|
pkgname=mozjs38
|
|
|
|
version=38.8.0
|
2017-04-14 09:06:41 +00:00
|
|
|
revision=2
|
2017-04-09 23:18:56 +00:00
|
|
|
wrksrc="mozilla-esr${version%.*.*}"
|
|
|
|
build_wrksrc="js/src"
|
|
|
|
build_style=gnu-configure
|
2017-04-14 09:06:41 +00:00
|
|
|
hostmakedepends="perl python pkg-config"
|
|
|
|
makedepends="icu-devel libffi-devel nspr-devel zlib-devel"
|
2017-04-09 23:18:56 +00:00
|
|
|
short_desc="Mozilla JavaScript interpreter and library (38.x series)"
|
|
|
|
homepage="http://www.mozilla.org/js/"
|
|
|
|
license="MPL-1.1, GPL-2, LGPL-2.1"
|
|
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
|
|
distfiles="https://ftp.mozilla.org/pub/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.bz2"
|
|
|
|
checksum=9475adcee29d590383c4885bc5f958093791d1db4302d694a5d2766698f59982
|
|
|
|
nopie=yes
|
|
|
|
|
2017-04-14 09:06:41 +00:00
|
|
|
# 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"
|
2017-04-14 08:25:36 +00:00
|
|
|
|
2017-04-09 23:18:56 +00:00
|
|
|
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 ./configure --prefix=/usr --enable-threadsafe \
|
2017-04-14 09:06:41 +00:00
|
|
|
--enable-system-ffi --with-system-icu --with-system-nspr \
|
|
|
|
${_args}
|
2017-04-09 23:18:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
post_install() {
|
|
|
|
|
|
|
|
# Rename pkgconfig
|
|
|
|
mv ${PKGDESTDIR}/usr/lib/pkgconfig/js.pc ${PKGDESTDIR}/usr/lib/pkgconfig/mozjs-${version%.*.*}.pc
|
|
|
|
|
|
|
|
# Remove links
|
|
|
|
mv ${PKGDESTDIR}/usr/include/mozjs-/js-config.h ${PKGDESTDIR}/usr/include/
|
|
|
|
rm -rf ${PKGDESTDIR}/usr/include/mozjs-/*
|
|
|
|
mv ${PKGDESTDIR}/usr/include/js-config.h ${PKGDESTDIR}/usr/include/mozjs-/
|
|
|
|
cp -p ${wrksrc}/js/src/js.msg ${PKGDESTDIR}/usr/include/mozjs-/
|
|
|
|
cp -p ${wrksrc}/js/src/*.h ${PKGDESTDIR}/usr/include/mozjs-/
|
|
|
|
mkdir ${PKGDESTDIR}/usr/include/mozjs-/js/
|
|
|
|
cp -p ${wrksrc}/js/public/*.h ${PKGDESTDIR}/usr/include/mozjs-/js/
|
|
|
|
mkdir ${PKGDESTDIR}/usr/include/mozjs-/mozilla/
|
|
|
|
cp -p ${wrksrc}/mfbt/*.h ${PKGDESTDIR}/usr/include/mozjs-/mozilla/
|
|
|
|
}
|
|
|
|
|
|
|
|
mozjs38-devel_package() {
|
|
|
|
depends="nspr-devel ${sourcepkg}>=${version}_${revision}"
|
|
|
|
short_desc+=" - development files"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/bin/js-config
|
|
|
|
vmove usr/include
|
|
|
|
vmove usr/lib/pkgconfig
|
|
|
|
}
|
|
|
|
}
|