void-packages/srcpkgs/mozjs60/template

66 lines
2 KiB
Bash
Raw Normal View History

2018-09-03 15:28:35 +00:00
# Template file for 'mozjs60'
pkgname=mozjs60
reverts="60.2.2_1"
version=60.0.2
revision=6
2018-09-03 15:28:35 +00:00
wrksrc="firefox-${version}"
2018-09-08 15:39:27 +00:00
build_wrksrc=js/src
2018-09-03 15:28:35 +00:00
build_style=gnu-configure
hostmakedepends="perl python pkg-config automake autoconf213 autoconf-archive"
makedepends="icu-devel libffi-devel nspr-devel python-devel readline-devel zlib-devel"
short_desc="Mozilla JavaScript interpreter and library (60.x series)"
license="MPL-2.0"
maintainer="Rasmus Thomsen <cogitri@exherbo.org>"
homepage="https://www.mozilla.org/js/"
distfiles="${MOZILLA_SITE}/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz"
checksum=4c629edac14e15c41b04320b0f66a46f25537661324cdc0ed30dc0799d7708a0
2018-09-03 15:28:35 +00:00
patch_args="-Np1"
case "$XBPS_TARGET_MACHINE" in
mips*|armv[56]*) makedepends+=" libatomic-devel" ; LDFLAGS+=" -latomic" ;;
esac
do_configure() {
local _args
if [ "$CROSS_BUILD" ]; then
export HOST_CFLAGS="-Os"
export HOST_CXXFLAGS="-Os"
2018-09-08 15:39:27 +00:00
_args+=" --target=$XBPS_CROSS_TRIPLET --enable-linker=bfd"
2018-09-03 15:28:35 +00:00
fi
autoconf-2.13 old-configure.in > old-configure
2018-09-03 15:28:35 +00:00
touch ${wrksrc}/js/src/configure
touch ${wrksrc}/js/src/old-configure
2018-09-03 15:28:35 +00:00
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} \
2018-09-03 15:28:35 +00:00
${_args}
}
do_check() {
dist/bin/jsapi-tests
2018-09-03 15:28:35 +00:00
}
post_install() {
# temp fix for mozjs60 not installing headers into the right place
mkdir $DESTDIR/usr/include/mozjs-60
mv $DESTDIR/usr/include/{double-conversion,js,mozilla,*.h} $DESTDIR/usr/include/mozjs-60/
}
2018-09-03 15:28:35 +00:00
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
}
}