From fa1ad87cf3d6e599e7a361b3577d48fc9f161f8f Mon Sep 17 00:00:00 2001 From: B Stack Date: Wed, 24 Apr 2019 23:42:47 +0000 Subject: waterfox add el7 support This involved disabling --with-system- for a number of libs, disabling lto, and using SCL. --- waterfox/waterfox.spec | 56 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/waterfox/waterfox.spec b/waterfox/waterfox.spec index ea4b2bd..775293f 100644 --- a/waterfox/waterfox.spec +++ b/waterfox/waterfox.spec @@ -46,8 +46,10 @@ ExcludeArch: armv7hl %endif %ifarch x86_64 +%if !0%{?el7} %global build_with_lto 1 %endif +%endif # Big endian platforms %ifarch ppc64 s390x @@ -129,10 +131,34 @@ ExcludeArch: armv7hl %global build_langpacks 1 +# additional repos to get python27 and devtoolset-7 +# for el6 and el7: Software Collection;, for x86_64 only +# http://mirror.centos.org/centos/6/sclo/x86_64/rh/ +# http://mirror.centos.org/centos/6/sclo/x86_64/sclo/ +# for el6.i386: +# https://copr-be.cloud.fedoraproject.org/results/ewdurbin/pythons-el6/epel-6-$basearch/ +# https://copr-be.cloud.fedoraproject.org/results/mlampe/devtoolset-7/epel-6-$basearch/ +%define scl_env %{nil} +%define scl_buildreq coreutils +%if 0%{?el7} +%define scl_env devtoolset-7 +%define scl_buildreq devtoolset-7-toolchain +%global system_nss 0 +%global system_hunspell 0 +%global system_libevent 0 +%global system_webp 0 +%global system_vorbis 0 +%global system_sqlite 0 +%global system_libvpx 0 +%if "%{?scl_env}" != "" +BuildRequires: %{scl_buildreq} +%endif +%endif + Summary: Waterfox Web browser Name: waterfox Version: 56.2.8 -Release: 4%{?gver}%{?dist} +Release: 12%{?gver}%{?dist} URL: https://www.waterfoxproject.org License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -279,8 +305,8 @@ BuildRequires: yasm BuildRequires: llvm BuildRequires: llvm-devel BuildRequires: clang -BuildRequires: clang-libs %if 0%{?build_with_clang} +BuildRequires: clang-libs BuildRequires: lld BuildRequires: libstdc++-static %if 0%{?build_with_pgo} @@ -617,6 +643,7 @@ chmod -x third_party/rust/itertools/src/lib.rs #--------------------------------------------------------------------- %build + %if 0%{?system_sqlite} # Do not proceed with build if the sqlite require would be broken: # make sure the minimum requirement is non-empty, ... @@ -753,12 +780,24 @@ export STRIP=/bin/true export TMPDIR="$(pwd)/tmpdir" mkdir -p "$TMPDIR" %endif + +%if "%{?scl_env}" != "" + thispwd=$( pwd ) + scl enable %{scl_env} /bin/bash << 'EOFSCL' + pushd $thispwd +%endif + %if 0%{?build_with_pgo} SHELL=/usr/bin/bash GDK_BACKEND=x11 xvfb-run ./mach build %{?verbose_mach} %else SHELL=/usr/bin/bash ./mach build %{?verbose_mach} %endif +%if "%{?scl_env}" != "" + popd || : +EOFSCL +%endif + %if %{?run_tests} %if 0%{?system_nss} ln -s /usr/bin/certutil objdir/dist/bin/certutil @@ -792,6 +831,11 @@ rm -f objdir/dist/bin/pk12util #--------------------------------------------------------------------- %install +%if "%{?scl_env}" != "" + thispwd=$( pwd ) + scl enable %{scl_env} /bin/bash << 'EOFSCL' + pushd $thispwd +%endif # set up our default bookmarks cp -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/en-US/locale/browser/bookmarks.html @@ -938,6 +982,11 @@ rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libmozalloc.so rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libxul.so #--------------------------------------------------------------------- +%if "%{?scl_env}" != "" + popd || : +EOFSCL +%endif + # Moves defaults/preferences to browser/defaults/preferences %pretrans -p require 'posix' @@ -1026,6 +1075,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Apr 23 2019 B Stack - 56.2.8-12.20190411giteeb3b0b +- add el7 support, which uses provided libs for the most part, and disables lto + * Mon Apr 15 2019 B Stack - 56.2.8.1-4.20190411giteeb3b0b - repackage for stackrpms -- cgit