[11985] | 1 | %global major 52 |
---|
| 2 | |
---|
| 3 | %global system_libatomic 0 |
---|
| 4 | %global big_endian 0 |
---|
| 5 | |
---|
| 6 | Name: mozjs%{major} |
---|
| 7 | Version: 52.9.0 |
---|
| 8 | Release: 2%{?_dist_release} |
---|
| 9 | Summary: SpiderMonkey JavaScript library |
---|
| 10 | Summary(ja): SpiderMonkey JavaScriptライブラリ |
---|
| 11 | |
---|
| 12 | License: MPLv2.0 and MPLv1.1 and BSD and GPLv2+ and GPLv3+ and LGPLv2.1 and LGPLv2.1+ and AFL and ASL 2.0 |
---|
| 13 | URL: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey |
---|
| 14 | Vendor: Project Vine |
---|
| 15 | Distribution: Vine Linux |
---|
| 16 | |
---|
| 17 | Source0: https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz |
---|
| 18 | |
---|
| 19 | # Patches from Debian mozjs52_52.3.1-4.debian.tar.xz: |
---|
| 20 | Patch0001: fix-soname.patch |
---|
| 21 | Patch0002: copy-headers.patch |
---|
| 22 | Patch0003: tests-increase-timeout.patch |
---|
| 23 | Patch0004: tests-snans-be.patch |
---|
| 24 | |
---|
| 25 | # Disable JS Helper threads on ppc64le |
---|
| 26 | # https://bugzilla.redhat.com/show_bug.cgi?id=1523121 |
---|
| 27 | Patch0010: disable-extra-threads.patch |
---|
| 28 | |
---|
| 29 | # Patches from https://github.com/ptomato/mozjs / Debian mozjs52_52.3.1-4.debian.tar.xz |
---|
| 30 | Patch0101: disable-mozglue.patch |
---|
| 31 | Patch0104: include-configure-script.patch |
---|
| 32 | |
---|
| 33 | # Patches from Fedora firefox package: |
---|
| 34 | Patch18: xulrunner-24.0-jemalloc-ppc.patch |
---|
| 35 | Patch19: xulrunner-24.0-s390-inlines.patch |
---|
| 36 | Patch26: build-icu-big-endian.patch |
---|
| 37 | Patch36: build-missing-xlocale-h.patch |
---|
| 38 | Patch304: mozilla-1253216.patch |
---|
| 39 | |
---|
| 40 | BuildRequires: autoconf213 |
---|
| 41 | BuildRequires: gcc |
---|
| 42 | BuildRequires: gcc-c++ |
---|
| 43 | BuildRequires: perl |
---|
| 44 | BuildRequires: libffi-devel |
---|
| 45 | BuildRequires: zlib-devel |
---|
| 46 | BuildRequires: python-devel |
---|
| 47 | BuildRequires: readline-devel |
---|
| 48 | BuildRequires: /usr/bin/zip |
---|
| 49 | %if 0%{?system_libatomic} |
---|
| 50 | BuildRequires: libatomic |
---|
| 51 | %endif |
---|
| 52 | |
---|
| 53 | # Firefox does not allow to build with system version of jemalloc |
---|
| 54 | Provides: bundled(jemalloc) = 4.3.1 |
---|
| 55 | |
---|
| 56 | %description |
---|
| 57 | SpiderMonkey is the code-name for Mozilla Firefox's C++ implementation of |
---|
| 58 | JavaScript. It is intended to be embedded in other applications |
---|
| 59 | that provide host environments for JavaScript. |
---|
| 60 | |
---|
| 61 | %description -l ja |
---|
| 62 | SpiderMonkeyは、Mozilla FirefoxのC++によるJavaScript実装のコードネーム |
---|
| 63 | です。他のアプリへ組み込み、JavaScriptホスト環境を提供することを意図して |
---|
| 64 | います。 |
---|
| 65 | |
---|
| 66 | %package devel |
---|
| 67 | Summary: Development files for %{name} |
---|
| 68 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
| 69 | |
---|
| 70 | %description devel |
---|
| 71 | The %{name}-devel package contains libraries and header files for |
---|
| 72 | developing applications that use %{name}. |
---|
| 73 | |
---|
| 74 | %description devel -l ja |
---|
| 75 | %{name}-develパッケージは、%{name}を利用する際に必要となるライブラリや |
---|
| 76 | ヘッダファイルを収録しています。 |
---|
| 77 | |
---|
| 78 | %prep |
---|
| 79 | %setup -q -n firefox-%{version}esr/js/src |
---|
| 80 | |
---|
| 81 | pushd ../.. |
---|
| 82 | %patch0001 -p1 |
---|
| 83 | %patch0002 -p1 |
---|
| 84 | %patch0003 -p1 |
---|
| 85 | %patch0004 -p1 |
---|
| 86 | |
---|
| 87 | %patch0010 -p1 |
---|
| 88 | |
---|
| 89 | %patch0101 -p1 |
---|
| 90 | %patch0104 -p1 |
---|
| 91 | |
---|
| 92 | %patch18 -p1 -b .jemalloc-ppc |
---|
| 93 | %patch19 -p2 -b .s390-inlines |
---|
| 94 | |
---|
| 95 | # Patch for big endian platforms only |
---|
| 96 | %if 0%{?big_endian} |
---|
| 97 | %patch26 -p1 -b .icu |
---|
| 98 | %patch36 -p2 -b .xlocale |
---|
| 99 | %endif |
---|
| 100 | |
---|
| 101 | %patch304 -p1 -b .1253216 |
---|
| 102 | |
---|
| 103 | # make sure we don't ever accidentally link against bundled security libs |
---|
| 104 | rm -rf security/ |
---|
| 105 | popd |
---|
| 106 | |
---|
| 107 | # Remove zlib directory (to be sure using system version) |
---|
| 108 | rm -rf ../../modules/zlib |
---|
| 109 | |
---|
| 110 | %build |
---|
| 111 | # Disable null pointer gcc6 optimization in gcc6 (rhbz#1328045) |
---|
| 112 | export CFLAGS="%{optflags} -fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks" |
---|
| 113 | export CXXFLAGS="$CFLAGS" |
---|
| 114 | export LINKFLAGS="%{?__global_ldflags}" |
---|
| 115 | export PYTHON="%{__python}" |
---|
| 116 | |
---|
| 117 | autoconf-2.13 |
---|
| 118 | %configure \ |
---|
| 119 | --without-system-icu \ |
---|
| 120 | --enable-posix-nspr-emulation \ |
---|
| 121 | --with-system-zlib \ |
---|
| 122 | --enable-tests \ |
---|
| 123 | --disable-strip \ |
---|
| 124 | --with-intl-api \ |
---|
| 125 | --enable-readline \ |
---|
| 126 | --enable-shared-js \ |
---|
| 127 | --disable-optimize \ |
---|
| 128 | --enable-pie \ |
---|
| 129 | %ifarch s390 s390x |
---|
| 130 | --disable-jemalloc \ |
---|
| 131 | %endif |
---|
| 132 | %ifarch %{arm} aarch64 ppc %{power64} |
---|
| 133 | --disable-ion |
---|
| 134 | %endif |
---|
| 135 | |
---|
| 136 | %if 0%{?big_endian} |
---|
| 137 | echo "Generate big endian version of config/external/icu/data/icud58l.dat" |
---|
| 138 | pushd ../.. |
---|
| 139 | ./mach python intl/icu_sources_data.py . |
---|
| 140 | ls -l config/external/icu/data |
---|
| 141 | rm -f config/external/icu/data/icudt*l.dat |
---|
| 142 | popd |
---|
| 143 | %endif |
---|
| 144 | |
---|
| 145 | %make_build |
---|
| 146 | |
---|
| 147 | %install |
---|
| 148 | %make_install |
---|
| 149 | |
---|
| 150 | # Fix permissions |
---|
| 151 | chmod -x %{buildroot}%{_libdir}/pkgconfig/*.pc |
---|
| 152 | |
---|
| 153 | # Remove unneeded files |
---|
| 154 | rm %{buildroot}%{_bindir}/js%{major}-config |
---|
| 155 | rm %{buildroot}%{_libdir}/libjs_static.ajs |
---|
| 156 | |
---|
| 157 | # Rename library and create symlinks, following fix-soname.patch |
---|
| 158 | mv %{buildroot}%{_libdir}/libmozjs-%{major}.so \ |
---|
| 159 | %{buildroot}%{_libdir}/libmozjs-%{major}.so.0.0.0 |
---|
| 160 | ln -s libmozjs-%{major}.so.0.0.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so.0 |
---|
| 161 | ln -s libmozjs-%{major}.so.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so |
---|
| 162 | |
---|
| 163 | %check |
---|
| 164 | # Run SpiderMonkey tests |
---|
| 165 | %{__python} tests/jstests.py -d -s -t 1800 --no-progress ../../js/src/js/src/shell/js \ |
---|
| 166 | %ifarch %{ix86} x86_64 %{arm} aarch64 ppc ppc64le s390 |
---|
| 167 | ; |
---|
| 168 | %else |
---|
| 169 | || : |
---|
| 170 | %endif |
---|
| 171 | |
---|
| 172 | # Run basic JIT tests |
---|
| 173 | %{__python} jit-test/jit_test.py -s -t 1800 --no-progress ../../js/src/js/src/shell/js basic \ |
---|
| 174 | %ifarch %{ix86} x86_64 %{arm} aarch64 ppc ppc64le s390 s390x |
---|
| 175 | ; |
---|
| 176 | %else |
---|
| 177 | || : |
---|
| 178 | %endif |
---|
| 179 | |
---|
| 180 | %post |
---|
| 181 | /sbin/ldconfig |
---|
| 182 | |
---|
| 183 | %postun |
---|
| 184 | /sbin/ldconfig |
---|
| 185 | |
---|
| 186 | %files |
---|
| 187 | %doc README.html |
---|
| 188 | %{_libdir}/libmozjs-%{major}.so.0* |
---|
| 189 | |
---|
| 190 | %files devel |
---|
| 191 | %{_bindir}/js%{major} |
---|
| 192 | %{_libdir}/libmozjs-%{major}.so |
---|
| 193 | %{_libdir}/pkgconfig/*.pc |
---|
| 194 | %{_includedir}/mozjs-%{major}/ |
---|
| 195 | |
---|
| 196 | %changelog |
---|
| 197 | * Sun Dec 16 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 52.9.0-2 |
---|
| 198 | - initial build for Vine Linux. |
---|
| 199 | |
---|
| 200 | * Wed Jul 25 2018 Kalev Lember <klember@redhat.com> - 52.9.0-1 |
---|
| 201 | - Update to 52.9.0 |
---|
| 202 | |
---|
| 203 | * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 52.8.0-3 |
---|
| 204 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |
---|
| 205 | |
---|
| 206 | * Mon Jun 11 2018 Ray Strode <rstrode@redhat.com> - 52.8.0-2 |
---|
| 207 | - safeguard against linking against bundled nss |
---|
| 208 | Related: #1563708 |
---|
| 209 | |
---|
| 210 | * Fri May 11 2018 Kalev Lember <klember@redhat.com> - 52.8.0-1 |
---|
| 211 | - Update to 52.8.0 |
---|
| 212 | - Fix the build on ppc |
---|
| 213 | - Disable JS Helper threads on ppc64le (#1523121) |
---|
| 214 | |
---|
| 215 | * Sat Apr 07 2018 Kalev Lember <klember@redhat.com> - 52.7.3-1 |
---|
| 216 | - Update to 52.7.3 |
---|
| 217 | |
---|
| 218 | * Tue Mar 20 2018 Kalev Lember <klember@redhat.com> - 52.7.2-1 |
---|
| 219 | - Update to 52.7.2 |
---|
| 220 | - Switch to %%ldconfig_scriptlets |
---|
| 221 | |
---|
| 222 | * Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 52.6.0-2 |
---|
| 223 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild |
---|
| 224 | |
---|
| 225 | * Tue Jan 23 2018 Kalev Lember <klember@redhat.com> - 52.6.0-1 |
---|
| 226 | - Update to 52.6.0 |
---|
| 227 | |
---|
| 228 | * Fri Nov 24 2017 Björn Esser <besser82@fedoraproject.org> - 52.5.0-5 |
---|
| 229 | - SpiderMonkey tests have regressions on %%{power64}, too |
---|
| 230 | |
---|
| 231 | * Fri Nov 24 2017 Björn Esser <besser82@fedoraproject.org> - 52.5.0-4 |
---|
| 232 | - SpiderMonkey tests have regressions on big endian platforms |
---|
| 233 | |
---|
| 234 | * Fri Nov 24 2017 Björn Esser <besser82@fedoraproject.org> - 52.5.0-3 |
---|
| 235 | - SpiderMonkey tests do not fail on any arch |
---|
| 236 | - Basic JIT tests are failing on s390 arches, only |
---|
| 237 | - Use macro for ppc64 arches |
---|
| 238 | - Run tests using Python2 explicitly |
---|
| 239 | - Simplify %%check |
---|
| 240 | - Use the %%{major} macro consequently |
---|
| 241 | - Replace %%define with %%global |
---|
| 242 | |
---|
| 243 | * Fri Nov 24 2017 Björn Esser <besser82@fedoraproject.org> - 52.5.0-2 |
---|
| 244 | - Use macro for Python 2 interpreter |
---|
| 245 | - Use proper export and quoting |
---|
| 246 | |
---|
| 247 | * Tue Nov 14 2017 Kalev Lember <klember@redhat.com> - 52.5.0-1 |
---|
| 248 | - Update to 52.5.0 |
---|
| 249 | |
---|
| 250 | * Tue Oct 31 2017 Kalev Lember <klember@redhat.com> - 52.4.0-3 |
---|
| 251 | - Include standalone /usr/bin/js52 interpreter |
---|
| 252 | |
---|
| 253 | * Tue Oct 31 2017 Kalev Lember <klember@redhat.com> - 52.4.0-2 |
---|
| 254 | - Various secondary arch fixes |
---|
| 255 | |
---|
| 256 | * Thu Sep 28 2017 Kalev Lember <klember@redhat.com> - 52.4.0-1 |
---|
| 257 | - Update to 52.4.0 |
---|
| 258 | |
---|
| 259 | * Wed Sep 20 2017 Kalev Lember <klember@redhat.com> - 52.3.0-1 |
---|
| 260 | - Initial Fedora packaging, based on earlier mozjs45 work |
---|