summaryrefslogtreecommitdiff
path: root/dev-cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp')
-rw-r--r--dev-cpp/atkmm/atkmm-2.36.2-r1.ebuild2
-rw-r--r--dev-cpp/doctest/doctest-2.4.9.ebuild2
-rw-r--r--dev-cpp/elfio/Manifest1
-rw-r--r--dev-cpp/elfio/elfio-3.11.ebuild32
-rw-r--r--dev-cpp/elfio/files/elfio-3.11-system-gtest.patch33
-rw-r--r--dev-cpp/rapidfuzz-cpp/rapidfuzz-cpp-1.10.1.ebuild2
-rw-r--r--dev-cpp/taskflow/taskflow-3.3.0.ebuild2
-rw-r--r--dev-cpp/tbb/files/tbb-2021.7.0-pthread-eagain.patch135
-rw-r--r--dev-cpp/tbb/tbb-2021.7.0-r1.ebuild41
-rw-r--r--dev-cpp/tbb/tbb-2021.7.0.ebuild2
10 files changed, 247 insertions, 5 deletions
diff --git a/dev-cpp/atkmm/atkmm-2.36.2-r1.ebuild b/dev-cpp/atkmm/atkmm-2.36.2-r1.ebuild
index 4c5e59ce730c..ab0cdcd81385 100644
--- a/dev-cpp/atkmm/atkmm-2.36.2-r1.ebuild
+++ b/dev-cpp/atkmm/atkmm-2.36.2-r1.ebuild
@@ -11,7 +11,7 @@ HOMEPAGE="https://www.gtkmm.org"
LICENSE="LGPL-2.1+"
SLOT="2.36"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
IUSE="gtk-doc"
DEPEND="
diff --git a/dev-cpp/doctest/doctest-2.4.9.ebuild b/dev-cpp/doctest/doctest-2.4.9.ebuild
index ddc7a022970e..c0f08fb95ecc 100644
--- a/dev-cpp/doctest/doctest-2.4.9.ebuild
+++ b/dev-cpp/doctest/doctest-2.4.9.ebuild
@@ -11,7 +11,7 @@ SRC_URI="https://github.com/doctest/doctest/archive/v${PV}.tar.gz -> ${P}.tar.gz
LICENSE="MIT"
SLOT="0"
-KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 ~riscv x86"
+KEYWORDS="amd64 ~arm arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc x86"
IUSE="test"
RESTRICT="!test? ( test )"
diff --git a/dev-cpp/elfio/Manifest b/dev-cpp/elfio/Manifest
index 5e626b46552f..3293acb2df14 100644
--- a/dev-cpp/elfio/Manifest
+++ b/dev-cpp/elfio/Manifest
@@ -1 +1,2 @@
DIST elfio-3.10.tar.gz 4243841 BLAKE2B a4cd5e7cb8b2f13cd7341adacb623b996e07e8ac761cd0f1e8eb20a87770fa936bf97ad79a0ff8d700ac41278bae7c5dd00d277f4c2d47e73340aaf607b7ee49 SHA512 f609fe5162d1609d1d65f441dbf01011ca5ae36195d8b3a74dec2b72891e9f8f90d3fdbc9bf893f7186494071606e898e5519fda18665fc88ae9781c504cd4a9
+DIST elfio-3.11.tar.gz 4150700 BLAKE2B 2e0270384f1fdbc8f8374c1a42b5bd0c6ba6faa8c8a7125063b682cd9808fbb3f330e2a0fa4646c8828f6d276ad8f92e36b69ab7916c3bd2b1b2ecad6708fcc1 SHA512 3a254aad62e707f2809e2997998aab6a9794d70791dc535a6de90bad3e9de3cbcc4f8e7787067ca7cd47ce2dc71cf52809747267bc36cfb08369b49a6b92cf5e
diff --git a/dev-cpp/elfio/elfio-3.11.ebuild b/dev-cpp/elfio/elfio-3.11.ebuild
new file mode 100644
index 000000000000..0c82a247cdd9
--- /dev/null
+++ b/dev-cpp/elfio/elfio-3.11.ebuild
@@ -0,0 +1,32 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="ELF reader/producer header-only C++ library"
+HOMEPAGE="https://github.com/serge1/ELFIO"
+SRC_URI="https://github.com/serge1/${PN}/archive/Release_${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}"/${PN^^}-Release_${PV}
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="test? ( dev-cpp/gtest )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.11-system-gtest.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DFETCHCONTENT_FULLY_DISCONNECTED=ON
+ -DELFIO_BUILD_TESTS=$(usex test)
+ )
+
+ cmake_src_configure
+}
diff --git a/dev-cpp/elfio/files/elfio-3.11-system-gtest.patch b/dev-cpp/elfio/files/elfio-3.11-system-gtest.patch
new file mode 100644
index 000000000000..2110086c69d6
--- /dev/null
+++ b/dev-cpp/elfio/files/elfio-3.11-system-gtest.patch
@@ -0,0 +1,33 @@
+https://github.com/serge1/ELFIO/pull/113
+
+From 4c47fd4c783f286a73605e43e362f1e14b0296a9 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 19 Nov 2022 02:56:22 +0000
+Subject: [PATCH] tests: allow using system gtest copy
+
+Distributions often do builds with no network access available
+for both security reasons and also to ensure reproducibility.
+
+This change tells CMake to query the system for a copy of gtest,
+but if it's not available, it'll fall back to downloading via
+FetchContent.
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -3,6 +3,7 @@ include(FetchContent)
+ FetchContent_Declare(
+ googletest
+ URL https://github.com/google/googletest/archive/9a32aee22d771387c494be2d8519fbdf46a713b2.zip
++ FIND_PACKAGE_ARGS NAMES GTest
+ )
+
+ # For Windows: Prevent overriding the parent project's compiler/linker settings
+@@ -44,7 +45,8 @@ target_link_libraries(
+ ELFIOTest
+ PRIVATE
+ elfio::elfio
+- gtest_main)
++ gtest_main
++ GTest::gtest_main)
+
+ add_test(
+ NAME
diff --git a/dev-cpp/rapidfuzz-cpp/rapidfuzz-cpp-1.10.1.ebuild b/dev-cpp/rapidfuzz-cpp/rapidfuzz-cpp-1.10.1.ebuild
index 32f8979b752f..623f3493ce1b 100644
--- a/dev-cpp/rapidfuzz-cpp/rapidfuzz-cpp-1.10.1.ebuild
+++ b/dev-cpp/rapidfuzz-cpp/rapidfuzz-cpp-1.10.1.ebuild
@@ -14,7 +14,7 @@ SRC_URI="
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~riscv"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc"
IUSE="test"
RESTRICT="!test? ( test )"
diff --git a/dev-cpp/taskflow/taskflow-3.3.0.ebuild b/dev-cpp/taskflow/taskflow-3.3.0.ebuild
index 90c7c0a78d6d..d11ec4039e9b 100644
--- a/dev-cpp/taskflow/taskflow-3.3.0.ebuild
+++ b/dev-cpp/taskflow/taskflow-3.3.0.ebuild
@@ -13,7 +13,7 @@ if [[ ${PV} == 9999 ]]; then
S="${WORKDIR}/taskflow-${PV}"
else
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~riscv ~x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
S="${WORKDIR}/taskflow-${PV}"
fi
diff --git a/dev-cpp/tbb/files/tbb-2021.7.0-pthread-eagain.patch b/dev-cpp/tbb/files/tbb-2021.7.0-pthread-eagain.patch
new file mode 100644
index 000000000000..6c0912ec96b7
--- /dev/null
+++ b/dev-cpp/tbb/files/tbb-2021.7.0-pthread-eagain.patch
@@ -0,0 +1,135 @@
+https://bugs.gentoo.org/881161
+https://github.com/rui314/mold/issues/410
+https://github.com/oneapi-src/oneTBB/commit/ceacd2207edfb72a8fc235213265afe68ce74ad0
+https://github.com/oneapi-src/oneTBB/commit/137c1a88b690acf3525e0f279720ac489ce66481
+
+From ceacd2207edfb72a8fc235213265afe68ce74ad0 Mon Sep 17 00:00:00 2001
+From: Ilya Isaev <ilya.isaev@intel.com>
+Date: Wed, 26 Oct 2022 13:13:51 +0200
+Subject: [PATCH] Rework test_eh_thread to avoid sporadic failures (#946)
+
+Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
+--- a/test/tbb/test_eh_thread.cpp
++++ b/test/tbb/test_eh_thread.cpp
+@@ -54,15 +54,16 @@ void limitThreads(size_t limit)
+ CHECK_MESSAGE(0 == ret, "setrlimit has returned an error");
+ }
+
+-static bool g_exception_caught = false;
+-static std::mutex m;
+-static std::condition_variable cv;
+-static std::atomic<bool> stop{ false };
++size_t getThreadLimit() {
++ rlimit rlim;
++
++ int ret = getrlimit(RLIMIT_NPROC, &rlim);
++ CHECK_MESSAGE(0 == ret, "getrlimit has returned an error");
++ return rlim.rlim_cur;
++}
+
+ static void* thread_routine(void*)
+ {
+- std::unique_lock<std::mutex> lock(m);
+- cv.wait(lock, [] { return stop == true; });
+ return nullptr;
+ }
+
+@@ -94,32 +95,17 @@ TEST_CASE("Too many threads") {
+ }
+
+ // Some systems set really big limit (e.g. >45К) for the number of processes/threads
+- limitThreads(1024);
+-
+- std::thread /* isolate test */ ([] {
+- std::vector<Thread> threads;
+- stop = false;
+- auto finalize = [&] {
+- stop = true;
+- cv.notify_all();
+- for (auto& t : threads) {
+- t.join();
+- }
+- };
+-
+- for (int i = 0;; ++i) {
++ limitThreads(1);
++ if (getThreadLimit() == 1) {
++ for (int attempt = 0; attempt < 5; ++attempt) {
+ Thread thread;
+- if (!thread.isValid()) {
+- break;
+- }
+- threads.push_back(thread);
+- if (i == 1024) {
+- WARN_MESSAGE(false, "setrlimit seems having no effect");
+- finalize();
++ if (thread.isValid()) {
++ WARN_MESSAGE(false, "We were able to create a thread. setrlimit seems having no effect");
++ thread.join();
+ return;
+ }
+ }
+- g_exception_caught = false;
++ bool g_exception_caught = false;
+ try {
+ // Initialize the library to create worker threads
+ tbb::parallel_for(0, 2, [](int) {});
+@@ -132,9 +118,10 @@ TEST_CASE("Too many threads") {
+ }
+ // Do not CHECK to avoid memory allocation (we can be out of memory)
+ if (!g_exception_caught) {
+- FAIL("No exception was caught");
++ FAIL("No exception was thrown on library initialization");
+ }
+- finalize();
+- }).join();
++ } else {
++ WARN_MESSAGE(false, "setrlimit seems having no effect");
++ }
+ }
+ #endif
+
+From 137c1a88b690acf3525e0f279720ac489ce66481 Mon Sep 17 00:00:00 2001
+From: Rui Ueyama <ruiu@cs.stanford.edu>
+Date: Wed, 26 Oct 2022 04:54:20 -0700
+Subject: [PATCH] Retry if pthread_create fails with EAGAIN (#824)
+
+Signed-off-by: Rui Ueyama <ruiu@cs.stanford.edu>
+--- a/src/tbb/rml_thread_monitor.h
++++ b/src/tbb/rml_thread_monitor.h
+@@ -31,6 +31,7 @@
+ #include <pthread.h>
+ #include <cstring>
+ #include <cstdlib>
++#include <time.h>
+ #else
+ #error Unsupported platform
+ #endif
+@@ -191,8 +192,25 @@ inline thread_monitor::handle_type thread_monitor::launch( void* (*thread_routin
+ check(pthread_attr_init( &s ), "pthread_attr_init has failed");
+ if( stack_size>0 )
+ check(pthread_attr_setstacksize( &s, stack_size ), "pthread_attr_setstack_size has failed" );
++
++ // pthread_create(2) can spuriously fail with EAGAIN. We retry
++ // max_num_tries times with progressively longer wait times.
+ pthread_t handle;
+- check( pthread_create( &handle, &s, thread_routine, arg ), "pthread_create has failed" );
++ const int max_num_tries = 20;
++ int error = EAGAIN;
++
++ for (int i = 0; i < max_num_tries && error == EAGAIN; i++) {
++ if (i != 0) {
++ // Wait i milliseconds
++ struct timespec ts = {0, i * 1000 * 1000};
++ nanosleep(&ts, NULL);
++ }
++ error = pthread_create(&handle, &s, thread_routine, arg);
++ }
++
++ if (error)
++ handle_perror(error, "pthread_create has failed");
++
+ check( pthread_attr_destroy( &s ), "pthread_attr_destroy has failed" );
+ return handle;
+ }
+
diff --git a/dev-cpp/tbb/tbb-2021.7.0-r1.ebuild b/dev-cpp/tbb/tbb-2021.7.0-r1.ebuild
new file mode 100644
index 000000000000..d88f920769a0
--- /dev/null
+++ b/dev-cpp/tbb/tbb-2021.7.0-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib flag-o-matic
+
+DESCRIPTION="High level abstract threading library"
+HOMEPAGE="https://www.threadingbuildingblocks.org"
+SRC_URI="https://github.com/oneapi-src/oneTBB/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/oneTBB-${PV}"
+
+LICENSE="Apache-2.0"
+# https://github.com/oneapi-src/oneTBB/blob/master/CMakeLists.txt#L53
+# libtbb<SONAME>-libtbbmalloc<SONAME>-libtbbbind<SONAME>
+SLOT="0/12.5-2.5-3.5"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="!kernel_Darwin? ( sys-apps/hwloc:= )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2021.7.0-pthread-eagain.patch
+)
+
+src_configure() {
+ # bug #872287
+ filter-flags -D_GLIBCXX_ASSERTIONS
+ append-cppflags -U_GLIBCXX_ASSERTIONS
+
+ local mycmakeargs=(
+ -DTBB_TEST=$(usex test)
+ -DTBB_ENABLE_IPO=OFF
+ -DTBB_STRICT=OFF
+ )
+
+ cmake-multilib_src_configure
+}
diff --git a/dev-cpp/tbb/tbb-2021.7.0.ebuild b/dev-cpp/tbb/tbb-2021.7.0.ebuild
index 8c5606ac0e0d..439a0b99a71c 100644
--- a/dev-cpp/tbb/tbb-2021.7.0.ebuild
+++ b/dev-cpp/tbb/tbb-2021.7.0.ebuild
@@ -14,7 +14,7 @@ LICENSE="Apache-2.0"
# https://github.com/oneapi-src/oneTBB/blob/master/CMakeLists.txt#L53
# libtbb<SONAME>-libtbbmalloc<SONAME>-libtbbbind<SONAME>
SLOT="0/12.5-2.5-3.5"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~ppc ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="test"
RESTRICT="!test? ( test )"