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