commit:     3d0a57cb432f91e59b6531ef1e6e5ef3c331599a
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Wed Feb 25 08:36:49 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 25 12:06:51 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d0a57cb

dev-cpp/ctemplate: fix gcc-16/cxx20, update PYTHON_COMPAT

python is always required (src/htmlparser/generate_fsm.py)

Closes: https://bugs.gentoo.org/967254
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/138
Merges: https://codeberg.org/gentoo/gentoo/pulls/138
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-cpp/ctemplate/ctemplate-2.4.ebuild                | 10 +++++++---
 dev-cpp/ctemplate/files/ctemplate-2.4-fix_cxx20.patch | 14 ++++++++++++++
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/dev-cpp/ctemplate/ctemplate-2.4.ebuild 
b/dev-cpp/ctemplate/ctemplate-2.4.ebuild
index 6dcc9f3b5507..65f41282e91f 100644
--- a/dev-cpp/ctemplate/ctemplate-2.4.ebuild
+++ b/dev-cpp/ctemplate/ctemplate-2.4.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{10..13} )
+PYTHON_COMPAT=( python3_{11..14} )
 
 inherit autotools elisp-common flag-o-matic python-any-r1
 
@@ -17,7 +17,7 @@ SLOT="0"
 KEYWORDS="amd64 arm ppc x86"
 IUSE="doc emacs vim-syntax static-libs test"
 
-DEPEND="test? ( ${PYTHON_DEPS} )"
+BDEPEND="${PYTHON_DEPS}"
 RDEPEND="
        emacs? ( >=app-editors/emacs-23.1:* )
        vim-syntax? ( >=app-editors/vim-core-7 )"
@@ -27,6 +27,10 @@ SITEFILE="70ctemplate-gentoo.el"
 # Some tests are broken in 2.3
 RESTRICT="test"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-fix_cxx20.patch
+)
+
 src_prepare() {
        default
        eautoreconf

diff --git a/dev-cpp/ctemplate/files/ctemplate-2.4-fix_cxx20.patch 
b/dev-cpp/ctemplate/files/ctemplate-2.4-fix_cxx20.patch
new file mode 100644
index 000000000000..a0adc59a8727
--- /dev/null
+++ b/dev-cpp/ctemplate/files/ctemplate-2.4-fix_cxx20.patch
@@ -0,0 +1,14 @@
+PR merged https://github.com/OlafvdSpek/ctemplate/pull/143.patch
+gcc-16/C++20, bug 967254, fix: remove hint, removed typedef
+--- a/src/base/arena-inl.h
++++ b/src/base/arena-inl.h
+@@ -93,8 +93,7 @@ template <class T, class C> class ArenaAllocator {
+   ArenaAllocator(C* arena) : arena_(arena) { }  // NOLINT
+   ~ArenaAllocator() { }
+ 
+-  pointer allocate(size_type n,
+-                   std::allocator<void>::const_pointer /*hint*/ = 0) {
++  pointer allocate(size_type n) {
+     assert(arena_ && "No arena to allocate from!");
+     return reinterpret_cast<T*>(arena_->AllocAligned(n * sizeof(T),
+                                                      kAlignment));

Reply via email to