PKGBUILDs/community/js185/PKGBUILD

91 lines
3.1 KiB
Bash
Raw Normal View History

2018-01-11 19:50:44 +00:00
# Maintainer: Bruno Pagani <archange@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
2013-04-23 00:04:46 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - patch to fix mozilla stupidity
2014-02-05 22:25:55 +00:00
# - patch to fix mozilla stupidity
2019-01-07 01:31:34 +00:00
# - patch for AArch64
2013-04-23 00:04:46 +00:00
pkgname=js185
pkgver=1.0.0
2019-01-06 23:40:49 +00:00
pkgrel=7
2013-04-23 00:04:46 +00:00
pkgdesc="JavaScript interpreter and libraries (legacy)"
2018-01-11 19:50:44 +00:00
arch=(x86_64)
2015-12-10 05:08:54 +00:00
url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/1.8.5"
2013-04-23 00:04:46 +00:00
license=(MPL)
2018-01-11 19:50:44 +00:00
depends=(nspr libffi)
2013-04-23 00:04:46 +00:00
makedepends=(python2 zip)
2018-01-11 19:50:44 +00:00
source=("https://ftp.mozilla.org/pub/mozilla.org/js/${pkgname}-${pkgver}.tar.gz"
2019-01-01 15:16:12 +00:00
'fix-gcc6.patch'
'fix-install-symlinks.patch'
'system-libffi-autoconf.patch'
2018-01-11 19:50:44 +00:00
'allow-to-build-against-system-libffi.patch'
2019-01-06 23:40:49 +00:00
'apache-couchdb-mozjs-tag.patch'
2015-07-19 05:07:00 +00:00
ihatemozilla.patch no-neon.patch
2019-01-07 01:31:34 +00:00
Bug-638056-Avoid-The-cacheFlush-support-is-missing-o.patch)
2018-01-11 19:50:44 +00:00
sha256sums=('5d12f7e1f5b4a99436685d97b9b7b75f094d33580227aa998c406bbae6f2a687'
2019-01-01 15:16:12 +00:00
'7d252ea688f3011360c3a370820e1a00c85ae785cdad37c6655d0d5ef996fb76'
'b738dc60b6f9c4697aede30ca09a87ac0d5895fe5da6c9f277295531cbe8c215'
2018-01-11 19:50:44 +00:00
'524e11a66f0931dc1affcfcf47a87e086b6006ee9b747e2c7caae82334d6ba6b'
'eea3f80f72cfde52745fbb24b9d3a3506dd2cdbb08fe53a529d7c9a14f0381a6'
2019-01-06 23:40:49 +00:00
'669b2e87f962ef554ab8e7940d1dbf4e0e437b96ed3001a3b9ef124492a686d0'
2018-01-11 19:50:44 +00:00
'40d3f2778ff111bf75c736018a25c5d5cf02585a1981430d18dd2ec030414771'
'99bc474f881950c3d65b09d7a912115cc209d7fbfb4223a819b75d393bd49586'
2019-01-07 01:31:34 +00:00
'2f3fdaa47825835d3b54453c0cfb201f15aee2d12631a244106243d2ff5594e5')
2017-11-22 01:29:27 +00:00
prepare() {
2018-01-11 19:50:44 +00:00
find . -name config.sub -exec chmod +w {} \; -exec cp /usr/share/libtool/build-aux/config.sub {} \;
find . -name config.guess -exec chmod +w {} \; -exec cp /usr/share/libtool/build-aux/config.guess {} \;
cd js-1.8.5
2019-01-01 15:16:12 +00:00
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811665
patch -p1 -i ../fix-gcc6.patch
# https://bugzilla.mozilla.org/show_bug.cgi?id=628723
patch -p1 -i ../fix-install-symlinks.patch
patch -p1 -i ../system-libffi-autoconf.patch
2018-01-11 19:50:44 +00:00
patch -p1 -i ../allow-to-build-against-system-libffi.patch
2019-01-06 23:40:49 +00:00
patch -p1 -i ../apache-couchdb-mozjs-tag.patch
2017-11-22 01:29:27 +00:00
2018-01-11 19:50:44 +00:00
patch -p1 -i ../ihatemozilla.patch
patch -p1 -i ../no-neon.patch
2017-11-22 01:29:27 +00:00
if [[ $CARCH == "aarch64" ]]; then
2018-01-11 19:50:44 +00:00
patch -p1 -i ../Bug-638056-Avoid-The-cacheFlush-support-is-missing-o.patch
2017-11-22 01:29:27 +00:00
fi
}
2013-04-23 00:04:46 +00:00
build() {
cd js-1.8.5/js/src
2019-01-01 15:16:12 +00:00
# _FORTIFY_SOURCE causes the following configure error:
# checking for the alignment of void*... configure: error: No alignment found for void*
2013-04-23 00:04:46 +00:00
unset CPPFLAGS
2018-01-11 19:50:44 +00:00
./configure \
--prefix=/usr \
--with-system-nspr \
--disable-tests \
2019-01-01 15:16:12 +00:00
--disable-optimize \
--disable-profile-guided-optimization \
2019-01-06 23:40:49 +00:00
--disable-methodjit \
2018-01-11 19:50:44 +00:00
--enable-ctypes \
2019-01-01 15:16:12 +00:00
--enable-jemalloc \
--enable-readline \
2018-01-11 19:50:44 +00:00
--enable-threadsafe \
--enable-system-ffi
2013-04-23 00:04:46 +00:00
make
}
package() {
cd js-1.8.5/js/src
2018-01-11 19:50:44 +00:00
make DESTDIR="${pkgdir}" install
install -Dm755 shell/js -t "${pkgdir}"/usr/bin/
find "${pkgdir}"/usr/{lib/pkgconfig,include} -type f -exec chmod -x {} +
# Remove static lib (!staticlibs does not work because name do not match)
rm "${pkgdir}"/usr/lib/libmozjs185-1.0.a
2013-04-23 00:04:46 +00:00
}