Package libmozjs52: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | %define ver_major 52 %def_disable optimize %def_without system_icu %def_without system_nspr %if_without system_nspr %def_enable posix_nspr_emulation %endif ## fc # Big endian platforms %ifarch ppc ppc64 s390 s390x %def_enable big_endian %endif %if "%(rpmvercmp '%{get_version libicu-devel}' '5.8.1')" < "0" %def_disable system_icu %endif Name: libmozjs%ver_major Version: %ver_major.9.0 Release: alt3 Summary: JavaScript interpreter and libraries Group: System/Libraries License: MPL-2.0 Url: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/52 #Source: %name-%version.tar #Source: https://ftp.gnome.org/pub/gnome/teams/releng/tarballs-needing-help/mozjs/mozjs-52.2.1gnome1.tar.gz Source: https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz ## patchset fetched from https://src.fedoraproject.org/rpms/mozjs52.git # Patches from Debian mozjs52_52.3.1-4.debian.tar.xz: Patch1: fix-soname.patch Patch2: copy-headers.patch # Patches from https://github.com/ptomato/mozjs / Debian mozjs52_52.3.1-4.debian.tar.xz Patch3: disable-mozglue.patch Patch4: include-configure-script.patch # Patches from Fedora firefox package: Patch10: xulrunner-24.0-jemalloc-ppc.patch Patch11: xulrunner-24.0-s390-inlines.patch Patch12: build-icu-big-endian.patch Patch13: build-missing-xlocale-h.patch Patch14: mozilla-1253216.patch Patch15: fix-tests-build.patch BuildRequires: gcc-c++ libreadline-devel zip unzip BuildRequires: libffi-devel libffi-devel-static BuildRequires: python2-base BuildRequires: python-module-setuptools BuildRequires: python-module-pip BuildRequires: python-module-distribute BuildRequires: python-module-json BuildRequires: zlib-devel %{?_with_system_icu:BuildRequires: libicu-devel} %{?_with_system_nspr:BuildRequires: libnspr-devel} BuildRequires: autoconf_2.13 %set_autoconf_version 2.13 %description JavaScript is the Netscape-developed object scripting language used in millions of web pages and server applications worldwide. Netscape's JavaScript is a super set of the ECMA-262 Edition 3 (ECMAScript) standard scripting language, with only mild differences from the published standard. %package devel Summary: Header files, libraries and development documentation for %name Group: Development/C++ Requires: %name = %version-%release %description devel This package contains the header files, static libraries and development documentation for %name. If you like to develop programs using %name, you will need to install %name-devel. %package devel-static Summary: SpiderMonkey static libraries Group: Development/C++ Requires: %name-devel = %version-%release %description devel-static SpiderMonkey development kit (static libs) %package tools Summary: Tools for the SpiderMonkey Group: Development/Other %description tools SpiderMonkey is the code-name for the Mozilla's C implementation of JavaScript. This package provides standalone SpiderMonkey shell, a command line interface to the JavaScript engine. %prep %setup -n firefox-%{version}esr #%%setup -n mozjs-%{version}gnome1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch10 -p1 -b .jemalloc-ppc %patch11 -p2 -b .s390-inlines # Patches for big endian platforms only %if_enabled big_endian %patch12 -p1 -b .icu %patch13 -p2 -b .xlocale %endif %patch14 -p1 -b .1253216 %patch15 -p2 # Correct sed expression for new sed sed -i 's|\^\[:space:\]|^\[\[:space:\]\]|g' js/src/configure %build export srcdir="$PWD" cd js/src %add_optflags %optflags_shared export CFLAGS="%optflags" export CXXFLAGS="$CFLAGS -fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks" export SHELL=/bin/sh # cow@: Quick fix for the build. For some reason build script can't calculate correct path # for python interpreter with the latest changes made in Sisyphus. I don't have enough # time and motivation (this package hopefully will be thrown out in 6 months) to find # issue root cause. So for now I just make the easiest fix I have. unset PYTHON ./configure \ --prefix=%_prefix \ --libdir=%_libdir \ --disable-strip \ --enable-pie \ %ifarch s390 s390x --disable-jemalloc \ %endif --enable-readline \ --enable-shared-js \ %{?_with_system_nspr:--with-system-nspr} \ %{?_enable_posix_nspr_emulation:--enable-posix-nspr-emulation} \ %{subst_enable optimize} \ --with-system-zlib \ %{?_with_system_icu:--with-system-icu} \ --with-intl-api \ %ifarch %{arm} aarch64 ppc ppc64 --disable-ion %endif %if_enabled big_endian echo "Generate big endian version of config/external/icu/data/icud58l.dat" pushd ../.. ./mach python2 intl/icu_sources_data.py . ls -l config/external/icu/data rm -f config/external/icu/data/icudt*l.dat popd %endif %make_build %install cd js/src %makeinstall_std chmod a-x %buildroot/%_pkgconfigdir/*.pc [ ! -f %buildroot/%_pkgconfigdir/js.pc ] || mv -f -- \ %buildroot/%_pkgconfigdir/js.pc \ %buildroot/%_pkgconfigdir/mozjs-%ver_major.pc (set -x for f in %buildroot/%_libdir/*.ajs; do mv -vf -- "$f" "${f%%js}" done ) # Install files, not symlinks to build directory (set +x find -P "%buildroot/%_includedir" -type l -printf '%%p\n' | while read link; do t="$(readlink -ev "$link")" rm -f -- "$link" cp -f -- "$t" "$link" done ) cp -p js/src/js-config.h %buildroot/%_includedir/mozjs-%ver_major %files %_libdir/libmozjs-%ver_major.so* %files devel %_pkgconfigdir/mozjs-%ver_major.pc %_includedir/mozjs-%ver_major/ %files tools %_bindir/js%ver_major %_bindir/js%ver_major-config %files devel-static %_libdir/*.a %changelog * Tue Sep 22 2020 Vladimir Didenko <cow@altlinux.org> 52.9.0-alt3 - use python2 in build command instead of just python * Wed May 13 2020 Vladimir Didenko <cow@altlinux.org> 52.9.0-alt2 - fix build * Sun Apr 26 2020 Vladimir Didenko <cow@altlinux.org> 52.9.0-alt1 - new version - fix license name - fix build * Fri Dec 21 2018 Yuri N. Sedunov <aris@altlinux.org> 52.7.3-alt2 - rebuilt against libreadline.so.7 * Mon Apr 16 2018 Yuri N. Sedunov <aris@altlinux.org> 52.7.3-alt1 - built from firefox sources with debian/fc patchset and bundled icu - enabled smp-build (ALT #34772) * Thu Jan 04 2018 Yuri N. Sedunov <aris@altlinux.org> 52.2.1-alt2 - rebuilt with system libicu60-60.2 * Fri Aug 04 2017 Yuri N. Sedunov <aris@altlinux.org> 52.2.1-alt1 - first build for Sisyphus |