Summary: JavaScript interpreter and libraries
Name: mozjs17
Version: 17.0.0
Release: 18%{?dist}
License: GPLv2+ or LGPLv2+ or MPLv1.1
Group: Development/Languages
URL: http://www.mozilla.org/js/
Source0: http://ftp.mozilla.org/pub/mozilla.org/js/mozjs%{version}.tar.gz
BuildRequires: pkgconfig(nspr)
BuildRequires: readline-devel
BuildRequires: /usr/bin/zip
BuildRequires: /usr/bin/python
BuildRequires: /usr/bin/autoconf-2.13
BuildRequires: perl(Getopt::Long)
Patch0: js17-build-fixes.patch
# makes mozjs to match js from xul 21
Patch1: js17-jsval.patch
Patch2: mozbug746112-no-decommit-on-large-pages.patch
Patch3: mozjs17-0001-Add-AArch64-support.patch
Patch4: 0001-Make-js-config.h-multiarch-compatible.patch
Patch5: 0001-Move-JS_BYTES_PER_WORD-out-of-config.h.patch
Patch6: aarch64-64k-page.patch
Patch7: mozjs17-perl522.patch
Patch8: mozjs17-48-bit-VA-fix.patch
Patch9: mozjs17.0.0-gcc7.patch
%description
JavaScript is the Netscape-developed object scripting language used in millions
of web pages and server applications worldwide. Netscape's JavaScript is a
superset of the ECMA-262 Edition 3 (ECMAScript) standard scripting language,
with only mild differences from the published standard.
%package devel
Summary: Header files, libraries and development documentation for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
This package contains the header files, static libraries and development
documentation for %{name}. If you like to develop programs using %{name},
you will need to install %{name}-devel.
%prep
%setup -q -n mozjs%{version}
# Delete bundled sources
rm js/src/editline -rf
rm js/src/ctypes/libffi -rf
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1 -b .aarch64
%patch6 -p1 -b .aarch64
%patch7 -p1
%patch8 -p1
%patch9 -p1
chmod a+x configure
(cd js/src && autoconf-2.13)
%patch5 -p1 -b .multilib-devel
%build
%configure --disable-static --with-system-nspr --enable-threadsafe --enable-readline
make %{?_smp_mflags}
%check
cat > js/src/config/find_vanilla_new_calls << EOF
#!/bin/bash
exit 0
EOF
make -C js/src check
%install
make install DESTDIR=%{buildroot}
# For some reason the headers and pkg-config file are executable
find %{buildroot}%{_includedir} -type f -exec chmod a-x {} \;
chmod a-x %{buildroot}%{_libdir}/pkgconfig/*.pc
# Upstream does not honor --disable-static yet
rm -f %{buildroot}%{_libdir}/*.a
# This is also statically linked; once that is fixed that we could
# consider shipping it.
rm -f %{buildroot}%{_bindir}/js17
# However, delete js-config since everything should use
# the pkg-config file.
rm -f %{buildroot}%{_bindir}/js17-config
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc LICENSE README
%{_libdir}/*.so
%files devel
%{_libdir}/pkgconfig/*.pc
%{_includedir}/js-17.0
%changelog
* Wed Jun 07 2017 Than Ngo <than@redhat.com> - 17.0.0-18
- fixed build issue with gcc7
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 17.0.0-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Sep 12 2016 Debarshi Ray <rishi@fedoraproject.org> 17.0.0-16
- Backport fix for 48-bit VA on Aarch64 (RH #1242326)
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 17.0.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Nov 09 2015 Yaakov Selkowitz <yselkowi@redhat.com> - 17.0.0-14
- Fix build with Perl 5.22 (#1239698)
- Specify Perl module dependencies for F24
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 17.0.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 17.0.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Fri Jun 06 2014 Dennis Gilmore <dennis@ausil.us> 17.0.0-11
- add patch for 64k pages on aarch64
* Tue Mar 18 2014 Colin Walters <walters@redhat.com> 17.0.0-10
- Add patch to fix multilib conflicts with -devel headers
* Mon Jan 6 2014 Peter Robinson <pbrobinson@fedoraproject.org> 17.0.0-9
- Add patch to fix FTBFS on aarch64
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 17.0.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Jun 17 2013 Dennis Gilmore <dennis@ausil.us> 17.0.0-7
- disable failing find_vanilla_new_calls test
* Fri Jun 07 2013 Colin Walters <walters@verbum.org> 17.0.0-6
- Add patch for ppc/ppc64: https://bugzilla.redhat.com/show_bug.cgi?id=971519
* Fri Jun 07 2013 Colin Walters <walters@verbum.org> 17.0.0-5
- Enable check: https://bugzilla.redhat.com/show_bug.cgi?id=971519
* Fri May 17 2013 Dan HorĂ¡k <dan[at]danny.cz> - 17.0.0-4
- fix build on 64-bit big-endians
* Mon Apr 15 2013 Colin Walters <walters@verbum.org> 17.0.0-3
- Delete js17, it is not used
* Sun Apr 14 2013 Peter Robinson <pbrobinson@fedoraproject.org> 17.0.0-2
- Add disttag
* Mon Apr 01 2013 Colin Walters <walters@verbum.org> - 17.0.0-1
- Spec file inherited from js.spec