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