]> git.pld-linux.org Git - packages/mozjs91.git/blob - mozjs91.spec
- try with updated x32-rust patch
[packages/mozjs91.git] / mozjs91.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # tests build
4
5 Summary:        SpiderMonkey 91 - JavaScript implementation
6 Summary(pl.UTF-8):      SpiderMonkey 91 - implementacja języka JavaScript
7 Name:           mozjs91
8 Version:        91.7.1
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:  5bed22ca5921850b0fe250c512945f6f
15 Patch0:         copy-headers.patch
16 Patch1:         system-virtualenv.patch
17 Patch2:         include-configure-script.patch
18 Patch3:         x32.patch
19 Patch4:         mozjs-x32-rust.patch
20 Patch5:         glibc-double.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:7
28 BuildRequires:  llvm
29 BuildRequires:  m4 >= 1.1
30 BuildRequires:  nspr-devel >= 4.26
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.51.0
39 BuildRequires:  rust-cbindgen >= 0.19.0
40 BuildRequires:  tar >= 1:1.22
41 BuildRequires:  xz
42 BuildRequires:  zlib-devel >= 1.2.3
43 Requires:       nspr >= 4.26
44 Requires:       zlib >= 1.2.3
45 ExclusiveArch:  %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 JavaScript Reference Implementation (codename SpiderMonkey). The
50 package contains JavaScript runtime (compiler, interpreter,
51 decompiler, garbage collector, atom manager, standard classes) and
52 small "shell" program that can be used interactively and with .js
53 files to run scripts.
54
55 %description -l pl.UTF-8
56 Wzorcowa implementacja JavaScriptu (o nazwie kodowej SpiderMonkey).
57 Pakiet zawiera środowisko uruchomieniowe (kompilator, interpreter,
58 dekompilator, odśmiecacz, standardowe klasy) i niewielką powłokę,
59 która może być używana interaktywnie lub z plikami .js do uruchamiania
60 skryptów.
61
62 %package devel
63 Summary:        Header files for JavaScript reference library
64 Summary(pl.UTF-8):      Pliki nagłówkowe do biblioteki JavaScript
65 Group:          Development/Libraries
66 Requires:       %{name} = %{version}-%{release}
67 Requires:       libstdc++-devel
68 Requires:       nspr-devel >= 4.25
69
70 %description devel
71 Header files for JavaScript reference library.
72
73 %description devel -l pl.UTF-8
74 Pliki nagłówkowe do biblioteki JavaScript.
75
76 %prep
77 %setup -q -n firefox-%{version}
78 %patch0 -p1
79 %patch1 -p1
80 %patch2 -p1
81 %patch3 -p1
82 %ifarch x32
83 %patch4 -p1
84 %endif
85 %patch5 -p1
86
87 %build
88 export PYTHON="%{__python}"
89 export AUTOCONF="%{_bindir}/autoconf2_13"
90 export SHELL="/bin/sh"
91 cd js/src
92 AC_MACRODIR=$(pwd)/../../build/autoconf \
93 AWK=awk \
94 M4=m4 \
95 sh ../../build/autoconf/autoconf.sh --localdir=$(pwd) configure.in >configure
96 chmod 755 configure
97 mkdir -p obj
98 cd obj
99
100 %define configuredir ".."
101 %configure2_13 \
102         --enable-gcgenerational \
103         --disable-jemalloc \
104         --enable-readline \
105         --enable-shared-js \
106         %{!?with_tests:--disable-tests} \
107         --enable-threadsafe \
108         --with-intl-api \
109         --with-system-icu \
110         --with-system-nspr \
111         --with-system-zlib
112
113 %{__make} \
114         HOST_OPTIMIZE_FLAGS= \
115         MODULE_OPTIMIZE_FLAGS= \
116         MOZ_OPTIMIZE_FLAGS="-freorder-blocks" \
117         MOZ_PGO_OPTIMIZE_FLAGS= \
118         MOZILLA_VERSION=%{version}
119
120 %install
121 rm -rf $RPM_BUILD_ROOT
122
123 cd js/src/obj
124
125 %{__make} -C js/src install \
126         DESTDIR=$RPM_BUILD_ROOT \
127         MOZILLA_VERSION=%{version}
128
129 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.ajs
130
131 %clean
132 rm -rf $RPM_BUILD_ROOT
133
134 %post   -p /sbin/ldconfig
135 %postun -p /sbin/ldconfig
136
137 %files
138 %defattr(644,root,root,755)
139 %doc js/src/README.html
140 %attr(755,root,root) %{_bindir}/js91
141 %attr(755,root,root) %{_libdir}/libmozjs-91.so
142
143 %files devel
144 %defattr(644,root,root,755)
145 %attr(755,root,root) %{_bindir}/js91-config
146 %{_includedir}/mozjs-91
147 %{_pkgconfigdir}/mozjs-91.pc
This page took 0.068933 seconds and 3 git commands to generate.