commit:     250d1561d16a33a249f1a8bcc8d2b34492df7c84
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  4 10:11:25 2026 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Feb  4 10:13:57 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=250d1561

app-text/diction: fix compilation on non-glibc platforms

some weird fallback for non-glibc platforms defined getenv without
argument, but getenv really needs an argument, so defining it without is
not going to work with recent compilers

this fixes compilation on musl, macOS, Solaris, etc.

Closes: https://bugs.gentoo.org/969099
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 app-text/diction/diction-1.14.ebuild             |  7 ++++---
 app-text/diction/files/diction-1.14-getenv.patch | 16 ++++++++++++++++
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/app-text/diction/diction-1.14.ebuild 
b/app-text/diction/diction-1.14.ebuild
index 99a1a64520f1..9dbfc57fe8e5 100644
--- a/app-text/diction/diction-1.14.ebuild
+++ b/app-text/diction/diction-1.14.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI="8"
 
 DESCRIPTION="Diction and style checkers for english and german texts"
 HOMEPAGE="https://www.gnu.org/software/diction/diction.html";
@@ -9,7 +9,7 @@ SRC_URI="http://www.moria.de/~michael/${PN}/${P}.tar.gz";
 
 LICENSE="GPL-3"
 SLOT="0"
-KEYWORDS="amd64 ~hppa ~mips ppc ~sparc x86 ~x64-macos"
+KEYWORDS="amd64 ~hppa ~mips ppc ~sparc x86 ~arm64-macos ~x64-macos"
 
 DEPEND="
        sys-devel/gettext
@@ -17,5 +17,6 @@ DEPEND="
 "
 PATCHES=(
        "${FILESDIR}"/${PN}-1.13-make.patch
+       "${FILESDIR}"/${PN}-1.14-getenv.patch
 )
 DOCS=( NEWS README )

diff --git a/app-text/diction/files/diction-1.14-getenv.patch 
b/app-text/diction/files/diction-1.14-getenv.patch
new file mode 100644
index 000000000000..4d2cf79accd4
--- /dev/null
+++ b/app-text/diction/files/diction-1.14-getenv.patch
@@ -0,0 +1,16 @@
+get correct getenv prototype instead of cooking one up that's not going
+to be useless with recent compilers
+
+--- a/getopt.c
++++ b/getopt.c
+@@ -143,9 +143,7 @@
+ /* Avoid depending on library functions or files
+    whose names are inconsistent.  */
+ 
+-#ifndef getenv
+-extern char *getenv ();
+-#endif
++#include <stdlib.h>
+ 
+ #endif /* not __GNU_LIBRARY__ */
+ 

Reply via email to