|
|
e43f4b |
%global major 60
|
|
|
e43f4b |
|
|
|
e43f4b |
# Require libatomic for ppc
|
|
|
e43f4b |
%ifarch ppc
|
|
|
e43f4b |
%global system_libatomic 1
|
|
|
e43f4b |
%endif
|
|
|
e43f4b |
|
|
|
e43f4b |
# Big endian platforms
|
|
|
e43f4b |
%ifarch ppc ppc64 s390 s390x
|
|
|
e43f4b |
%global big_endian 1
|
|
|
e43f4b |
%endif
|
|
|
e43f4b |
|
|
|
e43f4b |
Name: mozjs%{major}
|
|
|
e43f4b |
Version: 60.9.0
|
|
|
e43f4b |
Release: 3%{?dist}
|
|
|
e43f4b |
Summary: SpiderMonkey JavaScript library
|
|
|
e43f4b |
|
|
|
e43f4b |
License: MPLv2.0 and MPLv1.1 and BSD and GPLv2+ and GPLv3+ and LGPLv2+ and AFL and ASL 2.0
|
|
|
e43f4b |
URL: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
|
|
|
e43f4b |
Source0: https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz
|
|
|
e43f4b |
|
|
|
e43f4b |
# Patches from Debian mozjs52_52.3.1-4.debian.tar.xz:
|
|
|
e43f4b |
Patch0001: fix-soname.patch
|
|
|
e43f4b |
Patch0002: copy-headers.patch
|
|
|
e43f4b |
Patch0003: tests-increase-timeout.patch
|
|
|
e43f4b |
Patch0008: Always-use-the-equivalent-year-to-determine-the-time-zone.patch
|
|
|
e43f4b |
Patch0009: icu_sources_data.py-Decouple-from-Mozilla-build-system.patch
|
|
|
e43f4b |
Patch0010: icu_sources_data-Write-command-output-to-our-stderr.patch
|
|
|
e43f4b |
Patch0011: tests-For-tests-that-are-skipped-on-64-bit-mips64-is-also.patch
|
|
|
e43f4b |
|
|
|
e43f4b |
# Build fixes - https://hg.mozilla.org/mozilla-central/rev/ca36a6c4f8a4a0ddaa033fdbe20836d87bbfb873
|
|
|
e43f4b |
Patch12: emitter.patch
|
|
|
e43f4b |
Patch13: emitter_test.patch
|
|
|
e43f4b |
Patch14: init_patch.patch
|
|
|
e43f4b |
|
|
|
e43f4b |
# s390x fixes:
|
|
|
e43f4b |
# https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/enddianness.patch
|
|
|
e43f4b |
Patch15: enddianness.patch
|
|
|
e43f4b |
# https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/jsproperty-endian.patch
|
|
|
e43f4b |
Patch16: jsproperty-endian.patch
|
|
|
e43f4b |
|
|
|
e43f4b |
# Patches from Fedora firefox package:
|
|
|
e43f4b |
Patch26: build-icu-big-endian.patch
|
|
|
e43f4b |
|
|
|
e43f4b |
# aarch64 fixes for -O2
|
|
|
e43f4b |
Patch30: Save-x28-before-clobbering-it-in-the-regex-compiler.patch
|
|
|
e43f4b |
Patch31: Save-and-restore-non-volatile-x28-on-ARM64-for-generated-unboxed-object-constructor.patch
|
|
|
e43f4b |
|
|
|
e43f4b |
BuildRequires: autoconf213
|
|
|
e43f4b |
BuildRequires: gcc
|
|
|
e43f4b |
BuildRequires: gcc-c++
|
|
|
e43f4b |
BuildRequires: perl-devel
|
|
|
e43f4b |
BuildRequires: pkgconfig(libffi)
|
|
|
e43f4b |
BuildRequires: pkgconfig(zlib)
|
|
|
e43f4b |
BuildRequires: python2-devel
|
|
|
e43f4b |
BuildRequires: readline-devel
|
|
|
e43f4b |
BuildRequires: /usr/bin/zip
|
|
|
e43f4b |
%if 0%{?system_libatomic}
|
|
|
e43f4b |
BuildRequires: libatomic
|
|
|
e43f4b |
%endif
|
|
|
e43f4b |
|
|
|
e43f4b |
# Firefox does not allow to build with system version of jemalloc
|
|
|
e43f4b |
Provides: bundled(jemalloc) = 4.3.1
|
|
|
e43f4b |
|
|
|
e43f4b |
%description
|
|
|
e43f4b |
SpiderMonkey is the code-name for Mozilla Firefox's C++ implementation of
|
|
|
e43f4b |
JavaScript. It is intended to be embedded in other applications
|
|
|
e43f4b |
that provide host environments for JavaScript.
|
|
|
e43f4b |
|
|
|
e43f4b |
%package devel
|
|
|
e43f4b |
Summary: Development files for %{name}
|
|
|
e43f4b |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
e43f4b |
|
|
|
e43f4b |
%description devel
|
|
|
e43f4b |
The %{name}-devel package contains libraries and header files for
|
|
|
e43f4b |
developing applications that use %{name}.
|
|
|
e43f4b |
|
|
|
e43f4b |
%prep
|
|
|
e43f4b |
%setup -q -n firefox-%{version}/js/src
|
|
|
e43f4b |
|
|
|
e43f4b |
pushd ../..
|
|
|
e43f4b |
%patch0001 -p1
|
|
|
e43f4b |
%patch0002 -p1
|
|
|
e43f4b |
%patch0003 -p1
|
|
|
e43f4b |
%patch0008 -p1
|
|
|
e43f4b |
%patch0009 -p1
|
|
|
e43f4b |
%patch0010 -p1
|
|
|
e43f4b |
%patch0011 -p1
|
|
|
e43f4b |
|
|
|
e43f4b |
%patch12 -p1
|
|
|
e43f4b |
%patch13 -p1
|
|
|
e43f4b |
%patch14 -p1
|
|
|
e43f4b |
|
|
|
e43f4b |
# s390x fixes
|
|
|
e43f4b |
%patch15 -p1
|
|
|
e43f4b |
%patch16 -p1
|
|
|
e43f4b |
|
|
|
e43f4b |
# Patch for big endian platforms only
|
|
|
e43f4b |
%if 0%{?big_endian}
|
|
|
e43f4b |
%patch26 -p1 -b .icu
|
|
|
e43f4b |
%endif
|
|
|
e43f4b |
|
|
|
e43f4b |
# aarch64 -O2 fixes
|
|
|
e43f4b |
%ifarch aarch64
|
|
|
e43f4b |
%patch30 -p1
|
|
|
e43f4b |
%patch31 -p1
|
|
|
e43f4b |
%endif
|
|
|
e43f4b |
|
|
|
e43f4b |
# make sure we don't ever accidentally link against bundled security libs
|
|
|
e43f4b |
rm -rf security/
|
|
|
e43f4b |
popd
|
|
|
e43f4b |
|
|
|
e43f4b |
# Remove zlib directory (to be sure using system version)
|
|
|
e43f4b |
rm -rf ../../modules/zlib
|
|
|
e43f4b |
|
|
|
e43f4b |
%build
|
|
|
e43f4b |
export CFLAGS="%{optflags}"
|
|
|
e43f4b |
|
|
|
e43f4b |
export CXXFLAGS="$CFLAGS"
|
|
|
e43f4b |
export LINKFLAGS="%{?__global_ldflags}"
|
|
|
e43f4b |
export PYTHON="%{__python2}"
|
|
|
e43f4b |
# Keep using Python 2 for the build for now
|
|
|
e43f4b |
# https://bugzilla.redhat.com/show_bug.cgi?id=1610009
|
|
|
e43f4b |
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
|
|
e43f4b |
|
|
|
e43f4b |
autoconf-2.13
|
|
|
e43f4b |
%configure \
|
|
|
e43f4b |
--without-system-icu \
|
|
|
e43f4b |
--enable-posix-nspr-emulation \
|
|
|
e43f4b |
--with-system-zlib \
|
|
|
e43f4b |
--enable-tests \
|
|
|
e43f4b |
--disable-strip \
|
|
|
e43f4b |
--with-intl-api \
|
|
|
e43f4b |
--enable-readline \
|
|
|
e43f4b |
--enable-shared-js \
|
|
|
e43f4b |
--disable-optimize \
|
|
|
e43f4b |
--enable-pie \
|
|
|
e43f4b |
--disable-jemalloc \
|
|
|
e43f4b |
|
|
|
e43f4b |
%if 0%{?big_endian}
|
|
|
e43f4b |
echo "Generate big endian version of config/external/icu/data/icud58l.dat"
|
|
|
e43f4b |
pushd ../..
|
|
|
e43f4b |
./mach python intl/icu_sources_data.py .
|
|
|
e43f4b |
ls -l config/external/icu/data
|
|
|
e43f4b |
rm -f config/external/icu/data/icudt*l.dat
|
|
|
e43f4b |
popd
|
|
|
e43f4b |
%endif
|
|
|
e43f4b |
|
|
|
e43f4b |
%make_build
|
|
|
e43f4b |
|
|
|
e43f4b |
%install
|
|
|
e43f4b |
# Keep using Python 2 for the build for now
|
|
|
e43f4b |
# https://bugzilla.redhat.com/show_bug.cgi?id=1610009
|
|
|
e43f4b |
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
|
|
e43f4b |
|
|
|
e43f4b |
%make_install
|
|
|
e43f4b |
|
|
|
e43f4b |
# Fix permissions
|
|
|
e43f4b |
chmod -x %{buildroot}%{_libdir}/pkgconfig/*.pc
|
|
|
e43f4b |
|
|
|
e43f4b |
# Avoid multilib conflicts
|
|
|
e43f4b |
case `uname -i` in
|
|
|
e43f4b |
i386 | ppc | s390 | sparc )
|
|
|
e43f4b |
wordsize="32"
|
|
|
e43f4b |
;;
|
|
|
e43f4b |
x86_64 | ppc64 | s390x | sparc64 )
|
|
|
e43f4b |
wordsize="64"
|
|
|
e43f4b |
;;
|
|
|
e43f4b |
*)
|
|
|
e43f4b |
wordsize=""
|
|
|
e43f4b |
;;
|
|
|
e43f4b |
esac
|
|
|
e43f4b |
|
|
|
e43f4b |
if test -n "$wordsize"
|
|
|
e43f4b |
then
|
|
|
e43f4b |
mv %{buildroot}%{_includedir}/mozjs-60/js-config.h \
|
|
|
e43f4b |
%{buildroot}%{_includedir}/mozjs-60/js-config-$wordsize.h
|
|
|
e43f4b |
|
|
|
e43f4b |
cat >%{buildroot}%{_includedir}/mozjs-60/js-config.h <
|
|
|
e43f4b |
#ifndef JS_CONFIG_H_MULTILIB
|
|
|
e43f4b |
#define JS_CONFIG_H_MULTILIB
|
|
|
e43f4b |
|
|
|
e43f4b |
#include <bits/wordsize.h>
|
|
|
e43f4b |
|
|
|
e43f4b |
#if __WORDSIZE == 32
|
|
|
e43f4b |
# include "js-config-32.h"
|
|
|
e43f4b |
#elif __WORDSIZE == 64
|
|
|
e43f4b |
# include "js-config-64.h"
|
|
|
e43f4b |
#else
|
|
|
e43f4b |
# error "unexpected value for __WORDSIZE macro"
|
|
|
e43f4b |
#endif
|
|
|
e43f4b |
|
|
|
e43f4b |
#endif
|
|
|
e43f4b |
EOF
|
|
|
e43f4b |
|
|
|
e43f4b |
fi
|
|
|
e43f4b |
|
|
|
e43f4b |
# Remove unneeded files
|
|
|
e43f4b |
rm %{buildroot}%{_bindir}/js%{major}
|
|
|
e43f4b |
rm %{buildroot}%{_bindir}/js%{major}-config
|
|
|
e43f4b |
rm %{buildroot}%{_libdir}/libjs_static.ajs
|
|
|
e43f4b |
|
|
|
e43f4b |
# Rename library and create symlinks, following fix-soname.patch
|
|
|
e43f4b |
mv %{buildroot}%{_libdir}/libmozjs-%{major}.so \
|
|
|
e43f4b |
%{buildroot}%{_libdir}/libmozjs-%{major}.so.0.0.0
|
|
|
e43f4b |
ln -s libmozjs-%{major}.so.0.0.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so.0
|
|
|
e43f4b |
ln -s libmozjs-%{major}.so.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so
|
|
|
e43f4b |
|
|
|
e43f4b |
%check
|
|
|
e43f4b |
# Run SpiderMonkey tests
|
|
|
e43f4b |
/usr/bin/python2-for-tests tests/jstests.py -d -s -t 1800 --no-progress ../../js/src/js/src/shell/js \
|
|
|
e43f4b |
%ifarch %{ix86} x86_64 %{arm} aarch64 ppc ppc64le
|
|
|
e43f4b |
;
|
|
|
e43f4b |
%else
|
|
|
e43f4b |
|| :
|
|
|
e43f4b |
%endif
|
|
|
e43f4b |
|
|
|
e43f4b |
# Run basic JIT tests
|
|
|
e43f4b |
/usr/bin/python2-for-tests jit-test/jit_test.py -s -t 1800 --no-progress ../../js/src/js/src/shell/js basic \
|
|
|
e43f4b |
%ifarch %{ix86} x86_64 %{arm} aarch64 ppc ppc64le
|
|
|
e43f4b |
;
|
|
|
e43f4b |
%else
|
|
|
e43f4b |
|| :
|
|
|
e43f4b |
%endif
|
|
|
e43f4b |
|
|
|
e43f4b |
%ldconfig_scriptlets
|
|
|
e43f4b |
|
|
|
e43f4b |
%files
|
|
|
e43f4b |
%doc README.html
|
|
|
e43f4b |
%{_libdir}/libmozjs-%{major}.so.0*
|
|
|
e43f4b |
|
|
|
e43f4b |
%files devel
|
|
|
e43f4b |
%{_libdir}/libmozjs-%{major}.so
|
|
|
e43f4b |
%{_libdir}/pkgconfig/*.pc
|
|
|
e43f4b |
%{_includedir}/mozjs-%{major}/
|
|
|
e43f4b |
|
|
|
e43f4b |
%changelog
|
|
|
e43f4b |
* Tue Sep 10 2019 Kalev Lember <klember@redhat.com> - 60.9.0-3
|
|
|
e43f4b |
- Fix multilib conflicts in js-config.h
|
|
|
e43f4b |
|
|
|
e43f4b |
* Sat Sep 07 2019 Kalev Lember <klember@redhat.com> - 60.9.0-2
|
|
|
e43f4b |
- Backport patches for s390x support
|
|
|
e43f4b |
- Resolves: #1746889
|
|
|
e43f4b |
|
|
|
e43f4b |
* Tue Sep 03 2019 Kalev Lember <klember@redhat.com> - 60.9.0-1
|
|
|
e43f4b |
- Update to 60.9.0
|
|
|
e43f4b |
|
|
|
e43f4b |
* Wed May 29 2019 Kalev Lember <klember@redhat.com> - 60.7.0-2
|
|
|
e43f4b |
- Enable gating
|
|
|
e43f4b |
|
|
|
e43f4b |
* Tue May 21 2019 Kalev Lember <klember@redhat.com> - 60.7.0-1
|
|
|
e43f4b |
- Update to 60.7.0
|
|
|
e43f4b |
|
|
|
e43f4b |
* Mon Apr 15 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 60.6.1-2
|
|
|
e43f4b |
- Backport two Firefox 61 patches and allow compiler optimizations on aarch64
|
|
|
e43f4b |
|
|
|
e43f4b |
* Sun Apr 14 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 60.6.1-1
|
|
|
e43f4b |
- Update to 60.6.1
|
|
|
e43f4b |
|
|
|
e43f4b |
* Thu Feb 21 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 60.4.0-5
|
|
|
e43f4b |
- Re-enable null pointer gcc optimization
|
|
|
e43f4b |
|
|
|
e43f4b |
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 60.4.0-4
|
|
|
e43f4b |
- Rebuild for readline 8.0
|
|
|
e43f4b |
|
|
|
e43f4b |
* Thu Feb 14 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 60.4.0-3
|
|
|
e43f4b |
- Build aarch64 with -O0 because of rhbz#1676292
|
|
|
e43f4b |
|
|
|
e43f4b |
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 60.4.0-2
|
|
|
e43f4b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
e43f4b |
|
|
|
e43f4b |
* Wed Jan 02 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 60.4.0-1
|
|
|
e43f4b |
- Update to 60.4.0
|
|
|
e43f4b |
|
|
|
e43f4b |
* Mon Nov 12 2018 Kalev Lember <klember@redhat.com> - 60.3.0-1
|
|
|
e43f4b |
- Update to 60.3.0
|
|
|
e43f4b |
|
|
|
e43f4b |
* Thu Oct 04 2018 Kalev Lember <klember@redhat.com> - 60.2.2-1
|
|
|
e43f4b |
- Update to 60.2.2
|
|
|
e43f4b |
|
|
|
e43f4b |
* Fri Sep 28 2018 Kalev Lember <klember@redhat.com> - 60.2.1-1
|
|
|
e43f4b |
- Update to 60.2.1
|
|
|
e43f4b |
|
|
|
e43f4b |
* Tue Sep 11 2018 Kalev Lember <klember@redhat.com> - 60.2.0-1
|
|
|
e43f4b |
- Update to 60.2.0
|
|
|
e43f4b |
|
|
|
e43f4b |
* Tue Sep 04 2018 Frantisek Zatloukal <fzatlouk@redhat.com> - 60.1.0-1
|
|
|
e43f4b |
- Update to 60.1.0
|
|
|
e43f4b |
|
|
|
e43f4b |
* Wed Jul 25 2018 Kalev Lember <klember@redhat.com> - 52.9.0-1
|
|
|
e43f4b |
- Update to 52.9.0
|
|
|
e43f4b |
|
|
|
e43f4b |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 52.8.0-3
|
|
|
e43f4b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
e43f4b |
|
|
|
e43f4b |
* Mon Jun 11 2018 Ray Strode <rstrode@redhat.com> - 52.8.0-2
|
|
|
e43f4b |
- safeguard against linking against bundled nss
|
|
|
e43f4b |
Related: #1563708
|
|
|
e43f4b |
|
|
|
e43f4b |
* Fri May 11 2018 Kalev Lember <klember@redhat.com> - 52.8.0-1
|
|
|
e43f4b |
- Update to 52.8.0
|
|
|
e43f4b |
- Fix the build on ppc
|
|
|
e43f4b |
- Disable JS Helper threads on ppc64le (#1523121)
|
|
|
e43f4b |
|
|
|
e43f4b |
* Sat Apr 07 2018 Kalev Lember <klember@redhat.com> - 52.7.3-1
|
|
|
e43f4b |
- Update to 52.7.3
|
|
|
e43f4b |
|
|
|
e43f4b |
* Tue Mar 20 2018 Kalev Lember <klember@redhat.com> - 52.7.2-1
|
|
|
e43f4b |
- Update to 52.7.2
|
|
|
e43f4b |
- Switch to %%ldconfig_scriptlets
|
|
|
e43f4b |
|
|
|
e43f4b |
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 52.6.0-2
|
|
|
e43f4b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
e43f4b |
|
|
|
e43f4b |
* Tue Jan 23 2018 Kalev Lember <klember@redhat.com> - 52.6.0-1
|
|
|
e43f4b |
- Update to 52.6.0
|
|
|
e43f4b |
|
|
|
e43f4b |
* Fri Nov 24 2017 Björn Esser <besser82@fedoraproject.org> - 52.5.0-5
|
|
|
e43f4b |
- SpiderMonkey tests have regressions on %%{power64}, too
|
|
|
e43f4b |
|
|
|
e43f4b |
* Fri Nov 24 2017 Björn Esser <besser82@fedoraproject.org> - 52.5.0-4
|
|
|
e43f4b |
- SpiderMonkey tests have regressions on big endian platforms
|
|
|
e43f4b |
|
|
|
e43f4b |
* Fri Nov 24 2017 Björn Esser <besser82@fedoraproject.org> - 52.5.0-3
|
|
|
e43f4b |
- SpiderMonkey tests do not fail on any arch
|
|
|
e43f4b |
- Basic JIT tests are failing on s390 arches, only
|
|
|
e43f4b |
- Use macro for ppc64 arches
|
|
|
e43f4b |
- Run tests using Python2 explicitly
|
|
|
e43f4b |
- Simplify %%check
|
|
|
e43f4b |
- Use the %%{major} macro consequently
|
|
|
e43f4b |
- Replace %%define with %%global
|
|
|
e43f4b |
|
|
|
e43f4b |
* Fri Nov 24 2017 Björn Esser <besser82@fedoraproject.org> - 52.5.0-2
|
|
|
e43f4b |
- Use macro for Python 2 interpreter
|
|
|
e43f4b |
- Use proper export and quoting
|
|
|
e43f4b |
|
|
|
e43f4b |
* Tue Nov 14 2017 Kalev Lember <klember@redhat.com> - 52.5.0-1
|
|
|
e43f4b |
- Update to 52.5.0
|
|
|
e43f4b |
|
|
|
e43f4b |
* Tue Oct 31 2017 Kalev Lember <klember@redhat.com> - 52.4.0-3
|
|
|
e43f4b |
- Include standalone /usr/bin/js52 interpreter
|
|
|
e43f4b |
|
|
|
e43f4b |
* Tue Oct 31 2017 Kalev Lember <klember@redhat.com> - 52.4.0-2
|
|
|
e43f4b |
- Various secondary arch fixes
|
|
|
e43f4b |
|
|
|
e43f4b |
* Thu Sep 28 2017 Kalev Lember <klember@redhat.com> - 52.4.0-1
|
|
|
e43f4b |
- Update to 52.4.0
|
|
|
e43f4b |
|
|
|
e43f4b |
* Wed Sep 20 2017 Kalev Lember <klember@redhat.com> - 52.3.0-1
|
|
|
e43f4b |
- Initial Fedora packaging, based on earlier mozjs45 work
|