mozjs38: fix *-musl

Add flags for building with gcc6.3 taken from Arch Linux.
Also use system ffi and icu instead of the shipped versions.
This commit is contained in:
Jürgen Buchmüller 2017-04-14 11:06:41 +02:00
parent abfd639270
commit cc6594df8b

View file

@ -1,12 +1,12 @@
# Template file for 'mozjs38' # Template file for 'mozjs38'
pkgname=mozjs38 pkgname=mozjs38
version=38.8.0 version=38.8.0
revision=1 revision=2
wrksrc="mozilla-esr${version%.*.*}" wrksrc="mozilla-esr${version%.*.*}"
build_wrksrc="js/src" build_wrksrc="js/src"
build_style=gnu-configure build_style=gnu-configure
hostmakedepends="perl python" hostmakedepends="perl python pkg-config"
makedepends="nspr-devel zlib-devel" makedepends="icu-devel libffi-devel nspr-devel zlib-devel"
short_desc="Mozilla JavaScript interpreter and library (38.x series)" short_desc="Mozilla JavaScript interpreter and library (38.x series)"
homepage="http://www.mozilla.org/js/" homepage="http://www.mozilla.org/js/"
license="MPL-1.1, GPL-2, LGPL-2.1" license="MPL-1.1, GPL-2, LGPL-2.1"
@ -15,9 +15,11 @@ distfiles="https://ftp.mozilla.org/pub/firefox/releases/${version}esr/source/fir
checksum=9475adcee29d590383c4885bc5f958093791d1db4302d694a5d2766698f59982 checksum=9475adcee29d590383c4885bc5f958093791d1db4302d694a5d2766698f59982
nopie=yes nopie=yes
case "$XBPS_TARGET_MACHINE" in # Flags for gcc6.3 conceived by Arch Linux developers
x86_64-musl) broken="https://build.voidlinux.eu/builders/x86_64-musl_builder/builds/2009/steps/shell_3/logs/stdio";; CFLAGS="-fpermissive -fno-delete-null-pointer-checks -fno-tree-vrp -fno-strict-aliasing"
esac 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() { do_configure() {
local _args local _args
@ -29,7 +31,8 @@ do_configure() {
fi fi
SHELL=/bin/bash ./configure --prefix=/usr --enable-threadsafe \ SHELL=/bin/bash ./configure --prefix=/usr --enable-threadsafe \
--with-system-nspr ${_args} --enable-system-ffi --with-system-icu --with-system-nspr \
${_args}
} }
post_install() { post_install() {