]> git.pld-linux.org Git - SPECS.git/blob - mozjs115.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / mozjs115.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # tests build
4
5 Summary:        SpiderMonkey 115 - JavaScript implementation
6 Summary(pl.UTF-8):      SpiderMonkey 115 - implementacja języka JavaScript
7 Name:           mozjs115
8 Version:        115.2.1
9 Release:        1
10 License:        MPL v2.0
11 Group:          Libraries
12 #Source0:       https://download.gnome.org/teams/releng/tarballs-needing-help/mozjs/mozjs-%{version}.tar.xz
13 Source0:        https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz
14 # Source0-md5:  c8deec3a0e558a1882f11bbea2fbd462
15 Patch0:         copy-headers.patch
16 Patch1:         include-configure-script.patch
17 Patch2:         x32.patch
18 Patch3:         mozjs-x32-rust.patch
19 Patch4:         glibc-double.patch
20 URL:            https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
21 BuildRequires:  autoconf2_13 >= 2.13
22 BuildRequires:  cargo
23 # "TestWrappingOperations.cpp:27:1: error: non-constant condition for static assertion" with -fwrapv on gcc 6 and 7
24 %{?with_tests:BuildRequires:    gcc-c++ >= 6:8.1}
25 BuildRequires:  libicu-devel >= 73.1
26 BuildRequires:  libstdc++-devel >= 6:8.1
27 BuildRequires:  llvm
28 BuildRequires:  m4 >= 1.1
29 BuildRequires:  nspr-devel >= 4.32
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.66.0
38 BuildRequires:  rust-cbindgen >= 0.24.3
39 BuildRequires:  tar >= 1:1.22
40 BuildRequires:  xz
41 BuildRequires:  zlib-devel >= 1.2.3
42 Requires:       nspr >= 4.32
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 >= 6:8.1
67 Requires:       nspr-devel >= 4.32
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 %ifarch x32
81 %patch3 -p1
82 %endif
83 %patch4 -p1
84
85 %build
86 export PYTHON="%{__python}"
87 export AUTOCONF="%{_bindir}/autoconf2_13"
88 export SHELL="/bin/sh"
89 cd js/src
90 %if 0
91 # currently rebuild not needed
92 AC_MACRODIR=$(pwd)/../../build/autoconf \
93 AWK=awk \
94 M4=m4 \
95 sh ../../build/autoconf/autoconf.sh --localdir=$(pwd) old-configure.in >old-configure
96 chmod 755 old-configure
97 %endif
98 mkdir -p obj
99 cd obj
100
101 %define configuredir ".."
102 %configure2_13 \
103         --enable-gcgenerational \
104         --disable-jemalloc \
105         --enable-readline \
106         --enable-shared-js \
107         %{!?with_tests:--disable-tests} \
108         --enable-threadsafe \
109         --with-intl-api \
110         --with-system-icu \
111         --with-system-nspr \
112         --with-system-zlib
113
114 %{__make} \
115         HOST_OPTIMIZE_FLAGS= \
116         MODULE_OPTIMIZE_FLAGS= \
117         MOZ_OPTIMIZE_FLAGS="-freorder-blocks" \
118         MOZ_PGO_OPTIMIZE_FLAGS= \
119         MOZILLA_VERSION=%{version}
120
121 %install
122 rm -rf $RPM_BUILD_ROOT
123
124 cd js/src/obj
125
126 %{__make} -C js/src install \
127         DESTDIR=$RPM_BUILD_ROOT \
128         MOZILLA_VERSION=%{version}
129
130 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.ajs
131
132 %clean
133 rm -rf $RPM_BUILD_ROOT
134
135 %post   -p /sbin/ldconfig
136 %postun -p /sbin/ldconfig
137
138 %files
139 %defattr(644,root,root,755)
140 %doc js/src/README.html
141 %attr(755,root,root) %{_bindir}/js115
142 %attr(755,root,root) %{_libdir}/libmozjs-115.so
143
144 %files devel
145 %defattr(644,root,root,755)
146 %attr(755,root,root) %{_bindir}/js115-config
147 %{_includedir}/mozjs-115
148 %{_pkgconfigdir}/mozjs-115.pc
This page took 0.493752 seconds and 3 git commands to generate.