mozjs128/mozjs128.spec

307 lines
10 KiB
RPMSpec
Raw Permalink Normal View History

%define MAJver %(echo %version | cut -d. -f1)
%define majver %(echo %version | cut -d. -f1-2)
Name: mozjs128
Version: 128.3.1
Release: 1mamba
Summary: Mozilla stand-alone library implementing JavaScript 24
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://www.mozilla.org/en-US/
Source: https://archive.mozilla.org/pub/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz
Patch0: mozjs-91.8.0-fix-soname.patch
Patch1: mozjs-68.4.2-arm-Add-options-to-specify-Rust-target-name.patch
Patch2: mozjs-68.4.2-arm-disable_emulate_arm_unaligned_fp_access.patch
Patch3: mozjs-68.4.2-gcc-10.0.patch
Patch4: mozjs-91.8.0-copy-headers.patch
Patch5: mozjs-91.8.0-tests-increase-timeout.patch
Patch6: mozjs-91.8.0-icu_sources_data.py-Decouple-from-Mozilla-build-system.patch
Patch7: mozjs-91.8.0-icu_sources_data-Write-command-output-to-our-stderr.patch
Patch8: mozjs-91.8.0-emitter.patch
Patch9: mozjs-91.8.0-tests-Use-native-TemporaryDirectory.patch
Patch10: mozjs-91.8.0-init_patch.patch
Patch11: mozjs-91.8.0-remove-sloppy-m4-detection-from-bundled-autoconf.patch
Patch12: mozjs-91.8.0-spidermonkey_checks_disable.patch
Patch13: mozjs115-115.7.0-x86-double_t-fix.patch
# Only GPL because linking to readline
License: GPL
#License: MPL, GPL, LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libgcc
BuildRequires: libicu-devel
BuildRequires: libreadline-devel
BuildRequires: libstdc++6-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
BuildRequires: pkg-config
BuildRequires: autoconf2.13
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires(post): %{__install_info}
Requires(preun): %{__install_info}
%description
Mozilla stand-alone library implementing JavaScript 24.
%package -n lib%{name}
Group: System/Libraries
Summary: Mozilla stand-alone library implementing JavaScript 24
%description -n lib%{name}
Mozilla stand-alone library implementing JavaScript 24.
%package -n lib%{name}-devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: pkg-config
%description -n lib%{name}-devel
This package contains libraries and header files for developing applications that use %{name}.
%debug_package
%prep
%setup -q -c -a0
#% setup -q -c -D -T
cd firefox-%{version}
#:<< _EOF
%patch 0 -p1 -b .fix-soname
%patch 4 -p1 -b .copy-headers
%patch 6 -p1 -b .icu_sources_data.py-Decouple-from-Mozilla-build-system
%patch 7 -p1 -b .icu_sources_data-Write-command-output-to-our-stderr
%patch 8 -p1 -b .emitter
%patch 10 -p1 -b .init_patch
%patch 11 -p1 -b .remove-sloppy-m4-detection-from-bundled-autoconf
%patch 12 -p1 -b .spidermonkey_checks_disable
%ifarch %{ix86} arm
%patch 13 -p1 -b .x86-double_t-fix
%endif
%build
cd firefox-%{version}/js/src
#:<< _EOF
# NOTE: taken from Fedora
# Prefer GCC for now
export CC=gcc
export CXX=g++
# Workaround
# error: options `-C embed-bitcode=no` and `-C lto` are incompatible
# error: could not compile `jsrust`.
# https://github.com/japaric/cargo-call-stack/issues/25
export RUSTFLAGS="-C embed-bitcode"
# https://github.com/ptomato/mozjs/commit/36bb7982b41e0ef9a65f7174252ab996cd6777bd
export CARGO_PROFILE_RELEASE_LTO=true
export CFLAGS="%{optflags}"
export CXXFLAGS="$CFLAGS"
export LINKFLAGS="%{?build_ldflags}"
export PYTHON="%{python3}"
# Use bundled autoconf
export M4=m4
export AWK=awk
export AC_MACRODIR=%{_builddir}/%{name}-%{version}/firefox-%{version}/build/autoconf/
#sh ../../build/autoconf/autoconf.sh --localdir=%{_builddir}/firefox-%{version}/js/src configure.in > configure
#chmod +x configure
%ifarch arm
sed -i "s|armv4t|arm|" ../../build/moz.configure/rust.configure
%endif
%configure \
%ifarch %{ix86}
--host=i686-unknown-linux-gnu \
%endif
%ifarch arm
--host=armv5te-unknown-linux-gnueabi \
%endif
--with-system-icu \
--with-system-zlib \
--disable-tests \
--disable-strip \
--with-intl-api \
--enable-readline \
--enable-shared-js \
--enable-optimize \
--disable-debug \
--enable-pie \
--disable-jemalloc
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C firefox-%{version}/js/src
# Fix permissions
chmod -x %{buildroot}%{_libdir}/pkgconfig/*.pc
# Remove unneeded files
rm %{buildroot}%{_bindir}/js%{MAJver}-config
rm %{buildroot}%{_libdir}/libjs_static.ajs
# Rename library and create symlinks, following fix-soname.patch
mv %{buildroot}%{_libdir}/libmozjs-%{MAJver}.so \
%{buildroot}%{_libdir}/libmozjs-%{MAJver}.so.0.0.0
ln -s libmozjs-%{MAJver}.so.0.0.0 %{buildroot}%{_libdir}/libmozjs-%{MAJver}.so.0
ln -s libmozjs-%{MAJver}.so.0 %{buildroot}%{_libdir}/libmozjs-%{MAJver}.so
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files -n lib%{name}
%defattr(-,root,root)
%{_libdir}/libmozjs-%{MAJver}.so.*
%doc firefox-%{version}/LICENSE
%files -n lib%{name}-devel
%defattr(-,root,root)
%{_bindir}/js%{MAJver}
%dir %{_includedir}/mozjs-%{MAJver}/
%{_includedir}/mozjs-%{MAJver}/*
%{_libdir}/libmozjs-%{MAJver}.so
%{_libdir}/pkgconfig/mozjs-%{MAJver}.pc
%changelog
* Thu Oct 10 2024 Automatic Build System <autodist@openmamba.org> 128.3.1-1mamba
- automatic version update by autodist
* Wed Oct 02 2024 Automatic Build System <autodist@openmamba.org> 128.3.0-1mamba
- automatic version update by autodist
* Wed Sep 04 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 128.2.0-2mamba
- package renamed from mozjs115
* Wed Sep 04 2024 Automatic Build System <autodist@openmamba.org> 128.2.0-1mamba
- automatic version update by autodist
* Tue Aug 06 2024 Automatic Build System <autodist@openmamba.org> 128.1.0-1mamba
- automatic version update by autodist
* Tue Jul 09 2024 Automatic Build System <autodist@openmamba.org> 115.13.0-1mamba
- automatic version update by autodist
* Tue Jun 11 2024 Automatic Build System <autodist@openmamba.org> 115.12.0-1mamba
- automatic version update by autodist
* Tue May 14 2024 Automatic Build System <autodist@openmamba.org> 115.11.0-1mamba
- automatic version update by autodist
* Wed Apr 17 2024 Automatic Build System <autodist@openmamba.org> 115.10.0-1mamba
- automatic version update by autodist
* Sat Mar 23 2024 Automatic Build System <autodist@openmamba.org> 115.9.1-1mamba
- automatic version update by autodist
* Tue Mar 19 2024 Automatic Build System <autodist@openmamba.org> 115.9.0-1mamba
- automatic version update by autodist
* Tue Feb 20 2024 Automatic Build System <autodist@openmamba.org> 115.8.0-1mamba
- automatic version update by autodist
* Wed Jan 24 2024 Automatic Build System <autodist@openmamba.org> 115.7.0-1mamba
- automatic version update by autodist
* Wed Dec 20 2023 Automatic Build System <autodist@mambasoft.it> 115.6.0-1mamba
- automatic version update by autodist
* Thu Nov 23 2023 Automatic Build System <autodist@mambasoft.it> 115.5.0-1mamba
- automatic version update by autodist
* Tue Oct 24 2023 Automatic Build System <autodist@mambasoft.it> 115.4.0-1mamba
- automatic version update by autodist
* Fri Sep 29 2023 Automatic Build System <autodist@mambasoft.it> 115.3.1-1mamba
- automatic version update by autodist
* Wed Sep 27 2023 Automatic Build System <autodist@mambasoft.it> 115.3.0-1mamba
- automatic version update by autodist
* Wed Sep 13 2023 Automatic Build System <autodist@mambasoft.it> 115.2.1-1mamba
- automatic version update by autodist
* Thu Aug 31 2023 Automatic Build System <autodist@mambasoft.it> 115.2.0-1mamba
- automatic version update by autodist
* Sat Aug 05 2023 Automatic Build System <autodist@mambasoft.it> 102.14.0-1mamba
- automatic version update by autodist
* Wed Jul 05 2023 Automatic Build System <autodist@mambasoft.it> 102.13.0-1mamba
- automatic version update by autodist
* Fri Jun 02 2023 Automatic Build System <autodist@mambasoft.it> 102.12.0-1mamba
- automatic version update by autodist
* Wed May 10 2023 Automatic Build System <autodist@mambasoft.it> 102.11.0-1mamba
- automatic version update by autodist
* Tue Apr 11 2023 Automatic Build System <autodist@mambasoft.it> 102.10.0-1mamba
- automatic version update by autodist
* Tue Mar 14 2023 Automatic Build System <autodist@mambasoft.it> 102.9.0-1mamba
- automatic version update by autodist
* Wed Feb 15 2023 Automatic Build System <autodist@mambasoft.it> 102.8.0-1mamba
- automatic version update by autodist
* Tue Jan 17 2023 Automatic Build System <autodist@mambasoft.it> 102.7.0-1mamba
- automatic version update by autodist
* Tue Dec 13 2022 Automatic Build System <autodist@mambasoft.it> 102.6.0-1mamba
- automatic version update by autodist
* Wed Nov 16 2022 Automatic Build System <autodist@mambasoft.it> 102.5.0-1mamba
- automatic version update by autodist
* Tue Oct 18 2022 Automatic Build System <autodist@mambasoft.it> 102.4.0-1mamba
- automatic version update by autodist
* Sat Oct 01 2022 Automatic Build System <autodist@mambasoft.it> 102.3.0-1mamba
- automatic version update by autodist
* Thu Jul 28 2022 Automatic Build System <autodist@mambasoft.it> 91.12.0-1mamba
- automatic version update by autodist
* Tue Jun 28 2022 Automatic Build System <autodist@mambasoft.it> 91.11.0-1mamba
- automatic version update by autodist
* Wed Jun 01 2022 Automatic Build System <autodist@mambasoft.it> 91.10.0-1mamba
- automatic version update by autodist
* Sun May 22 2022 Automatic Build System <autodist@mambasoft.it> 91.9.1-1mamba
- automatic version update by autodist
* Mon May 09 2022 Automatic Build System <autodist@mambasoft.it> 91.9.0-1mamba
- automatic version update by autodist
* Sat Apr 16 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 91.8.0-2mamba
- fix wrong so library links
* Fri Apr 15 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 91.8.0-1mamba
- update to 91.8.0
* Sun Mar 22 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 68.4.2-1mamba
- update to 68.4.2
* Sat Jul 06 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 60.1.0-1mamba
- update to 60.1.0
* Tue Dec 11 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 52.6.0-1mamba
- update to 52.6.0
* Mon Dec 10 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 52.2.1-2mamba
- arm: rebuilt
* Mon Aug 13 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 52.2.1-1mamba
- update to 52.2.1
* Thu Jun 19 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 24.2.0-1mamba
- package created from mozjs185