commit:     3efd8cdc033900c2c61570767f3f505c132d6c0b
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Wed Jul  9 14:20:47 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jul 12 05:54:57 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3efd8cdc

app-text/dictd: add 1.13.3

SCR_URI : httpS

remove min version, really old
dev-db/libdbi and dev-libs/judy are just required for building (DEPEND)

remove the mention of app-dicts/dictd-dicts, treecleaned
(bugs 949693 940240)

add app-text/recode as optfeature

patches :
rebased for libtool
renew for version (avoid conflict with VERSION from libtool)
assume strlcpy and strlcat are declared in string.h (bug 880531)
debian patches for various compiler warnings

buffer overflow fixed in this release (bug 893270)
bug 884319 already fixed with -j1 (1.13.0-r4)

Closes: https://bugs.gentoo.org/880531
Closes: https://bugs.gentoo.org/893270
Closes: https://bugs.gentoo.org/884319
Closes: https://bugs.gentoo.org/949693
Closes: https://bugs.gentoo.org/940240
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/42947
Closes: https://github.com/gentoo/gentoo/pull/42947
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-text/dictd/Manifest                            |   1 +
 app-text/dictd/dictd-1.13.3.ebuild                 | 135 +++++++++
 .../files/dictd-1.13.3-debian_fix_warnings.patch   | 306 +++++++++++++++++++++
 app-text/dictd/files/dictd-1.13.3-libtool.patch    |  67 +++++
 .../files/dictd-1.13.3-rm_replace_strlfuncs.patch  |  35 +++
 app-text/dictd/files/dictd-1.13.3-version.patch    |  45 +++
 6 files changed, 589 insertions(+)

diff --git a/app-text/dictd/Manifest b/app-text/dictd/Manifest
index 5f213c8909a8..73a5df137059 100644
--- a/app-text/dictd/Manifest
+++ b/app-text/dictd/Manifest
@@ -1,2 +1,3 @@
 DIST dictd-1.13.0.tar.gz 395455 BLAKE2B 
222ce7eee03083ee23066f43330cce0cda3041d2ee4a0d54b2e9f2ea18a77ec83f91fbb766bdad645bdcaeed0674361ba600a393e4cb6c42bab6be94098991f0
 SHA512 
86871aaf34a182d1d7aac1a1282d4a75f2d7c112c762e92f303924c324f665dae75c51e7ca91e3cc1dde2053ad8e2d1fd50a76934a5f84ff70975aa858e26439
 DIST dictd-1.13.1.tar.gz 395619 BLAKE2B 
83caad8570e752575bf5fe39a41e4a7d564f3a255d4e4cb234661a56ed645dfb155bef8a89d4ecfebfefb2f03d4ab808c00f1c4eacaae883761e28817138526b
 SHA512 
31a2e67feaa672e773b86d16ecb9f41fdcd2d5f907759cc110261af30147b3972a2c7d742b4d61b67eb3b8c84c08e179106b9a30e998a425c9b437ec933b03ea
+DIST dictd-1.13.3.tar.gz 390047 BLAKE2B 
e7d27672c9e8770a062a0dfae2c8b011b57b906477eeb779a6a3104018b50c20edf6d951a5e2561489cf86ab14f52eff80fb3aa6ce39d4da1e3008820ce57968
 SHA512 
41091fa3c9ae5d9b6139ea765d20f1f9f801e25e97ffb5aba6bb7e9fbddb4c2b2018d25092b341af430a80c6051db1e35a9d93d5ee8f97760006053ed30f4d58

