Merge branch 'master' of ssh://pkgs.fedoraproject.org/rpms/firefox

This commit is contained in:
Martin Stransky 2018-10-19 12:41:15 +02:00
commit 5a75318a40
4 changed files with 67 additions and 22 deletions

1
.gitignore vendored
View File

@ -314,3 +314,4 @@ firefox-3.6.4.source.tar.bz2
/firefox-langpacks-62.0.3-20181002.tar.xz
/firefox-63.0.source.tar.xz
/firefox-langpacks-63.0-20181018.tar.xz
/cbindgen-vendor.tar.xz

View File

@ -1,5 +1,12 @@
# Use system nspr/nss?
%global system_nss 1
%global system_sqlite 0
%global system_ffi 1
%global system_cairo 0
%global system_libvpx 1
%global system_libicu 0
%global hardened_build 1
%global system_jpeg 1
# Make Wayland backend default?
%if 0%{?fedora} > 29
@ -8,39 +15,21 @@
%global wayland_backend_default 0
%endif
# Use system sqlite?
%global system_sqlite 0
%global system_ffi 1
# Use system cairo?
%global system_cairo 0
# Use system libvpx?
%global system_libvpx 1
# Use system libicu?
%global system_libicu 0
%if 0%{?fedora} < 29
%global use_bundled_cbindgen 1
%endif
# Big endian platforms
%ifarch ppc64 s390x
# Javascript Intl API is not supported on big endian platforms right now:
# https://bugzilla.mozilla.org/show_bug.cgi?id=1322212
%global big_endian 1
%endif
# Hardened build?
%global hardened_build 1
%global system_jpeg 1
%ifarch %{ix86} x86_64
%global run_tests 0
%else
%global run_tests 0
%endif
# Build as a debug package?
%bcond_without debug_build
%if %{with debug_build}
%else
@ -54,7 +43,6 @@
%global disable_elfhack 1
%endif
%global default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html
%global firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
# Minimal required versions
@ -108,6 +96,7 @@ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pr
%if %{with langpacks}
Source1: firefox-langpacks-%{version}%{?pre_version}-20181018.tar.xz
%endif
Source2: cbindgen-vendor.tar.xz
Source10: firefox-mozconfig
Source12: firefox-redhat-default-prefs.js
Source20: firefox.desktop
@ -213,7 +202,11 @@ BuildRequires: clang-libs
%if 0%{?fedora} > 27
BuildRequires: pipewire-devel
%endif
%if !0%{?use_bundled_cbindgen}
BuildRequires: cbindgen
%endif
BuildRequires: nodejs
Requires: mozilla-filesystem
@ -471,6 +464,22 @@ echo "ac_add_options --disable-ion" >> .mozconfig
# Remove executable bit to make brp-mangle-shebangs happy.
chmod -x third_party/rust/itertools/src/lib.rs
%if 0%{?use_bundled_cbindgen}
cd third_party/rust
%{__tar} xf %{SOURCE2}
cd -
mkdir -p .cargo
cat > .cargo/config <<EOL
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "`pwd`/third_party/rust"
EOL
env CARGO_HOME=.cargo cargo install cbindgen
%endif
#---------------------------------------------------------------------
%build
@ -485,6 +494,10 @@ case "%{sqlite_build_version}" in
esac
%endif
%if 0%{?use_bundled_cbindgen}
export PATH=`pwd`/.cargo/bin:$PATH
%endif
echo "Generate big endian version of config/external/icu/data/icud58l.dat"
%if 0%{?big_endian}
./mach python intl/icu_sources_data.py .

30
gen_cbindgen-vendor.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash
# Dummy Cargo.toml file with cbindgen dependency
cat > Cargo.toml <<EOL
[package]
name = "dummy"
version = "0.0.1"
description = """
This is a dummy package which contains dependency on cbindgen
to be used with 'cargo vendor' commmand.
"""
[dependencies]
cbindgen = "0.6.3"
[[bin]]
name = "dummy"
path = "dummy.rs"
doc = false
EOL
cargo install cargo-vendor
cargo vendor
cd vendor
tar -cJf ../cbindgen-vendor.tar.xz *
cd ..
rm -f Cargo.toml
rm -rf vendor

View File

@ -1,2 +1,3 @@
SHA512 (firefox-63.0.source.tar.xz) = 1e2cd61f84e5a9cdf0eee6fb7b84986a0a7f8bcdf72aa1eb491e178920e8ef80f158c7421cdc973acaff5e27b9901838c4d564f7d8235f428391241144794952
SHA512 (firefox-langpacks-63.0-20181018.tar.xz) = 340d4b40181cfe8aa0c0a5988651d982836dc5292b70e9942235219497ce36af099a733b00934d5c494134b29a971752da30166472e1e919d9419025f4cc5f94
SHA512 (cbindgen-vendor.tar.xz) = 6d1a6ef48e77920bccd51af27c836d66aed49a571a0f5298df9cc87724467a5542e382485aa6c5ed2b516277086ffe4d5360b9eb4c0ab62ef6e3e027fc736ead