2020-08-16 06:23:04 +02:00
|
|
|
# Template file for 'mozjs78'
|
|
|
|
pkgname=mozjs78
|
|
|
|
version=78.2.0
|
|
|
|
revision=1
|
|
|
|
wrksrc="firefox-${version}"
|
|
|
|
build_wrksrc=js/src
|
|
|
|
build_style=gnu-configure
|
2020-09-18 00:11:10 +02:00
|
|
|
build_helper=rust
|
2020-08-16 06:23:04 +02:00
|
|
|
hostmakedepends="perl python pkg-config automake autoconf213 autoconf-archive
|
|
|
|
cargo rust llvm clang which python3"
|
|
|
|
makedepends="icu-devel libffi-devel nspr-devel python-devel readline-devel
|
|
|
|
zlib-devel python3-devel rust-std"
|
|
|
|
depends="nspr>=4.19"
|
|
|
|
short_desc="Mozilla JavaScript interpreter and library (78.x series)"
|
|
|
|
maintainer="q66 <daniel@octaforge.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=965ccfcbb8c0aa97639911997c54be0fcf896fd388b03138952089af675ea918
|
|
|
|
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
|
|
|
|
# use gcc as assembler to avoid errors
|
|
|
|
unset AS
|
|
|
|
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
export HOST_CC=cc
|
|
|
|
export TARGET_CC="${CC}"
|
|
|
|
export HOST_CFLAGS="-Os"
|
|
|
|
export HOST_CXXFLAGS="-Os"
|
2020-09-18 00:11:10 +02:00
|
|
|
_args+=" --target=${XBPS_CROSS_TRIPLET} --enable-linker=bfd"
|
|
|
|
else
|
|
|
|
_args+=" --target=${XBPS_TRIPLET}"
|
2020-08-16 06:23:04 +02:00
|
|
|
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-readline --enable-shared-js --enable-system-ffi \
|
|
|
|
--enable-tests --with-intl-api --with-system-icu --with-system-nspr \
|
|
|
|
--enable-hardening --enable-release --with-system-zlib \
|
2020-09-18 00:11:10 +02:00
|
|
|
--host=${XBPS_TRIPLET} ${_args}
|
2020-08-16 06:23:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_check() {
|
|
|
|
dist/bin/jsapi-tests --format=none --exclude-random basic
|
|
|
|
}
|
|
|
|
|
|
|
|
post_install() {
|
|
|
|
# Remove unneeded static library
|
|
|
|
rm -f "${DESTDIR}"/usr/lib/*.ajs
|
|
|
|
}
|
|
|
|
|
|
|
|
mozjs78-devel_package() {
|
|
|
|
depends="nspr-devel ${sourcepkg}>=${version}_${revision}"
|
|
|
|
short_desc+=" - development files"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/bin/js78-config
|
|
|
|
vmove usr/include
|
|
|
|
vmove "usr/lib/*.so"
|
|
|
|
vmove usr/lib/pkgconfig
|
|
|
|
}
|
|
|
|
}
|