From 8a2f1f4c51475b63fced745139533141f3671abc Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 19 Oct 2018 10:28:50 +0000 Subject: testing/mozjs60: new aport needed by gjs-1.54 --- .../mozjs60/0001-silence-sandbox-violations.patch | 30 +++++++++++ testing/mozjs60/APKBUILD | 58 ++++++++++++++++++++++ testing/mozjs60/add-exposeToActiveJS.patch | 24 +++++++++ testing/mozjs60/fix-musl-build.patch | 16 ++++++ testing/mozjs60/fix-soname-lib.patch | 30 +++++++++++ 5 files changed, 158 insertions(+) create mode 100644 testing/mozjs60/0001-silence-sandbox-violations.patch create mode 100644 testing/mozjs60/APKBUILD create mode 100644 testing/mozjs60/add-exposeToActiveJS.patch create mode 100644 testing/mozjs60/fix-musl-build.patch create mode 100644 testing/mozjs60/fix-soname-lib.patch diff --git a/testing/mozjs60/0001-silence-sandbox-violations.patch b/testing/mozjs60/0001-silence-sandbox-violations.patch new file mode 100644 index 0000000000..9182026718 --- /dev/null +++ b/testing/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 +Date: Wed, 5 Sep 2018 15:05:24 +0200 +Subject: [PATCH] silence sandbox violations + +Signed-off-by: Marc-Antoine Perennou +--- + 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/testing/mozjs60/APKBUILD b/testing/mozjs60/APKBUILD new file mode 100644 index 0000000000..c9977ba60c --- /dev/null +++ b/testing/mozjs60/APKBUILD @@ -0,0 +1,58 @@ +# Maintainer: William Pitcock +pkgname=mozjs60 +pkgver=60.0.2 +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 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 + + 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 +} + +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/testing/mozjs60/add-exposeToActiveJS.patch b/testing/mozjs60/add-exposeToActiveJS.patch new file mode 100644 index 0000000000..7736e4ce68 --- /dev/null +++ b/testing/mozjs60/add-exposeToActiveJS.patch @@ -0,0 +1,24 @@ +Upstream: Yes +Reason: Required for GJS +# HG changeset patch +# User Philip Chimento +# Date 1527544053 25200 +# Mon May 28 14:47:33 2018 -0700 +# Node ID a50e7374d0952b893f843e9d21d13d5b7ec8564c +# Parent a466172aed4bc2afc21169b749b8068a4b98c93f +Bug 1464912 - Add exposeToActiveJS specialization for JSString. r=sfink + +diff --git a/js/public/RootingAPI.h b/js/public/RootingAPI.h +--- a/js/public/RootingAPI.h ++++ b/js/public/RootingAPI.h +@@ -719,6 +719,10 @@ struct BarrierMethods + static void postBarrier(JSString** vp, JSString* prev, JSString* next) { + JS::HeapStringPostBarrier(vp, prev, next); + } ++ static void exposeToJS(JSString* v) { ++ if (v) ++ js::gc::ExposeGCThingToActiveJS(JS::GCCellPtr(v)); ++ } + }; + + // Provide hash codes for Cell kinds that may be relocated and, thus, not have diff --git a/testing/mozjs60/fix-musl-build.patch b/testing/mozjs60/fix-musl-build.patch new file mode 100644 index 0000000000..af39467399 --- /dev/null +++ b/testing/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/testing/mozjs60/fix-soname-lib.patch b/testing/mozjs60/fix-soname-lib.patch new file mode 100644 index 0000000000..b9147fa20c --- /dev/null +++ b/testing/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') + + -- cgit v1.2.3