summaryrefslogtreecommitdiff
path: root/dev-cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp')
-rw-r--r--dev-cpp/benchmark/Manifest1
-rw-r--r--dev-cpp/benchmark/benchmark-1.9.5.ebuild93
-rw-r--r--dev-cpp/benchmark/files/benchmark-1.9.5-fix-documentation-installation.patch42
-rw-r--r--dev-cpp/cppgir/Manifest1
-rw-r--r--dev-cpp/cppgir/cppgir-2.0_p20260226.ebuild46
-rw-r--r--dev-cpp/expected/expected-1.1.0.ebuild4
-rw-r--r--dev-cpp/sparsehash/files/sparsehash-2.0.4-c++20.patch316
-rw-r--r--dev-cpp/sparsehash/sparsehash-2.0.4-r2.ebuild25
8 files changed, 526 insertions, 2 deletions
diff --git a/dev-cpp/benchmark/Manifest b/dev-cpp/benchmark/Manifest
index c0db3029d07f..b9c8ff454017 100644
--- a/dev-cpp/benchmark/Manifest
+++ b/dev-cpp/benchmark/Manifest
@@ -3,3 +3,4 @@ DIST benchmark-1.9.1.tar.gz 255148 BLAKE2B 39b78afcb333c750960f476476b625d7f72b7
DIST benchmark-1.9.2.tar.gz 258938 BLAKE2B fed5a3d2447ac32c6e717a936c662d7ef7464978e6ff2d1e625576eee3a225e33d9125d7be5cd287fc069399ddaf76c0c2904caeec467f3f89755e59d3fe75e6 SHA512 64e964f02c118935305ca3e7d3f732f2e093f927371bd1729467f6cb75dc0c42492f9f02c3191e3d8affdc9bab2e66becf10bd4250b768854074bf69efa7e4f2
DIST benchmark-1.9.3.tar.gz 262114 BLAKE2B 978baf8380d81d98e7d465458953503881a12d4bc66f4bb3daf66b94c1bb1c268d4cc2733cd806af6e262faea1a7db2d71bdd86216a1c5f08b132b27fb0bff11 SHA512 bd1bc103c89ec74a7dfdb09aa4b308496f79ccfe0a728e31eed2814b9ff0f19aa930c58827d044dac07e2e776f990f74ebc4c7cd9c86b37871f8868e1581d4e1
DIST benchmark-1.9.4.tar.gz 262499 BLAKE2B 93efe09a72c61639bbbd1fc97f851f77a742eb356ac2470377643eff327861c0ffdf45a043295db8f317baff709f89b56b27fe8cbbca9a6afd64081cf047672b SHA512 f9031f144a7deeed151d22676b50384c03e5bbd19b68dac9471e91e49c408b770158c5c325f58e6ac07437955fdab3f08aeee76ba7ca5f97d2b51f14f6782416
+DIST benchmark-1.9.5.tar.gz 267155 BLAKE2B 18a7df6f5145160818c55478f5b28d1e69d8ad59e812c1b77cd32c88ac823f122d8df40dab06497d91945458bf4ca9b456729a44989448ece8f7d9b80fc8e138 SHA512 f207a63868e0c52f31a66ff9fd0ee75183ce3aaaa0946b00a49b77836507363bac8574feef8d9da82810a3167847303d6edf939e74802ad17e5a615bbf61e372
diff --git a/dev-cpp/benchmark/benchmark-1.9.5.ebuild b/dev-cpp/benchmark/benchmark-1.9.5.ebuild
new file mode 100644
index 000000000000..4a8ffcf9f028
--- /dev/null
+++ b/dev-cpp/benchmark/benchmark-1.9.5.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..14} )
+
+inherit cmake-multilib flag-o-matic python-single-r1
+
+DESCRIPTION="A microbenchmark support library"
+HOMEPAGE="https://github.com/google/benchmark/"
+SRC_URI="https://github.com/google/benchmark/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="Apache-2.0"
+SLOT="0/$(ver_cut 1)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+IUSE="doc debug libpfm test +tools"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="tools? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="libpfm? ( dev-libs/libpfm:= )"
+
+RDEPEND="
+ ${DEPEND}
+
+ tools? (
+ $(python_gen_cond_dep '
+ dev-python/numpy[${PYTHON_USEDEP}]
+ >=dev-python/scipy-1.10.0[${PYTHON_USEDEP}]
+ ')
+
+ ${PYTHON_DEPS}
+ )
+"
+
+BDEPEND="
+ doc? ( app-text/doxygen )
+ test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )
+"
+
+PATCHES=( "${FILESDIR}/${PN}-1.9.5-fix-documentation-installation.patch" )
+
+pkg_setup() {
+ use tools && python-single-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ # bug #943629
+ use debug || append-cppflags -DNDEBUG
+
+ local mycmakeargs=(
+ -DBENCHMARK_ENABLE_DOXYGEN="$(usex doc)"
+ -DBENCHMARK_ENABLE_GTEST_TESTS="$(usex test)"
+
+ # Users should control this via *FLAGS
+ -DBENCHMARK_ENABLE_LTO=OFF
+
+ -DBENCHMARK_ENABLE_LIBPFM="$(multilib_native_usex libpfm)"
+ -DBENCHMARK_ENABLE_TESTING="$(usex test)"
+ -DBENCHMARK_ENABLE_WERROR=OFF
+ -DBENCHMARK_INSTALL_DOCS="$(usex doc)"
+ -DBENCHMARK_USE_BUNDLED_GTEST=OFF
+
+ # This is determined by profile
+ -DBENCHMARK_USE_LIBCXX=OFF
+ )
+
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ CMAKE_SKIP_TESTS=(
+ # CMake already warns on these being brittle w/ diff
+ # compiler versions. Could do with investigation if bored
+ # but not critical. See bug #941538.
+
+ run_donotoptimize_assembly_test_CHECK
+ run_state_assembly_test_CHECK
+ run_clobber_memory_assembly_test_CHECK
+ )
+
+ cmake_src_test
+}
+
+multilib_src_install_all() {
+ dodoc CONTRIBUTING.md
+ dodoc CONTRIBUTORS
+
+ if use tools; then
+ python_domodule tools/gbench
+ python_doscript tools/compare.py
+ python_doscript tools/strip_asm.py
+ fi
+}
diff --git a/dev-cpp/benchmark/files/benchmark-1.9.5-fix-documentation-installation.patch b/dev-cpp/benchmark/files/benchmark-1.9.5-fix-documentation-installation.patch
new file mode 100644
index 000000000000..5704b7e54658
--- /dev/null
+++ b/dev-cpp/benchmark/files/benchmark-1.9.5-fix-documentation-installation.patch
@@ -0,0 +1,42 @@
+From 009874342ddcf6446bec308686c54bd387a212a4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Matt=C3=A9o=20Rossillol=E2=80=91=E2=80=91Laruelle?=
+ <beatussum@protonmail.com>
+Date: Mon, 19 Aug 2024 09:12:57 +0200
+Subject: [PATCH] fix documentation installation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+HTML pages generated by Doxygen are now installed into
+/usr/share/doc/${PF}/html.
+
+The content of the docs directory is always installed even if HTML pages are
+installed.
+
+Signed-off-by: Mattéo Rossillol‑‑Laruelle <beatussum@protonmail.com>
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -185,16 +185,16 @@ if (BENCHMARK_ENABLE_DOXYGEN)
+ if (BENCHMARK_ENABLE_INSTALL AND BENCHMARK_INSTALL_DOCS)
+ install(
+ DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/"
+- DESTINATION ${CMAKE_INSTALL_DOCDIR})
+- endif()
+-else()
+- if (BENCHMARK_ENABLE_INSTALL AND BENCHMARK_INSTALL_DOCS)
+- install(
+- DIRECTORY "${PROJECT_SOURCE_DIR}/docs/"
+- DESTINATION ${CMAKE_INSTALL_DOCDIR})
++ DESTINATION "${CMAKE_INSTALL_DOCDIR}/html/")
+ endif()
+ endif()
+
++if (BENCHMARK_ENABLE_INSTALL AND BENCHMARK_INSTALL_DOCS)
++ install(
++ DIRECTORY "${PROJECT_SOURCE_DIR}/docs/"
++ DESTINATION ${CMAKE_INSTALL_DOCDIR})
++endif()
++
+ set(CMAKE_INSTALL_PYTOOLSDIR "${CMAKE_INSTALL_DATADIR}/googlebenchmark/tools" CACHE PATH "")
+
+ if (BENCHMARK_ENABLE_INSTALL AND BENCHMARK_INSTALL_TOOLS)
diff --git a/dev-cpp/cppgir/Manifest b/dev-cpp/cppgir/Manifest
index e962fb566199..6b3310d5ca55 100644
--- a/dev-cpp/cppgir/Manifest
+++ b/dev-cpp/cppgir/Manifest
@@ -1,2 +1,3 @@
DIST cppgir-2.0_p20250629.tar.bz2 159868 BLAKE2B df2d6b947e6303aabf17a3e40b175fb261dccf6e11f6a2870e0cdc08d247b416f48c370bdd1541bc21acd861cf5112b96aa472b46bbe0a3e815e33cfcda3678a SHA512 59578481542973e51fa7b7374a5a9cacc3d6c1c300e6ef128c3dd6d7093927de7957a2ecc0f762ae620bc61c94a4b31992d10f170ea11e17caad8c74a1ffb0b7
DIST cppgir-2.0_p20260109.tar.bz2 160502 BLAKE2B 3b4a0ca041001388e5b3b266a01ecaa405ef017102c327842a2673e9876451b45e4fdd6d03bfafbc0de6f9761423f423178c80ea71c10ba6bcb8c0cef5fe2a84 SHA512 7fbce18ec9c3794bf12ef2edeed18d1f5a972519c931bbd0b2d53405286c56f14811286ee7be6758f81de4c3c0d43f7c73c9778923c5bd181f43bcf2d77d2a65
+DIST cppgir-2.0_p20260226.tar.bz2 160619 BLAKE2B ce8d2a3155b3740aad71729c428abfc3b4f872e06d64abd33c725b8f50f26447adf3c8615419b83f3130e9fa7b42ac9aed18c2110cd729cd326d4ff7e42c8580 SHA512 259d3a0f0c6ced89882e95e7c98fb984943fb1884a5ed2bcfc65cc3095d88a4d5ad137ac25f7e052d592fc33e87825d7e2ed4275eb79c4f85214141ba4d525c7
diff --git a/dev-cpp/cppgir/cppgir-2.0_p20260226.ebuild b/dev-cpp/cppgir/cppgir-2.0_p20260226.ebuild
new file mode 100644
index 000000000000..3c2efae9e031
--- /dev/null
+++ b/dev-cpp/cppgir/cppgir-2.0_p20260226.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic
+
+DESCRIPTION="GObject-Introspection C++ binding wrapper generator"
+HOMEPAGE="https://gitlab.com/mnauw/cppgir"
+
+MY_PV="47cf94f83b54cda59018135601e19d7fb0c77776"
+SRC_URI="https://gitlab.com/mnauw/cppgir/-/archive/${MY_PV}/cppgir-${MY_PV}.tar.bz2 -> ${P}.tar.bz2"
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/boost:=
+ dev-libs/libfmt:=
+"
+DEPEND="${RDEPEND}
+ dev-cpp/expected-lite
+"
+BDEPEND="
+ doc? ( app-text/ronn-ng )
+ test? ( dev-libs/glib )
+"
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_DOC=$(usex doc)
+ -DBUILD_TESTING=$(usex test)
+ -DBUILD_EXAMPLES=no
+ -DINTERNAL_EXPECTED=no
+ )
+
+ append-cppflags \
+ -UDEFAULT_GIRPATH \
+ -DDEFAULT_GIRPATH="${EPREFIX}/usr/share:${EPREFIX}/usr/local/share"
+
+ cmake_src_configure
+}
diff --git a/dev-cpp/expected/expected-1.1.0.ebuild b/dev-cpp/expected/expected-1.1.0.ebuild
index 907e5cc60649..eac875514fa6 100644
--- a/dev-cpp/expected/expected-1.1.0.ebuild
+++ b/dev-cpp/expected/expected-1.1.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -12,7 +12,7 @@ SRC_URI="https://github.com/TartanLlama/expected/archive/refs/tags/v${PV}.tar.gz
LICENSE="CC0-1.0"
SLOT="0"
-KEYWORDS="amd64 ~loong ~x86"
+KEYWORDS="~alpha amd64 ~loong ~s390 ~x86"
RESTRICT="test"
src_configure() {
diff --git a/dev-cpp/sparsehash/files/sparsehash-2.0.4-c++20.patch b/dev-cpp/sparsehash/files/sparsehash-2.0.4-c++20.patch
new file mode 100644
index 000000000000..776443d68c5e
--- /dev/null
+++ b/dev-cpp/sparsehash/files/sparsehash-2.0.4-c++20.patch
@@ -0,0 +1,316 @@
+https://github.com/igorsugak/sparsehash/commit/6940fcaba9766735e48064b930690d67fc2f84ea
+https://github.com/sparsehash/sparsehash/pull/165
+https://bugs.gentoo.org/967004
+C++20 removed many deprecated std::allocator members, causing sparsehash
+to fail when it is built with -std=c++20. This implements most of
+the uses of the removed members in terms of std::allocator_traits.
+
+There are no corresponding reference and const_reference members
+in std::allocator_traits, in which case used the actual
+value_type&/const value_type& instead.
+From 6940fcaba9766735e48064b930690d67fc2f84ea Mon Sep 17 00:00:00 2001
+From: sugak <sugak@fb.com>
+Date: Mon, 29 Nov 2021 18:01:19 -0800
+Subject: [PATCH] fix build with -std=c++20
+
+---
+ src/sparsehash/internal/densehashtable.h | 46 ++++++++++++---------
+ src/sparsehash/internal/sparsehashtable.h | 50 +++++++++++++----------
+ src/sparsehash/sparsetable | 37 +++++++++--------
+ 3 files changed, 74 insertions(+), 59 deletions(-)
+
+diff --git a/src/sparsehash/internal/densehashtable.h b/src/sparsehash/internal/densehashtable.h
+index cdf4ff6..79cecab 100644
+--- a/src/sparsehash/internal/densehashtable.h
++++ b/src/sparsehash/internal/densehashtable.h
+@@ -149,7 +149,8 @@ struct dense_hashtable_const_iterator;
+ template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
+ struct dense_hashtable_iterator {
+ private:
+- typedef typename A::template rebind<V>::other value_alloc_type;
++ typedef typename std::allocator_traits<A>::template rebind_alloc<V> value_alloc_type;
++ typedef std::allocator_traits<value_alloc_type> value_alloc_traits;
+
+ public:
+ typedef dense_hashtable_iterator<V,K,HF,ExK,SetK,EqK,A> iterator;
+@@ -157,10 +158,10 @@ struct dense_hashtable_iterator {
+
+ typedef std::forward_iterator_tag iterator_category; // very little defined!
+ typedef V value_type;
+- typedef typename value_alloc_type::difference_type difference_type;
+- typedef typename value_alloc_type::size_type size_type;
+- typedef typename value_alloc_type::reference reference;
+- typedef typename value_alloc_type::pointer pointer;
++ typedef typename value_alloc_traits::difference_type difference_type;
++ typedef typename value_alloc_traits::size_type size_type;
++ typedef value_type& reference;
++ typedef typename value_alloc_traits::pointer pointer;
+
+ // "Real" constructor and default constructor
+ dense_hashtable_iterator(const dense_hashtable<V,K,HF,ExK,SetK,EqK,A> *h,
+@@ -202,7 +203,8 @@ struct dense_hashtable_iterator {
+ template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
+ struct dense_hashtable_const_iterator {
+ private:
+- typedef typename A::template rebind<V>::other value_alloc_type;
++ typedef typename std::allocator_traits<A>::template rebind_alloc<V> value_alloc_type;
++ typedef std::allocator_traits<value_alloc_type> value_alloc_traits;
+
+ public:
+ typedef dense_hashtable_iterator<V,K,HF,ExK,SetK,EqK,A> iterator;
+@@ -210,10 +212,10 @@ struct dense_hashtable_const_iterator {
+
+ typedef std::forward_iterator_tag iterator_category; // very little defined!
+ typedef V value_type;
+- typedef typename value_alloc_type::difference_type difference_type;
+- typedef typename value_alloc_type::size_type size_type;
+- typedef typename value_alloc_type::const_reference reference;
+- typedef typename value_alloc_type::const_pointer pointer;
++ typedef typename value_alloc_traits::difference_type difference_type;
++ typedef typename value_alloc_traits::size_type size_type;
++ typedef const value_type& reference;
++ typedef typename value_alloc_traits::const_pointer pointer;
+
+ // "Real" constructor and default constructor
+ dense_hashtable_const_iterator(
+@@ -259,7 +261,8 @@ template <class Value, class Key, class HashFcn,
+ class ExtractKey, class SetKey, class EqualKey, class Alloc>
+ class dense_hashtable {
+ private:
+- typedef typename Alloc::template rebind<Value>::other value_alloc_type;
++ typedef typename std::allocator_traits<Alloc>::template rebind_alloc<Value> value_alloc_type;
++ typedef std::allocator_traits<value_alloc_type> value_alloc_traits;
+
+ public:
+ typedef Key key_type;
+@@ -268,12 +271,12 @@ class dense_hashtable {
+ typedef EqualKey key_equal;
+ typedef Alloc allocator_type;
+
+- typedef typename value_alloc_type::size_type size_type;
+- typedef typename value_alloc_type::difference_type difference_type;
+- typedef typename value_alloc_type::reference reference;
+- typedef typename value_alloc_type::const_reference const_reference;
+- typedef typename value_alloc_type::pointer pointer;
+- typedef typename value_alloc_type::const_pointer const_pointer;
++ typedef typename value_alloc_traits::size_type size_type;
++ typedef typename value_alloc_traits::difference_type difference_type;
++ typedef value_type& reference;
++ typedef const value_type& const_reference;
++ typedef typename value_alloc_traits::pointer pointer;
++ typedef typename value_alloc_traits::const_pointer const_pointer;
+ typedef dense_hashtable_iterator<Value, Key, HashFcn,
+ ExtractKey, SetKey, EqualKey, Alloc>
+ iterator;
+@@ -518,7 +521,9 @@ class dense_hashtable {
+ // FUNCTIONS CONCERNING SIZE
+ public:
+ size_type size() const { return num_elements - num_deleted; }
+- size_type max_size() const { return val_info.max_size(); }
++ size_type max_size() const {
++ return std::allocator_traits<ValInfo>::max_size(val_info);
++ }
+ bool empty() const { return size() == 0; }
+ size_type bucket_count() const { return num_buckets; }
+ size_type max_bucket_count() const { return max_size(); }
+@@ -1170,8 +1175,9 @@ class dense_hashtable {
+ template <class A>
+ class alloc_impl : public A {
+ public:
+- typedef typename A::pointer pointer;
+- typedef typename A::size_type size_type;
++ typedef std::allocator_traits<A> alloc_traits;
++ typedef typename alloc_traits::pointer pointer;
++ typedef typename alloc_traits::size_type size_type;
+
+ // Convert a normal allocator to one that has realloc_or_die()
+ alloc_impl(const A& a) : A(a) { }
+diff --git a/src/sparsehash/internal/sparsehashtable.h b/src/sparsehash/internal/sparsehashtable.h
+index f54ea51..1c71d6d 100644
+--- a/src/sparsehash/internal/sparsehashtable.h
++++ b/src/sparsehash/internal/sparsehashtable.h
+@@ -160,7 +160,8 @@ struct sparse_hashtable_const_iterator;
+ template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
+ struct sparse_hashtable_iterator {
+ private:
+- typedef typename A::template rebind<V>::other value_alloc_type;
++ typedef typename std::allocator_traits<A>::template rebind_alloc<V> value_alloc_type;
++ typedef std::allocator_traits<value_alloc_type> value_alloc_traits;
+
+ public:
+ typedef sparse_hashtable_iterator<V,K,HF,ExK,SetK,EqK,A> iterator;
+@@ -170,10 +171,10 @@ struct sparse_hashtable_iterator {
+
+ typedef std::forward_iterator_tag iterator_category; // very little defined!
+ typedef V value_type;
+- typedef typename value_alloc_type::difference_type difference_type;
+- typedef typename value_alloc_type::size_type size_type;
+- typedef typename value_alloc_type::reference reference;
+- typedef typename value_alloc_type::pointer pointer;
++ typedef typename value_alloc_traits::difference_type difference_type;
++ typedef typename value_alloc_traits::size_type size_type;
++ typedef value_type& reference;
++ typedef typename value_alloc_traits::pointer pointer;
+
+ // "Real" constructor and default constructor
+ sparse_hashtable_iterator(const sparse_hashtable<V,K,HF,ExK,SetK,EqK,A> *h,
+@@ -212,7 +213,9 @@ struct sparse_hashtable_iterator {
+ template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
+ struct sparse_hashtable_const_iterator {
+ private:
+- typedef typename A::template rebind<V>::other value_alloc_type;
++ typedef typename std::allocator_traits<A>::template rebind_alloc<V> value_alloc_type;
++ typedef typename std::allocator_traits<value_alloc_type> value_alloc_traits;
++
+
+ public:
+ typedef sparse_hashtable_iterator<V,K,HF,ExK,SetK,EqK,A> iterator;
+@@ -222,10 +225,10 @@ struct sparse_hashtable_const_iterator {
+
+ typedef std::forward_iterator_tag iterator_category; // very little defined!
+ typedef V value_type;
+- typedef typename value_alloc_type::difference_type difference_type;
+- typedef typename value_alloc_type::size_type size_type;
+- typedef typename value_alloc_type::const_reference reference;
+- typedef typename value_alloc_type::const_pointer pointer;
++ typedef typename value_alloc_traits::difference_type difference_type;
++ typedef typename value_alloc_traits::size_type size_type;
++ typedef const value_type& reference;
++ typedef typename value_alloc_traits::const_pointer pointer;
+
+ // "Real" constructor and default constructor
+ sparse_hashtable_const_iterator(const sparse_hashtable<V,K,HF,ExK,SetK,EqK,A> *h,
+@@ -267,7 +270,9 @@ struct sparse_hashtable_const_iterator {
+ template <class V, class K, class HF, class ExK, class SetK, class EqK, class A>
+ struct sparse_hashtable_destructive_iterator {
+ private:
+- typedef typename A::template rebind<V>::other value_alloc_type;
++ typedef typename std::allocator_traits<A>::template rebind_alloc<V> value_alloc_type;
++ typedef std::allocator_traits<value_alloc_type> value_alloc_traits;
++
+
+ public:
+ typedef sparse_hashtable_destructive_iterator<V,K,HF,ExK,SetK,EqK,A> iterator;
+@@ -276,10 +281,10 @@ struct sparse_hashtable_destructive_iterator {
+
+ typedef std::forward_iterator_tag iterator_category; // very little defined!
+ typedef V value_type;
+- typedef typename value_alloc_type::difference_type difference_type;
+- typedef typename value_alloc_type::size_type size_type;
+- typedef typename value_alloc_type::reference reference;
+- typedef typename value_alloc_type::pointer pointer;
++ typedef typename value_alloc_traits::difference_type difference_type;
++ typedef typename value_alloc_traits::size_type size_type;
++ typedef value_type& reference;
++ typedef typename value_alloc_traits::pointer pointer;
+
+ // "Real" constructor and default constructor
+ sparse_hashtable_destructive_iterator(const
+@@ -320,7 +325,8 @@ template <class Value, class Key, class HashFcn,
+ class ExtractKey, class SetKey, class EqualKey, class Alloc>
+ class sparse_hashtable {
+ private:
+- typedef typename Alloc::template rebind<Value>::other value_alloc_type;
++ typedef typename std::allocator_traits<Alloc>::template rebind_alloc<Value> value_alloc_type;
++ typedef std::allocator_traits<value_alloc_type> value_alloc_traits;
+
+ public:
+ typedef Key key_type;
+@@ -329,12 +335,12 @@ class sparse_hashtable {
+ typedef EqualKey key_equal;
+ typedef Alloc allocator_type;
+
+- typedef typename value_alloc_type::size_type size_type;
+- typedef typename value_alloc_type::difference_type difference_type;
+- typedef typename value_alloc_type::reference reference;
+- typedef typename value_alloc_type::const_reference const_reference;
+- typedef typename value_alloc_type::pointer pointer;
+- typedef typename value_alloc_type::const_pointer const_pointer;
++ typedef typename value_alloc_traits::size_type size_type;
++ typedef typename value_alloc_traits::difference_type difference_type;
++ typedef value_type& reference;
++ typedef const value_type& const_reference;
++ typedef typename value_alloc_traits::pointer pointer;
++ typedef typename value_alloc_traits::const_pointer const_pointer;
+ typedef sparse_hashtable_iterator<Value, Key, HashFcn, ExtractKey,
+ SetKey, EqualKey, Alloc>
+ iterator;
+diff --git a/src/sparsehash/sparsetable b/src/sparsehash/sparsetable
+index 6259ebd..60c71dc 100644
+--- a/src/sparsehash/sparsetable
++++ b/src/sparsehash/sparsetable
+@@ -802,16 +802,17 @@ class destructive_two_d_iterator {
+ template <class T, u_int16_t GROUP_SIZE, class Alloc>
+ class sparsegroup {
+ private:
+- typedef typename Alloc::template rebind<T>::other value_alloc_type;
++ typedef typename std::allocator_traits<Alloc>::template rebind_alloc<T> value_alloc_type;
++ typedef std::allocator_traits<value_alloc_type> value_alloc_traits;
+
+ public:
+ // Basic types
+ typedef T value_type;
+ typedef Alloc allocator_type;
+- typedef typename value_alloc_type::reference reference;
+- typedef typename value_alloc_type::const_reference const_reference;
+- typedef typename value_alloc_type::pointer pointer;
+- typedef typename value_alloc_type::const_pointer const_pointer;
++ typedef value_type& reference;
++ typedef const value_type& const_reference;
++ typedef typename value_alloc_traits::pointer pointer;
++ typedef typename value_alloc_traits::const_pointer const_pointer;
+
+ typedef table_iterator<sparsegroup<T, GROUP_SIZE, Alloc> > iterator;
+ typedef const_table_iterator<sparsegroup<T, GROUP_SIZE, Alloc> >
+@@ -1289,8 +1290,9 @@ class sparsegroup {
+ template <class A>
+ class alloc_impl : public A {
+ public:
+- typedef typename A::pointer pointer;
+- typedef typename A::size_type size_type;
++ typedef std::allocator_traits<A> alloc_traits;
++ typedef typename alloc_traits::pointer pointer;
++ typedef typename alloc_traits::size_type size_type;
+
+ // Convert a normal allocator to one that has realloc_or_die()
+ alloc_impl(const A& a) : A(a) { }
+@@ -1362,20 +1364,21 @@ template <class T, u_int16_t GROUP_SIZE = DEFAULT_SPARSEGROUP_SIZE,
+ class Alloc = libc_allocator_with_realloc<T> >
+ class sparsetable {
+ private:
+- typedef typename Alloc::template rebind<T>::other value_alloc_type;
+- typedef typename Alloc::template rebind<
+- sparsegroup<T, GROUP_SIZE, value_alloc_type> >::other vector_alloc;
++ typedef typename std::allocator_traits<Alloc>::template rebind_alloc<T> value_alloc_type;
++ typedef std::allocator_traits<value_alloc_type> value_alloc_traits;
++ typedef typename std::allocator_traits<Alloc>::template rebind_alloc<
++ sparsegroup<T, GROUP_SIZE, value_alloc_type> > vector_alloc;
+
+ public:
+ // Basic types
+ typedef T value_type; // stolen from stl_vector.h
+ typedef Alloc allocator_type;
+- typedef typename value_alloc_type::size_type size_type;
+- typedef typename value_alloc_type::difference_type difference_type;
+- typedef typename value_alloc_type::reference reference;
+- typedef typename value_alloc_type::const_reference const_reference;
+- typedef typename value_alloc_type::pointer pointer;
+- typedef typename value_alloc_type::const_pointer const_pointer;
++ typedef typename value_alloc_traits::size_type size_type;
++ typedef typename value_alloc_traits::difference_type difference_type;
++ typedef value_type& reference;
++ typedef const value_type& const_reference;
++ typedef typename value_alloc_traits::pointer pointer;
++ typedef typename value_alloc_traits::const_pointer const_pointer;
+ typedef table_iterator<sparsetable<T, GROUP_SIZE, Alloc> > iterator;
+ typedef const_table_iterator<sparsetable<T, GROUP_SIZE, Alloc> >
+ const_iterator;
+@@ -1446,7 +1449,7 @@ class sparsetable {
+ return destructive_iterator(groups.begin(), groups.end(), groups.end());
+ }
+
+- typedef sparsegroup<value_type, GROUP_SIZE, allocator_type> group_type;
++ typedef sparsegroup<value_type, GROUP_SIZE, value_alloc_type> group_type;
+ typedef std::vector<group_type, vector_alloc > group_vector_type;
+
+ typedef typename group_vector_type::reference GroupsReference;
diff --git a/dev-cpp/sparsehash/sparsehash-2.0.4-r2.ebuild b/dev-cpp/sparsehash/sparsehash-2.0.4-r2.ebuild
new file mode 100644
index 000000000000..8b170f5fd14a
--- /dev/null
+++ b/dev-cpp/sparsehash/sparsehash-2.0.4-r2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="An extremely memory-efficient hash_map implementation"
+HOMEPAGE="https://github.com/sparsehash/sparsehash"
+SRC_URI="https://github.com/sparsehash/sparsehash/archive/${P}.tar.gz"
+S="${WORKDIR}/${PN}-${P}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.0.3-fix-buildsystem.patch"
+ "${FILESDIR}/${P}-c++20.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}