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