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