]> git.pld-linux.org Git - packages/firefox.git/blobdiff - firefox.spec
conditional BR for either gcc or clang
[packages/firefox.git] / firefox.spec
index 09c96cf55ed96e44f718e173f776a61e64b20542..973d6773bab4927322627b39498397a08aa97c0a 100644 (file)
@@ -10,6 +10,7 @@
 # - disabled shared_js - https://bugzilla.mozilla.org/show_bug.cgi?id=1039964
 %bcond_with    shared_js       # shared libmozjs library [broken]
 %bcond_without system_icu      # build without system ICU
+%bcond_without clang           # build using Clang/LLVM
 
 # On updating version, grab CVE links from:
 # https://www.mozilla.org/security/known-vulnerabilities/firefox.html
@@ -26,12 +27,12 @@ Summary:    Firefox web browser
 Summary(hu.UTF-8):     Firefox web böngésző
 Summary(pl.UTF-8):     Firefox - przeglądarka WWW
 Name:          firefox
-Version:       55.0.1
+Version:       55.0.2
 Release:       1
 License:       MPL v2.0
 Group:         X11/Applications/Networking
 Source0:       http://releases.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}.source.tar.xz
-# Source0-md5: 53debc4c7edfaf84b42f040872771d9d
+# Source0-md5: d1e65708db51034d2ad090b4bfba7f1c
 Source3:       %{name}.desktop
 Source4:       %{name}.sh
 Source5:       vendor.js
@@ -48,15 +49,16 @@ Patch10:    freetype.patch
 URL:           https://www.mozilla.org/firefox/
 BuildRequires: OpenGL-devel
 BuildRequires: alsa-lib-devel
-BuildRequires: automake
 BuildRequires: autoconf2_13
+BuildRequires: automake
 BuildRequires: bzip2-devel
 BuildRequires: cairo-devel >= 1.10.2-5
 BuildRequires: cargo
+%{?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
@@ -65,6 +67,7 @@ BuildRequires:        gstreamer-plugins-base-devel >= 1.0
 %{?with_kerberos:BuildRequires:        heimdal-devel >= 0.7.1}
 BuildRequires: hunspell-devel >= 1.6.1
 BuildRequires: libIDL-devel >= 0.8.0
+BuildRequires: libatomic-devel
 # DECnet (dnprogs.spec), not dummy net (libdnet.spec)
 #BuildRequires:        libdnet-devel
 BuildRequires: libevent-devel >= 1.4.7
@@ -150,6 +153,10 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                filterout_cpp           -D_FORTIFY_SOURCE=[0-9]+
 
+%if %{with clang}
+%define                filterout               -fvar-tracking-assignments
+%endif
+
 # don't satisfy other packages
 %define                _noautoprovfiles        %{_libdir}/%{name}
 
@@ -213,8 +220,13 @@ cp -p %{_datadir}/automake/config.* build/autoconf
 cat << 'EOF' > .mozconfig
 . $topsrcdir/browser/config/mozconfig
 
+%if %{with clang}
+export CC="clang"
+export CXX="clang++"
+%else
 export CC="%{__cc}"
 export CXX="%{__cxx}"
+%endif
 export CFLAGS="%{rpmcflags} -D_FILE_OFFSET_BITS=64"
 export CXXFLAGS="%{rpmcxxflags} -D_FILE_OFFSET_BITS=64"
 
This page took 0.113983 seconds and 4 git commands to generate.