aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2019-04-27 09:55:40 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-05-04 17:12:57 +0000
commit257168624752e0b5ca396b9776a89e8a03db50a3 (patch)
treed37e8cdfe3e2c923a25be2098d7bed40ff47f827 /main
parent8b28bdf5b6adfb470f70b5c403f7798269b248ea (diff)
downloadaports-257168624752e0b5ca396b9776a89e8a03db50a3.tar.bz2
aports-257168624752e0b5ca396b9776a89e8a03db50a3.tar.xz
mozjs60: move to main, polkit needs it
Diffstat (limited to 'main')
-rw-r--r--main/mozjs60/0001-silence-sandbox-violations.patch30
-rw-r--r--main/mozjs60/APKBUILD68
-rw-r--r--main/mozjs60/fix-musl-build.patch16
-rw-r--r--main/mozjs60/fix-soname-lib.patch30
4 files changed, 144 insertions, 0 deletions
diff --git a/main/mozjs60/0001-silence-sandbox-violations.patch b/main/mozjs60/0001-silence-sandbox-violations.patch
new file mode 100644
index 0000000000..9182026718
--- /dev/null
+++ b/main/mozjs60/0001-silence-sandbox-violations.patch
@@ -0,0 +1,30 @@
+Upstream: no
+From 9ad10569e11a2fb96377188f895bc66abcc9511d Mon Sep 17 00:00:00 2001
+From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
+Date: Wed, 5 Sep 2018 15:05:24 +0200
+Subject: [PATCH] silence sandbox violations
+
+Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
+---
+ python/mozbuild/mozbuild/frontend/emitter.py | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py
+index 642b381c0..c37fbf5d0 100644
+--- a/python/mozbuild/mozbuild/frontend/emitter.py
++++ b/python/mozbuild/mozbuild/frontend/emitter.py
+@@ -1127,11 +1127,6 @@ class TreeMetadataEmitter(LoggingMixin):
+ raise SandboxValidationError('Path specified in LOCAL_INCLUDES '
+ 'does not exist: %s (resolved to %s)' % (local_include,
+ full_path), context)
+- if (full_path == context.config.topsrcdir or
+- full_path == context.config.topobjdir):
+- raise SandboxValidationError('Path specified in LOCAL_INCLUDES '
+- 'is not allowed: %s (resolved to %s)' % (local_include,
+- full_path), context)
+ include_obj = LocalInclude(context, local_include)
+ local_includes.append(include_obj.path.full_path)
+ yield include_obj
+--
+2.18.0
+
diff --git a/main/mozjs60/APKBUILD b/main/mozjs60/APKBUILD
new file mode 100644
index 0000000000..8ca9c33996
--- /dev/null
+++ b/main/mozjs60/APKBUILD
@@ -0,0 +1,68 @@
+# Maintainer:
+pkgname=mozjs60
+pkgver=60.0.2
+_majver=${pkgver%%.*}
+pkgrel=4
+pkgdesc="standalone mozilla javascript engine"
+url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/38"
+arch="all !armhf !armv7 !s390x"
+license="LGPL"
+depends=""
+depends_dev="icu-dev nspr-dev libffi-dev readline-dev"
+makedepends="$depends_dev zlib-dev python2 perl sed autoconf2.13 linux-headers"
+subpackages="$pkgname-dev"
+source="https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz
+ 0001-silence-sandbox-violations.patch
+ add-exposeToActiveJS.patch
+ fix-musl-build.patch
+ fix-soname-lib.patch
+ "
+builddir="$srcdir"/firefox-$pkgver
+_builddir="$builddir/js/src"
+
+build() {
+ cd "$_builddir"
+
+ # avoid complains about autoconf
+ touch configure
+
+ export SHELL=/bin/ash
+ PYTHON=/usr/bin/python2 ./configure --prefix=/usr \
+ --with-system-icu \
+ --with-system-nspr \
+ --with-system-zlib \
+ --with-intl-api \
+ --enable-ctypes \
+ --enable-shared-js \
+ --enable-readline \
+ --enable-system-ffi \
+ --disable-optimize \
+ --disable-jemalloc \
+ --enable-pie
+ make
+}
+
+check() {
+ cd "$_builddir"
+ dist/bin/jsapi-tests
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ rm -f "$pkgdir"/usr/lib/*.ajs
+
+ # temp fix for mozjs60 not installing headers into the right place
+ mkdir -p "$pkgdir"/usr/include/mozjs-$_majver
+ mv "$pkgdir"/usr/include/double-conversion \
+ "$pkgdir"/usr/include/js \
+ "$pkgdir"/usr/include/mozilla \
+ "$pkgdir"/usr/include/*.h \
+ "$pkgdir"/usr/include/mozjs-$_majver/
+}
+
+sha512sums="c147517e37ecb6340dab29f4bcbaeb18450eda0fbd2bdfda1ab0c160de9ad33572113866c1ed4feba6a77bec432a2e02fb5cbcceb73e4a45ceef308f04d2b836 firefox-60.0.2esr.source.tar.xz
+adaacd6e087a07bd4ded598f6a66ee00c67c9092bb93d88729668516f6f00f497ad8ece1866680e6c371e4705e0f9194ade41ea3a986f793bd972c92029cf03a 0001-silence-sandbox-violations.patch
+7ad9dbd07a74673d0f531c1cf1aad05a169126321007ea231b3a9f090e018e681da0d16a33d662245fd0bb10e8feb2a4a282683d6e9a2307d70fdcfb2a321387 add-exposeToActiveJS.patch
+bc91c2fb15eb22acb8acc36d086fb18fbf6f202b4511d138769b5ecaaed4a673349c55f808270c762616fafa42e3b01e74dc0af1dcbeea1289e043926e2750c8 fix-musl-build.patch
+4782794a0f409f767293fb5f61a9ad58985e05197538975ed8f7372bfae6921a3b9bcbbbfcf8ce2843cdfe8ee799d08cee71a6391ed5ae939f051d13038b0960 fix-soname-lib.patch"
diff --git a/main/mozjs60/fix-musl-build.patch b/main/mozjs60/fix-musl-build.patch
new file mode 100644
index 0000000000..af39467399
--- /dev/null
+++ b/main/mozjs60/fix-musl-build.patch
@@ -0,0 +1,16 @@
+Upstream: No
+Reason: mozjs60 miscompiles on musl if built with HAVE_THREAD_TLS_KEYWORD:
+https://github.com/void-linux/void-packages/issues/2598
+diff --git a/js/src/old-configure.in b/js/src/old-configure.in
+--- a/js/src/old-configure.in
++++ b/js/src/old-configure.in
+@@ -1272,6 +1272,9 @@
+ *-android*|*-linuxandroid*)
+ :
+ ;;
++ *-musl*)
++ :
++ ;;
+ *)
+ AC_DEFINE(HAVE_THREAD_TLS_KEYWORD)
+ ;;
diff --git a/main/mozjs60/fix-soname-lib.patch b/main/mozjs60/fix-soname-lib.patch
new file mode 100644
index 0000000000..b9147fa20c
--- /dev/null
+++ b/main/mozjs60/fix-soname-lib.patch
@@ -0,0 +1,30 @@
+Source: Arch Linux
+Upstream: Unknown
+Reason: fixes linking against libmozjs-60
+
+diff --git i/js/src/build/Makefile.in w/js/src/build/Makefile.in
+index ee19104e0ef5..a0f06fd35a18 100644
+--- i/js/src/build/Makefile.in
++++ w/js/src/build/Makefile.in
+@@ -89,6 +89,8 @@ ifneq (,$(REAL_LIBRARY))
+ endif
+ ifneq (,$(SHARED_LIBRARY))
+ $(SYSINSTALL) $(SHARED_LIBRARY) $(DESTDIR)$(libdir)
++ mv -f $(DESTDIR)$(libdir)/$(SHARED_LIBRARY) $(DESTDIR)$(libdir)/$(SHARED_LIBRARY).0
++ ln -s $(SHARED_LIBRARY).0 $(DESTDIR)$(libdir)/$(SHARED_LIBRARY)
+ ifeq ($(OS_ARCH),Darwin)
+ install_name_tool -id $(abspath $(libdir)/$(SHARED_LIBRARY)) $(DESTDIR)$(libdir)/$(SHARED_LIBRARY)
+ endif
+diff --git i/js/src/build/moz.build w/js/src/build/moz.build
+index a7f5fa4ce8eb..726687c13fb0 100644
+--- i/js/src/build/moz.build
++++ w/js/src/build/moz.build
+@@ -23,6 +23,7 @@ if not CONFIG['JS_STANDALONE']:
+ if CONFIG['JS_SHARED_LIBRARY']:
+ GeckoSharedLibrary('js', linkage=None)
+ SHARED_LIBRARY_NAME = CONFIG['JS_LIBRARY_NAME']
++ LDFLAGS += ['-Wl,-soname,lib{}.so.0'.format(SHARED_LIBRARY_NAME)]
+ else:
+ Library('js')
+
+