dev-cpp/glog: backport fixes to 0.6.0

* Fix CMake 4
* Skip buggy tests

Bug: https://bugs.gentoo.org/863599
Bug: https://bugs.gentoo.org/954083
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-05-26 03:37:29 +01:00
parent fcfdc0e2ae
commit 89bae30fab
2 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
https://bugs.gentoo.org/954083
https://github.com/google/glog/commit/3411d58669fe07e70335b252299432a00d1e7c6c
From 3411d58669fe07e70335b252299432a00d1e7c6c Mon Sep 17 00:00:00 2001
From: Sergiu Deitsch <sergiu.deitsch@gmail.com>
Date: Thu, 5 Oct 2023 00:48:10 +0200
Subject: [PATCH] cmake: eliminate deprecation warning
--- a/cmake/GetCacheVariables.cmake
+++ b/cmake/GetCacheVariables.cmake
@@ -1,5 +1,5 @@
cmake_policy (PUSH)
-cmake_policy (VERSION 3.3)
+cmake_policy (VERSION 3.16...3.27)
include (CMakeParseArguments)

View File

@@ -0,0 +1,64 @@
# Copyright 2011-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake-multilib
DESCRIPTION="Google Logging library"
HOMEPAGE="https://github.com/google/glog"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/google/glog"
inherit git-r3
else
SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
fi
LICENSE="BSD"
SLOT="0/1"
IUSE="gflags +libunwind llvm-libunwind test"
RESTRICT="!test? ( test )"
RDEPEND="
gflags? ( dev-cpp/gflags:=[${MULTILIB_USEDEP}] )
libunwind? (
llvm-libunwind? ( llvm-runtimes/libunwind:=[${MULTILIB_USEDEP}] )
!llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] )
)
"
DEPEND="
${RDEPEND}
test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )
"
PATCHES=(
"${FILESDIR}"/${PN}-0.6.0-cmake-4.patch
)
src_configure() {
local mycmakeargs=(
-DBUILD_TESTING=$(usex test ON OFF)
-DWITH_GFLAGS=$(usex gflags ON OFF)
-DWITH_GTEST=$(usex test ON OFF)
-DWITH_UNWIND=$(usex libunwind ON OFF)
)
cmake-multilib_src_configure
}
src_test() {
# Tests have a history of being brittle: bug #863599
CMAKE_SKIP_TESTS=(
logging
stacktrace
symbolize
log_severity_conversion
includes_vlog_is_on
includes_raw_logging
)
cmake-multilib_src_test -j1
}