summaryrefslogtreecommitdiff
path: root/waterfox/waterfox.spec
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2019-12-21 19:23:36 +0000
committerB Stack <bgstack15@gmail.com>2019-12-21 19:23:36 +0000
commit2a1b1ad901e716163527339c804ae056c7c86e37 (patch)
treee145606994210080b7107554af86b8bd3bb2755d /waterfox/waterfox.spec
parentMerge branch 'irfanview-bump' into 'master' (diff)
parentWIP: waterfox rpm updates from phantomx (diff)
downloadstackrpms-2a1b1ad901e716163527339c804ae056c7c86e37.tar.gz
stackrpms-2a1b1ad901e716163527339c804ae056c7c86e37.tar.bz2
stackrpms-2a1b1ad901e716163527339c804ae056c7c86e37.zip
Merge branch 'updates' into 'master'
Waterfox and ublock-origin See merge request bgstack15/stackrpms!108
Diffstat (limited to 'waterfox/waterfox.spec')
-rw-r--r--waterfox/waterfox.spec140
1 files changed, 75 insertions, 65 deletions
diff --git a/waterfox/waterfox.spec b/waterfox/waterfox.spec
index 3f85188..a0467ef 100644
--- a/waterfox/waterfox.spec
+++ b/waterfox/waterfox.spec
@@ -1,12 +1,12 @@
-%global commit 68014c079a1d4afa26aaad13466fcc76d0f6dcc4
+%global commit 8864e433baf07e995e7047e840d8f94d8f1b2496
%global shortcommit %(c=%{commit}; echo ${c:0:7})
-%global date 20191016
+%global date 20191205
%global with_snapshot 1
%global branch classic
-%global freebsd_rev 480450
-%global freebsd_root %{name}-FreeBSD-patches-r%{freebsd_rev}
+%global freebsd_rev 20191102
+%global freebsd_root %{name}-FreeBSD-patches-%{freebsd_rev}
%if 0%{?with_snapshot}
%global gver .%{date}git%{shortcommit}
@@ -34,7 +34,6 @@ ExcludeArch: armv7hl
%global system_libvpx 0
%endif
%global system_webp 1
-%global system_vorbis 1
%global system_libicu 0
%global system_jpeg 1
@@ -42,16 +41,16 @@ ExcludeArch: armv7hl
%global hardened_build 1
+%global disable_elfhack 0
+
%global build_with_clang 0
%ifnarch %{ix86} ppc64 s390x
%global build_with_pgo 1
%endif
%ifarch x86_64
-%if !0%{?el7}
%global build_with_lto 1
%endif
-%endif
# Big endian platforms
%ifarch ppc64 s390x
@@ -61,6 +60,7 @@ ExcludeArch: armv7hl
%if 0%{?build_with_pgo}
%global use_xvfb 1
%global build_tests 1
+%global disable_elfhack 1
%endif
%if !0%{?run_tests}
@@ -70,10 +70,9 @@ ExcludeArch: armv7hl
%global debug_build 0
-%global disable_elfhack 0
-
%global build_stylo 0
-%global build_rust_simd 1
+# stackrpms: disable simd because it only causes problems
+%global build_rust_simd 0
# Set to build with pinned rust version
# This enables stylo build when default rust version is not supported
# and a downgraded rust package exists
@@ -100,10 +99,6 @@ ExcludeArch: armv7hl
%if 0%{?system_webp}
%global webp_version 1.0.0
%endif
-%if 0%{?system_vorbis}
-%global ogg_version 1.3.3
-%global vorbis_version 1.3.5
-%endif
%if 0%{?system_nss}
%global nspr_version 4.17.0
@@ -120,6 +115,12 @@ ExcludeArch: armv7hl
%global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536)
%endif
+%if %{branch} == "classic"
+%global channel Classic
+%else
+%global channel Current
+%endif
+
%global mozappdir %{_libdir}/%{name}
%global mozappdirdev %{_libdir}/%{name}-devel-%{version}
%global langpackdir %{mozappdir}/langpacks
@@ -152,13 +153,12 @@ BuildRequires: %{scl_buildreq}
%endif
%if 0%{?rhel} >= 7
%global system_webp 0
-%global system_vorbis 0
%endif
Summary: Waterfox Web browser
Name: waterfox
-Version: 2019.10
-Release: 12.%{branch}%{?gver}%{?dist}
+Version: 2019.12
+Release: 13.%{branch}%{?gver}%{?dist}
URL: https://www.waterfox.net
License: MPLv1.1 or GPLv2+ or LGPLv2+
@@ -172,6 +172,7 @@ Source0: %{vc_url}/archive/%{version}-%{branch}/%{name}-%{version}-%{bran
# FreeBSD patches
# https://www.freshports.org/www/waterfox
# rev=revision ./waterfox-FreeBSD-patches-snapshot.sh
+# https://github.com/MrAlex94/Waterfox/issues/1220
Source600: https://dl.bintray.com/phantomx/tarballs/%{freebsd_root}.tar.xz
Source10: waterfox-mozconfig
@@ -222,10 +223,6 @@ Patch420: https://hg.mozilla.org/mozilla-central/raw-rev/97dae871389b#/mo
# Upstream updates/PRs/Reverts
#Patch???: %%{vc_url}/commit/commit.patch#/%%{name}-gh-commit.patch
-## These seems to breaking LTO
-Patch450: %{vc_url}/commit/8f87cbc0938fec17726dd09b4af2648c084fdbf7.patch#/%{name}-gh-8f87cbc.patch
-Patch451: %{vc_url}/commit/8eacc27e9529f29dea26625ca2a28a9b9aff62c4.patch#/%{name}-gh-8eacc27.patch
-Patch452: %{vc_url}/commit/94dc86561e44725210db9491ca7a06ed0322dff6.patch#/%{name}-gh-94dc865.patch
# Debian patches
Patch500: mozilla-440908.patch
@@ -242,9 +239,8 @@ Patch700: %{name}-nolangpacks.patch
# https://github.com/MrAlex94/Waterfox/pull/547.patch, down
Patch701: %{name}-waterfoxdir-1.patch
Patch702: %{name}-waterfoxdir-2.patch
-Patch703: %{name}-webrtc-gtest-libv4l2.patch
-Patch704: %{name}-fix-testing-file.patch
-
+Patch703: %{name}-fix-testing-file.patch
+Patch704: %{name}-disable-diagnostics-color.patch
%if 0%{?system_nss}
BuildRequires: pkgconfig(nspr) >= %{nspr_version}
@@ -287,17 +283,12 @@ BuildRequires: pkgconfig(libnotify) >= %{libnotify_version}
BuildRequires: pkgconfig(dri)
BuildRequires: pkgconfig(libcurl)
BuildRequires: dbus-glib-devel
-BuildRequires: pkgconfig(libv4l2)
%if 0%{?system_libvpx}
BuildRequires: pkgconfig(vpx) >= %{libvpx_version}
%endif
%if 0%{?system_webp}
BuildRequires: pkgconfig(libwebp) >= %{webp_version}
%endif
-%if 0%{?system_vorbis}
-BuildRequires: pkgconfig(ogg) >= %{ogg_version}
-BuildRequires: pkgconfig(vorbis) >= %{vorbis_version}
-%endif
BuildRequires: autoconf213
BuildRequires: pkgconfig(libpulse)
%if 0%{?system_libicu}
@@ -439,10 +430,6 @@ This package contains results of tests executed during build.
%patch419 -p1 -b .mozilla-1320560
%patch420 -p1 -b .mozilla-1389436
-%patch450 -p1 -R
-%patch451 -p1 -R
-%patch452 -p1 -R
-
# Debian extension patch
%patch500 -p1 -b .440908
@@ -490,8 +477,8 @@ done
%patch700 -p1 -b .nolangpacks
%patch701 -p1 -b .waterfoxdir-1
%patch702 -p1 -b .waterfoxdir-2
-%patch703 -p1 -b .lv4l2
-%patch704 -p1 -b .fix-testing-file
+%patch703 -p1 -b .fix-testing-file
+%patch704 -p1 -b .no-diagnostics-color
# Patch for big endian platforms only
%if 0%{?big_endian}
@@ -499,9 +486,15 @@ done
%patch36 -p2 -b .xlocale
%endif
+cp %{SOURCE26} .
+sed -e 's|_BRANCH_|%{channel}|g' -i distribution.ini
+
rm -f .mozconfig
cp %{SOURCE10} .mozconfig
+echo "ac_add_options --prefix=\"%{_prefix}\"" >> .mozconfig
+echo "ac_add_options --libdir=\"%{_libdir}\"" >> .mozconfig
+
%if 0%{?build_with_pgo}
echo "mk_add_options MOZ_PGO=1" >> .mozconfig
echo "mk_add_options PROFILE_GEN_SCRIPT='EXTRA_TEST_ARGS=10 \$(MAKE) -C \$(MOZ_OBJDIR) pgo-profile-run'" >> .mozconfig
@@ -616,14 +609,6 @@ echo "ac_add_options --with-system-webp" >> .mozconfig
echo "ac_add_options --without-system-webp" >> .mozconfig
%endif
-%if 0%{?system_vorbis}
-echo "ac_add_options --with-system-ogg" >> .mozconfig
-echo "ac_add_options --with-system-vorbis" >> .mozconfig
-%else
-echo "ac_add_options --without-system-ogg" >> .mozconfig
-echo "ac_add_options --without-system-vorbis" >> .mozconfig
-%endif
-
%if 0%{?system_libicu}
echo "ac_add_options --with-system-icu" >> .mozconfig
%else
@@ -732,7 +717,7 @@ MOZ_OPT_FLAGS="$(echo "$MOZ_OPT_FLAGS" | sed -e 's/-O2/-O3/' -e 's/ -g\b/ -g1/')
%if 0%{?build_with_clang}
RPM_FLTO_FLAGS="-flto=thin -Wl,--thinlto-jobs=$RPM_NCPUS"
%else
-RPM_FLTO_FLAGS="-flto=$RPM_NCPUS -fuse-linker-plugin -flifetime-dse=1 -fdisable-ipa-cdtor"
+RPM_FLTO_FLAGS="-flto=$RPM_NCPUS -fuse-linker-plugin -flifetime-dse=1"
%endif
MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS $RPM_FLTO_FLAGS"
MOZ_LINK_FLAGS="$MOZ_OPT_FLAGS"
@@ -757,6 +742,8 @@ MOZ_LINK_FLAGS="-Wl,--no-keep-memory"
%endif
%endif
+# Source file to improve testing
+cat > %{name}-env <<EOF
%ifarch %{arm} %{ix86}
export RUSTFLAGS="-Cdebuginfo=0"
%endif
@@ -776,21 +763,20 @@ export NM="gcc-nm"
export RANLIB="gcc-ranlib"
%endif
-export CFLAGS=$MOZ_OPT_FLAGS
-export CXXFLAGS=$MOZ_OPT_FLAGS
-export LDFLAGS=$MOZ_LINK_FLAGS
-
-export PREFIX='%{_prefix}'
-export LIBDIR='%{_libdir}'
+export CFLAGS="$MOZ_OPT_FLAGS"
+export CXXFLAGS="$MOZ_OPT_FLAGS"
+export LDFLAGS="$MOZ_LINK_FLAGS"
export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS"
export MOZ_SERVICES_SYNC="1"
export MOZ_NOSPAM=1
export STRIP=%{_prefix}/bin/true
-%if 0%{?build_with_lto}
+
+%if 0%{?build_with_lto} || 0%{?build_with_pgo}
export TMPDIR="$(pwd)/tmpdir"
-mkdir -p "$TMPDIR"
+mkdir -p "\$TMPDIR"
%endif
+EOF
%if "%{?scl_env}" != ""
thispwd=$( pwd )
@@ -798,7 +784,11 @@ mkdir -p "$TMPDIR"
pushd $thispwd
%endif
+source ./%{name}-env
+
%if 0%{?build_with_pgo}
+mkdir -p objdir/dist/%{name}-%{branch}
+ln -sf %{name}-%{branch} objdir/dist/%{name}
SHELL=%{_prefix}/bin/bash GDK_BACKEND=x11 xvfb-run ./mach build %{?verbose_mach}
%else
SHELL=%{_prefix}/bin/bash ./mach build %{?verbose_mach}
@@ -865,12 +855,12 @@ mkdir -p %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications}
desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE20}
# set up the waterfox start script
-rm -rf %{buildroot}%{_bindir}/waterfox
+rm -rf %{buildroot}%{_bindir}/%{name}
sed -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE21} \
- > %{buildroot}%{_bindir}/waterfox
-chmod 755 %{buildroot}%{_bindir}/waterfox
+ > %{buildroot}%{_bindir}/%{name}
+chmod 755 %{buildroot}%{_bindir}/%{name}
-install -p -D -m 644 %{SOURCE23} %{buildroot}%{_mandir}/man1/waterfox.1
+install -p -D -m 644 %{SOURCE23} %{buildroot}%{_mandir}/man1/%{name}.1
rm -f %{buildroot}/%{mozappdir}/waterfox-config
rm -f %{buildroot}/%{mozappdir}/update-settings.ini
@@ -878,7 +868,7 @@ rm -f %{buildroot}/%{mozappdir}/update-settings.ini
for s in 16 22 24 32 48 64 128 256; do
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps
cp -p browser/branding/unofficial/default${s}.png \
- %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/waterfox.png
+ %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/%{name}.png
done
# Register as an application to be visible in the software center
@@ -988,7 +978,7 @@ cp %{SOURCE12} %{buildroot}%{mozappdir}/browser/defaults/preferences
# Add distribution.ini
mkdir -p %{buildroot}%{mozappdir}/distribution
-cp %{SOURCE26} %{buildroot}%{mozappdir}/distribution
+cp distribution.ini %{buildroot}%{mozappdir}/distribution
# Remove copied libraries to speed up build
rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libmozjs.so
@@ -1029,14 +1019,14 @@ if [ $1 -eq 0 ]; then
fi
%files -f %{name}.lang
-%{_bindir}/waterfox
-%{mozappdir}/waterfox
-%{mozappdir}/waterfox-bin
+%{_bindir}/%{name}
+%{mozappdir}/%{name}
+%{mozappdir}/%{name}-bin
%doc %{_mandir}/man1/*
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/*
-%dir %{_datadir}/waterfox/extensions/*
-%dir %{_libdir}/waterfox/extensions/*
+%dir %{_datadir}/%{name}/extensions/*
+%dir %{_libdir}/%{name}/extensions/*
%{_metainfodir}/*.appdata.xml
%{_datadir}/applications/*.desktop
%dir %{mozappdir}
@@ -1049,6 +1039,7 @@ fi
# That's Windows only
%ghost %{mozappdir}/browser/features/aushelper@mozilla.org.xpi
%attr(644, root, root) %{mozappdir}/browser/blocklist.xml
+%attr(644, root, root) %{mozappdir}/browser/ua-update.json
%dir %{mozappdir}/browser/extensions
%{mozappdir}/browser/extensions/*
%if %{build_langpacks}
@@ -1059,7 +1050,7 @@ fi
%{mozappdir}/run-mozilla.sh
%{mozappdir}/application.ini
%exclude %{mozappdir}/removed-files
-%{_datadir}/icons/hicolor/*/apps/waterfox.png
+%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{mozappdir}/*.so
%{mozappdir}/gtk2/*.so
%{mozappdir}/defaults/pref/channel-prefs.js
@@ -1083,9 +1074,28 @@ fi
#---------------------------------------------------------------------
%changelog
-* Thu Oct 17 2019 B Stack <bgstack15@gmail.com> - 2019.10-12.classic.20191016git68014c0
+* Thu Dec 19 2019 B Stack <bgstack15@gmail.com> - 2019.12-13.classic
- add el7 and el8 support
- repackage for stackrpms
+- disable simd globally
+
+* Thu Dec 12 2019 Phantom X <megaphantomx at bol dot com dot br> - 2019.12-3.classic
+- PGO build from COPR crashing, try to fix disabling elfhack
+
+* Wed Dec 11 2019 Phantom X <megaphantomx at bol dot com dot br> - 2019.12-2.classic
+- PGO again
+
+* Wed Dec 11 2019 Phantom X <megaphantomx at bol dot com dot br> - 2019.12-1.classic
+- 2019.12
+- Disable broken PGO for the time
+- Update FreeBSD patches. No system ogg/vorbis anymore
+
+* Thu Oct 24 2019 Phantom X <megaphantomx at bol dot com dot br> - 2019.10-4.classic.20191020gitf80144e
+- New snapshot
+- Add channel to distribution.ini
+
+* Thu Oct 17 2019 Phantom X <megaphantomx at bol dot com dot br> - 2019.10-3.classic.20191016git68014c0
+- PR to restore user-agent overrides
* Wed Oct 16 2019 Phantom X <megaphantomx at bol dot com dot br> - 2019.10-2.classic.20191016git68014c0
- Try to fix crash with LTO, reverting some commits
bgstack15