mozjs17: cross build support.

This commit is contained in:
Juan RP 2014-01-23 23:27:17 +01:00
parent 12aa282125
commit 7dc1c80453

View file

@ -1,11 +1,10 @@
# Template file for 'mozjs17' # Template file for 'mozjs17'
pkgname=mozjs17 pkgname=mozjs17
version=17.0.0 version=17.0.0
revision=1 revision=2
wrksrc="mozjs${version}" wrksrc="mozjs${version}"
build_wrksrc="js/src" build_wrksrc="js/src"
build_style=gnu-configure build_style=gnu-configure
configure_args="--with-system-nspr --enable-threadsafe"
hostmakedepends="zip python perl" hostmakedepends="zip python perl"
makedepends="zlib-devel nspr-devel libedit-devel libffi-devel" makedepends="zlib-devel nspr-devel libedit-devel libffi-devel"
short_desc="Mozilla JavaScript interpreter and library" short_desc="Mozilla JavaScript interpreter and library"
@ -14,14 +13,25 @@ license="MPL-1.1, GPL-2, LGPL-2.1"
maintainer="Juan RP <xtraeme@gmail.com>" maintainer="Juan RP <xtraeme@gmail.com>"
distfiles="${MOZILLA_SITE}/js/mozjs${version}.tar.gz" distfiles="${MOZILLA_SITE}/js/mozjs${version}.tar.gz"
checksum=321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c172fba checksum=321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c172fba
long_desc="
JavaScript is the Netscape-developed object scripting language used in millions do_configure() {
of web pages and server applications worldwide. Netscape's JavaScript is a local _args
superset of the ECMA-262 Edition 3 (ECMAScript) standard scripting language,
with only mild differences from the published standard." if [ "$CROSS_BUILD" ]; then
export HOST_CFLAGS="-Os"
export HOST_CXXFLAGS="-Os"
_args+=" --target=$XBPS_CROSS_TRIPLET"
fi
./configure --prefix=/usr --with-system-nspr \
--with-nspr-prefix=${XBPS_CROSS_BASE}/usr \
--enable-threadsafe ${_args}
sed -e 's,-L/usr/lib,,g' -i config/autoconf.mk
}
mozjs17-devel_package() { mozjs17-devel_package() {
depends="nspr-devel ${sourcepkg}>=${version}" depends="nspr-devel ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files" short_desc+=" - development files"
pkg_install() { pkg_install() {
vmove usr/bin/js17-config vmove usr/bin/js17-config