summaryrefslogtreecommitdiff
path: root/dev-cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp')
-rw-r--r--dev-cpp/Manifest.gzbin14989 -> 14992 bytes
-rw-r--r--dev-cpp/benchmark/Manifest3
-rw-r--r--dev-cpp/benchmark/benchmark-1.8.3-r1.ebuild39
-rw-r--r--dev-cpp/benchmark/files/benchmark-1.8.3-backport-pr1753.patch94
-rw-r--r--dev-cpp/benchmark/files/benchmark-1.8.3-backport-pr1756.patch89
-rw-r--r--dev-cpp/magic_enum/Manifest3
-rw-r--r--dev-cpp/magic_enum/files/magic_enum-0.9.5-werror.patch22
-rw-r--r--dev-cpp/magic_enum/magic_enum-0.9.5.ebuild4
8 files changed, 253 insertions, 1 deletions
diff --git a/dev-cpp/Manifest.gz b/dev-cpp/Manifest.gz
index b034ba884849..de408ace1c63 100644
--- a/dev-cpp/Manifest.gz
+++ b/dev-cpp/Manifest.gz
Binary files differ
diff --git a/dev-cpp/benchmark/Manifest b/dev-cpp/benchmark/Manifest
index b47c53fa28fd..6b28bbedd14c 100644
--- a/dev-cpp/benchmark/Manifest
+++ b/dev-cpp/benchmark/Manifest
@@ -1,4 +1,7 @@
+AUX benchmark-1.8.3-backport-pr1753.patch 3386 BLAKE2B a89175e07a3aeca05e076e3c4a4506cfaf80b23f0ebc1ec1b28fa5b7ef78faf133f881aea0eab1b7336b47fed798f3e1b55e120adf0a78fc61d27a1867d259e6 SHA512 55d49b89c450a3a89ad82186826f8629d1bc92697e1d54ab804046d67c7e7b6b7b60ca78c741df5a16a0f50281efb70b86f700fbecae5d68019685cf00ea5cf1
+AUX benchmark-1.8.3-backport-pr1756.patch 2836 BLAKE2B ea3b1c34e9502488c0e6e6a343ba3c29083bdf0623e935008ac03f0ac7815fa9020327bab7e8b6be4fccf5d10bae8c305ea0220936fb608b02e0acf4cfa5ab82 SHA512 aed107584a5b81685a29b055221e903dc8aa4c92f67ac6654a1a120a507a0c51b20109eafb8ad5a459e9a609ca6e5e2d50234af1bddbe36e8eb9391ba3017cfd
AUX benchmark-1.8.3-fix-32bit-test.patch 809 BLAKE2B 22adc089c727de1f93a19dbaed2549536b7b97b705e472c3126af6ebccb56665c1b4cf835a2e5e306233bc6415eed59401295645f79f679315a68a2275e60d91 SHA512 a14a9adc33e0ffb57177b946d6eae2e3a4faf34a24715b5acf0b0ff9fca372a27357b225eb5ffea05b8ebf033244752c6e7b15714946ec2f036fee483199e994
DIST benchmark-1.8.3.tar.gz 250206 BLAKE2B 14b4af17184a88378314d11623b73c27368999fcff6e50986407a08739fdf388cdcbd140471b629cd2a9948f81073796f8a6c38d015be8413b7e4d4759715f97 SHA512 4e12114251c79a426873cfba6e27270b69fc980cef9a68e9cb3170f8e2e203f77dee19ab1e65cad51cd67e60991d3bbfdd52553f22522ce5e6c611b5aa07602c
+EBUILD benchmark-1.8.3-r1.ebuild 1034 BLAKE2B a5615935213f819755143ddf3eb3f35cf35c36c5d361300d41c0613e3338b286beb1f7c6dc6b1ff8c1e55bda310b79d6de016879a2aab413fee8a3556fbfb793 SHA512 48b07a73517ffeb46b7a6cac24a0fa454ae4d07d1d26fbdb951676ef4127fc6df36e21f0fd2bbf930a9a586e1fe7754ebbdf1d193eb736c473a8eaeff4369f75
EBUILD benchmark-1.8.3.ebuild 930 BLAKE2B 87d167ea89f479241b01c2f322048647d34b83d1f1b85d22df1d30e7c23653fb8267c6afee743767baa73824d4bd2497082b278e0eaecb525a703b7a2dff480f SHA512 4cdf4bc984677e07b291ef223c9faabfec6a5fcd2b2f2574642119ba09d734f0480d24b5179fc5ed00aee8f68f6c63a70508a1b2bab2ceaef8e5be9f072e9546
MISC metadata.xml 468 BLAKE2B 1cccded2d58d45121482aedc04732f83d8e1b034fa34eb037ae2e68922c6394b6ce7ad019cca64b0c2496e4328b124a9f06d9b8bba037e36e6f46f716acee9cf SHA512 c7a6087c885a8587799d32fcba2abdef1bac08eb7f6cb7ec195280b0464c962acdfe92cba1ca137bb049d895962bcbecc97b53818a24b84757263f90c345e094
diff --git a/dev-cpp/benchmark/benchmark-1.8.3-r1.ebuild b/dev-cpp/benchmark/benchmark-1.8.3-r1.ebuild
new file mode 100644
index 000000000000..5c20bb79f760
--- /dev/null
+++ b/dev-cpp/benchmark/benchmark-1.8.3-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic
+
+DESCRIPTION="A microbenchmark support library"
+HOMEPAGE="https://github.com/google/benchmark"
+SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~x86"
+IUSE="debug doc test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="doc? ( app-text/doxygen )
+ test? ( >=dev-cpp/gtest-1.11.0 )"
+PATCHES=(
+ "${FILESDIR}/${PN}-1.8.3-fix-32bit-test.patch"
+ "${FILESDIR}/${PN}-1.8.3-backport-pr1753.patch"
+ "${FILESDIR}/${PN}-1.8.3-backport-pr1756.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DBENCHMARK_ENABLE_ASSEMBLY_TESTS=OFF
+ -DBENCHMARK_ENABLE_DOXYGEN=$(usex doc)
+ -DBENCHMARK_ENABLE_GTEST_TESTS=$(usex test)
+ -DBENCHMARK_ENABLE_TESTING=$(usex test)
+ -DBENCHMARK_ENABLE_WERROR=OFF
+ -DBENCHMARK_USE_BUNDLED_GTEST=OFF
+ )
+
+ use debug || append-cppflags -DNDEBUG
+
+ cmake_src_configure
+}
diff --git a/dev-cpp/benchmark/files/benchmark-1.8.3-backport-pr1753.patch b/dev-cpp/benchmark/files/benchmark-1.8.3-backport-pr1753.patch
new file mode 100644
index 000000000000..1c2516c38e37
--- /dev/null
+++ b/dev-cpp/benchmark/files/benchmark-1.8.3-backport-pr1753.patch
@@ -0,0 +1,94 @@
+https://bugs.gentoo.org/922877
+https://github.com/google/benchmark/pull/1753
+
+From cdd4a6d48077a78d07e3b7f165383f6d5052108c Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 2 Feb 2024 21:38:11 -0500
+Subject: [PATCH 1/3] CycleClock: Add support for Alpha architecture
+
+As documented, the real cycle counter is unsafe to use here, because it
+is a 32-bit integer which wraps every ~4s. Use gettimeofday instead,
+which has a limitation of a low-precision real-time-clock (~1ms), but no
+wrapping. Passes test suite.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ src/cycleclock.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/cycleclock.h b/src/cycleclock.h
+index 931bba146..eff563e7f 100644
+--- a/src/cycleclock.h
++++ b/src/cycleclock.h
+@@ -218,6 +218,15 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
+ uint64_t pcycle;
+ asm volatile("%0 = C15:14" : "=r"(pcycle));
+ return static_cast<double>(pcycle);
++#elif defined(__alpha__)
++ // Alpha has a cycle counter, the PCC register, but it is an unsigned 32-bit
++ // integer and thus wraps every ~4s, making using it for tick counts
++ // unreliable beyond this time range. The real-time clock is low-precision,
++ // roughtly ~1ms, but it is the only option that can reasonable count
++ // indefinitely.
++ struct timeval tv;
++ gettimeofday(&tv, nullptr);
++ return static_cast<int64_t>(tv.tv_sec) * 1000000 + tv.tv_usec;
+ #else
+ // The soft failover to a generic implementation is automatic only for ARM.
+ // For other platforms the developer is expected to make an attempt to create
+
+From b1bec2fa5aed335b5be78720a9812cf27baf9df6 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 2 Feb 2024 21:46:06 -0500
+Subject: [PATCH 2/3] sysinfo: support parsing /proc/cpuinfo on Alpha
+
+And also, bail out if unable to parse /proc/cpuinfo. This will
+preemptively alert users on platforms that need custom code for parsing
+/proc/cpuinfo.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ src/sysinfo.cc | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sysinfo.cc b/src/sysinfo.cc
+index 04d64dc5b..786bb1b41 100644
+--- a/src/sysinfo.cc
++++ b/src/sysinfo.cc
+@@ -513,7 +513,11 @@ int GetNumCPUs() {
+ std::cerr << "failed to open /proc/cpuinfo\n";
+ return -1;
+ }
++#if defined(__alpha__)
++ const std::string Key = "cpus detected";
++#else
+ const std::string Key = "processor";
++#endif
+ std::string ln;
+ while (std::getline(f, ln)) {
+ if (ln.empty()) continue;
+
+From 17f2f35e1ce650b4f8596a5c5df6a050588136c5 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 2 Feb 2024 21:49:24 -0500
+Subject: [PATCH 3/3] tabular_test: add a missing DoNotOptimize call
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ test/user_counters_tabular_test.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/test/user_counters_tabular_test.cc b/test/user_counters_tabular_test.cc
+index 3e8fb1bf0..ffd3c0992 100644
+--- a/test/user_counters_tabular_test.cc
++++ b/test/user_counters_tabular_test.cc
+@@ -63,6 +63,9 @@ ADD_CASES(TC_CSVOut, {{"%csv_header,"
+
+ void BM_Counters_Tabular(benchmark::State& state) {
+ for (auto _ : state) {
++ // This test requires a non-zero CPU time to avoid divide-by-zero
++ auto iterations = state.iterations();
++ benchmark::DoNotOptimize(iterations);
+ }
+ namespace bm = benchmark;
+ state.counters.insert({
diff --git a/dev-cpp/benchmark/files/benchmark-1.8.3-backport-pr1756.patch b/dev-cpp/benchmark/files/benchmark-1.8.3-backport-pr1756.patch
new file mode 100644
index 000000000000..6744d3cf212f
--- /dev/null
+++ b/dev-cpp/benchmark/files/benchmark-1.8.3-backport-pr1756.patch
@@ -0,0 +1,89 @@
+https://bugs.gentoo.org/922877
+https://github.com/google/benchmark/pull/1756
+
+From 3805709f137766c99922f647af9b97d49d14e772 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 13 Feb 2024 20:23:20 -0500
+Subject: [PATCH] sysinfo.cc: Always abort on GetNumCPUs failure
+
+Defines a wrapper function, CheckNumCPUs, which enforces that GetNumCPUs
+never returns fewer than one CPU. There is no reasonable way to
+continue if we are unable to identify the number of CPUs.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ src/sysinfo.cc | 28 +++++++++++++++++-----------
+ 1 file changed, 17 insertions(+), 11 deletions(-)
+
+diff --git a/src/sysinfo.cc b/src/sysinfo.cc
+index 786bb1b41..daeb98b02 100644
+--- a/src/sysinfo.cc
++++ b/src/sysinfo.cc
+@@ -474,12 +474,11 @@ std::string GetSystemName() {
+ #endif // Catch-all POSIX block.
+ }
+
+-int GetNumCPUs() {
++int GetNumCPUsImpl() {
+ #ifdef BENCHMARK_HAS_SYSCTL
+ int num_cpu = -1;
+ if (GetSysctl("hw.ncpu", &num_cpu)) return num_cpu;
+- fprintf(stderr, "Err: %s\n", strerror(errno));
+- std::exit(EXIT_FAILURE);
++ PrintErrorAndDie("Err: ", strerror(errno));
+ #elif defined(BENCHMARK_OS_WINDOWS)
+ SYSTEM_INFO sysinfo;
+ // Use memset as opposed to = {} to avoid GCC missing initializer false
+@@ -493,8 +492,8 @@ int GetNumCPUs() {
+ // Returns -1 in case of a failure.
+ long num_cpu = sysconf(_SC_NPROCESSORS_ONLN);
+ if (num_cpu < 0) {
+- fprintf(stderr, "sysconf(_SC_NPROCESSORS_ONLN) failed with error: %s\n",
+- strerror(errno));
++ PrintErrorAndDie("sysconf(_SC_NPROCESSORS_ONLN) failed with error: ",
++ strerror(errno));
+ }
+ return (int)num_cpu;
+ #elif defined(BENCHMARK_OS_QNX)
+@@ -510,8 +509,7 @@ int GetNumCPUs() {
+ int max_id = -1;
+ std::ifstream f("/proc/cpuinfo");
+ if (!f.is_open()) {
+- std::cerr << "failed to open /proc/cpuinfo\n";
+- return -1;
++ PrintErrorAndDie("Failed to open /proc/cpuinfo");
+ }
+ #if defined(__alpha__)
+ const std::string Key = "cpus detected";
+@@ -540,12 +538,10 @@ int GetNumCPUs() {
+ }
+ }
+ if (f.bad()) {
+- std::cerr << "Failure reading /proc/cpuinfo\n";
+- return -1;
++ PrintErrorAndDie("Failure reading /proc/cpuinfo");
+ }
+ if (!f.eof()) {
+- std::cerr << "Failed to read to end of /proc/cpuinfo\n";
+- return -1;
++ PrintErrorAndDie("Failed to read to end of /proc/cpuinfo");
+ }
+ f.close();
+
+@@ -559,6 +555,16 @@ int GetNumCPUs() {
+ BENCHMARK_UNREACHABLE();
+ }
+
++int GetNumCPUs() {
++ const int num_cpus = GetNumCPUsImpl();
++ if (num_cpus < 1) {
++ PrintErrorAndDie(
++ "Unable to extract number of CPUs. If your platform uses "
++ "/proc/cpuinfo, custom support may need to be added.");
++ }
++ return num_cpus;
++}
++
+ class ThreadAffinityGuard final {
+ public:
+ ThreadAffinityGuard() : reset_affinity(SetAffinity()) {
diff --git a/dev-cpp/magic_enum/Manifest b/dev-cpp/magic_enum/Manifest
index 44f0e6f43547..70bd308c4d7d 100644
--- a/dev-cpp/magic_enum/Manifest
+++ b/dev-cpp/magic_enum/Manifest
@@ -1,5 +1,6 @@
+AUX magic_enum-0.9.5-werror.patch 875 BLAKE2B b2add770c207262fdf631fad89347ae8299300c3c2aabd88f9b9f1b36b4a166f171d338d27cbcd69d14788ffc38cb0baa4d345b21dd7e41e937377d45e1edd6f SHA512 72da8efd9468f623f04feb443768231d45b481df092a4087a319027e50cb75ddbe59deeebcad8568c15f1edf467ba5e41ecfb3f04a6fdd512586f86a4889b71f
DIST magic_enum-0.8.2.tar.gz 171915 BLAKE2B e8915aa7cafa9407d5d4ab3b6837fafde6b1cb75877c8b56f82568e6291ca317720950947b2dfc7e12ca459279ba4e809a8c5782fc04adc2d7636eddcb80122d SHA512 849c426484156faf91dde3f32f6c755c7698879b16dd83e13fb86b299b53ec9bbe4d55267581386302c8acb93d80ec044cc248371fdc8608cdd8f4ab12099f0a
DIST magic_enum-0.9.5.tar.gz 198269 BLAKE2B c3c6bbf6c5d366813dac7df5fbfc48f414cf4235d842ef3a5a2fd8f2c2857e55243b7fbf7000d598e778fc8d2d54c7d6e34f8a97fa2eaf510572bf53f17500a6 SHA512 f1b412d15e0ef624b4588adba00a18ed12eeb1f0dabc021d53a7c047b8976ecb07701b76040f47c77c75e00151619dbce1f9a75f471db04340156a39044768f3
EBUILD magic_enum-0.8.2.ebuild 686 BLAKE2B d0bb6977096b53596464f585437d53a4a03518264cc100b58e49f033e69189a3a9617e5b8f84a6d78f1d9c37af23156cdbd0b4b2d53753043b75987b61f208d9 SHA512 e09532008abdb985e2bf19a57724d80e417d3384df26a283d35f1d05459d4b906e78e59ea66480827ea4529edfc7f06355441e77ca5d61aaf404d0dac2dcf063
-EBUILD magic_enum-0.9.5.ebuild 680 BLAKE2B 5e9e43338d402f2f484dcf41b1a19d1f0f22734541e5bc7a335a817151df40be6eab80800277380b16b7c247ea03ab71592854ecebdc0e07d5ed181309e9f217 SHA512 c4133170155febc96aef71b8639d8bec12b5cf04e935d6815ceedd401f2e8f79812bcc4f488b0e74554a804be6f80e66f99e39f5f72917bd3662875e85d90b24
+EBUILD magic_enum-0.9.5.ebuild 733 BLAKE2B 61d90178a7204a5a73ac31c96e757c7c01dc4a4a02e6454fa5a506e2a115da70b96c80a5d5ce0b2f8e94d57de24ae342440469507397174c8e7b5e515aa7c4e8 SHA512 ef82538caabd71017c0e34b49fd84f2e3ef938783e3f6d131bd10e295fcece01afb2ee0d6252a1ed32ab79a2ad10706b6ea39755a2b288ddbc0f395ce959a06d
MISC metadata.xml 337 BLAKE2B eabb1d9eee57714c609421664a9c4c20ad428bb04293b73b229ad35fd9f49bf0ecd6b8b3b1ff7499ca8a9ac47a34e413ae641fc0d0fb519e0f0362ce06b101fa SHA512 0b40ac7094d30a55aaee08f37268eae8b793768aa2f0d5eba53ef0dc1f3f763f3066cd0a2cfb46bb3002fcebde6e631ccb4cf3a8da2db2742ccd2cf536e67012
diff --git a/dev-cpp/magic_enum/files/magic_enum-0.9.5-werror.patch b/dev-cpp/magic_enum/files/magic_enum-0.9.5-werror.patch
new file mode 100644
index 000000000000..6f28fa7ef704
--- /dev/null
+++ b/dev-cpp/magic_enum/files/magic_enum-0.9.5-werror.patch
@@ -0,0 +1,22 @@
+--- a/example/CMakeLists.txt
++++ b/example/CMakeLists.txt
+@@ -2,7 +2,7 @@ include(CheckCXXCompilerFlag)
+
+ set(CMAKE_CXX_STANDARD 17)
+ if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
+- set(OPTIONS -Wall -Wextra -pedantic-errors -Werror)
++ set(OPTIONS -Wall -Wextra)
+ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+ set(OPTIONS /W4 /WX)
+ if(HAS_PERMISSIVE_FLAG)
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -12,7 +12,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+ check_cxx_compiler_flag(/std:c++latest HAS_CPPLATEST_FLAG)
+ elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+ set(CMAKE_VERBOSE_MAKEFILE ON)
+- set(OPTIONS -Wall -Wextra -pedantic-errors -Werror)
++ set(OPTIONS -Wall -Wextra)
+
+ check_cxx_compiler_flag(-std=c++20 HAS_CPP20_FLAG)
+ check_cxx_compiler_flag(-std=c++23 HAS_CPP23_FLAG)
diff --git a/dev-cpp/magic_enum/magic_enum-0.9.5.ebuild b/dev-cpp/magic_enum/magic_enum-0.9.5.ebuild
index 6dea37219253..1077c351e165 100644
--- a/dev-cpp/magic_enum/magic_enum-0.9.5.ebuild
+++ b/dev-cpp/magic_enum/magic_enum-0.9.5.ebuild
@@ -17,6 +17,10 @@ KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv x86"
IUSE="test"
RESTRICT="!test? ( test )"
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.9.5-werror.patch
+)
+
src_configure() {
local mycmakeargs=(
-DMAGIC_ENUM_OPT_BUILD_TESTS=$(usex test)