source: projects/specs/trunk/m/mozjs78/mozjs78-vl.spec @ 12546

Revision 12546, 8.8 KB checked in by tomop, 3 years ago (diff)

updated 28 packages

autoconf-2.71-1

automake-1.16.3-1

bison-3.7.5-1

e2fsprogs-1.46.1-1

findutils-4.8.0-1

galera-26.4.7-1

gawk-5.1.0-1

gdbm-1.19-1

gjs-1.66.2-1

gnome-initial-setup-3.36.4-2

grep-3.6-1

help2man-1.48.1-1

ipvsadm-1.31-1

less-563-1

libidn-1.36-1

make-4.3-1

mariadb-10.5.9-1

mozjs78-78.7.0-1

mpfr-4.1.0-1

nettle-3.7.1-1

parted-3.4-1

pcre2-10.36-1

polkit-0.118-1

strongswan-5.9.1-1

tar-1.34-1

trousers-0.3.15-1

wget-1.21-1

wireshark-3.4.3-1

Line 
1%global major 78
2
3# LTO - Enable in Release builds, but consider disabling for development as it increases compile time
4%global build_with_lto    1
5
6# Require tests to pass?
7%global require_tests     0
8
9%if 0%{?build_with_lto}
10# LTO is default since F33 and F32 package is backported as is, so no LTO there
11%else
12%define _lto_cflags %{nil}
13%endif
14
15# Require libatomic for ppc
16%ifarch ppc
17%global system_libatomic 1
18%endif
19
20# Big endian platforms
21%ifarch ppc ppc64 s390 s390x
22%global big_endian 1
23%endif
24
25Name:           mozjs%{major}
26Version:        78.7.0
27Release:        1%{?_dist_release}
28Summary:        SpiderMonkey JavaScript library
29Group:          system
30Vendor:         Project Vine
31Distribution:   Vine Linux
32
33License:        MPLv2.0 and MPLv1.1 and BSD and GPLv2+ and GPLv3+ and LGPLv2+ and AFL and ASL 2.0
34URL:            https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
35Source0:        https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz
36
37# Patches from mozjs68, rebased for mozjs78:
38Patch01:        fix-soname.patch
39Patch02:        copy-headers.patch
40Patch03:        tests-increase-timeout.patch
41Patch09:        icu_sources_data.py-Decouple-from-Mozilla-build-system.patch
42Patch10:        icu_sources_data-Write-command-output-to-our-stderr.patch
43
44# Build fixes - https://hg.mozilla.org/mozilla-central/rev/ca36a6c4f8a4a0ddaa033fdbe20836d87bbfb873
45Patch12:        emitter.patch
46
47# Build fixes
48Patch14:        init_patch.patch
49# TODO: Check with mozilla for cause of these fails and re-enable spidermonkey compile time checks if needed
50Patch15:        spidermonkey_checks_disable.patch
51
52# armv7 fixes
53Patch17:        armv7_disable_WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS.patch
54
55# s390x/ppc64 fixes, TODO: file bug report upstream?
56Patch18:        spidermonkey_style_check_disable_s390x.patch
57Patch19:        0001-Skip-failing-tests-on-ppc64-and-s390x.patch
58
59# fix error to build with rust-1.50
60Patch1000:      mozjs-rust1_50.patch
61
62BuildRequires: make
63BuildRequires:  autoconf213
64BuildRequires:  cargo
65BuildRequires:  clang-devel
66BuildRequires:  gcc
67BuildRequires:  gcc-c++
68BuildRequires:  nasm
69BuildRequires:  llvm
70BuildRequires:  llvm-devel
71BuildRequires:  rust
72BuildRequires:  perl
73BuildRequires:  pkgconfig(libffi)
74BuildRequires:  pkgconfig(zlib)
75BuildRequires:  python3-devel
76BuildRequires:  python3-setuptools
77BuildRequires:  python3-six
78BuildRequires:  readline-devel
79BuildRequires:  zip
80
81%if 0%{?big_endian}
82BuildRequires:  icu
83%endif
84
85%if 0%{?system_libatomic}
86BuildRequires:  libatomic
87%endif
88
89%description
90SpiderMonkey is the code-name for Mozilla Firefox's C++ implementation of
91JavaScript. It is intended to be embedded in other applications
92that provide host environments for JavaScript.
93
94
95%package        devel
96Summary:        Development files for %{name}
97Group:          programming
98Requires:       %{name}%{?_isa} = %{version}-%{release}
99
100%description    devel
101The %{name}-devel package contains libraries and header files for
102developing applications that use %{name}.
103
104
105%debug_package
106
107
108%prep
109%setup -q -n firefox-%{version}/js/src
110
111pushd ../..
112%patch01 -p1
113%patch02 -p1
114%patch03 -p1
115%patch09 -p1
116%patch10 -p1
117
118%patch12 -p1
119
120%patch14 -p1
121%patch15 -p1
122
123%ifarch armv7hl
124# Disable WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS as it causes the compilation to fail
125# https://bugzilla.mozilla.org/show_bug.cgi?id=1526653
126%patch17 -p1
127%endif
128
129%ifarch s390x
130%patch18 -p1
131%endif
132
133# Fixes for ppc64 and s390x, there is no need to keep it in ifarch here since mozilla tests support ifarch conditions
134%patch19 -p1
135
136# for rust-1.50.0
137%patch1000 -p1
138
139# Copy out the LICENSE file
140cp LICENSE js/src/
141popd
142
143# Remove zlib directory (to be sure using system version)
144rm -rf ../../modules/zlib
145
146
147%build
148# Prefer GCC for now
149export CC=gcc
150export CXX=g++
151
152# Workaround
153# error: options `-C embed-bitcode=no` and `-C lto` are incompatible
154# error: could not compile `jsrust`.
155# https://github.com/japaric/cargo-call-stack/issues/25
156export RUSTFLAGS="-C embed-bitcode"
157
158%if 0%{?build_with_lto}
159# https://github.com/ptomato/mozjs/commit/36bb7982b41e0ef9a65f7174252ab996cd6777bd
160export CARGO_PROFILE_RELEASE_LTO=true
161%endif
162
163export CFLAGS="%{optflags}"
164export CXXFLAGS="$CFLAGS"
165export LINKFLAGS="%{?__global_ldflags}"
166export PYTHON="%{__python3}"
167
168autoconf-2.13
169%configure \
170  --without-system-icu \
171  --with-system-zlib \
172  --disable-tests \
173  --disable-strip \
174  --with-intl-api \
175  --enable-readline \
176  --enable-shared-js \
177  --enable-optimize \
178  --disable-debug \
179  --enable-pie \
180  --disable-jemalloc
181
182%if 0%{?big_endian}
183echo "Generate big endian version of config/external/icu/data/icud67l.dat"
184pushd ../..
185  icupkg -tb config/external/icu/data/icudt67l.dat config/external/icu/data/icudt67b.dat
186  rm -f config/external/icu/data/icudt*l.dat
187popd
188%endif
189
190%make_build
191
192
193%install
194%make_install
195
196# Fix permissions
197chmod -x %{buildroot}%{_libdir}/pkgconfig/*.pc
198
199# Avoid multilib conflicts
200case `uname -i` in
201  i386 | ppc | s390 | sparc )
202    wordsize="32"
203    ;;
204  x86_64 | ppc64 | s390x | sparc64 )
205    wordsize="64"
206    ;;
207  *)
208    wordsize=""
209    ;;
210esac
211
212if test -n "$wordsize"
213then
214  mv %{buildroot}%{_includedir}/mozjs-%{major}/js-config.h \
215     %{buildroot}%{_includedir}/mozjs-%{major}/js-config-$wordsize.h
216
217  cat >%{buildroot}%{_includedir}/mozjs-%{major}/js-config.h <<EOF
218#ifndef JS_CONFIG_H_MULTILIB
219#define JS_CONFIG_H_MULTILIB
220
221#include <bits/wordsize.h>
222
223#if __WORDSIZE == 32
224# include "js-config-32.h"
225#elif __WORDSIZE == 64
226# include "js-config-64.h"
227#else
228# error "unexpected value for __WORDSIZE macro"
229#endif
230
231#endif
232EOF
233
234fi
235
236# Remove unneeded files
237rm %{buildroot}%{_bindir}/js%{major}-config
238rm %{buildroot}%{_libdir}/libjs_static.ajs
239
240# Rename library and create symlinks, following fix-soname.patch
241mv %{buildroot}%{_libdir}/libmozjs-%{major}.so \
242   %{buildroot}%{_libdir}/libmozjs-%{major}.so.0.0.0
243ln -s libmozjs-%{major}.so.0.0.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so.0
244ln -s libmozjs-%{major}.so.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so
245
246
247%check
248# Run SpiderMonkey tests
249%if 0%{?require_tests}
250PYTHONPATH=tests/lib %{__python3} tests/jstests.py -d -s -t 1800 --no-progress --wpt=disabled ../../js/src/dist/bin/js%{major}
251%else
252PYTHONPATH=tests/lib %{__python3} tests/jstests.py -d -s -t 1800 --no-progress --wpt=disabled ../../js/src/dist/bin/js%{major} || :
253%endif
254
255# Run basic JIT tests
256%if 0%{?require_tests}
257PYTHONPATH=tests/lib %{__python3} jit-test/jit_test.py -s -t 1800 --no-progress ../../js/src/dist/bin/js%{major} basic
258%else
259PYTHONPATH=tests/lib %{__python3} jit-test/jit_test.py -s -t 1800 --no-progress ../../js/src/dist/bin/js%{major} basic || :
260%endif
261
262
263%ldconfig_scriptlets
264
265
266%files
267%doc README.html
268%license LICENSE
269%{_libdir}/libmozjs-%{major}.so.0*
270
271%files devel
272%{_bindir}/js%{major}
273%{_libdir}/libmozjs-%{major}.so
274%{_libdir}/pkgconfig/*.pc
275%{_includedir}/mozjs-%{major}/
276
277
278%changelog
279* Wed Feb 24 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 78.7.0-1
280- switched to mozjs-78.
281
282* Tue Aug 04 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 68.11.0-1
283- initial build for Vine Linux.
284- new upstream release.
285
286* Tue Jun 30 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 68.10.0-1
287- Update to 68.10.0
288
289* Tue Jun 02 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 68.9.0-1
290- Update to 68.9.0
291- Drop llvm and rust deps
292
293* Wed May 06 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 68.8.0-1
294- Update to 68.8.0
295
296* Tue Apr 07 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 68.7.0-1
297- Update to 68.7.0
298
299* Tue Mar 17 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 68.6.0-2
300- Rebuild with GCC 10
301- Nuke check_spidermonkey_style.py on s390x
302
303* Wed Mar 11 2020 Kalev Lember <klember@redhat.com> - 68.6.0-1
304- Update to 68.6.0
305
306* Mon Feb 10 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 68.5.0-1
307- Update to 68.5.0
308
309* Mon Feb 03 2020 Kalev Lember <klember@redhat.com> - 68.4.2-3
310- Build with --enable-unaligned-private-values
311
312* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 68.4.2-2
313- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
314
315* Wed Jan 22 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 68.4.2-1
316- Update to 68.4.2
317
318* Tue Jan 07 2020 Frantisek Zatloukal <fzatlouk@redhat.com> - 68.4.0-1
319- Update to 68.4.0
320
321* Sat Dec 07 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 68.3.0-1
322- Update to 68.3.0
323
324* Wed Nov 20 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 68.2.0-5
325- Don't enforce tests to pass on s390 and s390x again
326
327* Tue Nov 19 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 68.2.0-4
328- Enable LTO
329- Enforce SpiderMonkey tests in check section on all architectures
330
331* Sun Nov 17 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 68.2.0-3
332- Fix armv7 build
333
334* Thu Nov 14 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 68.2.0-2
335- Fix s390x build
336- Exclude armv7 for now, see comment up in the spec
337
338* Mon Nov 04 2019 Frantisek Zatloukal <fzatlouk@redhat.com> - 68.2.0-1
339- Initial mozjs68 package based on mozjs60
Note: See TracBrowser for help on using the repository browser.