commit:     73452e0414cee2f4328569d9fda921a3934c036a
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Sun Apr 27 22:45:46 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 27 23:01:37 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73452e04

net-news/yydecode: fix build with gcc 15

Closes: https://bugs.gentoo.org/944985
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Part-of: https://github.com/gentoo/gentoo/pull/41802
Closes: https://github.com/gentoo/gentoo/pull/41802
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../yydecode/files/yydecode-0.2.10-gcc15.patch     | 12 +++++++
 net-news/yydecode/yydecode-0.2.10-r4.ebuild        | 37 ++++++++++++++++++++++
 2 files changed, 49 insertions(+)

diff --git a/net-news/yydecode/files/yydecode-0.2.10-gcc15.patch 
b/net-news/yydecode/files/yydecode-0.2.10-gcc15.patch
new file mode 100644
index 000000000000..b22bbad38467
--- /dev/null
+++ b/net-news/yydecode/files/yydecode-0.2.10-gcc15.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/944985
+
+--- a/src/error.c
++++ b/src/error.c
+@@ -56,7 +56,6 @@ void exit ();
+ extern char *program_name;
+ 
+ #ifdef HAVE_STRERROR
+-char *strerror ();
+ #else
+ extern char *sys_errlist[];
+ extern int sys_nerr;

diff --git a/net-news/yydecode/yydecode-0.2.10-r4.ebuild 
b/net-news/yydecode/yydecode-0.2.10-r4.ebuild
new file mode 100644
index 000000000000..ac0028c2de29
--- /dev/null
+++ b/net-news/yydecode/yydecode-0.2.10-r4.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="A decoder for yENC format, popular on Usenet"
+HOMEPAGE="https://yydecode.sourceforge.net/";
+SRC_URI="https://downloads.sourceforge.net/yydecode/${P}.tar.gz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~sparc ~x86"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.2.10-fix-strcmp-not-found.patch
+       "${FILESDIR}"/${PN}-0.2.10-gcc15.patch
+)
+
+src_prepare() {
+       default
+
+       # https://bugs.gentoo.org/277307
+       sed -e "s/t3.sh//" -e "s/t7.sh//" -i checks/Makefile.in 
checks/Makefile.am || die
+
+       eautoreconf
+}
+
+src_configure() {
+       # -Werror=lto-type-mismatch
+       # https://bugs.gentoo.org/898078
+       #
+       # Upstream has been dead since 2003. No bug reported.
+       filter-lto
+       default
+}

Reply via email to