diff --git a/app-text/dictd/dictd-1.13.3.ebuild 
b/app-text/dictd/dictd-1.13.3.ebuild
new file mode 100644
index 000000000000..fd0a58fc38eb
--- /dev/null
+++ b/app-text/dictd/dictd-1.13.3.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools optfeature readme.gentoo-r1 systemd
+
+DESCRIPTION="Dictionary Client/Server for the DICT protocol"
+HOMEPAGE="https://www.dict.org/ https://sourceforge.net/projects/dict/";
+SRC_URI="https://downloads.sourceforge.net/dict/${P}.tar.gz";
+
+LICENSE="GPL-1+ GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 
~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="dbi judy minimal selinux test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       acct-group/dictd
+       acct-user/dictd
+       dev-libs/libmaa:=
+       sys-apps/coreutils
+       sys-libs/zlib
+       selinux? ( sec-policy/selinux-dictd )
+"
+DEPEND="${RDEPEND}
+       dbi? ( dev-db/libdbi )
+       judy? ( dev-libs/judy )
+"
+BDEPEND="
+       app-alternatives/lex
+       app-alternatives/yacc
+       sys-apps/gawk
+"
+
+DOC_CONTENTS="
+       To start and use ${PN} you need to emerge at least one dictionary from
+       the app-dicts category with the package name starting with 'dictd-'.
+       ${PN} will NOT start without at least one dictionary.\n
+       \nIf you are running systemd, you will need to review the instructions
+       explained in /etc/dict/dictd.conf comments.
+"
+
+PATCHES=(
+       "${FILESDIR}"/dictd-1.10.11-colorit-nopp-fix.patch
+       "${FILESDIR}"/dictd-1.12.0-build.patch
+       "${FILESDIR}"/dictd-1.13.0-stack-smashing.patch # bug #908998
+       "${FILESDIR}"/dictd-1.13.3-debian_fix_warnings.patch
+       "${FILESDIR}"/dictd-1.13.3-libtool.patch # bug #818535
+       "${FILESDIR}"/dictd-1.13.3-version.patch # bug #852884
+       "${FILESDIR}"/dictd-1.13.3-rm_replace_strlfuncs.patch # bug #880531
+)
+
+src_prepare() {
+       default
+
+       eautoreconf
+}
+
+src_configure() {
+       local myeconfargs=(
+               $(use_with dbi plugin-dbi)
+               $(use_with judy plugin-judy)
+               --libexecdir="${EPREFIX}"/usr/$(get_libdir)/${PN}
+               --sysconfdir="${EPREFIX}"/etc/dict
+       )
+       econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+       # -j1 for bug #743292
+       if use minimal; then
+               emake -j1 dictfmt dictzip dictzip
+       else
+               emake -j1
+       fi
+}
+
+src_test() {
+       use minimal && return 0 # All tests are for dictd which we don't 
build...
+
+       if [[ ${EUID} -eq 0 ]]; then
+               # If dictd is run as root user (-userpriv) it drops its 
privileges to
+               # dictd user and group. Give dictd group write access to test 
directory.
+               chown :dictd "${WORKDIR}" "${S}/test" || die
+               chmod 770 "${WORKDIR}" "${S}/test" || die
+       fi
+
+       emake -j1 test
+}
+
+src_install() {
+       if use minimal; then
+               emake -j1 DESTDIR="${ED}" install.dictzip install.dict 
install.dictfmt
+       else
+               default
+
+               # Don't install rfc2229.txt because it is non-free
+               dodoc doc/{dicf.ms,rfc.ms,rfc.sh}
+               dodoc doc/{security.doc,toc.ms}
+               dodoc -r examples
+
+               # conf files. For dict.conf see below.
+               insinto /etc/dict
+               for f in dictd.conf site.info colorit.conf; do
+                       doins "${FILESDIR}/1.10.11/${f}"
+               done
+
+               # startups for dictd
+               newinitd "${FILESDIR}/1.10.11/dictd.initd" dictd
+               newconfd "${FILESDIR}/1.10.11/dictd.confd" dictd
+               systemd_dounit "${FILESDIR}"/${PN}.service
+       fi
+
+       find "${ED}" -name '*.la' -o -name '*.a' -delete || die
+
+       insinto /etc/dict
+       doins "${FILESDIR}"/1.10.11/dict.conf
+
+       dodoc ANNOUNCE NEWS README TODO
+
+       readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+       readme.gentoo_print_elog
+
+       optfeature "character set conversions (dictl)"  app-text/recode
+
+       if has_version sys-apps/systemd; then
+               ewarn "The default location for dicts has changed! If you've 
modified your"
+               ewarn "systemd units locally to point into /usr/lib/dict, 
please update it"
+               ewarn "to point at /usr/share/dict now."
+       fi
+}

