bstinson / rpms / mozjs60

Forked from rpms/mozjs60 5 years ago
Clone

Blame SPECS/mozjs60.spec

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