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