1 # Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
6 pkgdesc="JavaScript interpreter and libraries - Version 52"
8 url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
10 depends=(gcc-libs readline zlib sh)
11 makedepends=(python2 zip autoconf2.13)
13 source=(https://archive.mozilla.org/pub/firefox/releases/$_relver/source/firefox-$_relver.source.tar.xz
14 mozjs52-copy-headers.patch
15 mozjs52-disable-mozglue.patch
16 mozjs52-disable-wformat.patch)
17 sha256sums=('c01d09658c53c1b3a496e353a24dad03b26b81d3b1d099abc26a06f81c199dd6'
18 'c5b3a88e4d10ef149aba6fc48d431db54ff266323fa22a5d549028fd794423cc'
19 '5a84f02521f37de873991dd360a4c4bfdbdd2fb4a218e11be73f9cbbf02050e8'
20 '4c5a1662e36c6a5a11db0263bb264d104ff801789d5b6bc6a6104439457afb90')
22 # Make sure the duplication between bin and lib is found
29 # https://salsa.debian.org/gnome-team/mozjs52/tree/debian/master/debian/patches
30 patch -Np1 -i ../mozjs52-copy-headers.patch
31 patch -Np1 -i ../mozjs52-disable-mozglue.patch
33 # New errors in test code as of GCC 9
34 patch -Np1 -i ../mozjs52-disable-wformat.patch
38 local configure_args=(
41 --disable-debug-symbols
45 --enable-optimize="-O2"
47 --enable-posix-nspr-emulation
56 -fno-delete-null-pointer-checks
61 cd firefox-$_relver/obj
64 CFLAGS+=" ${flags[*]}"
65 CXXFLAGS+=" ${flags[*]}"
66 export CC=gcc CXX=g++ PYTHON=/usr/bin/python2
68 sh ../js/src/configure "${configure_args[@]}"
73 local jstests_extra_args=(
76 ) jittest_extra_args=(
83 cd firefox-$_relver/obj
84 make -C js/src check-jstests check-jit-test \
85 JSTESTS_EXTRA_ARGS="${jstests_extra_args[*]}" \
86 JITTEST_EXTRA_ARGS="${jittest_extra_args[*]}" \
87 JITTEST_TEST_ARGS="${jittest_test_args[*]}"
91 cd firefox-$_relver/obj
92 make DESTDIR="$pkgdir" install
93 rm "$pkgdir"/usr/lib/*.ajs
94 find "$pkgdir"/usr/{lib/pkgconfig,include} -type f -exec chmod -c a-x {} +
97 # vim:set ts=2 sw=2 et: