+#
+# Conditional build:
+%bcond_without tests # tests build
+
Summary: SpiderMonkey 60 - JavaScript implementation
Summary(pl.UTF-8): SpiderMonkey 60 - implementacja języka JavaScript
Name: mozjs60
-Version: 60.1.0
-Release: 1
+Version: 60.7.0
+Release: 3
License: MPL v2.0
Group: Libraries
-Source0: http://ftp.gnome.org/pub/gnome/teams/releng/tarballs-needing-help/mozjs/mozjs-%{version}.tar.bz2
-# Source0-md5: 202f71313e53d9b92e7c578107541539
+#Source0: http://ftp.gnome.org/pub/gnome/teams/releng/tarballs-needing-help/mozjs/mozjs-%{version}.tar.bz2
+Source0: http://ftp.mozilla.org/pub/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz
+# Source0-md5: 8e42357e8687ae2004b1493f1fbc0f04
Patch0: copy-headers.patch
Patch1: system-virtualenv.patch
Patch2: include-configure-script.patch
+Patch3: x32.patch
URL: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
-BuildRequires: autoconf2_13
+BuildRequires: autoconf2_13 >= 2.13
+# "TestWrappingOperations.cpp:27:1: error: non-constant condition for static assertion" with -fwrapv on gcc 6 and 7
+%{?with_tests:BuildRequires: gcc-c++ >= 6:8}
+BuildRequires: libicu-devel >= 59.1
BuildRequires: libstdc++-devel >= 6:4.4
BuildRequires: nspr-devel >= 4.9.2
BuildRequires: perl-base >= 1:5.6
Pliki nagłówkowe do biblioteki JavaScript.
%prep
-%setup -q -n mozjs-%{version}
+%setup -q -n firefox-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%build
export PYTHON="%{__python}"
export AUTOCONF="%{_bindir}/autoconf2_13"
export SHELL="/bin/sh"
cd js/src
-mkdir obj
+mkdir -p obj
cd obj
%define configuredir ".."
%configure2_13 \
+ --enable-gcgenerational \
+ --disable-jemalloc \
--enable-readline \
- --enable-threadsafe \
--enable-shared-js \
- --enable-gcgenerational \
- --with-system-nspr \
- --with-system-icu \
- --with-system-zlib \
+ %{!?with_tests:--disable-tests} \
+ --enable-threadsafe \
--with-intl-api \
- --disable-jemalloc
+ --with-system-icu \
+ --with-system-nspr \
+ --with-system-zlib
%{__make} \
HOST_OPTIMIZE_FLAGS= \
MOZ_PGO_OPTIMIZE_FLAGS= \
MOZILLA_VERSION=%{version}
-cd ../../..
-
%install
rm -rf $RPM_BUILD_ROOT