From d3a773c9acac98b27542086132c4ac79224fe0c1 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Tue, 9 May 2023 16:58:28 +0200 Subject: [PATCH] abseil_cpp, bump version, keep older to not break dependencies (#8617) --- .../abseil-cpp/abseil_cpp-20230125.3.recipe | 103 ++++++++++++++++++ ...cipe => abseil_cpp.2022-20220623.1.recipe} | 13 ++- .../patches/abseil_cpp-20230125.3.patchset | 35 ++++++ 3 files changed, 146 insertions(+), 5 deletions(-) create mode 100644 dev-cpp/abseil-cpp/abseil_cpp-20230125.3.recipe rename dev-cpp/abseil-cpp/{abseil_cpp-20220623.1.recipe => abseil_cpp.2022-20220623.1.recipe} (88%) create mode 100644 dev-cpp/abseil-cpp/patches/abseil_cpp-20230125.3.patchset diff --git a/dev-cpp/abseil-cpp/abseil_cpp-20230125.3.recipe b/dev-cpp/abseil-cpp/abseil_cpp-20230125.3.recipe new file mode 100644 index 000000000..6ed4d93e7 --- /dev/null +++ b/dev-cpp/abseil-cpp/abseil_cpp-20230125.3.recipe @@ -0,0 +1,103 @@ +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="5366d7e7fa7ba0d915014d387b66d0d002c03236448e1ba9ef98122c13b35c36" +SOURCE_DIR="abseil-cpp-$portVersion" +PATCHES="abseil_cpp-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +libVersion="2301.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 demangle_internal die_if_null examine_stack \ +exponential_biased failure_signal_handler flags 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 leak_check log_entry log_flags log_globals log_initialize log_internal_check_op \ +log_internal_conditions log_internal_format log_internal_globals log_internal_log_sink_set \ +log_internal_message log_internal_nullguard log_internal_proto log_severity log_sink \ +low_level_hash malloc_internal \ +periodic_sampler 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 symbolize \ +synchronization throw_delegate time time_zone" +PROVIDES=" + abseil_cpp$secondaryArchSuffix = $portVersion + " +for lib in $libs; do + PROVIDES+=" + lib:libabsl_$lib$secondaryArchSuffix = $libVersionCompat" +done +REQUIRES=" + haiku$secondaryArchSuffix + lib:libstdc++$secondaryArchSuffix + " + +PROVIDES_devel=" + abseil_cpp${secondaryArchSuffix}_devel = $portVersion + " +for lib in $libs; do + PROVIDES_devel+=" + devel:libabsl_$lib$secondaryArchSuffix = $libVersionCompat" +done +REQUIRES_devel=" + abseil_cpp$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$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 +} diff --git a/dev-cpp/abseil-cpp/abseil_cpp-20220623.1.recipe b/dev-cpp/abseil-cpp/abseil_cpp.2022-20220623.1.recipe similarity index 88% rename from dev-cpp/abseil-cpp/abseil_cpp-20220623.1.recipe rename to dev-cpp/abseil-cpp/abseil_cpp.2022-20220623.1.recipe index 233981d68..80e302737 100644 --- a/dev-cpp/abseil-cpp/abseil_cpp-20220623.1.recipe +++ b/dev-cpp/abseil-cpp/abseil_cpp.2022-20220623.1.recipe @@ -33,7 +33,7 @@ raw_logging_internal scoped_set_env spinlock_wait stacktrace status statusor \ str_format_internal strerror strings strings_internal symbolize \ synchronization throw_delegate time time_zone" PROVIDES=" - abseil_cpp$secondaryArchSuffix = $portVersion + abseil_cpp.2022$secondaryArchSuffix = $portVersion " for lib in $libs; do PROVIDES+=" @@ -45,14 +45,17 @@ REQUIRES=" " PROVIDES_devel=" - abseil_cpp${secondaryArchSuffix}_devel = $portVersion + abseil_cpp.2022${secondaryArchSuffix}_devel = $portVersion " for lib in $libs; do PROVIDES_devel+=" devel:libabsl_$lib$secondaryArchSuffix = $libVersionCompat" done REQUIRES_devel=" - abseil_cpp$secondaryArchSuffix == $portVersion base + abseil_cpp.2022$secondaryArchSuffix == $portVersion base + " +CONFLICTS_devel=" + abseil_cpp${secondaryArchSuffix}_devel " BUILD_REQUIRES=" @@ -69,7 +72,7 @@ debugList=() for lib in $libs; do debugList+=("$libDir"/libabsl_$lib.so.$libVersion) done -defineDebugInfoPackage abseil_cpp$secondaryArchSuffix "${debugList[@]}" +defineDebugInfoPackage abseil_cpp.2022$secondaryArchSuffix "${debugList[@]}" BUILD() { @@ -87,7 +90,7 @@ INSTALL() make -C build install PREFIX=$prefix for lib in $libs; do - prepareInstalledDevelLib libabsl_$lib + prepareInstalledDevelLibs libabsl_$lib done fixPkgconfig diff --git a/dev-cpp/abseil-cpp/patches/abseil_cpp-20230125.3.patchset b/dev-cpp/abseil-cpp/patches/abseil_cpp-20230125.3.patchset new file mode 100644 index 000000000..7c7bc97fb --- /dev/null +++ b/dev-cpp/abseil-cpp/patches/abseil_cpp-20230125.3.patchset @@ -0,0 +1,35 @@ +From ad8d56ebc515843aa58a8ceae836996543d7ef6f Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Fri, 20 May 2022 09:39:12 +0200 +Subject: use __thread instead of thread_local + + +diff --git a/absl/strings/internal/cordz_functions.cc b/absl/strings/internal/cordz_functions.cc +index 20d314f..b1e6cc3 100644 +--- a/absl/strings/internal/cordz_functions.cc ++++ b/absl/strings/internal/cordz_functions.cc +@@ -40,7 +40,7 @@ std::atomic g_cordz_mean_interval(50000); + // Special negative 'not initialized' per thread value for cordz_next_sample. + static constexpr int64_t kInitCordzNextSample = -1; + +-ABSL_CONST_INIT thread_local int64_t cordz_next_sample = kInitCordzNextSample; ++ABSL_CONST_INIT __thread int64_t cordz_next_sample = kInitCordzNextSample; + + // kIntervalIfDisabled is the number of profile-eligible events need to occur + // before the code will confirm that cordz is still disabled. +diff --git a/absl/strings/internal/cordz_functions.h b/absl/strings/internal/cordz_functions.h +index ed108bf..c70d0e9 100644 +--- a/absl/strings/internal/cordz_functions.h ++++ b/absl/strings/internal/cordz_functions.h +@@ -45,7 +45,7 @@ void set_cordz_mean_interval(int32_t mean_interval); + // the value is 1 or less, the code will check on the next event if cordz is + // enabled, and if so, will sample the Cord. cordz is only enabled when we can + // use thread locals. +-ABSL_CONST_INIT extern thread_local int64_t cordz_next_sample; ++ABSL_CONST_INIT extern __thread int64_t cordz_next_sample; + + // Determines if the next sample should be profiled. If it is, the value pointed + // at by next_sample will be set with the interval until the next sample. +-- +2.37.3 +