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