diff --git a/thunderbird.spec b/thunderbird.spec index 48fec43..a130861 100644 --- a/thunderbird.spec +++ b/thunderbird.spec @@ -19,7 +19,7 @@ ExcludeArch: armv7hl %define system_ffi 1 %define build_langpacks 1 -%global build_with_clang 0 +%bcond_with toolchain_clang %global use_bundled_cbindgen 1 %global disable_elfhack 1 @@ -89,6 +89,10 @@ ExcludeArch: s390x %endif %endif +%if %{with toolchain_clang} +%global toolchain clang +%endif + # Exclude private libraries from autogenerated provides and requires %global __provides_exclude_from ^%{mozappdir} %global __requires_exclude ^(%%(find %{buildroot}%{mozappdir} -name '*.so' | xargs -n1 basename | sort -u | paste -s -d '|' -)) @@ -96,7 +100,7 @@ ExcludeArch: s390x Summary: Mozilla Thunderbird mail/newsgroup client Name: thunderbird Version: 91.11.0 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://www.mozilla.org/projects/thunderbird/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/thunderbird/releases/%{version}%{?pre_version}/source/thunderbird-%{version}%{?pre_version}.source.tar.xz @@ -178,7 +182,7 @@ BuildRequires: llvm BuildRequires: llvm-devel BuildRequires: clang BuildRequires: clang-libs -%if 0%{?build_with_clang} +%if "%toolchain" == "clang" BuildRequires: lld %endif %if %{?system_ffi} @@ -494,7 +498,7 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g0/') export MOZ_DEBUG_FLAGS=" " %endif -%if !0%{?build_with_clang} +%if "%toolchain" != "clang" %ifarch s390 ppc aarch64 %{ix86} MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif @@ -518,7 +522,7 @@ echo "export CFLAGS=\"$MOZ_OPT_FLAGS\"" >> .mozconfig echo "export CXXFLAGS=\"$MOZ_OPT_FLAGS\"" >> .mozconfig echo "export LDFLAGS=\"$MOZ_LINK_FLAGS\"" >> .mozconfig -%if 0%{?build_with_clang} +%if "%toolchain" == "clang" echo "export LLVM_PROFDATA=\"llvm-profdata\"" >> .mozconfig echo "export AR=\"llvm-ar\"" >> .mozconfig echo "export NM=\"llvm-nm\"" >> .mozconfig @@ -742,6 +746,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #=============================================================================== %changelog +* Fri Jul 05 2022 Tom Stellard - 91.11.0-2 +- Clean up macros that allow building with clang + * Wed Jun 29 2022 Eike Rathke - 91.11.0-1 - Update to 91.11.0