Accepting request 1105866 from devel:microos

OBS-URL: https://build.opensuse.org/request/show/1105866
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/abseil-cpp?expand=0&rev=30
This commit is contained in:
Ana Guerrero 2023-08-30 08:17:57 +00:00 committed by Git OBS Bridge
commit 154731d95f
3 changed files with 32 additions and 1 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Aug 9 15:18:16 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Fix build on older systems by requiring C++17 compliant compiler
- Added patch:
* cmake.patch
+ lower the cmake requirement to 3.5 in order to be able to
build on SLE12SP5
-------------------------------------------------------------------
Thu Jun 29 09:52:24 UTC 2023 - Fabian Vogt <fvogt@suse.com>

View File

@ -25,13 +25,20 @@ License: Apache-2.0
URL: https://abseil.io/
Source0: https://github.com/abseil/abseil-cpp/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: baselibs.conf
BuildRequires: c++_compiler
%if 0%{?suse_version} < 1500
BuildRequires: gcc7
BuildRequires: gcc7-c++
%else
BuildRequires: gcc >= 7
BuildRequires: gcc-c++ >= 7
%endif
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: pkgconfig
# PATCH-FIX-OPENSUSE options-{old,cxx17}.patch Ensure ABI stability regardless of compiler options
%if 0%{?suse_version} < 1550
Patch0: options-old.patch
Patch1: cmake.patch
%else
Patch0: options-cxx17.patch
%endif
@ -64,6 +71,10 @@ This package contains headers and build system files for it.
%autosetup -p1
%build
%if 0%{?suse_version} < 1500
export CC="gcc-7"
export CXX="g++-7"
%endif
%cmake
%cmake_build

11
cmake.patch Normal file
View File

@ -0,0 +1,11 @@
--- abseil-cpp-20230125.3/CMakeLists.txt 2023-08-08 13:05:37.796998429 +0200
+++ abseil-cpp-20230125.3/CMakeLists.txt 2023-08-08 13:06:11.263885421 +0200
@@ -16,7 +16,7 @@
# https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md
# As of 2022-09-06, CMake 3.10 is the minimum supported version.
-cmake_minimum_required(VERSION 3.10)
+cmake_minimum_required(VERSION 3.5)
# Compiler id for Apple Clang is now AppleClang.
if (POLICY CMP0025)