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