aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mozjs38
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-10-11 15:35:29 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-10-11 15:35:29 +0000
commit1fa80cad00c2c2449252fba87dab64a03cd76ac8 (patch)
tree113f1f37ecf9e70eae80897f69a287f3ab0b6d43 /testing/mozjs38
parentfde93c49a55b265ca740d9081a4ca70f41656e4b (diff)
downloadaports-1fa80cad00c2c2449252fba87dab64a03cd76ac8.tar.bz2
aports-1fa80cad00c2c2449252fba87dab64a03cd76ac8.tar.xz
testing/mozjs38: rename
we should not have -[0-9] in pkgname
Diffstat (limited to 'testing/mozjs38')
-rw-r--r--testing/mozjs38/APKBUILD54
-rw-r--r--testing/mozjs38/copy-headers.patch20
-rw-r--r--testing/mozjs38/fix-fortify-system-wrappers.patch13
-rw-r--r--testing/mozjs38/gcc-alignment.patch122
-rw-r--r--testing/mozjs38/icu-add-bracket.patch16
-rw-r--r--testing/mozjs38/pkg-config-version.patch22
6 files changed, 247 insertions, 0 deletions
diff --git a/testing/mozjs38/APKBUILD b/testing/mozjs38/APKBUILD
new file mode 100644
index 0000000000..ed6fc39aaf
--- /dev/null
+++ b/testing/mozjs38/APKBUILD
@@ -0,0 +1,54 @@
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=mozjs38
+pkgver=38.8.0
+pkgrel=0
+pkgdesc="standalone mozilla javascript engine"
+url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/38"
+arch="all !armhf !armv7"
+license="LGPL"
+depends=""
+depends_dev="icu-dev nspr-dev libffi-dev readline-dev"
+makedepends="$depends_dev python2 perl sed"
+replaces="mozjs-38"
+install=""
+subpackages="$pkgname-dev $pkgname-dbg"
+source="https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.bz2
+ fix-fortify-system-wrappers.patch
+ copy-headers.patch
+ pkg-config-version.patch
+ icu-add-bracket.patch
+ gcc-alignment.patch"
+builddir="$srcdir/mozilla-esr38"
+_builddir="$builddir/js/src"
+options="!check"
+
+
+build() {
+ cd "$_builddir"
+ SHELL=/bin/ash PYTHON=/usr/bin/python ./configure --prefix=/usr \
+ --with-system-icu \
+ --with-system-nspr \
+ --enable-system-ffi \
+ --with-system-zlib \
+ --with-intl-api \
+ --enable-ctypes \
+ --enable-threadsafe \
+ --enable-shared-js \
+ --enable-gcgenerational \
+ --disable-optimize \
+ --enable-pie
+ make
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ rm -f "$pkgdir"/usr/lib/*.ajs
+}
+
+sha512sums="fcd2497a60176b8403a1793d1ad0a1c96a0a60217c2d4d7acd0506abf6810892bd51fd113d8f952f92b20032efc539a6b1233d8d124c2eb72d726b0935c04d65 firefox-38.8.0esr.source.tar.bz2
+a4f613ba4e977796fa024824940bbc1d3df549138612bfcdbb643753d54d4d5bfbf601a12f76312a87ecc7ec595ff34ddefb47c2cd1a6e31252c1fa3a263bdae fix-fortify-system-wrappers.patch
+22cc4e4595ddbd7ff037ce5f04755de4156d24921fa57161afbaa6494c795e30b6cfc08e8b999dbcce145c231cc6a3322334134e40f251f514b4688598a75f61 copy-headers.patch
+f3d87ffa7232e7242c4a1bf2762c2d1d4e190e72bd1c15fe223bce2480769bf577021ca799aab9570e3219144fcd9978e97cf8648f0cb7abe379bcabc9b03c4c pkg-config-version.patch
+658df4a957b2e11345dc3caf884d2063b4e492c58f002114d3c8d7b595731cde33d1ad43e02cc2eba4ec0e7a751c3c5bbbf0cacab6ca726f2a1158864b09af8c icu-add-bracket.patch
+fba936027456cc30f3fb17036634a1f572078f4d90b8410b9647b579004b5ca5053ad870d7eeb73f3cf3139832cc2b4949c3c4dc7c0f31b87d4066218a6a5965 gcc-alignment.patch"
diff --git a/testing/mozjs38/copy-headers.patch b/testing/mozjs38/copy-headers.patch
new file mode 100644
index 0000000000..7f352a795c
--- /dev/null
+++ b/testing/mozjs38/copy-headers.patch
@@ -0,0 +1,20 @@
+Description: Copy headers on install instead of symlinking
+Author: Rico Tzschichholz <ricotz@ubuntu.com>
+Forwarded: no
+Last-Update: 2014-10-29
+
+---
+
+Index: b/python/mozbuild/mozbuild/backend/recursivemake.py
+===================================================================
+--- a/python/mozbuild/mozbuild/backend/recursivemake.py
++++ b/python/mozbuild/mozbuild/backend/recursivemake.py
+@@ -796,7 +796,7 @@
+ return
+
+ for source, dest, _ in self._walk_hierarchy(obj, exports):
+- self._install_manifests['dist_include'].add_symlink(source, dest)
++ self._install_manifests['dist_include'].add_copy(source, dest)
+
+ if not os.path.exists(source):
+ raise Exception('File listed in EXPORTS does not exist: %s' % source)
diff --git a/testing/mozjs38/fix-fortify-system-wrappers.patch b/testing/mozjs38/fix-fortify-system-wrappers.patch
new file mode 100644
index 0000000000..f020a2f408
--- /dev/null
+++ b/testing/mozjs38/fix-fortify-system-wrappers.patch
@@ -0,0 +1,13 @@
+The wrapper features.h gets pulled in by system headers causing thigns to
+break. We work around it by simply not wrap features.h
+
+--- a/config/system-headers.orig
++++ b/config/system-headers
+@@ -422,7 +422,6 @@
+ extras.h
+ fabdef.h
+ fcntl.h
+-features.h
+ fibdef.h
+ File.h
+ filehdr.h
diff --git a/testing/mozjs38/gcc-alignment.patch b/testing/mozjs38/gcc-alignment.patch
new file mode 100644
index 0000000000..a3a57d5447
--- /dev/null
+++ b/testing/mozjs38/gcc-alignment.patch
@@ -0,0 +1,122 @@
+--- a/js/src/jit/RegisterSets.h 2017-02-10 17:33:06.210702431 -0800
++++ b/js/src/jit/RegisterSets.h 2017-02-10 17:43:52.877514146 -0800
+@@ -7,7 +7,6 @@
+ #ifndef jit_RegisterSets_h
+ #define jit_RegisterSets_h
+
+-#include "mozilla/Alignment.h"
+ #include "mozilla/MathAlgorithms.h"
+
+ #include "jit/JitAllocPolicy.h"
+@@ -26,8 +25,8 @@
+ Code code_;
+
+ public:
+- AnyRegister()
+- { }
++ AnyRegister() = default;
++
+ explicit AnyRegister(Register gpr) {
+ code_ = gpr.code();
+ }
+@@ -156,7 +155,7 @@
+ }
+ #endif
+
+- ValueOperand() {}
++ ValueOperand() = default;
+ };
+
+ // Registers to hold either either a typed or untyped value.
+@@ -165,46 +164,25 @@
+ // Type of value being stored.
+ MIRType type_;
+
+- // Space to hold either an AnyRegister or a ValueOperand.
+ union U {
+- mozilla::AlignedStorage2<AnyRegister> typed;
+- mozilla::AlignedStorage2<ValueOperand> value;
++ AnyRegister typed;
++ ValueOperand value;
+ } data;
+
+- AnyRegister& dataTyped() {
+- MOZ_ASSERT(hasTyped());
+- return *data.typed.addr();
+- }
+- ValueOperand& dataValue() {
+- MOZ_ASSERT(hasValue());
+- return *data.value.addr();
+- }
+-
+- AnyRegister dataTyped() const {
+- MOZ_ASSERT(hasTyped());
+- return *data.typed.addr();
+- }
+- const ValueOperand& dataValue() const {
+- MOZ_ASSERT(hasValue());
+- return *data.value.addr();
+- }
+-
+ public:
+
+- TypedOrValueRegister()
+- : type_(MIRType_None)
+- {}
++ TypedOrValueRegister() = default;
+
+ TypedOrValueRegister(MIRType type, AnyRegister reg)
+ : type_(type)
+ {
+- dataTyped() = reg;
++ data.typed = reg;
+ }
+
+ MOZ_IMPLICIT TypedOrValueRegister(ValueOperand value)
+ : type_(MIRType_Value)
+ {
+- dataValue() = value;
++ data.value = value;
+ }
+
+ MIRType type() const {
+@@ -220,11 +198,13 @@
+ }
+
+ AnyRegister typedReg() const {
+- return dataTyped();
++ MOZ_ASSERT(hasTyped());
++ return data.typed;
+ }
+
+ ValueOperand valueReg() const {
+- return dataValue();
++ MOZ_ASSERT(hasValue());
++ return data.value;
+ }
+
+ AnyRegister scratchReg() {
+@@ -240,19 +220,18 @@
+ // Whether a constant value is being stored.
+ bool constant_;
+
+- // Space to hold either a Value or a TypedOrValueRegister.
+ union U {
+- mozilla::AlignedStorage2<Value> constant;
+- mozilla::AlignedStorage2<TypedOrValueRegister> reg;
++ Value constant;
++ TypedOrValueRegister reg;
+ } data;
+
+ Value& dataValue() {
+ MOZ_ASSERT(constant());
+- return *data.constant.addr();
++ return data.constant;
+ }
+ TypedOrValueRegister& dataReg() {
+ MOZ_ASSERT(!constant());
+- return *data.reg.addr();
++ return data.reg;
+ }
+
+ public:
diff --git a/testing/mozjs38/icu-add-bracket.patch b/testing/mozjs38/icu-add-bracket.patch
new file mode 100644
index 0000000000..873697d18f
--- /dev/null
+++ b/testing/mozjs38/icu-add-bracket.patch
@@ -0,0 +1,16 @@
+Add bracket for sed 4.3 compliance
+
+Based on upstream fix by Daniel Stenberg in 09 jan 2017
+See: https://hg.mozilla.org/mozilla-central/rev/ebcbf47a83e7
+
+--- a/js/src/configure 2017-02-21 16:56:42.350105741 -0300
++++ b/js/src/configure 2017-02-21 17:33:13.183493978 -0300
+@@ -15231,7 +15231,7 @@
+ fi
+ fi
+
+- version=`sed -n 's/^[:space:]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"`
++ version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"`
+ if test x"$version" = x; then
+ { echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&2; echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&5; exit 1; }
+ fi
diff --git a/testing/mozjs38/pkg-config-version.patch b/testing/mozjs38/pkg-config-version.patch
new file mode 100644
index 0000000000..34a43d1f6d
--- /dev/null
+++ b/testing/mozjs38/pkg-config-version.patch
@@ -0,0 +1,22 @@
+Add major version to pkg-config filename.
+Author: Rico Tzschichholz <ricotz@ubuntu.com>
+Forwarded: no
+Last-Update: 2015-05-04
+
+Index: b/js/src/Makefile.in
+===================================================================
+--- a/js/src/Makefile.in
++++ b/js/src/Makefile.in
+@@ -214,10 +214,10 @@
+ $(JS_CONFIG_NAME): js-config
+ cp $^ $@
+
+-$(LIBRARY_NAME).pc: js.pc
++$(JS_LIBRARY_NAME).pc: js.pc
+ cp $^ $@
+
+-install:: $(LIBRARY_NAME).pc
++install:: $(JS_LIBRARY_NAME).pc
+ $(SYSINSTALL) $^ $(DESTDIR)$(libdir)/pkgconfig
+
+ install:: js-config.h