mozjs52-vl.spec 7.4 KB

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