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