|
|
c4fa72 |
%global major 52
|
|
|
c4fa72 |
|
|
|
c4fa72 |
# Require libatomic for ppc
|
|
|
c4fa72 |
%ifarch ppc
|
|
|
c4fa72 |
%global system_libatomic 1
|
|
|
c4fa72 |
%endif
|
|
|
c4fa72 |
|
|
|
c4fa72 |
# Big endian platforms
|
|
|
c4fa72 |
%ifarch ppc ppc64 s390 s390x
|
|
|
c4fa72 |
%global big_endian 1
|
|
|
c4fa72 |
%endif
|
|
|
c4fa72 |
|
|
|
c4fa72 |
Name: mozjs%{major}
|
|
|
c4fa72 |
Version: 52.9.0
|
|
|
c4fa72 |
Release: 1%{?dist}
|
|
|
c4fa72 |
Summary: SpiderMonkey JavaScript library
|
|
|
c4fa72 |
|
|
|
c4fa72 |
License: MPLv2.0 and MPLv1.1 and BSD and GPLv2+ and GPLv3+ and LGPLv2.1 and LGPLv2.1+ and AFL and ASL 2.0
|
|
|
c4fa72 |
URL: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
|
|
|
c4fa72 |
Source0: https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz
|
|
|
c4fa72 |
|
|
|
c4fa72 |
# Patches from Debian mozjs52_52.3.1-4.debian.tar.xz:
|
|
|
c4fa72 |
Patch0001: fix-soname.patch
|
|
|
c4fa72 |
Patch0002: copy-headers.patch
|
|
|
c4fa72 |
Patch0003: tests-increase-timeout.patch
|
|
|
c4fa72 |
Patch0004: tests-snans-be.patch
|
|
|
c4fa72 |
|
|
|
c4fa72 |
# Disable JS Helper threads on ppc64le
|
|
|
c4fa72 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1523121
|
|
|
c4fa72 |
Patch0010: disable-extra-threads.patch
|
|
|
c4fa72 |
|
|
|
c4fa72 |
# Patches from https://github.com/ptomato/mozjs / Debian mozjs52_52.3.1-4.debian.tar.xz
|
|
|
c4fa72 |
Patch0101: disable-mozglue.patch
|
|
|
c4fa72 |
Patch0104: include-configure-script.patch
|
|
|
c4fa72 |
|
|
|
c4fa72 |
# Patches from Fedora firefox package:
|
|
|
c4fa72 |
Patch18: xulrunner-24.0-jemalloc-ppc.patch
|
|
|
c4fa72 |
Patch19: xulrunner-24.0-s390-inlines.patch
|
|
|
c4fa72 |
Patch26: build-icu-big-endian.patch
|
|
|
c4fa72 |
Patch36: build-missing-xlocale-h.patch
|
|
|
c4fa72 |
Patch304: mozilla-1253216.patch
|
|
|
c4fa72 |
|
|
|
c4fa72 |
BuildRequires: autoconf213
|
|
|
c4fa72 |
BuildRequires: perl-devel
|
|
|
c4fa72 |
BuildRequires: pkgconfig(libffi)
|
|
|
c4fa72 |
BuildRequires: pkgconfig(zlib)
|
|
|
c4fa72 |
BuildRequires: python2-devel
|
|
|
c4fa72 |
BuildRequires: readline-devel
|
|
|
c4fa72 |
BuildRequires: /usr/bin/zip
|
|
|
c4fa72 |
%if 0%{?system_libatomic}
|
|
|
c4fa72 |
BuildRequires: libatomic
|
|
|
c4fa72 |
%endif
|
|
|
c4fa72 |
|
|
|
c4fa72 |
# Firefox does not allow to build with system version of jemalloc
|
|
|
c4fa72 |
Provides: bundled(jemalloc) = 4.3.1
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%description
|
|
|
c4fa72 |
SpiderMonkey is the code-name for Mozilla Firefox's C++ implementation of
|
|
|
c4fa72 |
JavaScript. It is intended to be embedded in other applications
|
|
|
c4fa72 |
that provide host environments for JavaScript.
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%package devel
|
|
|
c4fa72 |
Summary: Development files for %{name}
|
|
|
c4fa72 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%description devel
|
|
|
c4fa72 |
The %{name}-devel package contains libraries and header files for
|
|
|
c4fa72 |
developing applications that use %{name}.
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%prep
|
|
|
c4fa72 |
%setup -q -n firefox-%{version}esr/js/src
|
|
|
c4fa72 |
|
|
|
c4fa72 |
pushd ../..
|
|
|
c4fa72 |
%patch0001 -p1
|
|
|
c4fa72 |
%patch0002 -p1
|
|
|
c4fa72 |
%patch0003 -p1
|
|
|
c4fa72 |
%patch0004 -p1
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%patch0010 -p1
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%patch0101 -p1
|
|
|
c4fa72 |
%patch0104 -p1
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%patch18 -p1 -b .jemalloc-ppc
|
|
|
c4fa72 |
%patch19 -p2 -b .s390-inlines
|
|
|
c4fa72 |
|
|
|
c4fa72 |
# Patch for big endian platforms only
|
|
|
c4fa72 |
%if 0%{?big_endian}
|
|
|
c4fa72 |
%patch26 -p1 -b .icu
|
|
|
c4fa72 |
%patch36 -p2 -b .xlocale
|
|
|
c4fa72 |
%endif
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%patch304 -p1 -b .1253216
|
|
|
c4fa72 |
|
|
|
c4fa72 |
# make sure we don't ever accidentally link against bundled security libs
|
|
|
c4fa72 |
rm -rf security/
|
|
|
c4fa72 |
popd
|
|
|
c4fa72 |
|
|
|
c4fa72 |
# Remove zlib directory (to be sure using system version)
|
|
|
c4fa72 |
rm -rf ../../modules/zlib
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%build
|
|
|
c4fa72 |
# Disable null pointer gcc6 optimization in gcc6 (rhbz#1328045)
|
|
|
c4fa72 |
export CFLAGS="%{optflags} -fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks"
|
|
|
c4fa72 |
export CXXFLAGS="$CFLAGS"
|
|
|
c4fa72 |
export LINKFLAGS="%{?__global_ldflags}"
|
|
|
c4fa72 |
export PYTHON="%{__python2}"
|
|
|
c4fa72 |
# Keep using Python 2 for the build for now
|
|
|
c4fa72 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1610009
|
|
|
c4fa72 |
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
|
|
c4fa72 |
|
|
|
c4fa72 |
autoconf-2.13
|
|
|
c4fa72 |
%configure \
|
|
|
c4fa72 |
--without-system-icu \
|
|
|
c4fa72 |
--enable-posix-nspr-emulation \
|
|
|
c4fa72 |
--with-system-zlib \
|
|
|
c4fa72 |
--enable-tests \
|
|
|
c4fa72 |
--disable-strip \
|
|
|
c4fa72 |
--with-intl-api \
|
|
|
c4fa72 |
--enable-readline \
|
|
|
c4fa72 |
--enable-shared-js \
|
|
|
c4fa72 |
--disable-optimize \
|
|
|
c4fa72 |
--enable-pie \
|
|
|
c4fa72 |
%ifarch s390 s390x
|
|
|
c4fa72 |
--disable-jemalloc \
|
|
|
c4fa72 |
%endif
|
|
|
c4fa72 |
%ifarch %{arm} aarch64 ppc %{power64}
|
|
|
c4fa72 |
--disable-ion
|
|
|
c4fa72 |
%endif
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%if 0%{?big_endian}
|
|
|
c4fa72 |
echo "Generate big endian version of config/external/icu/data/icud58l.dat"
|
|
|
c4fa72 |
pushd ../..
|
|
|
c4fa72 |
./mach python intl/icu_sources_data.py .
|
|
|
c4fa72 |
ls -l config/external/icu/data
|
|
|
c4fa72 |
rm -f config/external/icu/data/icudt*l.dat
|
|
|
c4fa72 |
popd
|
|
|
c4fa72 |
%endif
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%make_build
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%install
|
|
|
c4fa72 |
# Keep using Python 2 for the build for now
|
|
|
c4fa72 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1610009
|
|
|
c4fa72 |
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%make_install
|
|
|
c4fa72 |
|
|
|
c4fa72 |
# Fix permissions
|
|
|
c4fa72 |
chmod -x %{buildroot}%{_libdir}/pkgconfig/*.pc
|
|
|
c4fa72 |
|
|
|
c4fa72 |
# Remove unneeded files
|
|
|
c4fa72 |
rm %{buildroot}%{_bindir}/js%{major}-config
|
|
|
c4fa72 |
rm %{buildroot}%{_libdir}/libjs_static.ajs
|
|
|
c4fa72 |
|
|
|
c4fa72 |
# Rename library and create symlinks, following fix-soname.patch
|
|
|
c4fa72 |
mv %{buildroot}%{_libdir}/libmozjs-%{major}.so \
|
|
|
c4fa72 |
%{buildroot}%{_libdir}/libmozjs-%{major}.so.0.0.0
|
|
|
c4fa72 |
ln -s libmozjs-%{major}.so.0.0.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so.0
|
|
|
c4fa72 |
ln -s libmozjs-%{major}.so.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%check
|
|
|
c4fa72 |
# Run SpiderMonkey tests
|
|
|
c4fa72 |
/usr/bin/python2-for-tests tests/jstests.py -d -s -t 1800 --no-progress ../../js/src/js/src/shell/js \
|
|
|
c4fa72 |
%ifarch %{ix86} x86_64 %{arm} aarch64 ppc ppc64le s390
|
|
|
c4fa72 |
;
|
|
|
c4fa72 |
%else
|
|
|
c4fa72 |
|| :
|
|
|
c4fa72 |
%endif
|
|
|
c4fa72 |
|
|
|
c4fa72 |
# Run basic JIT tests
|
|
|
c4fa72 |
/usr/bin/python2-for-tests jit-test/jit_test.py -s -t 1800 --no-progress ../../js/src/js/src/shell/js basic \
|
|
|
c4fa72 |
%ifarch %{ix86} x86_64 %{arm} aarch64 ppc ppc64le s390
|
|
|
c4fa72 |
;
|
|
|
c4fa72 |
%else
|
|
|
c4fa72 |
|| :
|
|
|
c4fa72 |
%endif
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%ldconfig_scriptlets
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%files
|
|
|
c4fa72 |
%doc README.html
|
|
|
c4fa72 |
%{_libdir}/libmozjs-%{major}.so.0*
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%files devel
|
|
|
c4fa72 |
%{_bindir}/js%{major}
|
|
|
c4fa72 |
%{_libdir}/libmozjs-%{major}.so
|
|
|
c4fa72 |
%{_libdir}/pkgconfig/*.pc
|
|
|
c4fa72 |
%{_includedir}/mozjs-%{major}/
|
|
|
c4fa72 |
|
|
|
c4fa72 |
%changelog
|
|
|
c4fa72 |
* Wed Jul 25 2018 Kalev Lember <klember@redhat.com> - 52.9.0-1
|
|
|
c4fa72 |
- Update to 52.9.0
|
|
|
c4fa72 |
|
|
|
c4fa72 |
* Mon Jun 11 2018 Ray Strode <rstrode@redhat.com> - 52.8.0-2
|
|
|
c4fa72 |
- safeguard against linking against bundled nss
|
|
|
c4fa72 |
Related: #1563708
|
|
|
c4fa72 |
|
|
|
c4fa72 |
* Fri May 11 2018 Kalev Lember <klember@redhat.com> - 52.8.0-1
|
|
|
c4fa72 |
- Update to 52.8.0
|
|
|
c4fa72 |
- Fix the build on ppc
|
|
|
c4fa72 |
- Disable JS Helper threads on ppc64le (#1523121)
|
|
|
c4fa72 |
|
|
|
c4fa72 |
* Sat Apr 07 2018 Kalev Lember <klember@redhat.com> - 52.7.3-1
|
|
|
c4fa72 |
- Update to 52.7.3
|
|
|
c4fa72 |
|
|
|
c4fa72 |
* Tue Mar 20 2018 Kalev Lember <klember@redhat.com> - 52.7.2-1
|
|
|
c4fa72 |
- Update to 52.7.2
|
|
|
c4fa72 |
- Switch to %%ldconfig_scriptlets
|
|
|
c4fa72 |
|
|
|
c4fa72 |
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 52.6.0-2
|
|
|
c4fa72 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
c4fa72 |
|
|
|
c4fa72 |
* Tue Jan 23 2018 Kalev Lember <klember@redhat.com> - 52.6.0-1
|
|
|
c4fa72 |
- Update to 52.6.0
|
|
|
c4fa72 |
|
|
|
c4fa72 |
* Fri Nov 24 2017 Björn Esser <besser82@fedoraproject.org> - 52.5.0-5
|
|
|
c4fa72 |
- SpiderMonkey tests have regressions on %%{power64}, too
|
|
|
c4fa72 |
|
|
|
c4fa72 |
* Fri Nov 24 2017 Björn Esser <besser82@fedoraproject.org> - 52.5.0-4
|
|
|
c4fa72 |
- SpiderMonkey tests have regressions on big endian platforms
|
|
|
c4fa72 |
|
|
|
c4fa72 |
* Fri Nov 24 2017 Björn Esser <besser82@fedoraproject.org> - 52.5.0-3
|
|
|
c4fa72 |
- SpiderMonkey tests do not fail on any arch
|
|
|
c4fa72 |
- Basic JIT tests are failing on s390 arches, only
|
|
|
c4fa72 |
- Use macro for ppc64 arches
|
|
|
c4fa72 |
- Run tests using Python2 explicitly
|
|
|
c4fa72 |
- Simplify %%check
|
|
|
c4fa72 |
- Use the %%{major} macro consequently
|
|
|
c4fa72 |
- Replace %%define with %%global
|
|
|
c4fa72 |
|
|
|
c4fa72 |
* Fri Nov 24 2017 Björn Esser <besser82@fedoraproject.org> - 52.5.0-2
|
|
|
c4fa72 |
- Use macro for Python 2 interpreter
|
|
|
c4fa72 |
- Use proper export and quoting
|
|
|
c4fa72 |
|
|
|
c4fa72 |
* Tue Nov 14 2017 Kalev Lember <klember@redhat.com> - 52.5.0-1
|
|
|
c4fa72 |
- Update to 52.5.0
|
|
|
c4fa72 |
|
|
|
c4fa72 |
* Tue Oct 31 2017 Kalev Lember <klember@redhat.com> - 52.4.0-3
|
|
|
c4fa72 |
- Include standalone /usr/bin/js52 interpreter
|
|
|
c4fa72 |
|
|
|
c4fa72 |
* Tue Oct 31 2017 Kalev Lember <klember@redhat.com> - 52.4.0-2
|
|
|
c4fa72 |
- Various secondary arch fixes
|
|
|
c4fa72 |
|
|
|
c4fa72 |
* Thu Sep 28 2017 Kalev Lember <klember@redhat.com> - 52.4.0-1
|
|
|
c4fa72 |
- Update to 52.4.0
|
|
|
c4fa72 |
|
|
|
c4fa72 |
* Wed Sep 20 2017 Kalev Lember <klember@redhat.com> - 52.3.0-1
|
|
|
c4fa72 |
- Initial Fedora packaging, based on earlier mozjs45 work
|