diff --git a/app-text/dictd/files/dictd-1.13.3-debian_fix_warnings.patch 
b/app-text/dictd/files/dictd-1.13.3-debian_fix_warnings.patch
new file mode 100644
index 000000000000..bef11e2c5f7b
--- /dev/null
+++ b/app-text/dictd/files/dictd-1.13.3-debian_fix_warnings.patch
@@ -0,0 +1,306 @@
+Debian patches :
+13-Fix-compiler-warnings (adapted because lex-fix is merged)
+17-fix-some-gcc-8-warnings
+
+From: Robert Luberda <[email protected]>
+Date: Sat, 23 Jun 2018 22:39:26 +0200
+Subject: Fix some of gcc-8 warnings
+
+---
+ dict.c    |  8 ++++----
+ dictd.c   | 28 ++++++++++++++++------------
+ dictfmt.c |  6 ++++--
+ lev.h     |  4 ++--
+ 4 files changed, 26 insertions(+), 20 deletions(-)
+
+diff --git a/dict.c b/dict.c
+index 5321c9c..9ef5192 100644
+--- a/dict.c
++++ b/dict.c
+@@ -1239,7 +1239,7 @@ static const char *client_get_banner( void )
+    uname( &uts );
+    buffer = xmalloc(256);
+    snprintf( buffer, 256,
+-           "%s %s/rf on %s %s", err_program_name (), id_string (),
++           "%s %.50s/rf on %s %s", err_program_name (), id_string (),
+            uts.sysname, uts.release );
+    return buffer;
+ }
+@@ -1330,7 +1330,7 @@ int main( int argc, char **argv )
+    const char         *word       = NULL;
+    int                doauth      = 1;
+    int                docorrect   = 1;
+-   int                offset      = 0;
++   /*int                offset      = 0;*/
+    int                i;
+    enum { DEFINE = 0x0001,
+         MATCH  = 0x0002,
+@@ -1526,11 +1526,11 @@ int main( int argc, char **argv )
+           case 5: *p = '\0'; word = cpy(s);            ++state; s=p+1; break;
+           case 6: *p = '\0'; database = cpy(s);        ++state; s=p+1; break;
+           case 7: *p = '\0';
+-             if (function == DEFINE) offset = atoi(s);
++             if (function == DEFINE) /*offset = atoi(s)*/;
+              else                    strategy = cpy(s);
+                                                        ++state; s=p+1; break;
+           case 8: *p = '\0';
+-             if (function == MATCH) offset = atoi(s); ++state; s=p+1; break;
++             if (function == MATCH) { /*offset = atoi(s)*/; ++state; s=p+1; 
break; }
+                               /* FALLTHROUGH */
+           default:
+              PRINTF(DBG_URL,("State = %d, s = %s\n",state,s));
+diff --git a/dictd.c b/dictd.c
+index 3073ace..954a6cc 100644
+--- a/dictd.c
++++ b/dictd.c
+@@ -333,6 +333,7 @@ static void xsigprocmask (int how, const sigset_t *set, 
sigset_t *oset)
+    }
+ }
+ 
++#if 0
+ static void block_signals (void)
+ {
+    sigset_t set;
+@@ -343,6 +344,7 @@ static void block_signals (void)
+ 
+    xsigprocmask (SIG_BLOCK, &set, NULL);
+ }
++#endif
+ 
+ static void unblock_signals (void)
+ {
+@@ -1154,12 +1156,12 @@ const char *dict_get_banner( int shortFlag )
+    shortBuffer = xmalloc(256);
+    snprintf(
+       shortBuffer, 256,
+-      "%s %s", err_program_name(), id_string () );
++      "%s %.50s", err_program_name(), id_string () );
+ 
+    longBuffer = xmalloc(256);
+    snprintf(
+       longBuffer, 256,
+-      "%s %s/rf on %s %s", err_program_name(), id_string (),
++      "%s %.50s/rf on %s %s", err_program_name(), id_string (),
+       uts.sysname,
+       uts.release );
+ 
+@@ -1258,6 +1260,8 @@ void set_minimal( void )
+    flg_set("-min");
+ }
+ 
++#define CHECK_SYSCALL(x) do { if ((x) < 0) { perror(#x); exit(1); }} while (0)
++
+ static void release_root_privileges( void )
+ /* At the spring 1999 Linux Expo in Raleigh, Rik Faith told me that he
+  * did not want dictd to be allowed to run as root for any reason.
+@@ -1272,17 +1276,17 @@ static void release_root_privileges( void )
+       struct passwd *pwd;
+ 
+       if ((pwd = getpwnam("dictd"))) {
+-         setgid(pwd->pw_gid);
++         CHECK_SYSCALL(setgid(pwd->pw_gid));
+          initgroups("dictd",pwd->pw_gid);
+-         setuid(pwd->pw_uid);
++         CHECK_SYSCALL(setuid(pwd->pw_uid));
+       } else if ((pwd = getpwnam("nobody"))) {
+-         setgid(pwd->pw_gid);
++         CHECK_SYSCALL(setgid(pwd->pw_gid));
+          initgroups("nobody",pwd->pw_gid);
+-         setuid(pwd->pw_uid);
++         CHECK_SYSCALL(setuid(pwd->pw_uid));
+       } else {
+-         setgid(GID_NOGROUP);
++         CHECK_SYSCALL(setgid(GID_NOGROUP));
+          initgroups("nobody", GID_NOGROUP);
+-         setuid(UID_NOBODY);
++         CHECK_SYSCALL(setuid(UID_NOBODY));
+       }
+    }
+ }
+@@ -1473,9 +1477,9 @@ static void reopen_012 (void)
+    close (1);
+    close (2);
+ 
+-   dup (fd);
+-   dup (fd);
+-   dup (fd);
++   CHECK_SYSCALL(dup (fd));
++   CHECK_SYSCALL(dup (fd));
++   CHECK_SYSCALL(dup (fd));
+ }
+ 
+ int main (int argc, char **argv, char **envp)
+@@ -1713,7 +1717,7 @@ int main (int argc, char **argv, char **envp)
+ 
+    if (detach){
+       /* become a daemon */
+-      daemon (0, 1);
++      CHECK_SYSCALL(daemon (0, 1));
+       reopen_012 ();
+ 
+       /* after fork from daemon(3) */
+diff --git a/dictfmt.c b/dictfmt.c
+index b8b7aa9..1cff05e 100644
+--- a/dictfmt.c
++++ b/dictfmt.c
+@@ -1136,6 +1136,8 @@ static int xatoi (const char *nptr)
+    return (int) ret;
+ }
+ 
++#define CHECK_LIBCALL(x) do { if ((x) == NULL) { fprintf(stderr, #x " 
failed\n"); exit(1); }} while (0)
++
+ int main( int argc, char **argv )
+ {
+    int        c;
+@@ -1500,8 +1502,8 @@ int main( int argc, char **argv )
+           buf++;
+        } else if (strncmp(buffer, "_____",5) == 0) {
+           buf = (unsigned char *) buffer;
+-          fgets (buffer,BSIZE-1,stdin); /* empty line */
+-          fgets (buffer,BSIZE-1,stdin);
++          CHECK_LIBCALL(fgets (buffer,BSIZE-1,stdin)); /* empty line */
++          CHECK_LIBCALL(fgets (buffer,BSIZE-1,stdin));
+           if (strlen(buffer))
+              buffer[strlen(buffer)-1] = '\0'; /* remove newline */
+ 
+diff --git a/lev.h b/lev.h
+index 249272d..d2a86d4 100644
+--- a/lev.h
++++ b/lev.h
+@@ -118,7 +118,7 @@ static int dict_search_lev_utf8 (
+    mbstate_t ps;
+    int       count = 0;
+    const char *pt;
+-   dictWord   *datum;
++   /*dictWord   *datum;*/
+ 
+    const char *p;
+    char *d;
+@@ -127,7 +127,7 @@ static int dict_search_lev_utf8 (
+    size_t i;
+    set_Set    s    = set_create (NULL,NULL);
+ 
+-   LEV_VARS
++   /*LEV_VARS*/
+ 
+    assert (alphabet);
+ 
+From: Robert Luberda <[email protected]>
+Date: Sun, 21 Aug 2016 13:16:39 +0200
+Subject: Fix some of compiler warnings
+
+---
+ daemon.c      | 18 +++++++++---------
+ dictd.c       |  2 ++
+ dictzip.c     |  2 --
+ md5.c         |  2 +-
+ parse.c       |  4 ++--
+ servparse.y   |  3 +++
+
+diff --git a/daemon.c b/daemon.c
+index d63e753..445c8c6 100644
+--- a/daemon.c
++++ b/daemon.c
+@@ -131,23 +131,23 @@ static void daemon_log( int type, const char *format, 
... )
+ 
+    switch (type) {
+    case DICT_LOG_TERM:
+-      if (!flg_test(LOG_STATS))    return; marker = 'I'; break;
++      if (!flg_test(LOG_STATS))    { return; } marker = 'I'; break;
+    case DICT_LOG_TRACE:
+-      if (!flg_test(LOG_SERVER))   return; marker = 'I'; break;
++      if (!flg_test(LOG_SERVER))   { return; } marker = 'I'; break;
+    case DICT_LOG_CLIENT:
+-      if (!flg_test(LOG_CLIENT))   return; marker = 'C'; break;
++      if (!flg_test(LOG_CLIENT))   { return; } marker = 'C'; break;
+    case DICT_LOG_CONNECT:
+-      if (!flg_test(LOG_CONNECT))  return; marker = 'K'; break;
++      if (!flg_test(LOG_CONNECT))  { return; } marker = 'K'; break;
+    case DICT_LOG_DEFINE:
+-      if (!flg_test(LOG_FOUND))    return; marker = 'D'; break;
++      if (!flg_test(LOG_FOUND))    { return; } marker = 'D'; break;
+    case DICT_LOG_MATCH:
+-      if (!flg_test(LOG_FOUND))    return; marker = 'M'; break;
++      if (!flg_test(LOG_FOUND))    { return; } marker = 'M'; break;
+    case DICT_LOG_NOMATCH:
+-      if (!flg_test(LOG_NOTFOUND)) return; marker = 'N'; break;
++      if (!flg_test(LOG_NOTFOUND)) { return; } marker = 'N'; break;
+    case DICT_LOG_COMMAND:
+-      if (!flg_test(LOG_COMMAND))  return; marker = 'T'; break;
++      if (!flg_test(LOG_COMMAND))  { return; } marker = 'T'; break;
+    case DICT_LOG_AUTH:
+-      if (!flg_test(LOG_AUTH))     return; marker = 'A'; break;
++      if (!flg_test(LOG_AUTH))     { return; } marker = 'A'; break;
+    }
+ 
+    if (dbg_test(DBG_PORT))
+diff --git a/dictd.c b/dictd.c
+index fe27e42..3073ace 100644
+--- a/dictd.c
++++ b/dictd.c
+@@ -318,6 +318,7 @@ static void reload_config (void)
+    dict_init_databases (DictConfig);
+ }
+ 
++/*
+ static void xsigaddset (sigset_t *set, int signo)
+ {
+    if (sigaddset (set, signo)){
+@@ -353,6 +354,7 @@ static void unblock_signals (void)
+ 
+    xsigprocmask (SIG_UNBLOCK, &set, NULL);
+ }
++*/
+ 
+ static void handler( int sig )
+ {
+diff --git a/dictzip.c b/dictzip.c
+index f917407..970eff8 100644
+--- a/dictzip.c
++++ b/dictzip.c
+@@ -336,10 +336,8 @@ int dict_data_zip( const char *inFilename, const char 
*outFilename,
+ static const char *id_string (void)
+ {
+    static char buffer[BUFFERSIZE];
+-   char        *pt;
+ 
+    snprintf( buffer, BUFFERSIZE, "%s", DICT_VERSION );
+-   pt = buffer + strlen( buffer );
+ 
+    return buffer;
+ }
+diff --git a/md5.c b/md5.c
+index 8d1accf..7f2a7ff 100644
+--- a/md5.c
++++ b/md5.c
+@@ -145,7 +145,7 @@ void MD5Final(unsigned char digest[16], struct MD5Context 
*ctx)
+     MD5Transform(ctx->buf, (uint32 *) ctx->in);
+     byteReverse((unsigned char *) ctx->buf, 4);
+     memcpy(digest, ctx->buf, 16);
+-    memset(ctx, 0, sizeof(ctx));      /* In case it's sensitive */
++    memset(ctx, 0, sizeof(*ctx));     /* In case it's sensitive */
+ }
+ 
+ #ifndef ASM_MD5
+diff --git a/parse.c b/parse.c
+index 1cdaf91..b6d1099 100644
+--- a/parse.c
++++ b/parse.c
+@@ -95,7 +95,7 @@ void prs_file( const char *filename )
+                                  "/usr/ccs/lib/cpp",  /* Solaris */
+                                  "/usr/lang/cpp",
+                                  0 };
+-   static const char *extra_options = "";
++   /*static const char *extra_options = "";*/
+    FILE              *tmp;
+    
+    if (!filename)
+@@ -116,7 +116,7 @@ void prs_file( const char *filename )
+             if ((t = strchr( buf, '\n' ))) *t = '\0';
+             PRINTF(MAA_PARSE,("%s: Using GNU cpp from %s\n", __func__, buf));
+             cpp = str_find( buf );
+-            extra_options = "-nostdinc -nostdinc++";
++            /*extra_options = "-nostdinc -nostdinc++";*/
+          }
+          pclose( tmp );
+       }

