mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
abseil_cpp, add version 20250127 (#11981)
This commit is contained in:
109
dev-cpp/abseil-cpp/abseil_cpp.2025-20250127.0.recipe
Normal file
109
dev-cpp/abseil-cpp/abseil_cpp.2025-20250127.0.recipe
Normal file
@@ -0,0 +1,109 @@
|
||||
SUMMARY="C++ Common Libraries"
|
||||
DESCRIPTION="Abseil is an open-source collection of C++ code (compliant to \
|
||||
C++11) designed to augment the C++ standard library."
|
||||
HOMEPAGE="https://abseil.io"
|
||||
COPYRIGHT="2017-2023 The Abseil Authors"
|
||||
LICENSE="Apache v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://github.com/abseil/abseil-cpp/archive/$portVersion/abseil-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="16242f394245627e508ec6bb296b433c90f8d914f73b9c026fddb905e27276e8"
|
||||
SOURCE_DIR="abseil-cpp-$portVersion"
|
||||
PATCHES="abseil_cpp-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="2501.0.0"
|
||||
libVersionCompat="$libVersion compat >= $libVersion"
|
||||
libs="
|
||||
bad_optional_access bad_variant_access bad_any_cast_impl base city \
|
||||
civil_time cord cord_internal cordz_functions cordz_handle cordz_info \
|
||||
cordz_sample_token crc32c crc_cord_state crc_cpu_detect crc_internal \
|
||||
debugging_internal decode_rust_punycode demangle_internal demangle_rust \
|
||||
die_if_null examine_stack \
|
||||
exponential_biased failure_signal_handler flags_commandlineflag \
|
||||
flags_commandlineflag_internal flags_config flags_internal flags_marshalling \
|
||||
flags_parse flags_private_handle_accessor flags_program_name flags_reflection \
|
||||
flags_usage flags_usage_internal graphcycles_internal hash hashtablez_sampler \
|
||||
int128 kernel_timeout_internal \
|
||||
leak_check log_entry log_flags log_globals log_initialize log_internal_check_op \
|
||||
log_internal_conditions log_internal_fnmatch log_internal_format \
|
||||
log_internal_globals log_internal_log_sink_set \
|
||||
log_internal_message log_internal_nullguard log_internal_proto \
|
||||
log_internal_structured_proto log_severity log_sink \
|
||||
low_level_hash malloc_internal \
|
||||
periodic_sampler poison \
|
||||
random_distributions random_internal_distribution_test_util \
|
||||
random_internal_platform random_internal_pool_urbg random_internal_randen \
|
||||
random_internal_randen_hwaes random_internal_randen_hwaes_impl \
|
||||
random_internal_randen_slow random_internal_seed_material \
|
||||
random_seed_gen_exception random_seed_sequences raw_hash_set \
|
||||
raw_logging_internal scoped_set_env spinlock_wait stacktrace status statusor \
|
||||
str_format_internal strerror strings strings_internal string_view symbolize \
|
||||
synchronization throw_delegate time time_zone tracing_internal \
|
||||
utf8_for_code_point vlog_config_internal"
|
||||
PROVIDES="
|
||||
abseil_cpp.2025$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
for lib in $libs; do
|
||||
PROVIDES+="
|
||||
lib:libabsl_$lib$secondaryArchSuffix = $libVersionCompat"
|
||||
done
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libstdc++$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
abseil_cpp.2025${secondaryArchSuffix}_devel = $portVersion
|
||||
"
|
||||
for lib in $libs; do
|
||||
PROVIDES_devel+="
|
||||
devel:libabsl_$lib$secondaryArchSuffix = $libVersionCompat"
|
||||
done
|
||||
REQUIRES_devel="
|
||||
abseil_cpp.2025$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
debugList=()
|
||||
for lib in $libs; do
|
||||
debugList+=("$libDir"/libabsl_$lib.so.$libVersion)
|
||||
done
|
||||
defineDebugInfoPackage abseil_cpp.2025$secondaryArchSuffix "${debugList[@]}"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -B build -S . $cmakeDirArgs \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_CXX_FLAGS="-DNDEBUG" \
|
||||
-DCMAKE_CXX_STANDARD=17 \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -C build install PREFIX=$prefix
|
||||
|
||||
for lib in $libs; do
|
||||
prepareInstalledDevelLibs libabsl_$lib
|
||||
done
|
||||
|
||||
fixPkgconfig
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
}
|
||||
58
dev-cpp/abseil-cpp/patches/abseil_cpp-20250127.0.patchset
Normal file
58
dev-cpp/abseil-cpp/patches/abseil_cpp-20250127.0.patchset
Normal file
@@ -0,0 +1,58 @@
|
||||
From 4bfa7781c6a534e899c565761b7af8efacb7c787 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||
Date: Wed, 5 Feb 2025 00:19:45 +0000
|
||||
Subject: Haiku: GetTID()
|
||||
|
||||
|
||||
diff --git a/absl/base/internal/sysinfo.cc b/absl/base/internal/sysinfo.cc
|
||||
index 1937db3..08fdd1d 100644
|
||||
--- a/absl/base/internal/sysinfo.cc
|
||||
+++ b/absl/base/internal/sysinfo.cc
|
||||
@@ -50,6 +50,10 @@
|
||||
#include <zircon/process.h>
|
||||
#endif
|
||||
|
||||
+#if defined(__HAIKU__)
|
||||
+#include <OS.h>
|
||||
+#endif
|
||||
+
|
||||
#include <string.h>
|
||||
|
||||
#include <cassert>
|
||||
@@ -475,6 +479,10 @@ pid_t GetTID() {
|
||||
return static_cast<pid_t>(zx_thread_self());
|
||||
}
|
||||
|
||||
+#elif defined(__HAIKU__)
|
||||
+
|
||||
+pid_t GetTID() { return find_thread(NULL); }
|
||||
+
|
||||
#else
|
||||
|
||||
// Fallback implementation of `GetTID` using `pthread_self`.
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From ae304d8bfce45530414c49e63f88be7135b28aeb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||
Date: Wed, 5 Feb 2025 00:31:34 +0000
|
||||
Subject: Haiku: force cast for Tid
|
||||
|
||||
|
||||
diff --git a/absl/log/internal/log_message.cc b/absl/log/internal/log_message.cc
|
||||
index 9e7722d..3dbe3c8 100644
|
||||
--- a/absl/log/internal/log_message.cc
|
||||
+++ b/absl/log/internal/log_message.cc
|
||||
@@ -224,7 +224,7 @@ void LogMessage::LogMessageData::InitializeEncodingAndFormat() {
|
||||
EncodeVarint(EventTag::kSeverity,
|
||||
ProtoSeverity(entry.log_severity(), entry.verbosity()),
|
||||
&encoded_remaining());
|
||||
- EncodeVarint(EventTag::kThreadId, entry.tid(), &encoded_remaining());
|
||||
+ EncodeVarint(EventTag::kThreadId, (uint32_t)entry.tid(), &encoded_remaining());
|
||||
}
|
||||
|
||||
void LogMessage::LogMessageData::FinalizeEncodingAndFormat() {
|
||||
--
|
||||
2.48.1
|
||||
|
||||
Reference in New Issue
Block a user