From 1a1d55604438887fd724523729334e196a1980af Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Dec 12 2022 18:31:45 +0000 Subject: Make it build on el8 --- diff --git a/android-tools.spec b/android-tools.spec index d4a5a52..f7a05f8 100644 --- a/android-tools.spec +++ b/android-tools.spec @@ -1,4 +1,9 @@ %global _hardened_build 1 +%if 0%{?el8} +# Required to avoid conflicts between installed files and existing directories +# with the same name in the source tree +%undefine __cmake_in_source_build +%endif Name: android-tools Version: 33.0.3p1 @@ -20,8 +25,15 @@ Patch0: Disable-e2fsdroid-for-ppc64le.patch BuildRequires: brotli-devel BuildRequires: cmake +%if 0%{?el8} +# Uses C++20 features so we need a newer GCC +BuildRequires: gcc-toolset-11-gcc-c++ +BuildRequires: gcc-toolset-11-annobin-plugin-gcc +BuildRequires: gcc-toolset-11-binutils +%else BuildRequires: gcc BuildRequires: gcc-c++ +%endif BuildRequires: gtest-devel BuildRequires: golang BuildRequires: golang(golang.org/x/crypto/chacha20) @@ -76,6 +88,9 @@ setup between the host and the target phone as adb. cp -p %{SOURCE1} 51-android.rules %build +%if 0%{?el8} +. /opt/rh/gcc-toolset-11/enable +%endif export GO111MODULE=off %cmake -DBUILD_SHARED_LIBS:BOOL=OFF %cmake_build