diff --git a/app-text/dictd/files/dictd-1.13.3-libtool.patch 
b/app-text/dictd/files/dictd-1.13.3-libtool.patch
new file mode 100644
index 000000000000..46fcf4497f45
--- /dev/null
+++ b/app-text/dictd/files/dictd-1.13.3-libtool.patch
@@ -0,0 +1,67 @@
+https://bugs.gentoo.org/818535
+
+From: orbea <[email protected]>
+Date: Fri, 17 Jun 2022 16:18:40 -0700
+Subject: [PATCH] configure: Add missing LT_INIT
+
+Rebased for 1.13.3 (rename configure.{in,ac})
+
+diff --git a/Makefile.in b/Makefile.in
+index bcd23a8..4470ea9 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -28,6 +28,7 @@ endif
+ 
+ .SUFFIXES:    
+ 
++top_builddir= @top_builddir@
+ srcdir=               @srcdir@
+ VPATH=                @srcdir@:.
+ prefix=               @prefix@
+diff --git a/configure.ac b/configure.ac
+index f727770..51078a5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -35,6 +35,8 @@ AC_INIT([dict],[VERSION],[[email protected]])
+ AC_CONFIG_SRCDIR([dictd.c])
+ AC_CONFIG_HEADERS([config.h])
+ 
++LT_INIT
++
+ echo Configuring for dict
+ echo .
+ 
+@@ -70,13 +72,10 @@ echo Checking for programs
+ 
+ AC_PROG_AWK
+ AC_PROG_INSTALL
+-AC_PROG_RANLIB
+ AC_PROG_MAKE_SET
+ AC_PROG_YACC
+ AC_PROG_LEX(yywrap)
+ 
+-AC_CHECK_PROG(LIBTOOL,libtool,libtool)
+-
+ AC_CHECK_PROGS(NROFF,gnroff nroff)
+ AC_CHECK_PROGS(TROFF,groff troff)
+ AC_CHECK_PROGS(COL,col cat)
+@@ -187,7 +186,6 @@ AC_SUBST(DICT_VERSION)
+ AC_SUBST(USE_PLUGIN)
+ AC_SUBST(EXEEXT)
+ AC_SUBST(allsubdirs)
+-AC_SUBST(LIBTOOL)
+ 
+ AC_SUBST(PLUGINS)
+ 
+diff --git a/doc/Makefile.in b/doc/Makefile.in
+index 233cc9f..3ee0853 100644
+--- a/doc/Makefile.in
++++ b/doc/Makefile.in
+@@ -28,6 +28,7 @@ endif
+ 
+ .SUFFIXES:    
+ 
++top_builddir= @top_builddir@
+ srcdir=               @srcdir@
+ VPATH=                @srcdir@
+ prefix=               @prefix@

