mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-27 16:41:11 +02:00
dev-cpp/abseil-cpp: Sync with Gentoo
It's from Gentoo commit d659f8343fd5d700934e37a3b0b86d247d4ef2ed.
This commit is contained in:
parent
ea4dbfbab1
commit
6257235903
@ -29,6 +29,7 @@ RESTRICT="!test? ( test )"
|
|||||||
|
|
||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/${PN}-20230125.2-musl-1.2.4.patch #906218
|
"${FILESDIR}"/${PN}-20230125.2-musl-1.2.4.patch #906218
|
||||||
|
"${FILESDIR}"/${PN}-random-tests.patch #935417
|
||||||
)
|
)
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
|
67
sdk_container/src/third_party/portage-stable/dev-cpp/abseil-cpp/abseil-cpp-20230125.3-r4.ebuild
vendored
Normal file
67
sdk_container/src/third_party/portage-stable/dev-cpp/abseil-cpp/abseil-cpp-20230125.3-r4.ebuild
vendored
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
# Copyright 2020-2024 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_{10..12} )
|
||||||
|
|
||||||
|
inherit cmake-multilib python-any-r1
|
||||||
|
|
||||||
|
DESCRIPTION="Abseil Common Libraries (C++), LTS Branch"
|
||||||
|
HOMEPAGE="https://abseil.io/"
|
||||||
|
SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0/${PV%%.*}.0"
|
||||||
|
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
|
||||||
|
IUSE="test"
|
||||||
|
|
||||||
|
RDEPEND=">=dev-cpp/gtest-1.13.0[${MULTILIB_USEDEP}]"
|
||||||
|
DEPEND="${RDEPEND}"
|
||||||
|
BDEPEND="
|
||||||
|
${PYTHON_DEPS}
|
||||||
|
test? (
|
||||||
|
sys-libs/timezone-data
|
||||||
|
)
|
||||||
|
"
|
||||||
|
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${PN}-20230125.2-musl-1.2.4.patch #906218
|
||||||
|
"${FILESDIR}"/${PN}-random-tests.patch #935417
|
||||||
|
"${FILESDIR}/${PN}-20230802.0-conditional-use-of-lzcnt.patch" #934337
|
||||||
|
)
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
cmake_src_prepare
|
||||||
|
|
||||||
|
# un-hardcode abseil compiler flags
|
||||||
|
sed -i \
|
||||||
|
-e '/"-maes",/d' \
|
||||||
|
-e '/"-msse4.1",/d' \
|
||||||
|
-e '/"-mfpu=neon"/d' \
|
||||||
|
-e '/"-march=armv8-a+crypto"/d' \
|
||||||
|
absl/copts/copts.py || die
|
||||||
|
|
||||||
|
# now generate cmake files
|
||||||
|
python_fix_shebang absl/copts/generate_copts.py
|
||||||
|
absl/copts/generate_copts.py || die
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_configure() {
|
||||||
|
local mycmakeargs=(
|
||||||
|
# We use -std=c++14 here so that abseil-cpp's string_view is used
|
||||||
|
# See the discussion in https://github.com/gentoo/gentoo/pull/32281.
|
||||||
|
-DCMAKE_CXX_STANDARD=14
|
||||||
|
-DABSL_ENABLE_INSTALL=TRUE
|
||||||
|
-DABSL_USE_EXTERNAL_GOOGLETEST=ON
|
||||||
|
-DABSL_PROPAGATE_CXX_STD=TRUE
|
||||||
|
# TEST_HELPERS needed for protobuf (bug #915902)
|
||||||
|
-DABSL_BUILD_TEST_HELPERS=ON
|
||||||
|
-DABSL_BUILD_TESTING=$(usex test ON OFF)
|
||||||
|
$(usex test -DBUILD_TESTING=ON '') # intentional usex, it used both variables for tests.
|
||||||
|
)
|
||||||
|
|
||||||
|
cmake_src_configure
|
||||||
|
}
|
@ -26,7 +26,12 @@ BDEPEND="
|
|||||||
"
|
"
|
||||||
|
|
||||||
RESTRICT="!test? ( test )"
|
RESTRICT="!test? ( test )"
|
||||||
PATCHES=( "${FILESDIR}/${PN}-20230802.0-sdata-tests.patch" )
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/${PN}-20230802.0-sdata-tests.patch"
|
||||||
|
"${FILESDIR}/${PN}-random-tests.patch" #935417
|
||||||
|
"${FILESDIR}/${PN}-20230802.0-conditional-use-of-lzcnt.patch" #934337
|
||||||
|
)
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
cmake_src_prepare
|
cmake_src_prepare
|
@ -26,7 +26,12 @@ BDEPEND="
|
|||||||
"
|
"
|
||||||
|
|
||||||
RESTRICT="!test? ( test )"
|
RESTRICT="!test? ( test )"
|
||||||
PATCHES=( "${FILESDIR}/${PN}-20230802.0-sdata-tests.patch" )
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/${PN}-20230802.0-sdata-tests.patch"
|
||||||
|
"${FILESDIR}/${PN}-random-tests.patch" #935417
|
||||||
|
"${FILESDIR}/${PN}-20230802.0-conditional-use-of-lzcnt.patch" #934337
|
||||||
|
)
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
cmake_src_prepare
|
cmake_src_prepare
|
@ -0,0 +1,49 @@
|
|||||||
|
Bug: https://bugs.gentoo.org/934337
|
||||||
|
From: https://github.com/abseil/abseil-cpp/commit/c1e1b47d989978cde8c5a2a219df425b785a0c47.patch
|
||||||
|
From c1e1b47d989978cde8c5a2a219df425b785a0c47 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Derek Mauro <dmauro@google.com>
|
||||||
|
Date: Fri, 3 May 2024 09:14:22 -0700
|
||||||
|
Subject: [PATCH] Use __builtin_ctzg and __builtin_clzg in the implementations
|
||||||
|
of CountTrailingZeroesNonzero16 and CountLeadingZeroes16 when they are
|
||||||
|
available.
|
||||||
|
|
||||||
|
GCC 14 and Clang 19 adds these new builtins. The g-suffix is for
|
||||||
|
"generic". The s-suffix on __builtin_ctzs and __builtin_clzs is for
|
||||||
|
"short". GCC never implemented the short versions and #1664 reports
|
||||||
|
GCC 14 (pre-release) gives an error here, although this may be a
|
||||||
|
pre-release bug.
|
||||||
|
|
||||||
|
Fixes #1664
|
||||||
|
|
||||||
|
PiperOrigin-RevId: 630408249
|
||||||
|
Change-Id: I4aedcc82b85430f50d025f8eb1cab089c6fcd1bc
|
||||||
|
---
|
||||||
|
absl/numeric/internal/bits.h | 8 ++++++--
|
||||||
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/absl/numeric/internal/bits.h b/absl/numeric/internal/bits.h
|
||||||
|
index bfef06bce1f..0917464d6ad 100644
|
||||||
|
--- a/absl/numeric/internal/bits.h
|
||||||
|
+++ b/absl/numeric/internal/bits.h
|
||||||
|
@@ -167,7 +167,9 @@ CountLeadingZeroes32(uint32_t x) {
|
||||||
|
|
||||||
|
ABSL_ATTRIBUTE_ALWAYS_INLINE ABSL_INTERNAL_CONSTEXPR_CLZ inline int
|
||||||
|
CountLeadingZeroes16(uint16_t x) {
|
||||||
|
-#if ABSL_HAVE_BUILTIN(__builtin_clzs)
|
||||||
|
+#if ABSL_HAVE_BUILTIN(__builtin_clzg)
|
||||||
|
+ return x == 0 ? 16 : __builtin_clzg(x);
|
||||||
|
+#elif ABSL_HAVE_BUILTIN(__builtin_clzs)
|
||||||
|
static_assert(sizeof(unsigned short) == sizeof(x), // NOLINT(runtime/int)
|
||||||
|
"__builtin_clzs does not take 16-bit arg");
|
||||||
|
return x == 0 ? 16 : __builtin_clzs(x);
|
||||||
|
@@ -303,7 +305,9 @@ CountTrailingZeroesNonzero64(uint64_t x) {
|
||||||
|
|
||||||
|
ABSL_ATTRIBUTE_ALWAYS_INLINE ABSL_INTERNAL_CONSTEXPR_CTZ inline int
|
||||||
|
CountTrailingZeroesNonzero16(uint16_t x) {
|
||||||
|
-#if ABSL_HAVE_BUILTIN(__builtin_ctzs)
|
||||||
|
+#if ABSL_HAVE_BUILTIN(__builtin_ctzg)
|
||||||
|
+ return __builtin_ctzg(x);
|
||||||
|
+#elif ABSL_HAVE_BUILTIN(__builtin_ctzs)
|
||||||
|
static_assert(sizeof(unsigned short) == sizeof(x), // NOLINT(runtime/int)
|
||||||
|
"__builtin_ctzs does not take 16-bit arg");
|
||||||
|
return __builtin_ctzs(x);
|
@ -0,0 +1,19 @@
|
|||||||
|
https://github.com/abseil/abseil-cpp/issues/1528
|
||||||
|
|
||||||
|
From: Paul Zander <negril.nx+gentoo@gmail.com>
|
||||||
|
Date: Sat, 7 Jul 2024 01:53:19 +0200
|
||||||
|
Subject: [PATCH] remove abseil::random_internal_mock_overload_set
|
||||||
|
See-Also: https://bugs.gentoo.org/935417
|
||||||
|
|
||||||
|
diff --git a/absl/random/CMakeLists.txt b/absl/random/CMakeLists.txt
|
||||||
|
index bd363d8..7692a35 100644
|
||||||
|
--- a/absl/random/CMakeLists.txt
|
||||||
|
+++ b/absl/random/CMakeLists.txt
|
||||||
|
@@ -112,7 +112,6 @@ absl_cc_library(
|
||||||
|
absl::raw_logging_internal
|
||||||
|
absl::random_distributions
|
||||||
|
absl::random_internal_distribution_caller
|
||||||
|
- absl::random_internal_mock_overload_set
|
||||||
|
absl::random_random
|
||||||
|
absl::strings
|
||||||
|
absl::span
|
Loading…
x
Reference in New Issue
Block a user