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