%bcond_without gtk3 # GTK+ 3.x instead of 2.x
%bcond_without kerberos # disable krb5 support
%bcond_without official # official Firefox branding
-%bcond_without pgo # PGO-enabled build (requires working $DISPLAY == :100)
+%bcond_with pgo # PGO-enabled build (requires working $DISPLAY == :100)
+%bcond_without gold # use default linker instead of gold
# - disabled shared_js - https://bugzilla.mozilla.org/show_bug.cgi?id=1039964
%bcond_with shared_js # shared libmozjs library [broken]
%bcond_with system_icu # build with system ICU (disabled due to crashes with system icu 58.2)
+%bcond_without clang # build using Clang/LLVM
# On updating version, grab CVE links from:
# https://www.mozilla.org/security/known-vulnerabilities/firefox.html
%define _basename firefox
%define nspr_ver 4.13.1
-%define nss_ver 3.28.5
+%define nss_ver 3.28.6
Summary: Firefox web browser
Summary(hu.UTF-8): Firefox web böngésző
Summary(pl.UTF-8): Firefox - przeglądarka WWW
Name: firefox52-esr
-Version: 52.4.1
-Release: 1
+Version: 52.9.0
+Release: 3
License: MPL v2.0
Group: X11/Applications/Networking
Source0: http://releases.mozilla.org/pub/mozilla.org/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz
-# Source0-md5: 0cae3ca26466f13f31444ac23dfbb6f8
+# Source0-md5: b8c2f3619c684818be9a513f8aa1dbfd
Source3: %{_basename}.desktop
Source4: %{_basename}.sh
Source5: vendor.js
Patch0: idl-parser.patch
Patch1: xulrunner-new-libxul.patch
Patch2: xulrunner-paths.patch
-Patch3: xulrunner-pc.patch
+Patch3: ffmpeg4.patch
Patch4: %{_basename}-prefs.patch
Patch5: %{_basename}-pld-bookmarks.patch
Patch6: %{_basename}-no-subshell.patch
Patch8: %{_basename}-system-virtualenv.patch
Patch9: %{_basename}-Disable-Firefox-Health-Report.patch
Patch10: freetype.patch
+Patch11: xulrunner-pc.patch
URL: https://www.mozilla.org/firefox/
BuildRequires: OpenGL-devel
BuildRequires: alsa-lib-devel
-BuildRequires: automake
BuildRequires: autoconf2_13
+BuildRequires: automake
+%{?with_gold:BuildRequires: binutils >= 3:2.20.51.0.7}
BuildRequires: bzip2-devel
BuildRequires: cairo-devel >= 1.10.2-5
+%{?with_clang:BuildRequires: clang}
BuildRequires: dbus-glib-devel >= 0.60
BuildRequires: fontconfig-devel >= 1:2.7.0
BuildRequires: freetype-devel >= 1:2.1.8
-BuildRequires: gcc-c++ >= 6:4.4
+%{!?with_clang:BuildRequires: gcc-c++ >= 6:4.4}
BuildRequires: glib2-devel >= 1:2.22
BuildRequires: gstreamer-devel >= 1.0
BuildRequires: gstreamer-plugins-base-devel >= 1.0
BuildRequires: nspr-devel >= 1:%{nspr_ver}
BuildRequires: nss-devel >= 1:%{nss_ver}
BuildRequires: pango-devel >= 1:1.22.0
-BuildRequires: pixman-devel >= 0.19.2
BuildRequires: perl-modules >= 5.004
+BuildRequires: pixman-devel >= 0.19.2
BuildRequires: pkgconfig
-BuildRequires: pkgconfig(libffi) >= 3.0.9
BuildRequires: pulseaudio-devel
BuildRequires: python-modules >= 1:2.5
%{?with_pgo:BuildRequires: python-modules-sqlite}
Obsoletes: mozilla-firebird
Obsoletes: mozilla-firefox
Obsoletes: mozilla-firefox-lang-en < 2.0.0.8-3
-Obsoletes: mozilla-firefox-libs
Obsoletes: xulrunner
Obsoletes: xulrunner-gnome
Conflicts: firefox-lang-resources < %{version}
%define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+
+%if %{with clang}
+%define filterout -fvar-tracking-assignments
+%else
+%define filterout -Werror=format-security
+%endif
+
# don't satisfy other packages
%define _noautoprovfiles %{_libdir}/%{name}
Requires: sqlite3 >= %{sqlite_build_version}
Requires: startup-notification >= 0.8
Provides: xulrunner-libs = 2:%{version}-%{release}
+Obsoletes: firefox-libs
Obsoletes: iceweasel-libs
+Obsoletes: mozilla-firefox-libs
Obsoletes: xulrunner-libs < 2:%{version}
+Conflicts: firefox52-esr < 52.9.0-2
%description libs
XULRunner shared libraries.
Requires: nss-devel >= 1:%{nss_ver}
Requires: python-ply
Provides: xulrunner-devel = 2:%{version}-%{release}
+Obsoletes: firefox-devel
Obsoletes: iceweasel-devel
Obsoletes: mozilla-devel
Obsoletes: mozilla-firefox-devel
%patch8 -p2
%patch9 -p1
%patch10 -p2
+%patch11 -p1
%{__sed} -i -e '1s,/usr/bin/env python,%{__python},' xpcom/typelib/xpt/tools/xpt.py xpcom/idl-parser/xpidl/xpidl.py
cat << 'EOF' > .mozconfig
. $topsrcdir/browser/config/mozconfig
+%if %{with clang}
+export CC="clang"
+export CXX="clang++"
+%else
+export CC="%{__cc}"
+export CXX="%{__cxx}"
+%endif
+
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu}
# Options for 'configure' (same as command-line options).
ac_add_options --enable-crash-on-assert
%else
ac_add_options --disable-debug
-ac_add_options --enable-optimize="%{rpmcflags} -Os"
+ac_add_options --enable-optimize="%{rpmcflags}"
%endif
ac_add_options --disable-strip
ac_add_options --disable-install-strip
ac_add_options --enable-chrome-format=omni
ac_add_options --enable-default-toolkit=%{?with_gtk3:cairo-gtk3}%{!?with_gtk3:cairo-gtk2}
ac_add_options --enable-extensions=default
+%{?with_gold:ac_add_options --enable-gold}
ac_add_options --enable-gio
ac_add_options --enable-readline
ac_add_options --enable-safe-browsing