commit: f03da6e3ffdae33bfb30a8be2751cd37af165cfa Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Sep 7 21:39:54 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Sep 7 21:47:12 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f03da6e3
app-misc/tdl: port to C23 & non-deprecated readline typedefs As promised in the previous commit. Bug: https://bugs.gentoo.org/944033 Signed-off-by: Sam James <sam <AT> gentoo.org> .../tdl-1.5.2-readline-obsolete-typedefs.patch | 33 ++++++++++++++++++++-- .../{tdl-1.5.2-r4.ebuild => tdl-1.5.2-r5.ebuild} | 17 ++++++----- 2 files changed, 39 insertions(+), 11 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 index 3010f3b1b3c8..d7fcbc24f786 100644 --- 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 @@ -1,13 +1,42 @@ https://bugs.gentoo.org/944033 --- a/inter.c +++ b/inter.c -@@ -28,7 +28,8 @@ +@@ -28,7 +28,7 @@ #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 +@@ -556,7 +556,7 @@ static int setup_initval_hook(void)/*{{{*/ + static char *interactive_text_readline(char *prompt, char *initval, int *is_blank, int *error)/*{{{*/ + { + char *line; +- Function *old_rl_pre_input_hook = NULL; ++ rl_hook_func_t *old_rl_pre_input_hook = NULL; + + *error = 0; + old_rl_pre_input_hook = rl_pre_input_hook; +@@ -633,9 +633,9 @@ char *interactive_text (char *prompt, char *initval, int *is_blank, int *error)/ + #ifdef USE_READLINE + if (isatty(0)) { + char *result; +- rl_attempted_completion_function = (CPPFunction *) null_tdl_completion; ++ rl_attempted_completion_function = (rl_completion_func_t *) null_tdl_completion; + result = interactive_text_readline(prompt, initval, is_blank, error); +- rl_attempted_completion_function = (CPPFunction *) tdl_completion; ++ rl_attempted_completion_function = (rl_completion_func_t *) tdl_completion; + return result; + } else { + /* In case someone wants to drive tdl from a script, by redirecting stdin to it. */ +@@ -653,7 +653,7 @@ void interactive(void)/*{{{*/ + #ifdef USE_READLINE + if (isatty(0)) { + rl_completion_entry_function = NULL; +- rl_attempted_completion_function = (CPPFunction *) tdl_completion; ++ rl_attempted_completion_function = (rl_completion_func_t *) tdl_completion; + interactive_readline(); + } else { + /* In case someone wants to drive tdl from a script, by redirecting stdin to it. */ diff --git a/app-misc/tdl/tdl-1.5.2-r4.ebuild b/app-misc/tdl/tdl-1.5.2-r5.ebuild similarity index 89% rename from app-misc/tdl/tdl-1.5.2-r4.ebuild rename to app-misc/tdl/tdl-1.5.2-r5.ebuild index 5b6a878ad639..9d709eaef990 100644 --- a/app-misc/tdl/tdl-1.5.2-r4.ebuild +++ b/app-misc/tdl/tdl-1.5.2-r5.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit edo flag-o-matic toolchain-funcs +inherit edo toolchain-funcs MY_PV="$(ver_rs 1- '_')" DESCRIPTION="Command line To Do List manager" @@ -17,13 +17,14 @@ KEYWORDS="amd64 ppc x86" IUSE="doc readline" RDEPEND=" - sys-libs/ncurses:0= - sys-libs/readline:0=" - -DEPEND=" - ${RDEPEND} + sys-libs/ncurses:= + sys-libs/readline:= +" +DEPEND="${RDEPEND}" +BDEPEND=" sys-apps/texinfo - doc? ( virtual/texi2dvi )" + doc? ( virtual/texi2dvi ) +" PATCHES=( "${FILESDIR}"/${PV}-ldflags.patch @@ -41,8 +42,6 @@ src_prepare() { } src_configure() { - append-cflags -std=gnu17 - local myconf=( --prefix="${EPREFIX}"/usr )
