From 2b704b302c8eb5ca66ccdee0ff65e483ca10d54e Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 30 2018 04:55:26 +0000 Subject: import gjs-1.52.3-1.el7 --- diff --git a/.gitignore b/.gitignore index 440cb79..c070dad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -SOURCES/firefox-52.6.0esr.source.tar.xz -SOURCES/gjs-1.50.4.tar.xz +SOURCES/gjs-1.52.3.tar.xz diff --git a/.gjs.metadata b/.gjs.metadata index cac6c2b..b3d9eed 100644 --- a/.gjs.metadata +++ b/.gjs.metadata @@ -1,2 +1 @@ -00d54201b3e31307c4f6d61e2895dec58df8a7e3 SOURCES/firefox-52.6.0esr.source.tar.xz -cad4f0c65c27174246d13352fb91f815141108a5 SOURCES/gjs-1.50.4.tar.xz +782f564ed424f0b0cc66a85565453f93ed009557 SOURCES/gjs-1.52.3.tar.xz diff --git a/SOURCES/0001-Revert-js-Convert-scripts-to-UTF-16-before-evaluatin.patch b/SOURCES/0001-Revert-js-Convert-scripts-to-UTF-16-before-evaluatin.patch new file mode 100644 index 0000000..8e99c58 --- /dev/null +++ b/SOURCES/0001-Revert-js-Convert-scripts-to-UTF-16-before-evaluatin.patch @@ -0,0 +1,99 @@ +From 6a194ae2b4479fefb803fc38a2ccad3ebc766440 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Tue, 15 May 2018 21:14:16 +0200 +Subject: [PATCH] Revert "js: Convert scripts to UTF-16 before evaluating" + +RHEL 7 libstdc++ 4.8 doesn't have header that gjs needs. In +order to work this around, this commit reverts the patch that introduced +the requirement. + +This reverts commit bc36f39ff09629e1b4c5c54f334028d2b2f8c545. +--- + gjs/jsapi-util.cpp | 15 ++++++--------- + gjs/module.cpp | 15 ++++++--------- + 2 files changed, 12 insertions(+), 18 deletions(-) + +diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp +index 322a41b..6033dff 100644 +--- a/gjs/jsapi-util.cpp ++++ b/gjs/jsapi-util.cpp +@@ -24,9 +24,6 @@ + + #include + +-#include +-#include +- + #include + #include + #include +@@ -851,19 +848,19 @@ gjs_eval_with_scope(JSContext *context, + eval_obj = JS_NewPlainObject(context); + + JS::CompileOptions options(context); +- options.setFileAndLine(filename, start_line_number) ++ options.setUTF8(true) ++ .setFileAndLine(filename, start_line_number) + .setSourceIsLazy(true); + +- std::wstring_convert, char16_t> convert; +- std::u16string utf16_string = convert.from_bytes(script); +- JS::SourceBufferHolder buf(utf16_string.c_str(), utf16_string.size(), +- JS::SourceBufferHolder::NoOwnership); ++ JS::RootedScript compiled_script(context); ++ if (!JS::Compile(context, options, script, real_len, &compiled_script)) ++ return false; + + JS::AutoObjectVector scope_chain(context); + if (!scope_chain.append(eval_obj)) + g_error("Unable to append to vector"); + +- if (!JS::Evaluate(context, scope_chain, options, buf, retval)) ++ if (!JS_ExecuteScript(context, scope_chain, compiled_script, retval)) + return false; + + gjs_schedule_gc_if_needed(context); +diff --git a/gjs/module.cpp b/gjs/module.cpp +index cc6657a..4b8bd40 100644 +--- a/gjs/module.cpp ++++ b/gjs/module.cpp +@@ -21,9 +21,6 @@ + * IN THE SOFTWARE. + */ + +-#include +-#include +- + #include + + #include "jsapi-util.h" +@@ -89,20 +86,20 @@ class GjsModule { + int line_number) + { + JS::CompileOptions options(cx); +- options.setFileAndLine(filename, line_number) ++ options.setUTF8(true) ++ .setFileAndLine(filename, line_number) + .setSourceIsLazy(true); + +- std::wstring_convert, char16_t> convert; +- std::u16string utf16_string = convert.from_bytes(script); +- JS::SourceBufferHolder buf(utf16_string.c_str(), utf16_string.size(), +- JS::SourceBufferHolder::NoOwnership); ++ JS::RootedScript compiled_script(cx); ++ if (!JS::Compile(cx, options, script, script_len, &compiled_script)) ++ return false; + + JS::AutoObjectVector scope_chain(cx); + if (!scope_chain.append(module)) + g_error("Unable to append to vector"); + + JS::RootedValue ignored_retval(cx); +- if (!JS::Evaluate(cx, scope_chain, options, buf, &ignored_retval)) ++ if (!JS_ExecuteScript(cx, scope_chain, compiled_script, &ignored_retval)) + return false; + + gjs_schedule_gc_if_needed(cx); +-- +1.8.3.1 + diff --git a/SOURCES/build-icu-big-endian.patch b/SOURCES/build-icu-big-endian.patch deleted file mode 100644 index 68fbea1..0000000 --- a/SOURCES/build-icu-big-endian.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up mozilla-aurora/build/autoconf/icu.m4.icu-endian mozilla-aurora/build/autoconf/icu.m4 ---- mozilla-aurora/build/autoconf/icu.m4.icu-endian 2016-12-09 09:11:01.227317790 +0100 -+++ mozilla-aurora/build/autoconf/icu.m4 2016-12-09 09:18:40.608712247 +0100 -@@ -78,7 +78,7 @@ if test -n "$USE_ICU"; then - # TODO: the l is actually endian-dependent - # We could make this set as 'l' or 'b' for little or big, respectively, - # but we'd need to check in a big-endian version of the file. -- ICU_DATA_FILE="icudt${version}l.dat" -+ ICU_DATA_FILE="icudt${version}b.dat" - - dnl We won't build ICU data as a separate file when building - dnl JS standalone so that embedders don't have to deal with it. diff --git a/SOURCES/build-missing-xlocale-h.patch b/SOURCES/build-missing-xlocale-h.patch deleted file mode 100644 index b4a62b2..0000000 --- a/SOURCES/build-missing-xlocale-h.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up thunderbird-52.3.0/mozilla/intl/icu/source/i18n/digitlst.cpp.xlocale thunderbird-52.3.0/mozilla/intl/icu/source/i18n/digitlst.cpp ---- thunderbird-52.3.0/mozilla/intl/icu/source/i18n/digitlst.cpp.xlocale 2017-08-24 14:42:48.634084293 +0200 -+++ thunderbird-52.3.0/mozilla/intl/icu/source/i18n/digitlst.cpp 2017-08-24 14:42:50.534084676 +0200 -@@ -64,7 +64,7 @@ - # if U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_CYGWIN - # include - # else --# include -+# include - # endif - #endif - diff --git a/SOURCES/copy-headers.patch b/SOURCES/copy-headers.patch deleted file mode 100644 index 69b2161..0000000 --- a/SOURCES/copy-headers.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 8b2d7a77bfb4dbd513763501ed7e9722058ee9af Mon Sep 17 00:00:00 2001 -From: Rico Tzschichholz -Date: Wed, 5 Jul 2017 22:45:59 -0700 -Subject: [PATCH] build: Copy headers on install instead of symlinking - -Patch ported forward to mozjs52 by Philip Chimento -. ---- - python/mozbuild/mozbuild/backend/recursivemake.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py -index 132dcf94..33d489a6 100644 ---- a/python/mozbuild/mozbuild/backend/recursivemake.py -+++ b/python/mozbuild/mozbuild/backend/recursivemake.py -@@ -1307,11 +1307,11 @@ def _process_final_target_files(self, obj, files, backend_file): - raise Exception("Wildcards are only supported in the filename part of " - "srcdir-relative or absolute paths.") - -- install_manifest.add_pattern_symlink(basepath, wild, path) -+ install_manifest.add_pattern_copy(basepath, wild, path) - else: -- install_manifest.add_pattern_symlink(f.srcdir, f, path) -+ install_manifest.add_pattern_copy(f.srcdir, f, path) - else: -- install_manifest.add_symlink(f.full_path, dest) -+ install_manifest.add_copy(f.full_path, dest) - else: - install_manifest.add_optional_exists(dest) - backend_file.write('%s_FILES += %s\n' % ( diff --git a/SOURCES/disable-extra-threads.patch b/SOURCES/disable-extra-threads.patch deleted file mode 100644 index 8e4e7fb..0000000 --- a/SOURCES/disable-extra-threads.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up firefox-52.6.0esr/js/src/vm/Runtime.cpp.disable-extra-threads firefox-52.6.0esr/js/src/vm/Runtime.cpp ---- firefox-52.6.0esr/js/src/vm/Runtime.cpp.disable-extra-threads 2018-02-08 10:16:13.453828939 -0500 -+++ firefox-52.6.0esr/js/src/vm/Runtime.cpp 2018-02-08 10:23:31.283458826 -0500 -@@ -283,6 +283,17 @@ JSRuntime::init(uint32_t maxbytes, uint3 - ownerThreadNative_ = (size_t)pthread_self(); - #endif - -+ const char* enable_js_helper_threads; -+ enable_js_helper_threads = getenv("GJS_ENABLE_JS_HELPER_THREADS"); -+ -+#if defined(__PPC64__) && defined (__LITTLE_ENDIAN__) -+ if (enable_js_helper_threads == NULL) -+ js::DisableExtraThreads(); -+#endif -+ -+ if (enable_js_helper_threads != NULL && enable_js_helper_threads[0] == '0') -+ js::DisableExtraThreads(); -+ - if (!mainThread.init()) - return false; - diff --git a/SOURCES/disable-mozglue.patch b/SOURCES/disable-mozglue.patch deleted file mode 100644 index 8355cf4..0000000 --- a/SOURCES/disable-mozglue.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 7e6d628456af3e99ebcb9a01a27e1461585082a4 Mon Sep 17 00:00:00 2001 -From: Till Schneidereit -Date: Thu, 1 Oct 2015 12:59:09 +0200 -Subject: [PATCH] Disable MOZ_GLUE_IN_PROGRAM in stand-alone builds on all - platforms - -Otherwise, build fails not being able to find HashBytes. - -Patch ported forward to mozjs52 by Philip Chimento -. - -https://bugzilla.mozilla.org/show_bug.cgi?id=1176787 ---- - js/src/old-configure.in | 23 ++++++++++++++--------- - mozglue/build/moz.build | 2 +- - 2 files changed, 15 insertions(+), 10 deletions(-) - -diff --git a/js/src/old-configure.in b/js/src/old-configure.in -index 1c5c9e21..ff0617e3 100644 ---- a/js/src/old-configure.in -+++ b/js/src/old-configure.in -@@ -1623,16 +1623,21 @@ dnl ======================================================== - dnl = Enable jemalloc - dnl ======================================================== - --case "${OS_TARGET}" in --Android|WINNT|Darwin) -+dnl In stand-alone builds we always only want to link executables against mozglue. -+if test "$JS_STANDALONE"; then - MOZ_GLUE_IN_PROGRAM= -- ;; --*) -- dnl On !Android !Windows !OSX, we only want to link executables against mozglue -- MOZ_GLUE_IN_PROGRAM=1 -- AC_DEFINE(MOZ_GLUE_IN_PROGRAM) -- ;; --esac -+else -+ case "${OS_TARGET}" in -+ Android|WINNT|Darwin) -+ MOZ_GLUE_IN_PROGRAM= -+ ;; -+ *) -+ dnl On !Android !Windows !OSX, we only want to link executables against mozglue -+ MOZ_GLUE_IN_PROGRAM=1 -+ AC_DEFINE(MOZ_GLUE_IN_PROGRAM) -+ ;; -+ esac -+fi - - if test "$MOZ_MEMORY"; then - if test "x$MOZ_DEBUG" = "x1"; then -diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build -index d2897477..e3be5a2b 100644 ---- a/mozglue/build/moz.build -+++ b/mozglue/build/moz.build -@@ -6,7 +6,7 @@ - - # Build mozglue as a shared lib on Windows, OSX and Android. - # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in --if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'): -+if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') and not CONFIG['JS_STANDALONE']: - SharedLibrary('mozglue') - else: - Library('mozglue') - diff --git a/SOURCES/gjs-mozjs-dont-export-abort.patch b/SOURCES/gjs-mozjs-dont-export-abort.patch deleted file mode 100644 index 84948af..0000000 --- a/SOURCES/gjs-mozjs-dont-export-abort.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urNp firefox-52.4.0esr.orig/memory/mozalloc/mozalloc_abort.cpp firefox-52.4.0esr/memory/mozalloc/mozalloc_abort.cpp ---- firefox-52.4.0esr.orig/memory/mozalloc/mozalloc_abort.cpp 2017-12-04 16:29:43.956029600 +0100 -+++ firefox-52.4.0esr/memory/mozalloc/mozalloc_abort.cpp 2017-12-04 18:21:05.296157795 +0100 -@@ -55,7 +55,7 @@ void fillAbortMessage(char (&msg)[N], ui - } - #endif - --#if defined(XP_UNIX) && !defined(MOZ_ASAN) -+#if 0 - // Define abort() here, so that it is used instead of the system abort(). This - // lets us control the behavior when aborting, in order to get better results - // on *NIX platforms. See mozalloc_abort for details. diff --git a/SOURCES/include-configure-script.patch b/SOURCES/include-configure-script.patch deleted file mode 100644 index c24d7b1..0000000 --- a/SOURCES/include-configure-script.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 4a06a1a6a71293decb83aee7adb74bc709493106 Mon Sep 17 00:00:00 2001 -From: Philip Chimento -Date: Wed, 5 Jul 2017 22:57:09 -0700 -Subject: [PATCH] build: Include configure script, be nicer about options - -A configure script is not included in the SpiderMonkey tarball by -default. Also, we have to account for JHbuild passing extra unknown -options like --disable-Werror. - -https://bugzilla.mozilla.org/show_bug.cgi?id=1379540 ---- - js/src/configure | 9 +++++++++ - python/mozbuild/mozbuild/configure/__init__.py | 2 +- - python/mozbuild/mozbuild/configure/options.py | 6 +++++- - 3 files changed, 15 insertions(+), 2 deletions(-) - create mode 100755 js/src/configure - -diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py -index 0fe640ca..09b460d3 100644 ---- a/python/mozbuild/mozbuild/configure/__init__.py -+++ b/python/mozbuild/mozbuild/configure/__init__.py -@@ -356,7 +356,7 @@ def run(self, path=None): - # All options should have been removed (handled) by now. - for arg in self._helper: - without_value = arg.split('=', 1)[0] -- raise InvalidOptionError('Unknown option: %s' % without_value) -+ print('Ignoring', without_value, ': Unknown option') - - # Run the execution queue - for func, args in self._execution_queue: -diff --git a/python/mozbuild/mozbuild/configure/options.py b/python/mozbuild/mozbuild/configure/options.py -index 4310c862..15bfe425 100644 ---- a/python/mozbuild/mozbuild/configure/options.py -+++ b/python/mozbuild/mozbuild/configure/options.py -@@ -402,7 +402,11 @@ def __init__(self, environ=os.environ, argv=sys.argv): - - def add(self, arg, origin='command-line', args=None): - assert origin != 'default' -- prefix, name, values = Option.split_option(arg) -+ try: -+ prefix, name, values = Option.split_option(arg) -+ except InvalidOptionError as e: -+ print('Ignoring', arg, ':', e) -+ return - if args is None: - args = self._extra_args - if args is self._extra_args and name in self._extra_args: - diff --git a/SOURCES/mozilla-1253216.patch b/SOURCES/mozilla-1253216.patch deleted file mode 100644 index c9252da..0000000 --- a/SOURCES/mozilla-1253216.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-48.0/js/src/jit/AtomicOperations.h.old firefox-48.0/js/src/jit/AtomicOperations.h ---- firefox-48.0/js/src/jit/AtomicOperations.h.old 2016-07-27 09:42:43.148175449 +0200 -+++ firefox-48.0/js/src/jit/AtomicOperations.h 2016-07-27 09:41:13.000000000 +0200 -@@ -340,7 +340,7 @@ AtomicOperations::isLockfree(int32_t siz - # elif defined(__aarch64__) - # include "jit/arm64/AtomicOperations-arm64.h" - # else --# include "jit/none/AtomicOperations-none.h" // These MOZ_CRASH() always -+# include "jit/none/AtomicOperations-ppc.h" - # endif - #elif defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64) - # include "jit/x86-shared/AtomicOperations-x86-shared.h" diff --git a/SOURCES/xulrunner-24.0-jemalloc-ppc.patch b/SOURCES/xulrunner-24.0-jemalloc-ppc.patch deleted file mode 100644 index b2aaae6..0000000 --- a/SOURCES/xulrunner-24.0-jemalloc-ppc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-48.0/memory/mozjemalloc/jemalloc.c.jemalloc-ppc firefox-48.0/memory/mozjemalloc/jemalloc.c ---- firefox-48.0/memory/mozjemalloc/jemalloc.c.jemalloc-ppc 2016-07-26 10:51:46.385434384 +0200 -+++ firefox-48.0/memory/mozjemalloc/jemalloc.c 2016-07-26 10:53:49.061023106 +0200 -@@ -1090,7 +1090,7 @@ static const bool config_recycle = false - * controlling the malloc behavior are defined as compile-time constants - * for best performance and cannot be altered at runtime. - */ --#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__) -+#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__) && !(defined(__powerpc__)) - #define MALLOC_STATIC_SIZES 1 - #endif - diff --git a/SOURCES/xulrunner-24.0-s390-inlines.patch b/SOURCES/xulrunner-24.0-s390-inlines.patch deleted file mode 100644 index 074f8d9..0000000 --- a/SOURCES/xulrunner-24.0-s390-inlines.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp ---- xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines 2013-10-23 16:04:01.773093979 +0200 -+++ xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp 2013-10-23 16:04:44.551134551 +0200 -@@ -4,6 +4,8 @@ - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -+#include "jscntxtinlines.h" -+ - #include "vm/SPSProfiler.h" - - #include "mozilla/DebugOnly.h" diff --git a/SPECS/gjs.spec b/SPECS/gjs.spec index 54ab0cc..4b5b67b 100644 --- a/SPECS/gjs.spec +++ b/SPECS/gjs.spec @@ -2,61 +2,23 @@ %global gobject_introspection_version 1.41.4 %global gtk3_version 3.20 -%global bundled_mozjs 1 - -%if 0%{?bundled_mozjs} -%global mozjs_major 52 -%global mozjs_version 52.6.0 - -# Big endian platforms -%ifarch ppc ppc64 s390 s390x -%define big_endian 1 -%endif -%endif - Name: gjs -Version: 1.50.4 -Release: 4%{?dist} +Version: 1.52.3 +Release: 1%{?dist} Summary: Javascript Bindings for GNOME # The following files contain code from Mozilla which # is triple licensed under MPL1.1/LGPLv2+/GPLv2+: # The console module (modules/console.c) # Stack printer (gjs/stack.c) -%if 0%{?bundled_mozjs} -License: MIT and (MPLv1.1 or GPLv2+ or LGPLv2+) and MPLv2.0 and MPLv1.1 and BSD and GPLv2+ and GPLv3+ and LGPLv2.1 and LGPLv2.1+ and AFL and ASL 2.0 -%else License: MIT and (MPLv1.1 or GPLv2+ or LGPLv2+) -%endif URL: https://wiki.gnome.org/Projects/Gjs -Source0: https://download.gnome.org/sources/%{name}/1.50/%{name}-%{version}.tar.xz - -%if 0%{?bundled_mozjs} -Source1: https://ftp.mozilla.org/pub/firefox/releases/%{mozjs_version}esr/source/firefox-%{mozjs_version}esr.source.tar.xz -Provides: bundled(mozjs) = %{mozjs_version} - -# https://bugzilla.redhat.com/show_bug.cgi?id=1510876 -Patch0001: gjs-mozjs-dont-export-abort.patch - -# Patches from Debian mozjs52_52.3.1-4.debian.tar.xz: -Patch0002: copy-headers.patch +Source0: https://download.gnome.org/sources/%{name}/1.52/%{name}-%{version}.tar.xz # Downstream RHEL patches -Patch0003: disable-extra-threads.patch +Patch0001: 0001-Revert-js-Convert-scripts-to-UTF-16-before-evaluatin.patch Patch0004: disable-destoyed-object-criticals.patch -# Patches from https://github.com/ptomato/mozjs / Debian mozjs52_52.3.1-4.debian.tar.xz -Patch0101: disable-mozglue.patch -Patch0104: include-configure-script.patch - -# Patches from Fedora firefox package: -Patch18: xulrunner-24.0-jemalloc-ppc.patch -Patch19: xulrunner-24.0-s390-inlines.patch -Patch26: build-icu-big-endian.patch -Patch36: build-missing-xlocale-h.patch -Patch304: mozilla-1253216.patch -%endif - BuildRequires: cairo-gobject-devel BuildRequires: chrpath BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version} @@ -65,31 +27,15 @@ BuildRequires: dbus-glib-devel BuildRequires: gettext BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gtk3-devel >= %{gtk3_version} -%if 0%{?bundled_mozjs} -BuildRequires: autoconf213 -BuildRequires: perl-devel -BuildRequires: pkgconfig(libffi) -BuildRequires: pkgconfig(zlib) -BuildRequires: python2-devel -BuildRequires: readline-devel -BuildRequires: /usr/bin/zip -%else BuildRequires: mozjs52-devel -%endif BuildRequires: pkgconfig Requires: glib2%{?_isa} >= %{glib2_version} Requires: gobject-introspection%{?_isa} >= %{gobject_introspection_version} Requires: gtk3%{?_isa} >= %{gtk3_version} -%if 0%{?bundled_mozjs} -# Firefox does not allow to build with system version of jemalloc -Provides: bundled(jemalloc) = 4.3.1 - -# Make sure we don't add requires/provides for private libraries +# Filter provides for private libraries %global __provides_exclude_from ^%{_libdir}/gjs/ -%global __requires_exclude ^libmozjs-%{mozjs_major}\\.so.* -%endif %description Gjs allows using GNOME libraries from Javascript. It's based on the @@ -112,106 +58,14 @@ The gjs-tests package contains tests that can be used to verify the functionality of the installed gjs package. %prep -%setup -q - -%if 0%{?bundled_mozjs} -# Extract mozjs archive -tar -xf %{S:1} - -# Apply mozjs patches -pushd firefox-%{mozjs_version}esr -%patch0001 -p1 -%patch0002 -p1 -%patch0003 -p1 - -%patch0101 -p1 -%patch0104 -p1 - -%patch18 -p1 -b .jemalloc-ppc -%patch19 -p2 -b .s390-inlines - -# Patch for big endian platforms only -%if 0%{?big_endian} -%patch26 -p1 -b .icu -%patch36 -p2 -b .xlocale -%endif - -%patch304 -p1 -b .1253216 - -# Remove zlib directory (to be sure using system version) -rm -rf modules/zlib -popd - -%patch0004 -p1 -b .debug -%endif +%autosetup -p1 %build -%if 0%{?bundled_mozjs} -pushd firefox-%{mozjs_version}esr/js/src -# Disable null pointer gcc6 optimization in gcc6 (rhbz#1328045) -export CFLAGS="%{optflags} -fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks" -export CXXFLAGS=$CFLAGS -LINKFLAGS="%{?__global_ldflags}" -export PYTHON=/usr/bin/python2 - -autoconf-2.13 -%configure \ - --without-system-icu \ - --enable-posix-nspr-emulation \ - --with-system-zlib \ - --enable-tests \ - --disable-strip \ - --with-intl-api \ - --enable-readline \ - --enable-shared-js \ - --disable-optimize \ - --enable-pie \ -%ifarch s390 s390x - --disable-jemalloc \ -%endif -%ifarch %{arm} aarch64 ppc ppc64 ppc64le - --disable-ion -%endif - -%if 0%{?big_endian} -echo "Generate big endian version of config/external/icu/data/icud58l.dat" -pushd ../.. - ./mach python intl/icu_sources_data.py . - ls -l config/external/icu/data - rm -f config/external/icu/data/icudt*l.dat -popd -%endif - -%make_build -popd - -cat > mozjs-%{mozjs_major}.pc << EOF -Name: SpiderMonkey %{mozjs_version} -Description: The Mozilla library for JavaScript -Version: %{mozjs_version} - -Libs: -L`pwd`/firefox-%{mozjs_version}esr/js/src/dist/sdk/lib -Wl,-rpath=%{_libdir}/gjs -lmozjs-%{mozjs_major} -Cflags: -include `pwd`/firefox-%{mozjs_version}esr/js/src/dist/include/js/RequiredDefines.h -I`pwd`/firefox-%{mozjs_version}esr/js/src/dist/include -EOF -%endif - -%if 0%{?bundled_mozjs} -export PKG_CONFIG_PATH=`pwd` -export LD_LIBRARY_PATH=`pwd`/firefox-%{mozjs_version}esr/js/src/dist/sdk/lib -export LDFLAGS="%{?__global_ldflags} -Wl,--as-needed" -%endif %configure --disable-static --enable-installed-tests --without-dbus-tests make %{?_smp_mflags} V=1 -%if 0%{?bundled_mozjs} -sed -i -e 's/ mozjs-%{mozjs_major}//g' gjs-1.0.pc -%endif %install -%if 0%{?bundled_mozjs} -mkdir -p %{buildroot}%{_libdir}/gjs -cp -a firefox-%{mozjs_version}esr/js/src/js/src/libmozjs-%{mozjs_major}.so %{buildroot}%{_libdir}/gjs/ -%endif %make_install # Remove lib64 rpaths @@ -221,23 +75,6 @@ chrpath --delete %{buildroot}%{_libexecdir}/gjs/installed-tests/minijasmine find %{buildroot} -name '*.la' -exec rm -f {} ';' %check -%if 0%{?bundled_mozjs} -pushd firefox-%{mozjs_version}esr/js/src -# Run SpiderMonkey tests -%ifarch %{ix86} x86_64 %{arm} aarch64 -tests/jstests.py -d -s -t 1800 --no-progress ../../js/src/js/src/shell/js -%else -tests/jstests.py -d -s -t 1800 --no-progress ../../js/src/js/src/shell/js || : -%endif - -# Run basic JIT tests -%ifarch %{ix86} x86_64 %{arm} aarch64 -jit-test/jit_test.py -s -t 1800 --no-progress ../../js/src/js/src/shell/js basic -%else -jit-test/jit_test.py -s -t 1800 --no-progress ../../js/src/js/src/shell/js basic || : -%endif -popd -%endif #make check %post -p /sbin/ldconfig @@ -257,12 +94,20 @@ popd %{_includedir}/gjs-1.0 %{_libdir}/pkgconfig/gjs-1.0.pc %{_libdir}/*.so +%dir %{_datadir}/gjs-1.0 +%{_datadir}/gjs-1.0/lsan/ +%{_datadir}/gjs-1.0/valgrind/ %files tests %{_libexecdir}/gjs/installed-tests %{_datadir}/installed-tests %changelog +* Tue May 08 2018 Kalev Lember - 1.52.3-1 +- Update to 1.52.3 +- Switch to building against system mozjs52 +- Resolves: #1567325 + * Fri Feb 16 2018 Kalev Lember - 1.50.4-4 - Avoid emitting critical warnings for finalized objects Resolves: #1546059