void-packages/srcpkgs/mozjs38/template
Alessio Sergi ac1927d2cc mozjs38: fix multiple issues
Fix malformed library name and include directory to contain the major
version (libmozjs-38.so and /usr/include/mozjs-38).

Add major version to js shell, js-config and pkg-config files.

Patches from Debian.

Fix conflict with js-1.8.5.
2017-07-19 13:34:30 +02:00

47 lines
1.5 KiB
Bash

# Template file for 'mozjs38'
pkgname=mozjs38
version=38.8.0
revision=4
wrksrc="mozilla-esr${version%.*.*}"
build_wrksrc="js/src"
build_style=gnu-configure
hostmakedepends="perl python pkg-config"
makedepends="icu-devel libffi-devel nspr-devel zlib-devel"
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="${MOZILLA_SITE}/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.bz2"
checksum=9475adcee29d590383c4885bc5f958093791d1db4302d694a5d2766698f59982
patch_args="-Np1"
nopie=yes
# 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"
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 PYTHON=/usr/bin/python2 ./configure --prefix=/usr \
--enable-threadsafe --enable-system-ffi --with-system-zlib \
--with-system-icu --with-system-nspr ${_args}
}
mozjs38-devel_package() {
depends="nspr-devel ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/bin/js38-config
vmove usr/include
vmove usr/lib/pkgconfig
}
}