- updated to 78.14.0
[packages/mozjs78.git] / mozjs78.spec
CommitLineData
d9e9a7d7
JB
1#
2# Conditional build:
3%bcond_without tests # tests build
4
5Summary: SpiderMonkey 78 - JavaScript implementation
6Summary(pl.UTF-8): SpiderMonkey 78 - implementacja języka JavaScript
7Name: mozjs78
620763ed 8Version: 78.14.0
8c390bd0 9Release: 1
d9e9a7d7
JB
10License: MPL v2.0
11Group: Libraries
12#Source0: http://ftp.gnome.org/pub/gnome/teams/releng/tarballs-needing-help/mozjs/mozjs-%{version}.tar.bz2
80c50954 13Source0: https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz
620763ed 14# Source0-md5: 88c2a5dbee2b6a843258599df3566630
d9e9a7d7
JB
15Patch0: copy-headers.patch
16Patch1: system-virtualenv.patch
17Patch2: include-configure-script.patch
18Patch3: x32.patch
5ad300fe 19Patch4: %{name}-x32-rust.patch
4a319c65 20Patch5: arm.patch
d9e9a7d7
JB
21URL: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
22BuildRequires: autoconf2_13 >= 2.13
23BuildRequires: cargo
24# "TestWrappingOperations.cpp:27:1: error: non-constant condition for static assertion" with -fwrapv on gcc 6 and 7
25%{?with_tests:BuildRequires: gcc-c++ >= 6:8}
26BuildRequires: libicu-devel >= 67.1
27BuildRequires: libstdc++-devel >= 6:4.4
952fd973 28BuildRequires: llvm
d9e9a7d7
JB
29BuildRequires: nspr-devel >= 4.25
30BuildRequires: perl-base >= 1:5.6
31BuildRequires: pkgconfig
afe2538d 32BuildRequires: python3 >= 1:3.8.5-3
d9e9a7d7
JB
33BuildRequires: python3-virtualenv >= 1.9.1-4
34BuildRequires: readline-devel
35BuildRequires: rpm-perlprov
36BuildRequires: rpmbuild(macros) >= 1.294
37BuildRequires: rust >= 1.41.0
2b57b690
JP
38BuildRequires: tar >= 1:1.22
39BuildRequires: xz
d9e9a7d7
JB
40BuildRequires: zlib-devel >= 1.2.3
41Requires: nspr >= 4.25
42Requires: zlib >= 1.2.3
4a319c65 43ExclusiveArch: %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl
d9e9a7d7
JB
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46%description
47JavaScript Reference Implementation (codename SpiderMonkey). The
48package contains JavaScript runtime (compiler, interpreter,
49decompiler, garbage collector, atom manager, standard classes) and
50small "shell" program that can be used interactively and with .js
51files to run scripts.
52
53%description -l pl.UTF-8
54Wzorcowa implementacja JavaScriptu (o nazwie kodowej SpiderMonkey).
55Pakiet zawiera środowisko uruchomieniowe (kompilator, interpreter,
56dekompilator, odśmiecacz, standardowe klasy) i niewielką powłokę,
57która może być używana interaktywnie lub z plikami .js do uruchamiania
58skryptów.
59
60%package devel
61Summary: Header files for JavaScript reference library
62Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki JavaScript
63Group: Development/Libraries
64Requires: %{name} = %{version}-%{release}
65Requires: libstdc++-devel
66Requires: nspr-devel >= 4.25
67
68%description devel
69Header files for JavaScript reference library.
70
71%description devel -l pl.UTF-8
72Pliki nagłówkowe do biblioteki JavaScript.
73
74%prep
75%setup -q -n firefox-%{version}
76%patch0 -p1
77%patch1 -p1
78%patch2 -p1
79%patch3 -p1
5ad300fe
JB
80%ifarch x32
81%patch4 -p1
82%endif
4a319c65 83%patch5 -p1
d9e9a7d7
JB
84
85%build
86export PYTHON="%{__python}"
87export AUTOCONF="%{_bindir}/autoconf2_13"
88export SHELL="/bin/sh"
89cd js/src
90mkdir -p obj
91cd obj
92
93%define configuredir ".."
94%configure2_13 \
95 --enable-gcgenerational \
96 --disable-jemalloc \
97 --enable-readline \
98 --enable-shared-js \
99 %{!?with_tests:--disable-tests} \
100 --enable-threadsafe \
101 --with-intl-api \
102 --with-system-icu \
103 --with-system-nspr \
104 --with-system-zlib
105
106%{__make} \
107 HOST_OPTIMIZE_FLAGS= \
108 MODULE_OPTIMIZE_FLAGS= \
109 MOZ_OPTIMIZE_FLAGS="-freorder-blocks" \
110 MOZ_PGO_OPTIMIZE_FLAGS= \
111 MOZILLA_VERSION=%{version}
112
113%install
114rm -rf $RPM_BUILD_ROOT
115
116cd js/src/obj
117
118%{__make} -C js/src install \
119 DESTDIR=$RPM_BUILD_ROOT \
120 MOZILLA_VERSION=%{version}
121
122%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.ajs
123
124%clean
125rm -rf $RPM_BUILD_ROOT
126
127%post -p /sbin/ldconfig
128%postun -p /sbin/ldconfig
129
130%files
131%defattr(644,root,root,755)
132%doc js/src/README.html
133%attr(755,root,root) %{_bindir}/js78
134%attr(755,root,root) %{_libdir}/libmozjs-78.so
135
136%files devel
137%defattr(644,root,root,755)
138%attr(755,root,root) %{_bindir}/js78-config
139%{_includedir}/mozjs-78
140%{_pkgconfigdir}/mozjs-78.pc
This page took 0.1038 seconds and 4 git commands to generate.