commit:     23f6f7cf59498415a9ab51648b47d82a7f3c953c
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Mon Feb 24 10:28:35 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 10 03:00:39 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23f6f7cf

dev-util/gengetopt: del unary_function fix c17

unary_function removed in C++17. It can just be deleted.
no revbump

Closes: https://bugs.gentoo.org/913636
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Closes: https://github.com/gentoo/gentoo/pull/40729
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../gengetopt/files/gengetopt-2.23.1-fix-c17.patch  | 21 +++++++++++++++++++++
 dev-util/gengetopt/gengetopt-2.23-r1.ebuild         |  3 ++-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/dev-util/gengetopt/files/gengetopt-2.23.1-fix-c17.patch 
b/dev-util/gengetopt/files/gengetopt-2.23.1-fix-c17.patch
new file mode 100644
index 000000000000..570ff7ebdf1d
--- /dev/null
+++ b/dev-util/gengetopt/files/gengetopt-2.23.1-fix-c17.patch
@@ -0,0 +1,21 @@
+unary_function removed in C++17. It can just be deleted.
+--- a/src/gm_utils.h
++++ b/src/gm_utils.h
+@@ -117,7 +117,7 @@
+  * Function object to print something into a stream (to be used with for_each)
+  */
+ template<class T>
+-struct print_f : public std::unary_function<T, void>
++struct print_f
+ {
+     print_f(std::ostream& out, const string &s = ", ") : os(out), sep(s) {}
+     void operator() (T x) { os << x << sep; }
+@@ -129,7 +129,7 @@
+  * Function object to print a pair into two streams (to be used with for_each)
+  */
+ template<class T>
+-struct pair_print_f : public std::unary_function<T, void>
++struct pair_print_f
+ {
+     pair_print_f(std::ostream& out1, std::ostream& out2, const string &s = ", 
") :
+         os1(out1), os2(out2), sep(s) {}

diff --git a/dev-util/gengetopt/gengetopt-2.23-r1.ebuild 
b/dev-util/gengetopt/gengetopt-2.23-r1.ebuild
index 668848906481..1d9acc9ed1fa 100644
--- a/dev-util/gengetopt/gengetopt-2.23-r1.ebuild
+++ b/dev-util/gengetopt/gengetopt-2.23-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -17,6 +17,7 @@ BDEPEND="sys-apps/texinfo"
 
 PATCHES=(
        "${FILESDIR}"/${PN}-2.22.6-docdirs.patch
+       "${FILESDIR}"/${PN}-2.23.1-fix-c17.patch
 )
 
 src_prepare() {

Reply via email to