69 lines
2.1 KiB
Bash
69 lines
2.1 KiB
Bash
# Template file for 'mozjs60'
|
|
pkgname=mozjs60
|
|
version=60.8.0
|
|
revision=3
|
|
wrksrc="firefox-${version}"
|
|
build_wrksrc=js/src
|
|
build_style=gnu-configure
|
|
hostmakedepends="perl python pkg-config automake autoconf213 autoconf-archive
|
|
which"
|
|
makedepends="icu-devel libffi-devel nspr-devel python-devel readline-devel zlib-devel"
|
|
depends="nspr>=4.19"
|
|
short_desc="Mozilla JavaScript interpreter and library (60.x series)"
|
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
|
license="MPL-2.0"
|
|
homepage="https://www.mozilla.org/js/"
|
|
distfiles="${MOZILLA_SITE}/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz"
|
|
checksum=c13387d944e635aebd5f1d2ce9ab77cb706a74043a240cbb7b70654519487fbe
|
|
patch_args="-Np1"
|
|
CXXFLAGS="-Wno-class-memaccess"
|
|
LDFLAGS+=" -Wl,-z,stack-size=1048576"
|
|
|
|
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
|
makedepends+=" libatomic-devel"
|
|
LDFLAGS+=" -latomic"
|
|
fi
|
|
|
|
do_configure() {
|
|
local _args
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
export HOST_CFLAGS="-Os"
|
|
export HOST_CXXFLAGS="-Os"
|
|
_args+=" --target=$XBPS_CROSS_TRIPLET --enable-linker=bfd"
|
|
fi
|
|
|
|
autoconf-2.13 old-configure.in > old-configure
|
|
|
|
touch ${wrksrc}/js/src/configure
|
|
touch ${wrksrc}/js/src/old-configure
|
|
SHELL=/bin/bash PYTHON=/usr/bin/python2 ./configure --prefix=/usr \
|
|
--disable-jemalloc --disable-optimize --enable-ctypes --enable-pie \
|
|
--enable-readline --enable-shared-js --enable-system-ffi \
|
|
--enable-tests --with-intl-api --with-system-icu \
|
|
--with-system-nspr --with-system-zlib --target=${XBPS_TRIPLET} \
|
|
--host=${XBPS_TRIPLET} \
|
|
${_args}
|
|
}
|
|
|
|
do_check() {
|
|
dist/bin/jsapi-tests
|
|
}
|
|
|
|
post_install() {
|
|
# Fix the '-include' directive, otherwise it tries to use the hosts' header
|
|
vsed 's|^Cflags:.*|Cflags: -include ${pc_sysrootdir}/${includedir}/mozjs-60/js/RequiredDefines.h -I${includedir}/mozjs-60|' \
|
|
-i ${DESTDIR}/usr/lib/pkgconfig/mozjs-60.pc
|
|
}
|
|
|
|
mozjs60-devel_package() {
|
|
depends="nspr-devel ${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/bin/js60-config
|
|
vmove usr/include
|
|
vmove "usr/lib/*.so"
|
|
vmove "usr/lib/*.ajs"
|
|
vmove usr/lib/pkgconfig
|
|
}
|
|
}
|