diff --git a/app-text/dictd/files/dictd-1.13.3-rm_replace_strlfuncs.patch 
b/app-text/dictd/files/dictd-1.13.3-rm_replace_strlfuncs.patch
new file mode 100644
index 000000000000..16fe23c3dfaa
--- /dev/null
+++ b/app-text/dictd/files/dictd-1.13.3-rm_replace_strlfuncs.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/880531
+Let’s assume that strlcat and strlcpy are declared in string.h
+It avoids a failure while checking
+diff --git a/configure.ac b/configure.ac
+index f727770..a57d048 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -166,8 +166,6 @@ AC_LIBOBJ([iswalnum])
+ AC_LIBOBJ([towlower])
+ #     AC_LIBOBJ([wcwidth])
+ 
+-AC_REPLACE_FUNCS(strlcpy strlcat)
+-
+ echo .
+ echo Making output files
+ 
+diff --git a/dictP.h b/dictP.h
+index 198cce7..fa8ed25 100644
+--- a/dictP.h
++++ b/dictP.h
+@@ -85,14 +85,6 @@ extern wint_t towlower__ (wint_t wc);
+ 
+ #include <wchar.h>
+ 
+-#if !HAVE_STRLCPY
+-extern size_t strlcpy (char *s, const char * wc, size_t size);
+-#endif
+-
+-#if !HAVE_STRLCAT
+-size_t strlcat(char *dst, const char *src, size_t siz);
+-#endif
+-
+ #if !HAVE_WCRTOMB
+ extern size_t wcrtomb__ (char *s, wchar_t wc, mbstate_t *ps);
+ #else

