From 7b13ff701067e683a5cf846781638a01284fdc12 Mon Sep 17 00:00:00 2001 From: B Stack Date: Thu, 13 Dec 2018 10:15:53 -0500 Subject: waterfox 56.2.5 like normal, import from chinforpms --- waterfox/waterfox.spec | 158 +++++++++++++++++++++++++++++-------------------- 1 file changed, 94 insertions(+), 64 deletions(-) (limited to 'waterfox/waterfox.spec') diff --git a/waterfox/waterfox.spec b/waterfox/waterfox.spec index 43687e7..5882681 100644 --- a/waterfox/waterfox.spec +++ b/waterfox/waterfox.spec @@ -1,6 +1,6 @@ -%global commit 475fed0269120a3673ac55d8384022dc7f44eacf +%global commit 3e2c786a657a0b2e6e7a82c155a8ff6030888c4a %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global date 20181030 +%global date 20181211 %global with_snapshot 1 %global freebsd_rev 480450 @@ -10,68 +10,59 @@ %global gver .%{date}git%{shortcommit} %endif -# Build with clang only? -%global with_clang 0 -# Use ALSA backend? %global alsa_backend 1 - -# Use system nspr/nss? %global system_nss 1 - -# Use system hunspell? %global system_hunspell 1 - -# Use system libevent? %global system_libevent 1 - -# Use system sqlite? %global system_sqlite 1 - %global system_ffi 1 - -# Use system cairo? %global system_cairo 0 - -# Use system graphite2/harfbuzz? %global system_harfbuzz 1 - -# Use system libvpx? %global system_libvpx 1 - -# Use system webp? %global system_webp 1 - -# Use system libvpx? %global system_vorbis 1 - -# Use system libicu? %global system_libicu 0 +%global system_jpeg 1 + +%global run_tests 0 + +%global hardened_build 1 + +%global build_with_clang 0 +%if 0%{?fedora} >= 29 +%ifarch x86_64 aarch64 +%global build_with_clang 1 +%endif +%endif +%global build_with_pgo 0 # 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 +%if 0%{?build_with_pgo} +%global use_xvfb 1 +%global build_tests 1 +%endif -%ifarch %{ix86} x86_64 -%global run_tests 0 -%else -%global run_tests 0 +%if !0%{?run_tests} +%global use_xvfb 1 +%global build_tests 1 %endif -# Build as a debug package? +%bcond_without debug_build +%if %{with debug_build} +%else +%global debug_build 1 +%else %global debug_build 0 +%endif -%global disable_elfhack 0 -%if 0%{?fedora} > 28 -%global disable_elfhack 1 +%global disable_elfhack 0 +%if !0%{?build_with_clang} || 0%{?fedora} > 28 +%global disable_elfhack 1 %endif %global default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html @@ -184,13 +175,12 @@ Patch414: mozilla-1435695.patch Patch415: Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch Patch416: bug1375074-save-restore-x28.patch Patch417: mozilla-1436242.patch +Patch418: https://hg.mozilla.org/integration/autoland/raw-rev/342812d23eb9#/mozilla-1336978.patch # Upstream updates %global wf_url https://github.com/MrAlex94/Waterfox #Patch???: %%{wf_url}/commit/commit.patch#/wf-commit.patch -# Revert this until figure out -Patch490: %{wf_url}/commit/a89c49043079c720ea09ea3c7c523a5ef5db00e5.patch#/wf-a89c49043079c720ea09ea3c7c523a5ef5db00e5.patch # Debian patches Patch500: mozilla-440908.patch @@ -261,7 +251,10 @@ BuildRequires: llvm BuildRequires: llvm-devel BuildRequires: clang BuildRequires: clang-libs -%if !0%{?with_clang} +%if 0%{?build_with_clang} +#BuildRequires: lld +BuildRequires: libstdc++-static +%else BuildRequires: gcc-c++ %endif BuildRequires: patchutils @@ -274,6 +267,7 @@ Requires: nspr >= %{nspr_build_version} Requires: nss >= %{nss_build_version} %endif BuildRequires: python2-devel +Requires: u2f-hidraw-policy BuildRequires: nss-devel >= 3.29.1-2.1 Requires: nss >= 3.29.1-2.1 @@ -289,7 +283,7 @@ Requires: sqlite >= %{sqlite_build_version} BuildRequires: pkgconfig(libffi) %endif -%if %{?run_tests} +%if 0%{?use_xvfb} BuildRequires: xorg-x11-server-Xvfb %endif BuildRequires: rust @@ -304,7 +298,7 @@ Waterfox is an open-source web browser, specialised modification of the Mozilla platform, designed for privacy and user choice in mind. %if %{run_tests} -%global testsuite_pkg_name mozilla-%{name}-testresults +%global testsuite_pkg_name %{name}-testresults %package -n %{testsuite_pkg_name} Summary: Results of testsuite %description -n %{testsuite_pkg_name} @@ -374,8 +368,7 @@ This package contains results of tests executed during build. %endif %patch416 -p1 -b .bug1375074-save-restore-x28 %patch417 -p1 -b .mozilla-1436242 - -%patch490 -p1 -R -b .1420171 +%patch418 -p1 -b .mozilla-1336978 # Debian extension patch %patch500 -p1 -b .440908 @@ -400,7 +393,7 @@ done # 2: no apply # 3: uncertain for i in \ - 702179 991253 1021761 1144632 1288587 1452576 \ + 702179 991253 1021761 1144632 1288587 1395486 1452576 \ 1388744 1413143 \ 1447519 do @@ -431,9 +424,22 @@ done rm -f .mozconfig cp %{SOURCE10} .mozconfig -%if 0%{?with_clang} +%if 0%{?build_with_clang} +echo 'export LLVM_PROFDATA="llvm-profdata"' >> .mozconfig echo 'export CC=clang' >> .mozconfig echo 'export CXX=clang++' >> .mozconfig +echo 'export AR="llvm-ar"' >> .mozconfig +echo 'export NM="llvm-nm"' >> .mozconfig +echo 'export RANLIB="llvm-ranlib"' >> .mozconfig +echo "ac_add_options --enable-linker=gold" >> .mozconfig +echo "ac_add_options --enable-rust-simd" >> .mozconfig +%else +echo 'export CC=gcc' >> .mozconfig +echo 'export CXX=g++' >> .mozconfig +echo "ac_add_options --enable-linker=gold" >> .mozconfig +%endif +%if 0%{?build_with_pgo} +echo "ac_add_options MOZ_PGO=1" >> .mozconfig %endif %if %{?system_nss} @@ -497,10 +503,6 @@ echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig %else %global optimize_flags "none" -# Fedora 26 (gcc7) needs to disable default build flags (mozbz#1342344) -%ifnarch s390 s390x -%global optimize_flags "-g -O2" -%endif %ifarch armv7hl # ARMv7 need that (rhbz#1426850) %global optimize_flags "-g -O2 -fno-schedule-insns" @@ -564,6 +566,9 @@ echo "ac_add_options --without-system-icu" >> .mozconfig echo "ac_add_options --disable-ion" >> .mozconfig %endif +# Remove executable bit to make brp-mangle-shebangs happy. +chmod -x third_party/rust/itertools/src/lib.rs + #--------------------------------------------------------------------- @@ -589,13 +594,6 @@ echo "Generate big endian version of config/external/icu/data/icud58l.dat" # Update the various config.guess to upstream release for aarch64 support find ./ -name config.guess -exec cp /usr/lib/rpm/config.guess {} ';' -# -fpermissive is needed to build with gcc 4.6+ which has become stricter -# -# Mozilla builds with -Wall with exception of a few warnings which show up -# everywhere in the code; so, don't override that. -# -# Disable C++ exceptions since Mozilla code is not exception-safe -# MOZ_OPT_FLAGS=$(echo "%{optflags}" | %{__sed} -e 's/-Wall//') #rhbz#1037063 # -Werror=format-security causes build failures when -Wno-format is explicitly given @@ -603,9 +601,6 @@ MOZ_OPT_FLAGS=$(echo "%{optflags}" | %{__sed} -e 's/-Wall//') # Explicitly force the hardening flags for Waterfox so it passes the checksec test; # See also https://fedoraproject.org/wiki/Changes/Harden_All_Packages MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" -# Disable null pointer gcc6 optimization in gcc6 (rhbz#1328045) -MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fno-delete-null-pointer-checks" -# Use hardened build? %if %{?hardened_build} MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fPIC -Wl,-z,relro -Wl,-z,now" %endif @@ -619,9 +614,19 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') # (OOM when linking, rhbz#1238225) export MOZ_DEBUG_FLAGS=" " %endif +%ifarch %{arm} +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g0/') +export MOZ_DEBUG_FLAGS=" " +%endif +%if !0%{?build_with_clang} %ifarch s390 %{arm} ppc aarch64 MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif +%endif + +%ifarch %{arm} %{ix86} +export RUSTFLAGS="-Cdebuginfo=0" +%endif export CFLAGS=$MOZ_OPT_FLAGS export CXXFLAGS=$MOZ_OPT_FLAGS export LDFLAGS=$MOZ_LINK_FLAGS @@ -629,6 +634,16 @@ export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' export LIBDIR='%{_libdir}' +%if 0%{?build_with_clang} +export CC=clang +export CXX=clang++ +export AR="llvm-ar" +export NM="llvm-nm" +%else +export CC=gcc +export CXX=g++ +%endif + MOZ_SMP_FLAGS=-j1 # On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, # however builds tend to fail on other arches when building in parallel. @@ -640,7 +655,14 @@ MOZ_SMP_FLAGS=-j1 [ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 %endif -make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1" +export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" +export MOZ_SERVICES_SYNC="1" +export STRIP=/bin/true +%if 0%{?build_with_pgo} +xvfb-run ./mach build +%else +./mach build +%endif %if %{?run_tests} %if %{?system_nss} @@ -909,6 +931,14 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Dec 13 2018 B Stack 56.2.5.-3.20181211git3e2c786 +- repackage for stackrpms + +* Wed Dec 12 2018 Phantom X - 56.2.5-2.20181211git3e2c786 +- New snapshot +- Updated spec, more like Fedora Firefox one +- clang build + * Tue Oct 30 2018 Phantom X - 56.2.5-1.20181030git475fed0 - New release/snapshot -- cgit