diff --git a/wangle.spec b/wangle.spec index 920c39f..fc0e334 100644 --- a/wangle.spec +++ b/wangle.spec @@ -1,3 +1,10 @@ +%if 0%{?fedora} >= 36 +# Folly is compiled with Clang +%bcond_without toolchain_clang +%else +%bcond_with toolchain_clang +%endif + %bcond_without check Name: wangle @@ -16,9 +23,17 @@ Patch1: %{name}-make_version_consistent.patch # Folly is known not to work on big-endian CPUs # https://bugzilla.redhat.com/show_bug.cgi?id=1892807 ExcludeArch: s390x +%if 0%{?fedora} >= 36 +# fmt code breaks: https://bugzilla.redhat.com/show_bug.cgi?id=2061022 +ExcludeArch: ppc64le +%endif BuildRequires: cmake +%if %{with toolchain_clang} +BuildRequires: clang +%else BuildRequires: gcc-c++ +%endif # Library dependencies BuildRequires: fizz-devel = %{version} BuildRequires: folly-devel = %{version} @@ -52,7 +67,8 @@ developing applications that use %{name}. %build -%cmake wangle \ +cd wangle +%cmake \ %if %{with check} -DBUILD_TESTS=ON \ %else @@ -61,15 +77,20 @@ developing applications that use %{name}. -DCMAKE_INSTALL_DIR=%{_libdir}/cmake/%{name} \ -DPACKAGE_VERSION=%{version} %cmake_build +cd - %install +cd wangle %cmake_install +cd - %if %{with check} %check +cd wangle %ctest +cd - %endif