diff --git a/app-text/dictd/files/dictd-1.13.3-version.patch 
b/app-text/dictd/files/dictd-1.13.3-version.patch
new file mode 100644
index 000000000000..6edf35e0c93c
--- /dev/null
+++ b/app-text/dictd/files/dictd-1.13.3-version.patch
@@ -0,0 +1,45 @@
+https://github.com/cheusov/dictd/pull/27.patch
+https://bugs.gentoo.org/852884
+From 8b5259d0e9c9c7572586dcb95973837bea960127 Mon Sep 17 00:00:00 2001
+From: Nicolas PARLANT <[email protected]>
+Date: Thu, 10 Jul 2025 15:35:44 +0200
+Subject: [PATCH] Avoid conflict with libtool VERSION
+
+define(VERSION) in configure.ac conflicts with VERSION from libtool.
+
+Use anything else, here PKG_VERSION.
+
+Signed-off-by: Nicolas PARLANT <[email protected]>
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f727770..3aaa882 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -24,13 +24,13 @@ dnl             for optimization and stripping.
+ dnl     LIBOBJS is an automatically-generated list of extra objects we need
+ 
+ 
+-define(VERSION, 1.13.3)
++define(PKG_VERSION, 1.13.3)
+ 
+ 
+ AC_PREREQ([2.72])
+ AC_REVISION($Revision: 1.144 $)
+ 
+-AC_INIT([dict],[VERSION],[[email protected]])
++AC_INIT([dict],[PKG_VERSION],[[email protected]])
+ 
+ AC_CONFIG_SRCDIR([dictd.c])
+ AC_CONFIG_HEADERS([config.h])
+@@ -38,7 +38,7 @@ AC_CONFIG_HEADERS([config.h])
+ echo Configuring for dict
+ echo .
+ 
+-DICT_VERSION=VERSION
++DICT_VERSION=PKG_VERSION
+ 
+ AC_CANONICAL_HOST
+ 

Reply via email to