PKGBUILDs/extra/js52/PKGBUILD

99 lines
2.6 KiB
Bash
Raw Normal View History

2019-01-13 13:55:03 +00:00
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
2017-12-08 01:56:00 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - remove --enable-gold
pkgname=js52
2018-06-28 06:05:26 +00:00
pkgver=52.9.0
2019-06-20 23:10:02 +00:00
pkgrel=3
pkgdesc="JavaScript interpreter and libraries - Version 52"
2017-12-08 01:56:00 +00:00
arch=(x86_64)
url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
license=(MPL)
depends=(gcc-libs readline zlib sh)
2019-06-20 23:10:02 +00:00
makedepends=(python2 zip autoconf2.13)
_relver=${pkgver}esr
source=(https://archive.mozilla.org/pub/firefox/releases/$_relver/source/firefox-$_relver.source.tar.xz
2017-12-08 01:56:00 +00:00
mozjs52-copy-headers.patch
mozjs52-disable-mozglue.patch
mozjs52-fix-soname.patch
2019-06-20 23:10:02 +00:00
no-error.diff)
sha256sums=('c01d09658c53c1b3a496e353a24dad03b26b81d3b1d099abc26a06f81c199dd6'
2017-12-08 01:56:00 +00:00
'c5b3a88e4d10ef149aba6fc48d431db54ff266323fa22a5d549028fd794423cc'
'5a84f02521f37de873991dd360a4c4bfdbdd2fb4a218e11be73f9cbbf02050e8'
2018-05-04 18:50:30 +00:00
'728456fd9e66b69d6e0688c75e50091dc56735004ecf5f649212a83fe3087df1'
2019-06-20 23:10:02 +00:00
'4c5a1662e36c6a5a11db0263bb264d104ff801789d5b6bc6a6104439457afb90')
2017-12-08 01:56:00 +00:00
prepare() {
2019-06-20 23:10:02 +00:00
cd firefox-$_relver
2019-01-13 13:55:03 +00:00
mkdir obj
2017-12-08 01:56:00 +00:00
2019-01-13 13:55:03 +00:00
# https://salsa.debian.org/gnome-team/mozjs52/tree/debian/master/debian/patches
2017-12-08 01:56:00 +00:00
patch -Np1 -i ../mozjs52-fix-soname.patch
patch -Np1 -i ../mozjs52-copy-headers.patch
patch -Np1 -i ../mozjs52-disable-mozglue.patch
2019-06-20 23:10:02 +00:00
# New errors in test code as of GCC 9
patch -Np1 -i ../no-error.diff
2017-12-08 01:56:00 +00:00
}
build() {
2019-01-13 13:55:03 +00:00
local configure_args=(
--prefix=/usr
--disable-debug
--disable-debug-symbols
--disable-strip
--enable-optimize="-O2"
--enable-pie
--enable-posix-nspr-emulation
--enable-readline
--enable-release
--enable-shared-js
--enable-tests
--with-intl-api
--with-system-zlib
--without-system-icu
2019-06-20 23:10:02 +00:00
) flags=(
-fno-delete-null-pointer-checks
-fno-strict-aliasing
-fno-tree-vrp
2019-01-13 13:55:03 +00:00
)
2019-06-20 23:10:02 +00:00
cd firefox-$_relver/obj
2019-01-13 13:55:03 +00:00
2017-12-08 01:56:00 +00:00
unset CPPFLAGS
2019-06-20 23:10:02 +00:00
CFLAGS+=" ${flags[*]}"
CXXFLAGS+=" ${flags[*]}"
2017-12-08 01:56:00 +00:00
export CC=gcc CXX=g++ PYTHON=/usr/bin/python2
2019-01-13 13:55:03 +00:00
sh ../js/src/configure "${configure_args[@]}"
2017-12-08 01:56:00 +00:00
make
}
check() {
2019-01-13 13:55:03 +00:00
local jstests_extra_args=(
--format=none
--exclude-random
) jittest_extra_args=(
--format=none
--timeout 300
) jittest_test_args=(
basic
)
2019-06-20 23:10:02 +00:00
cd firefox-$_relver/obj
2019-01-13 13:55:03 +00:00
make -C js/src check-jstests check-jit-test \
JSTESTS_EXTRA_ARGS="${jstests_extra_args[*]}" \
JITTEST_EXTRA_ARGS="${jittest_extra_args[*]}" \
JITTEST_TEST_ARGS="${jittest_test_args[*]}"
2017-12-08 01:56:00 +00:00
}
package() {
2019-06-20 23:10:02 +00:00
cd firefox-$_relver/obj
2017-12-08 01:56:00 +00:00
make DESTDIR="$pkgdir" install
rm "$pkgdir"/usr/lib/*.ajs
find "$pkgdir"/usr/{lib/pkgconfig,include} -type f -exec chmod -c a-x {} +
}
# vim:set ts=2 sw=2 et: