Package libmozjs78: 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 | %def_disable snapshot %define ver_major 78 %def_disable optimize %def_with system_icu ## fc # Big endian platforms %ifarch ppc ppc64 s390 s390x %def_enable big_endian %endif %if "%(rpmvercmp '%{get_version libicu-devel}' '6.7.1')" < "0" %def_without system_icu %endif Name: libmozjs%ver_major Version: %ver_major.11.0 Release: alt1 Summary: JavaScript interpreter and libraries Group: System/Libraries License: MPL-2.0 and GPL-2.0-or-later LGPL-2.1-or-later and BSD Url: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/ %if_disabled snapshot Source: https://ftp.gnome.org/pub/gnome/teams/releng/tarballs-needing-help/mozjs/mozjs-%{version}.tar.bz2 #Source: https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz %else Vcs: https://github.com/ptomato/mozjs.git Source: %name-%version.tar %endif # fc armv7 fix Patch17: mozjs78-armv7_disable_WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS.patch # 0ad links with SharedArrayRawBufferRefs Patch20: mozjs78-0ad-FixSharedArray.patch BuildRequires(pre): rpm-build-python3 BuildRequires: /dev/shm /proc BuildRequires: python3-devel python3-module-setuptools python3-module-six BuildRequires: gcc-c++ nasm yasm BuildRequires: libreadline-devel zip unzip BuildRequires: libffi-devel libffi-devel-static BuildRequires: rust-cargo >= 1.50 clang-devel llvm-devel BuildRequires: zlib-devel %{?_with_system_icu:BuildRequires: libicu-devel} %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 %ifarch armh # Disable WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS as it causes the compilation to fail # https://bugzilla.mozilla.org/show_bug.cgi?id=1526653 %patch17 -p1 %endif %patch20 -p1 -b .0ad %build mkdir _build # prepare (fix) virtualenv directory structure mkdir -p _build/_virtualenvs/init_py3/lib/python{%__python3_version,3/site-packages} ln -s ../python3/site-packages _build/_virtualenvs/init_py3/lib/python%__python3_version/site-packages export srcdir="$PWD" cd _build %add_optflags %optflags_shared %(getconf LFS_CFLAGS) # error: compiler is incompatible with sanitize options, so export CC=gcc export CXX=g++ export AUTOCONF=%_bindir/autoconf export CFLAGS="%optflags" export CXXFLAGS="$CFLAGS" export SHELL=/bin/sh export PYTHON=%__python3 ../js/src/configure \ --prefix=%_prefix \ --libdir=%_libdir \ --disable-strip \ --disable-jemalloc \ --enable-readline \ --enable-shared-js \ --disable-tests \ %{subst_enable optimize} \ --with-system-zlib \ %{?_with_system_icu:--with-system-icu} \ --with-intl-api \ %if_enabled big_endian echo "Generate big endian version of config/external/icu/data/icud67l.dat" pushd ../.. icupkg -tb config/external/icu/data/icudt67l.dat config/external/icu/data/icudt67b.dat rm -f config/external/icu/data/icudt*l.dat popd %endif %make_build %install cd _build %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 * Thu Jun 17 2021 Yuri N. Sedunov <aris@altlinux.org> 78.11.0-alt1 - 78.11.0 * Tue Apr 13 2021 Yuri N. Sedunov <aris@altlinux.org> 78.0.1-alt3 - fixed build with rust-1.50 - export class SharedArrayRawBufferRefs, patch from 0ad * Sat Dec 26 2020 Yuri N. Sedunov <aris@altlinux.org> 78.0.1-alt2 - rebuilt with newer autoconf * Wed Aug 26 2020 Yuri N. Sedunov <aris@altlinux.org> 78.0.1-alt1 - first build for Sisyphus |