source: projects/specs/trunk/m/mozjs60/mozjs60-vl.spec @ 12349

Revision 12349, 11.3 KB checked in by tomop, 4 years ago (diff)

updated 4 packages

gjs-1.54.3-1

mozjs60-60.9.0-6

pam-1.3.1-1

polkit-0.116-1

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