[arch-commits] Commit in js68/trunk (PKGBUILD mozjs68-fix-soname.patch)

Jan Steffens heftig at archlinux.org
Sun Nov 3 13:31:50 UTC 2019


    Date: Sunday, November 3, 2019 @ 13:31:50
  Author: heftig
Revision: 366541

Prepare js68

Added:
  js68/trunk/PKGBUILD
  js68/trunk/mozjs68-fix-soname.patch

--------------------------+
 PKGBUILD                 |   84 +++++++++++++++++++++++++++++++++++++++++++++
 mozjs68-fix-soname.patch |   25 +++++++++++++
 2 files changed, 109 insertions(+)

Added: PKGBUILD
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2019-11-03 13:31:50 UTC (rev 366541)
@@ -0,0 +1,84 @@
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
+
+pkgname=js68
+pkgver=68.2.0
+pkgrel=1
+pkgdesc="JavaScript interpreter and libraries - Version 68"
+arch=(x86_64)
+url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
+license=(MPL)
+depends=(gcc-libs readline zlib sh)
+makedepends=(python python2 zip autoconf2.13 rust llvm clang)
+checkdepends=(mercurial git)
+_relver=${pkgver}esr
+source=(https://archive.mozilla.org/pub/firefox/releases/$_relver/source/firefox-$_relver.source.tar.xz{,.asc}
+        mozjs68-fix-soname.patch)
+sha256sums=('85f1c2eaf68ebedcbc0b78a342f6d16ef0865dedd426a1bba94b75c85f716f38'
+            'SKIP'
+            '975b8461982eab8aba891c4fb6dcbf1ac6894d0f1590dbc231fcb2f12447cb9b')
+validpgpkeys=('14F26682D0916CDD81E37B6D61B7B526D98F0353') # Mozilla Software Releases <release at mozilla.com>
+
+prepare() {
+  cd firefox-$pkgver
+  mkdir obj
+
+  # https://salsa.debian.org/gnome-team/mozjs52/tree/debian/master/debian/patches
+  patch -Np1 -i ../mozjs68-fix-soname.patch
+}
+
+build() {
+  local configure_args=(
+    --prefix=/usr
+    --disable-debug
+    --disable-debug-symbols
+    --disable-jemalloc
+    --disable-strip
+    --enable-hardening
+    --enable-lto
+    --enable-optimize
+    --enable-posix-nspr-emulation
+    --enable-readline
+    --enable-release
+    --enable-shared-js
+    --enable-tests
+    --with-intl-api
+    --with-system-zlib
+    --without-system-icu
+  )
+
+  export AR=llvm-ar
+  export NM=llvm-nm
+  export RANLIB=llvm-ranlib
+
+  cd firefox-$pkgver/obj
+
+  sh ../js/src/configure "${configure_args[@]}"
+  make
+}
+
+check() {
+  local jstests_extra_args=(
+    --format=none
+    --exclude-random
+  ) jittest_extra_args=(
+    --format=none
+    --timeout 300
+  ) jittest_test_args=(
+    basic
+  )
+
+  cd firefox-$pkgver/obj
+  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[*]}"
+}
+
+package() {
+  cd firefox-$pkgver/obj
+  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:

Added: mozjs68-fix-soname.patch
===================================================================
--- mozjs68-fix-soname.patch	                        (rev 0)
+++ mozjs68-fix-soname.patch	2019-11-03 13:31:50 UTC (rev 366541)
@@ -0,0 +1,25 @@
+diff --git i/js/src/build/Makefile.in w/js/src/build/Makefile.in
+index 0d5e980e8254..96c70b5432d4 100644
+--- i/js/src/build/Makefile.in
++++ w/js/src/build/Makefile.in
+@@ -79,6 +79,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 9b7ad87afea8..dbe3b6b89996 100644
+--- i/js/src/build/moz.build
++++ w/js/src/build/moz.build
+@@ -25,6 +25,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)]
+ 
+     # Ensure symbol versions of shared library on Linux do not conflict
+     # with those in libxul.



More information about the arch-commits mailing list