From: not-chicken <not-chicken@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP][Help Needed] Update gjs to 1.65.2.
Date: Sun, 10 May 2020 13:30:52 +0200 [thread overview]
Message-ID: <20200510113052.d7_kcTe0ZIb-k8JGlxIqyxkSFEQAPFQpbE7QQ1mw4tY@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-21716@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 712 bytes --]
There is an updated pull request by not-chicken against master on the void-packages repository
https://github.com/not-chicken/void-packages gjs
https://github.com/void-linux/void-packages/pull/21716
[WIP][Help Needed] Update gjs to 1.65.2.
Needed for #21382
Compilation tested:
- x86_64
- i686
- armv6l-musl
- armv7l
- aarch64
Runtime:
- x86_64 - gnome-shell 3.36.2 seems to run fine.
Edit: I underestimated travis I guess. It's able to build this fine.
Patched up to disable spidermonkey checks for now.
https://src.fedoraproject.org/rpms/mozjs68/blob/master/f/mozjs68.spec#_51
CC @Gottox
A patch file from https://github.com/void-linux/void-packages/pull/21716.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gjs-21716.patch --]
[-- Type: text/x-diff, Size: 16405 bytes --]
From 1396ef0ef8e18c5c904fbbe1b302a7e2aa5429ad Mon Sep 17 00:00:00 2001
From: Lorem <notloremipsum@protonmail.com>
Date: Thu, 7 May 2020 14:02:39 +0530
Subject: [PATCH 1/2] New package: mozjs68-68.8.0
---
common/shlibs | 1 +
srcpkgs/mozjs68-devel | 1 +
.../001-silence-sandbox-violations.patch | 27 +++++++
srcpkgs/mozjs68/patches/002-fix-soname.patch | 22 ++++++
.../mozjs68/patches/003-fix-wasm-arm.patch | 16 ++++
.../mozjs68/patches/004-fix-musl-build.patch | 17 +++++
.../005-spidermonkey-checks-disable.patch | 12 +++
.../006-mozjs68.pc-honor-sysroot.patch | 10 +++
...sed-LLVM-and-Rust-build-dependencies.patch | 74 +++++++++++++++++++
srcpkgs/mozjs68/template | 71 ++++++++++++++++++
srcpkgs/mozjs68/update | 1 +
11 files changed, 252 insertions(+)
create mode 120000 srcpkgs/mozjs68-devel
create mode 100644 srcpkgs/mozjs68/patches/001-silence-sandbox-violations.patch
create mode 100644 srcpkgs/mozjs68/patches/002-fix-soname.patch
create mode 100644 srcpkgs/mozjs68/patches/003-fix-wasm-arm.patch
create mode 100644 srcpkgs/mozjs68/patches/004-fix-musl-build.patch
create mode 100644 srcpkgs/mozjs68/patches/005-spidermonkey-checks-disable.patch
create mode 100644 srcpkgs/mozjs68/patches/006-mozjs68.pc-honor-sysroot.patch
create mode 100644 srcpkgs/mozjs68/patches/007-Remove-unused-LLVM-and-Rust-build-dependencies.patch
create mode 100644 srcpkgs/mozjs68/template
create mode 100644 srcpkgs/mozjs68/update
diff --git a/common/shlibs b/common/shlibs
index 8342e117092..381e758c35a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3454,6 +3454,7 @@ libmysqlpp.so.3 mysql++-3.2.5_1
libKF5Syndication.so.5 syndication-5.50.0_1
liblqr-1.so.0 liblqr-0.4.2_1
libmozjs-60.so.0 mozjs60-60.0.2_1
+libmozjs-68.so.0 mozjs68-68.8.0_1
libebur128.so.1 libebur128-1.2.4_1
libgtksourceview-4.so.0 gtksourceview4-4.0.2_1
libwx_gtk3u_propgrid-3.0.so.0 wxWidgets-gtk3-3.0.4_1
diff --git a/srcpkgs/mozjs68-devel b/srcpkgs/mozjs68-devel
new file mode 120000
index 00000000000..0843c595e78
--- /dev/null
+++ b/srcpkgs/mozjs68-devel
@@ -0,0 +1 @@
+mozjs68
\ No newline at end of file
diff --git a/srcpkgs/mozjs68/patches/001-silence-sandbox-violations.patch b/srcpkgs/mozjs68/patches/001-silence-sandbox-violations.patch
new file mode 100644
index 00000000000..51208e9438b
--- /dev/null
+++ b/srcpkgs/mozjs68/patches/001-silence-sandbox-violations.patch
@@ -0,0 +1,27 @@
+"Carried over from mozjs60"
+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(-)
+
+--- a/python/mozbuild/mozbuild/frontend/emitter.py
++++ b/python/mozbuild/mozbuild/frontend/emitter.py
+@@ -1195,11 +1195,6 @@
+ raise SandboxValidationError('Path specified in LOCAL_INCLUDES '
+ 'is a filename, but a directory is required: %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 '
+- '(%s) resolves to the topsrcdir or topobjdir (%s), which is '
+- 'not allowed' % (local_include, full_path), context)
+ include_obj = LocalInclude(context, local_include)
+ local_includes.append(include_obj.path.full_path)
+ yield include_obj
+
diff --git a/srcpkgs/mozjs68/patches/002-fix-soname.patch b/srcpkgs/mozjs68/patches/002-fix-soname.patch
new file mode 100644
index 00000000000..26cd1847929
--- /dev/null
+++ b/srcpkgs/mozjs68/patches/002-fix-soname.patch
@@ -0,0 +1,22 @@
+"Carried over from mozjs60"
+--- a/js/src/build/Makefile.in
++++ b/js/src/build/Makefile.in
+@@ -78,6 +78,8 @@
+ 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
+--- a/js/src/build/moz.build
++++ b/js/src/build/moz.build
+@@ -25,6 +25,7 @@
+ 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.
diff --git a/srcpkgs/mozjs68/patches/003-fix-wasm-arm.patch b/srcpkgs/mozjs68/patches/003-fix-wasm-arm.patch
new file mode 100644
index 00000000000..891a7652056
--- /dev/null
+++ b/srcpkgs/mozjs68/patches/003-fix-wasm-arm.patch
@@ -0,0 +1,16 @@
+"Taken from firefox-esr"
+--- a/js/src/wasm/WasmSignalHandlers.cpp
++++ b/js/src/wasm/WasmSignalHandlers.cpp
+@@ -243,9 +243,9 @@
+ // If you run into compile problems on a tier-3 platform, you can disable the
+ // emulation here.
+
+-#if defined(__linux__) && defined(__arm__)
+-# define WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS
+-#endif
++// #if defined(__linux__) && defined(__arm__)
++// # define WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS
++// #endif
+
+ #ifdef WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS
+ # include <sys/user.h>
diff --git a/srcpkgs/mozjs68/patches/004-fix-musl-build.patch b/srcpkgs/mozjs68/patches/004-fix-musl-build.patch
new file mode 100644
index 00000000000..f629fa2ac35
--- /dev/null
+++ b/srcpkgs/mozjs68/patches/004-fix-musl-build.patch
@@ -0,0 +1,17 @@
+"Carried over from mozjs60"
+Upstream: No
+Reason: mozjs68 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/srcpkgs/mozjs68/patches/005-spidermonkey-checks-disable.patch b/srcpkgs/mozjs68/patches/005-spidermonkey-checks-disable.patch
new file mode 100644
index 00000000000..f6eababd1f2
--- /dev/null
+++ b/srcpkgs/mozjs68/patches/005-spidermonkey-checks-disable.patch
@@ -0,0 +1,12 @@
+Source:Fedora
+Reason: Checks failed(Todo: Figure out why)
++++ a/config/run_spidermonkey_checks.py
++++ b/config/run_spidermonkey_checks.py
+@@ -11,5 +11,5 @@
+ for script in scripts:
+ retcode = subprocess.call(
+ [sys.executable, script], cwd=buildconfig.topsrcdir)
+- if retcode != 0:
+- raise Exception(script + " failed")
++ #if retcode != 0:
++ # raise Exception(script + " failed")
diff --git a/srcpkgs/mozjs68/patches/006-mozjs68.pc-honor-sysroot.patch b/srcpkgs/mozjs68/patches/006-mozjs68.pc-honor-sysroot.patch
new file mode 100644
index 00000000000..71214b8eccf
--- /dev/null
+++ b/srcpkgs/mozjs68/patches/006-mozjs68.pc-honor-sysroot.patch
@@ -0,0 +1,10 @@
+"Carried over from mozjs60"
+Reason: Fix the '-include' directive, otherwise it tries to use the host's header
+--- a/js/src/build/js.pc.in
++++ b/js/src/build/js.pc.in
+@@ -11,4 +11,4 @@
+ # Use -isystem for includes rather than -I, to mark them as "system headers"
+ # that don't generate warning diagnostics. For justification, see
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1539036
+-Cflags: -include ${includedir}/@JS_LIBRARY_NAME@/js/RequiredDefines.h -isystem ${includedir}/@JS_LIBRARY_NAME@
++Cflags: -include ${pc_sysrootdir}${includedir}/@JS_LIBRARY_NAME@/js/RequiredDefines.h -isystem ${includedir}/@JS_LIBRARY_NAME@
diff --git a/srcpkgs/mozjs68/patches/007-Remove-unused-LLVM-and-Rust-build-dependencies.patch b/srcpkgs/mozjs68/patches/007-Remove-unused-LLVM-and-Rust-build-dependencies.patch
new file mode 100644
index 00000000000..b1c7782adbf
--- /dev/null
+++ b/srcpkgs/mozjs68/patches/007-Remove-unused-LLVM-and-Rust-build-dependencies.patch
@@ -0,0 +1,74 @@
+Source: openSUSE
+Upstream: No
+Description: Remove unused LLVM and Rust build dependencies
+ Since the Javascript engine is normally part of Firefox, its build
+ system has dependencies on the LLVM and Rust toolchains. This limits
+ the number of architectures which mozjs68 can be built on.
+ .
+ It turns out, however, that neither LLVM nor Rust are used when mozjs68
+ is being built and these build dependencies are therefore not necessary.
+ .
+ This patch removes them and allows mozjs68 to be built on any architecture.
+ .
+Author: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959144
+Forwarded: no
+Last-Update: 2020-04-30
+
+Index: js/moz.configure
+===================================================================
+--- a/js/moz.configure
++++ a/js/moz.configure
+@@ -18,11 +18,6 @@ def building_js(build_project):
+ option(env='JS_STANDALONE', default=building_js,
+ help='Reserved for internal use')
+
+-include('../build/moz.configure/rust.configure',
+- when='--enable-compile-environment')
+-include('../build/moz.configure/bindgen.configure',
+- when='--enable-compile-environment')
+-
+ @depends('JS_STANDALONE')
+ def js_standalone(value):
+ if value:
+Index: moz.configure
+===================================================================
+--- a/moz.configure
++++ b/moz.configure
+@@ -598,36 +598,6 @@ set_config('MAKENSISU_FLAGS', nsis_flags
+
+ check_prog('7Z', ('7z', '7za'), allow_missing=True, when=target_is_windows)
+
+-
+-@depends(host_c_compiler, c_compiler, bindgen_config_paths)
+-def llvm_objdump(host_c_compiler, c_compiler, bindgen_config_paths):
+- clang = None
+- for compiler in (host_c_compiler, c_compiler):
+- if compiler and compiler.type == 'clang':
+- clang = compiler.compiler
+- break
+- elif compiler and compiler.type == 'clang-cl':
+- clang = os.path.join(os.path.dirname(compiler.compiler), 'clang')
+- break
+-
+- if not clang and bindgen_config_paths:
+- clang = bindgen_config_paths.clang_path
+- llvm_objdump = 'llvm-objdump'
+- if clang:
+- out = check_cmd_output(clang, '--print-prog-name=llvm-objdump',
+- onerror=lambda: None)
+- if out:
+- llvm_objdump = out.rstrip()
+- return (llvm_objdump,)
+-
+-
+-llvm_objdump = check_prog('LLVM_OBJDUMP', llvm_objdump, what='llvm-objdump',
+- when='--enable-compile-environment',
+- paths=toolchain_search_path)
+-
+-add_old_configure_assignment('LLVM_OBJDUMP', llvm_objdump)
+-
+-
+ # Please do not add configure checks from here on.
+
+ # Fallthrough to autoconf-based configure
diff --git a/srcpkgs/mozjs68/template b/srcpkgs/mozjs68/template
new file mode 100644
index 00000000000..0b54c56f763
--- /dev/null
+++ b/srcpkgs/mozjs68/template
@@ -0,0 +1,71 @@
+# Template file for 'mozjs68'
+pkgname=mozjs68
+version=68.8.0
+revision=1
+wrksrc="firefox-${version}"
+build_wrksrc=js/src
+build_style=gnu-configure
+hostmakedepends="perl python pkg-config automake autoconf213 autoconf-archive
+ which python3"
+makedepends="icu-devel libffi-devel nspr-devel python-devel readline-devel zlib-devel
+ python3-devel"
+depends="nspr>=4.19"
+short_desc="Mozilla JavaScript interpreter and library (68.x series)"
+maintainer="Enno Boland <gottox@voidlinux.org>"
+license="MPL-2.0"
+homepage="https://www.mozilla.org/js/"
+distfiles="${MOZILLA_SITE}/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz"
+checksum=fa5b2266d225878d4b35694678f79fd7e7a6d3c62759a40326129bd90f63e842
+patch_args="-Np1"
+CXXFLAGS="-Wno-class-memaccess"
+LDFLAGS+=" -Wl,-z,stack-size=1048576"
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+ makedepends+=" libatomic-devel"
+ LDFLAGS+=" -latomic"
+fi
+
+do_configure() {
+ local _args
+
+ if [ "$CROSS_BUILD" ]; then
+ export HOST_CC=cc
+ export TARGET_CC="${CC}"
+ export HOST_CFLAGS="-Os"
+ export HOST_CXXFLAGS="-Os"
+ _args+=" --target=$XBPS_CROSS_TRIPLET --enable-linker=bfd"
+ fi
+
+ autoconf-2.13 old-configure.in > old-configure
+
+ touch ${wrksrc}/js/src/configure
+ touch ${wrksrc}/js/src/old-configure
+ SHELL=/bin/bash PYTHON=/usr/bin/python2 ./configure --prefix=/usr \
+ --disable-jemalloc --disable-optimize --enable-ctypes \
+ --enable-readline --enable-shared-js --enable-system-ffi \
+ --enable-tests --with-intl-api --with-system-icu --with-system-nspr \
+ --enable-unaligned-private-values --enable-hardening \
+ --enable-release --with-system-zlib --target=${XBPS_TRIPLET} \
+ --host=${XBPS_TRIPLET} \
+ ${_args}
+}
+
+do_check() {
+ dist/bin/jsapi-tests --format=none --exclude-random basic
+}
+
+post_install() {
+ # Remove unneeded static library
+ rm -f "${DESTDIR}"/usr/lib/*.ajs
+}
+
+mozjs68-devel_package() {
+ depends="nspr-devel ${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/bin/js68-config
+ vmove usr/include
+ vmove "usr/lib/*.so"
+ vmove usr/lib/pkgconfig
+ }
+}
diff --git a/srcpkgs/mozjs68/update b/srcpkgs/mozjs68/update
new file mode 100644
index 00000000000..1947e19217f
--- /dev/null
+++ b/srcpkgs/mozjs68/update
@@ -0,0 +1 @@
+pkgname='mozjs'
From 450d528f9a7ce788fea9e898f5ca470984aa64ac Mon Sep 17 00:00:00 2001
From: Lorem <notloremipsum@protonmail.com>
Date: Thu, 7 May 2020 14:06:06 +0530
Subject: [PATCH 2/2] gjs: update to 1.65.2.
---
common/shlibs | 4 +---
srcpkgs/gjs/template | 21 ++++++---------------
2 files changed, 7 insertions(+), 18 deletions(-)
diff --git a/common/shlibs b/common/shlibs
index 381e758c35a..02ffe39b4e5 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -830,9 +830,7 @@ libtotem.so.0 libtotem-3.6.2_1
libclutter-1.0.so.0 clutter-1.14.0_1
libavfs.so.0 libavfs-1.0.5_1
libdmr.so.0.1 deepin-movie-reborn-3.2.5_1
-libgjs.so.0 gjs-1.63.3_1
-libgjs-gi.so gjs-1.63.3_1
-libgjs-dbus.so.0 gjs-1.63.3_1
+libgjs.so.0 gjs-1.65.2_1
libtelepathy-glib.so.0 telepathy-glib-0.15.5_1
libaccountsservice.so.0 accountsservice-0.6.4_1
libfolks.so.25 folks-0.9.5_1
diff --git a/srcpkgs/gjs/template b/srcpkgs/gjs/template
index 956fb9d28be..ec48baddf11 100644
--- a/srcpkgs/gjs/template
+++ b/srcpkgs/gjs/template
@@ -1,36 +1,27 @@
# Template file for 'gjs'
pkgname=gjs
-version=1.63.3
-revision=2
+version=1.65.2
+revision=1
build_style=meson
build_helper="gir qemu"
configure_args="-Dskip_dbus_tests=true -Dskip_gtk_tests=true
- -Dprofiler=disabled" # Disable test because they need X and GTK.
+ -Dprofiler=disabled -Dinstalled_tests=false" # Disable tests because they need dbus, X and GTK.
hostmakedepends="glib-devel pkg-config"
-makedepends="dbus-glib-devel mozjs60-devel readline-devel sysprof-devel"
+makedepends="dbus-glib-devel mozjs68-devel readline-devel sysprof-devel"
short_desc="Mozilla-based javascript bindings for the GNOME platform"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="MIT, LGPL-2.0-or-later"
homepage="https://wiki.gnome.org/action/show/Projects/Gjs"
changelog="https://gitlab.gnome.org/GNOME/gjs/blob/gnome-3-30/NEWS"
distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
-checksum=09f232c20e986c368e93394b2c10dc21b6fedacfff7de926f0b221ea5b933b5f
-
-pre_configure() {
- if [ "$CROSS_BUILD" ]; then
- vsed -i meson.build -e"/subdir('installed-tests')/d"
- fi
- if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
- grep -rlw "<sys/signal.h>" | xargs sed -i -e"s;<sys/signal.h>;<signal.h>;"
- fi
-}
+checksum=a66edad8a5f10027f9b182d88af84b81f13e5ad5840319cfa747d66e77e0214f
post_install() {
vlicense COPYING
}
gjs-devel_package() {
- depends="libgirepository-devel mozjs60-devel ${sourcepkg}>=${version}_${revision}"
+ depends="libgirepository-devel mozjs68-devel ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
next prev parent reply other threads:[~2020-05-10 11:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 9:40 [PR PATCH] " not-chicken
2020-05-07 13:00 ` sgn
2020-05-07 13:40 ` [PR PATCH] [Updated] " not-chicken
2020-05-07 13:42 ` not-chicken
2020-05-07 14:35 ` [PR PATCH] [Updated] " not-chicken
2020-05-07 14:41 ` not-chicken
2020-05-08 9:24 ` [PR PATCH] [Updated] " not-chicken
2020-05-08 15:13 ` toluschr
2020-05-08 15:21 ` toluschr
2020-05-09 1:12 ` [PR PATCH] [Updated] " not-chicken
2020-05-09 1:15 ` not-chicken
2020-05-09 2:17 ` sgn
2020-05-09 2:18 ` sgn
2020-05-09 2:19 ` sgn
2020-05-10 11:30 ` not-chicken [this message]
2020-05-10 12:28 ` not-chicken
2020-05-14 14:51 ` [PR PATCH] [Closed]: " sgn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200510113052.d7_kcTe0ZIb-k8JGlxIqyxkSFEQAPFQpbE7QQ1mw4tY@z \
--to=not-chicken@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).