MozillaFirefox/MozillaFirefox.spec
branchfirefox68
changeset 1101 a4709640638e
parent 1099 8a3c73e74e65
child 1104 15a995ab86c6
--- a/MozillaFirefox/MozillaFirefox.spec	Wed Sep 04 10:39:09 2019 +0200
+++ b/MozillaFirefox/MozillaFirefox.spec	Thu Sep 05 08:03:30 2019 +0200
@@ -33,6 +33,8 @@
 # PIE, full relro
 %define build_hardened 1
 
+%bcond_with only_print_mozconfig
+
 # Firefox only supports i686
 %ifarch %ix86
 ExclusiveArch:  i586 i686
@@ -134,7 +136,8 @@
 License:        MPL-2.0
 Group:          Productivity/Networking/Web/Browsers
 Url:            http://www.mozilla.org/
-Source:         http://ftp.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{orig_version}%{orig_suffix}.source.tar.xz
+%if !%{with only_print_mozconfig}
+Source:         http://ftp.mozilla.org/pub/firefox/releases/%{version}%{orig_suffix}/source/firefox-%{orig_version}%{orig_suffix}.source.tar.xz
 Source1:        MozillaFirefox.desktop
 Source2:        MozillaFirefox-rpmlintrc
 Source3:        mozilla.sh.in
@@ -156,8 +159,8 @@
 # please get your own set of keys.
 Source18:       mozilla-api-key
 Source19:       google-api-key
-Source20:       https://ftp.mozilla.org/pub/%{progname}/releases/%{version}/source/%{progname}-%{orig_version}%{orig_suffix}.source.tar.xz.asc
-Source21:       mozilla.keyring
+Source20:       https://ftp.mozilla.org/pub/%{progname}/releases/%{version}%{orig_suffix}/source/%{progname}-%{orig_version}%{orig_suffix}.source.tar.xz.asc
+Source21:       https://ftp.mozilla.org/pub/%{progname}/releases/%{version}%{orig_suffix}/KEY#/mozilla.keyring
 # Gecko/Toolkit
 Patch1:         mozilla-nongnome-proxies.patch
 Patch2:         mozilla-kde.patch
@@ -174,10 +177,18 @@
 Patch13:        mozilla-ppc-altivec_static_inline.patch
 Patch14:        mozilla-bmo1005535.patch
 Patch15:        mozilla-bmo1568145.patch
+Patch16:        mozilla-bmo1573381.patch
+Patch17:        mozilla-bmo1504834-part1.patch
+Patch18:        mozilla-bmo1504834-part2.patch
+Patch19:        mozilla-bmo1504834-part3.patch
+Patch20:        mozilla-bmo1511604.patch
+Patch21:        mozilla-bmo1554971.patch
+Patch22:        mozilla-nestegg-big-endian.patch
 # Firefox/browser
 Patch101:       firefox-kde.patch
 Patch102:       firefox-branded-icons.patch
 Patch103:       firefox-add-kde.js-in-order-to-survive-PGO-build.patch
+%endif # only_print_mozconfig
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Requires(post):   coreutils shared-mime-info desktop-file-utils
 Requires(postun): shared-mime-info desktop-file-utils
@@ -267,6 +278,7 @@
 symbols meant for upload to Mozilla's crash collector database.
 %endif
 
+%if !%{with only_print_mozconfig}
 %prep
 %if %localize
 
@@ -300,12 +312,21 @@
 %patch13 -p1
 %patch14 -p1
 %patch15 -p1
+%patch16 -p1
+%patch17 -p1
+%patch18 -p1
+%patch19 -p1
+%patch20 -p1
+%patch21 -p1
+%patch22 -p1
 # Firefox
 %patch101 -p1
 %patch102 -p1
 %patch103 -p1
+%endif # only_print_mozconfig
 
 %build
+%if !%{with only_print_mozconfig}
 # no need to add build time to binaries
 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
@@ -318,6 +339,8 @@
   exit 1
 fi
 source %{SOURCE5}
+%endif # only_print_mozconfig
+
 export MOZ_SOURCE_CHANGESET=$REV
 export SOURCE_REPO=$REPO
 export source_repo=$REPO
@@ -348,8 +371,18 @@
 %endif
 export CXXFLAGS="$CFLAGS"
 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig
+%if %{with only_print_mozconfig}
+echo "export CC=$CC"
+echo "export CXX=$CXX"
+echo "export CFLAGS=\"$CFLAGS\""
+echo "export LDFLAGS=\"$LDFLAGS\""
+echo "export RUSTFLAGS=\"$RUSTFLAGS\""
+echo ""
+cat << EOF
+%else
 %limit_build -m 2000
 cat << EOF > $MOZCONFIG
+%endif
 mk_add_options MOZILLA_OFFICIAL=1
 mk_add_options BUILD_OFFICIAL=1
 mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs}
@@ -424,7 +457,19 @@
 %endif
 %endif
 EOF
+%if !%{with only_print_mozconfig}
+%ifarch ppc64 s390x s390
+# NOTE: Currently, system-icu is too old, so we can't build with that,
+#       but have to generate the .dat-file freshly. This seems to be a
+#       less fragile approach anyways.
+# ac_add_options --with-system-icu
+echo "Generate big endian version of config/external/icu/data/icud58l.dat"
+./mach python intl/icu_sources_data.py .
+ls -l config/external/icu/data
+rm -f config/external/icu/data/icudt*l.dat
+%endif
 xvfb-run --server-args="-screen 0 1920x1080x24" ./mach build
+%endif # only_print_mozconfig
 
 %install
 cd $RPM_BUILD_DIR/obj
@@ -448,7 +493,7 @@
 # install browser prefs
 install -m 644 %{SOURCE6} %{buildroot}%{progdir}/browser/defaults/preferences/kde.js
 install -m 644 %{SOURCE9} %{buildroot}%{progdir}/browser/defaults/preferences/firefox.js
-# install additional locales
+# build additional locales
 %if %localize
 mkdir -p %{buildroot}%{progdir}/browser/extensions
 truncate -s 0 %{_tmppath}/translations.{common,other}