1 | %global major 60 |
---|
2 | |
---|
3 | # Enable LTO |
---|
4 | %global optflags %{?optflags} -flto |
---|
5 | %global build_ldflags %{?build_ldflags} -flto |
---|
6 | |
---|
7 | # Require libatomic for ppc |
---|
8 | %ifarch ppc |
---|
9 | %global system_libatomic 1 |
---|
10 | %endif |
---|
11 | |
---|
12 | # Big endian platforms |
---|
13 | %ifarch ppc ppc64 s390 s390x |
---|
14 | %global big_endian 1 |
---|
15 | %endif |
---|
16 | |
---|
17 | Name: mozjs%{major} |
---|
18 | Version: 60.9.0 |
---|
19 | Release: 7%{?_dist_release} |
---|
20 | Summary: SpiderMonkey JavaScript library |
---|
21 | |
---|
22 | Vendor: Project Vine |
---|
23 | Distribution: Vine Linux. |
---|
24 | |
---|
25 | License: MPLv2.0 and MPLv1.1 and BSD and GPLv2+ and GPLv3+ and LGPLv2+ and AFL and ASL 2.0 |
---|
26 | URL: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey |
---|
27 | Source0: https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz |
---|
28 | |
---|
29 | # Patches from Debian mozjs52_52.3.1-4.debian.tar.xz: |
---|
30 | Patch0001: fix-soname.patch |
---|
31 | Patch0002: copy-headers.patch |
---|
32 | Patch0003: tests-increase-timeout.patch |
---|
33 | Patch0008: Always-use-the-equivalent-year-to-determine-the-time-zone.patch |
---|
34 | Patch0009: icu_sources_data.py-Decouple-from-Mozilla-build-system.patch |
---|
35 | Patch0010: icu_sources_data-Write-command-output-to-our-stderr.patch |
---|
36 | Patch0011: tests-For-tests-that-are-skipped-on-64-bit-mips64-is-also.patch |
---|
37 | |
---|
38 | # Patches from Debian mozjs60_60.8.0-2.debian.tar.xz |
---|
39 | Patch001000: tests-Expect-some-floating-point-tests-to-fail-on-i386.patch |
---|
40 | |
---|
41 | # Build fixes - https://hg.mozilla.org/mozilla-central/rev/ca36a6c4f8a4a0ddaa033fdbe20836d87bbfb873 |
---|
42 | Patch12: emitter.patch |
---|
43 | Patch13: emitter_test.patch |
---|
44 | Patch14: init_patch.patch |
---|
45 | |
---|
46 | # s390x fixes: |
---|
47 | # https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/enddianness.patch |
---|
48 | Patch15: enddianness.patch |
---|
49 | # https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/jsproperty-endian.patch |
---|
50 | Patch16: jsproperty-endian.patch |
---|
51 | # https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/tests-Skip-a-test-on-s390x.patch |
---|
52 | Patch17: tests-Skip-a-test-on-s390x.patch |
---|
53 | # https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/tests-Expect-a-test-to-fail-on-big-endian.patch |
---|
54 | Patch18: tests-Expect-a-test-to-fail-on-big-endian.patch |
---|
55 | |
---|
56 | # Patches from Fedora firefox package: |
---|
57 | Patch26: build-icu-big-endian.patch |
---|
58 | |
---|
59 | # aarch64 fixes for -O2 |
---|
60 | Patch30: Save-x28-before-clobbering-it-in-the-regex-compiler.patch |
---|
61 | Patch31: Save-and-restore-non-volatile-x28-on-ARM64-for-generated-unboxed-object-constructor.patch |
---|
62 | |
---|
63 | BuildRequires: autoconf213 |
---|
64 | BuildRequires: gcc |
---|
65 | BuildRequires: gcc-c++ |
---|
66 | BuildRequires: perl |
---|
67 | BuildRequires: pkgconfig(libffi) |
---|
68 | BuildRequires: pkgconfig(zlib) |
---|
69 | BuildRequires: python-devel |
---|
70 | BuildRequires: python-rpm-macros |
---|
71 | BuildRequires: readline-devel |
---|
72 | BuildRequires: /usr/bin/zip |
---|
73 | %if 0%{?system_libatomic} |
---|
74 | BuildRequires: libatomic |
---|
75 | %endif |
---|
76 | |
---|
77 | # Firefox does not allow to build with system version of jemalloc |
---|
78 | Provides: bundled(jemalloc) = 4.3.1 |
---|
79 | |
---|
80 | %description |
---|
81 | SpiderMonkey is the code-name for Mozilla Firefox's C++ implementation of |
---|
82 | JavaScript. It is intended to be embedded in other applications |
---|
83 | that provide host environments for JavaScript. |
---|
84 | |
---|
85 | %package devel |
---|
86 | Summary: Development files for %{name} |
---|
87 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
88 | |
---|
89 | %description devel |
---|
90 | The %{name}-devel package contains libraries and header files for |
---|
91 | developing applications that use %{name}. |
---|
92 | |
---|
93 | |
---|
94 | %debug_package |
---|
95 | |
---|
96 | |
---|
97 | %prep |
---|
98 | %setup -q -n firefox-%{version}/js/src |
---|
99 | |
---|
100 | pushd ../.. |
---|
101 | %patch0001 -p1 |
---|
102 | %patch0002 -p1 |
---|
103 | %patch0003 -p1 |
---|
104 | %patch0008 -p1 |
---|
105 | %patch0009 -p1 |
---|
106 | %patch0010 -p1 |
---|
107 | %patch0011 -p1 |
---|
108 | |
---|
109 | %patch12 -p1 |
---|
110 | %patch13 -p1 |
---|
111 | %patch14 -p1 |
---|
112 | |
---|
113 | # s390x fixes |
---|
114 | %patch15 -p1 |
---|
115 | %patch16 -p1 |
---|
116 | %patch17 -p1 |
---|
117 | %patch18 -p1 |
---|
118 | |
---|
119 | # Patch for big endian platforms only |
---|
120 | %if 0%{?big_endian} |
---|
121 | %patch26 -p1 -b .icu |
---|
122 | %endif |
---|
123 | |
---|
124 | # aarch64 -O2 fixes |
---|
125 | %ifarch aarch64 |
---|
126 | %patch30 -p1 |
---|
127 | %patch31 -p1 |
---|
128 | %endif |
---|
129 | |
---|
130 | %ifarch %{ix86} |
---|
131 | %patch1000 -p1 |
---|
132 | %endif |
---|
133 | |
---|
134 | # make sure we don't ever accidentally link against bundled security libs |
---|
135 | rm -rf security/ |
---|
136 | popd |
---|
137 | |
---|
138 | # Remove zlib directory (to be sure using system version) |
---|
139 | rm -rf ../../modules/zlib |
---|
140 | |
---|
141 | %build |
---|
142 | # Enable LTO |
---|
143 | export AR=%{_bindir}/gcc-ar |
---|
144 | export RANLIB=%{_bindir}/gcc-ranlib |
---|
145 | export NM=%{_bindir}/gcc-nm |
---|
146 | |
---|
147 | export CFLAGS="%{optflags}" |
---|
148 | |
---|
149 | # workaround for ix86 (32bit) |
---|
150 | # https://bugzilla.mozilla.org/show_bug.cgi?id=1621900 |
---|
151 | %ifarch %{ix86} |
---|
152 | export CFLAGS="$CFLAGS -mfpmath=sse -msse -msse2" |
---|
153 | %endif |
---|
154 | |
---|
155 | export CXXFLAGS="$CFLAGS" |
---|
156 | export LINKFLAGS="%{?__global_ldflags}" |
---|
157 | export PYTHON="%{__python}" |
---|
158 | |
---|
159 | autoconf-2.13 |
---|
160 | %configure \ |
---|
161 | --without-system-icu \ |
---|
162 | --enable-posix-nspr-emulation \ |
---|
163 | --with-system-zlib \ |
---|
164 | --enable-tests \ |
---|
165 | --disable-strip \ |
---|
166 | --with-intl-api \ |
---|
167 | --enable-readline \ |
---|
168 | --enable-shared-js \ |
---|
169 | --disable-optimize \ |
---|
170 | --enable-pie \ |
---|
171 | --disable-jemalloc \ |
---|
172 | |
---|
173 | %if 0%{?big_endian} |
---|
174 | echo "Generate big endian version of config/external/icu/data/icud58l.dat" |
---|
175 | pushd ../.. |
---|
176 | ./mach python intl/icu_sources_data.py . |
---|
177 | ls -l config/external/icu/data |
---|
178 | rm -f config/external/icu/data/icudt*l.dat |
---|
179 | popd |
---|
180 | %endif |
---|
181 | |
---|
182 | %make_build |
---|
183 | |
---|
184 | %install |
---|
185 | rm -rf %{buildroot} |
---|
186 | %make_install |
---|
187 | |
---|
188 | # Fix permissions |
---|
189 | chmod -x %{buildroot}%{_libdir}/pkgconfig/*.pc |
---|
190 | |
---|
191 | # Avoid multilib conflicts |
---|
192 | case `uname -i` in |
---|
193 | i386 | ppc | s390 | sparc ) |
---|
194 | wordsize="32" |
---|
195 | ;; |
---|
196 | x86_64 | ppc64 | s390x | sparc64 ) |
---|
197 | wordsize="64" |
---|
198 | ;; |
---|
199 | *) |
---|
200 | wordsize="" |
---|
201 | ;; |
---|
202 | esac |
---|
203 | |
---|
204 | if test -n "$wordsize" |
---|
205 | then |
---|
206 | mv %{buildroot}%{_includedir}/mozjs-60/js-config.h \ |
---|
207 | %{buildroot}%{_includedir}/mozjs-60/js-config-$wordsize.h |
---|
208 | |
---|
209 | cat >%{buildroot}%{_includedir}/mozjs-60/js-config.h <<EOF |
---|
210 | #ifndef JS_CONFIG_H_MULTILIB |
---|
211 | #define JS_CONFIG_H_MULTILIB |
---|
212 | |
---|
213 | #include <bits/wordsize.h> |
---|
214 | |
---|
215 | #if __WORDSIZE == 32 |
---|
216 | # include "js-config-32.h" |
---|
217 | #elif __WORDSIZE == 64 |
---|
218 | # include "js-config-64.h" |
---|
219 | #else |
---|
220 | # error "unexpected value for __WORDSIZE macro" |
---|
221 | #endif |
---|
222 | |
---|
223 | #endif |
---|
224 | EOF |
---|
225 | |
---|
226 | fi |
---|
227 | |
---|
228 | # Remove unneeded files |
---|
229 | rm %{buildroot}%{_bindir}/js%{major}-config |
---|
230 | rm %{buildroot}%{_libdir}/libjs_static.ajs |
---|
231 | |
---|
232 | # Rename library and create symlinks, following fix-soname.patch |
---|
233 | mv %{buildroot}%{_libdir}/libmozjs-%{major}.so \ |
---|
234 | %{buildroot}%{_libdir}/libmozjs-%{major}.so.0.0.0 |
---|
235 | ln -s libmozjs-%{major}.so.0.0.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so.0 |
---|
236 | ln -s libmozjs-%{major}.so.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so |
---|
237 | |
---|
238 | %check |
---|
239 | # Run SpiderMonkey tests |
---|
240 | %{__python} tests/jstests.py -d -s -t 1800 --no-progress ../../js/src/js/src/shell/js \ |
---|
241 | %ifarch %{ix86} x86_64 %{arm} aarch64 ppc ppc64le s390x |
---|
242 | ; |
---|
243 | %else |
---|
244 | || : |
---|
245 | %endif |
---|
246 | |
---|
247 | # Run basic JIT tests |
---|
248 | %{__python} jit-test/jit_test.py -s -t 1800 --no-progress ../../js/src/js/src/shell/js basic \ |
---|
249 | %ifarch %{ix86} x86_64 %{arm} aarch64 ppc ppc64le s390x |
---|
250 | ; |
---|
251 | %else |
---|
252 | || : |
---|
253 | %endif |
---|
254 | |
---|
255 | |
---|
256 | %post -p /sbin/ldconfig |
---|
257 | |
---|
258 | %postun -p /sbin/ldconfig |
---|
259 | |
---|
260 | |
---|
261 | %files |
---|
262 | %doc README.html |
---|
263 | %{_libdir}/libmozjs-%{major}.so.0* |
---|
264 | |
---|
265 | %files devel |
---|
266 | %{_bindir}/js%{major} |
---|
267 | %{_libdir}/libmozjs-%{major}.so |
---|
268 | %{_libdir}/pkgconfig/*.pc |
---|
269 | %{_includedir}/mozjs-%{major}/ |
---|
270 | |
---|
271 | %changelog |
---|
272 | * Thu Mar 26 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 60.9.0-7 |
---|
273 | - separated debuginfo. |
---|
274 | |
---|
275 | * Mon Mar 23 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 60.9.0-6 |
---|
276 | - initial build for Vine Linux. |
---|
277 | - added Patch1000 for i686. |
---|
278 | |
---|
279 | * Mon Feb 17 2020 Kalev Lember <klember@redhat.com> - 60.9.0-5 |
---|
280 | - Update enddianness.patch with more s390x fixes |
---|
281 | - Enable tests on s390x again |
---|
282 | |
---|
283 | * Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 60.9.0-4 |
---|
284 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild |
---|
285 | |
---|
286 | * Tue Sep 10 2019 Kalev Lember <klember@redhat.com> - 60.9.0-3 |
---|
287 | - Fix multilib conflicts in js-config.h |
---|
288 | |
---|
289 | * Sat Sep 07 2019 Kalev Lember <klember@redhat.com> - 60.9.0-2 |
---|
290 | - Backport patches for s390x support |
---|
291 | |
---|
292 | * Tue Sep 03 2019 Kalev Lember <klember@redhat.com> - 60.9.0-1 |
---|
293 | - Update to 60.9.0 |
---|
294 | |
---|
295 | * Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 60.8.0-3 |
---|
296 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild |
---|
297 | |
---|
298 | * Wed Jul 10 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 60.8.0-2 |
---|
299 | - Enable LTO |
---|
300 | |
---|
301 | * Tue Jul 09 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 60.8.0-1 |
---|
302 | - Update to 60.8.0 |
---|
303 | |
---|
304 | * Sat Jun 22 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 60.7.2-1 |
---|
305 | - Update to 60.7.2 |
---|
306 | |
---|
307 | * Wed Jun 19 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 60.7.1-1 |
---|
308 | - Update to 60.7.1 |
---|
309 | |
---|
310 | * Tue May 21 2019 Kalev Lember <klember@redhat.com> - 60.7.0-1 |
---|
311 | - Update to 60.7.0 |
---|
312 | |
---|
313 | * Mon Apr 15 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 60.6.1-2 |
---|
314 | - Backport two Firefox 61 patches and allow compiler optimizations on aarch64 |
---|
315 | |
---|
316 | * Sun Apr 14 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 60.6.1-1 |
---|
317 | - Update to 60.6.1 |
---|
318 | |
---|
319 | * Thu Feb 21 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 60.4.0-5 |
---|
320 | - Re-enable null pointer gcc optimization |
---|
321 | |
---|
322 | * Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 60.4.0-4 |
---|
323 | - Rebuild for readline 8.0 |
---|
324 | |
---|
325 | * Thu Feb 14 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 60.4.0-3 |
---|
326 | - Build aarch64 with -O0 because of rhbz#1676292 |
---|
327 | |
---|
328 | * Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 60.4.0-2 |
---|
329 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild |
---|
330 | |
---|
331 | * Wed Jan 02 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 60.4.0-1 |
---|
332 | - Update to 60.4.0 |
---|
333 | |
---|
334 | * Mon Nov 12 2018 Kalev Lember <klember@redhat.com> - 60.3.0-1 |
---|
335 | - Update to 60.3.0 |
---|
336 | |
---|
337 | * Thu Oct 04 2018 Kalev Lember <klember@redhat.com> - 60.2.2-1 |
---|
338 | - Update to 60.2.2 |
---|
339 | |
---|
340 | * Fri Sep 28 2018 Kalev Lember <klember@redhat.com> - 60.2.1-1 |
---|
341 | - Update to 60.2.1 |
---|
342 | |
---|
343 | * Tue Sep 11 2018 Kalev Lember <klember@redhat.com> - 60.2.0-1 |
---|
344 | - Update to 60.2.0 |
---|
345 | |
---|
346 | * Tue Sep 04 2018 Frantisek Zatloukal <fzatlouk@redhat.com> - 60.1.0-1 |
---|
347 | - Update to 60.1.0 |
---|
348 | |
---|
349 | * Wed Jul 25 2018 Kalev Lember <klember@redhat.com> - 52.9.0-1 |
---|
350 | - Update to 52.9.0 |
---|
351 | |
---|
352 | * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 52.8.0-3 |
---|
353 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |
---|
354 | |
---|
355 | * Mon Jun 11 2018 Ray Strode <rstrode@redhat.com> - 52.8.0-2 |
---|
356 | - safeguard against linking against bundled nss |
---|
357 | Related: #1563708 |
---|
358 | |
---|
359 | * Fri May 11 2018 Kalev Lember <klember@redhat.com> - 52.8.0-1 |
---|
360 | - Update to 52.8.0 |
---|
361 | - Fix the build on ppc |
---|
362 | - Disable JS Helper threads on ppc64le (#1523121) |
---|
363 | |
---|
364 | * Sat Apr 07 2018 Kalev Lember <klember@redhat.com> - 52.7.3-1 |
---|
365 | - Update to 52.7.3 |
---|
366 | |
---|
367 | * Tue Mar 20 2018 Kalev Lember <klember@redhat.com> - 52.7.2-1 |
---|
368 | - Update to 52.7.2 |
---|
369 | - Switch to %%ldconfig_scriptlets |
---|
370 | |
---|
371 | * Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 52.6.0-2 |
---|
372 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild |
---|
373 | |
---|
374 | * Tue Jan 23 2018 Kalev Lember <klember@redhat.com> - 52.6.0-1 |
---|
375 | - Update to 52.6.0 |
---|
376 | |
---|
377 | * Fri Nov 24 2017 Björn Esser <besser82@fedoraproject.org> - 52.5.0-5 |
---|
378 | - SpiderMonkey tests have regressions on %%{power64}, too |
---|
379 | |
---|
380 | * Fri Nov 24 2017 Björn Esser <besser82@fedoraproject.org> - 52.5.0-4 |
---|
381 | - SpiderMonkey tests have regressions on big endian platforms |
---|
382 | |
---|
383 | * Fri Nov 24 2017 Björn Esser <besser82@fedoraproject.org> - 52.5.0-3 |
---|
384 | - SpiderMonkey tests do not fail on any arch |
---|
385 | - Basic JIT tests are failing on s390 arches, only |
---|
386 | - Use macro for ppc64 arches |
---|
387 | - Run tests using Python2 explicitly |
---|
388 | - Simplify %%check |
---|
389 | - Use the %%{major} macro consequently |
---|
390 | - Replace %%define with %%global |
---|
391 | |
---|
392 | * Fri Nov 24 2017 Björn Esser <besser82@fedoraproject.org> - 52.5.0-2 |
---|
393 | - Use macro for Python 2 interpreter |
---|
394 | - Use proper export and quoting |
---|
395 | |
---|
396 | * Tue Nov 14 2017 Kalev Lember <klember@redhat.com> - 52.5.0-1 |
---|
397 | - Update to 52.5.0 |
---|
398 | |
---|
399 | * Tue Oct 31 2017 Kalev Lember <klember@redhat.com> - 52.4.0-3 |
---|
400 | - Include standalone /usr/bin/js52 interpreter |
---|
401 | |
---|
402 | * Tue Oct 31 2017 Kalev Lember <klember@redhat.com> - 52.4.0-2 |
---|
403 | - Various secondary arch fixes |
---|
404 | |
---|
405 | * Thu Sep 28 2017 Kalev Lember <klember@redhat.com> - 52.4.0-1 |
---|
406 | - Update to 52.4.0 |
---|
407 | |
---|
408 | * Wed Sep 20 2017 Kalev Lember <klember@redhat.com> - 52.3.0-1 |
---|
409 | - Initial Fedora packaging, based on earlier mozjs45 work |
---|