commit:     0942887557e39f6516bf4184e9e09b70b5bb6f1d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  7 21:33:22 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep  7 21:47:11 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09428875

app-misc/tdl: fix build

* Enable deprecated typedefs in readline headers
* Build w/ -std=gnu17 because of function pointers

I'll see about doing better in a followup.

Closes: https://bugs.gentoo.org/944033
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../tdl/files/tdl-1.5.2-readline-obsolete-typedefs.patch    | 13 +++++++++++++
 app-misc/tdl/tdl-1.5.2-r4.ebuild                            | 11 ++++++++---
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/app-misc/tdl/files/tdl-1.5.2-readline-obsolete-typedefs.patch 
b/app-misc/tdl/files/tdl-1.5.2-readline-obsolete-typedefs.patch
new file mode 100644
index 000000000000..3010f3b1b3c8
--- /dev/null
+++ b/app-misc/tdl/files/tdl-1.5.2-readline-obsolete-typedefs.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/944033
+--- a/inter.c
++++ b/inter.c
+@@ -28,7 +28,8 @@
+ #include <unistd.h>
+ 
+ #ifdef USE_READLINE
+-#if BARE_READLINE_H 
++#define WANT_OBSOLETE_TYPEDEFS
++#if BARE_READLINE_H
+ #include <readline.h>
+ #include <history.h>
+ #else

diff --git a/app-misc/tdl/tdl-1.5.2-r4.ebuild b/app-misc/tdl/tdl-1.5.2-r4.ebuild
index e1592498ee84..5b6a878ad639 100644
--- a/app-misc/tdl/tdl-1.5.2-r4.ebuild
+++ b/app-misc/tdl/tdl-1.5.2-r4.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit edo toolchain-funcs
+inherit edo flag-o-matic toolchain-funcs
 
 MY_PV="$(ver_rs 1- '_')"
 DESCRIPTION="Command line To Do List manager"
@@ -30,6 +30,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-list.c.patch
        "${FILESDIR}"/${P}-main.c.patch
        "${FILESDIR}"/${P}-man.patch
+       "${FILESDIR}"/${P}-readline-obsolete-typedefs.patch
 )
 
 DOCS=( README NEWS tdl.txt tdl.html )
@@ -40,7 +41,11 @@ src_prepare() {
 }
 
 src_configure() {
-       local myconf=( --prefix="${EPREFIX}"/usr )
+       append-cflags -std=gnu17
+
+       local myconf=(
+               --prefix="${EPREFIX}"/usr
+       )
 
        if ! use readline; then
                myconf+=( "${myconf} --without-readline" )

Reply via email to