commit: b254a022187b08785482cdbf7b573f022143261c Author: NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com> AuthorDate: Sat Feb 15 17:32:44 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Feb 15 20:55:29 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b254a022
games-board/gnushogi: update EAPI 7 -> 8, fix build errors Massages Makefile.in into fail-early form, fixes generated parser by adding missing function declarations. Closes: https://bugs.gentoo.org/932280 Closes: https://bugs.gentoo.org/930372 Closes: https://bugs.gentoo.org/883893 Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com> Closes: https://github.com/gentoo/gentoo/pull/40586 Signed-off-by: Sam James <sam <AT> gentoo.org> .../gnushogi/files/gnushogi-1.4.1-makefile.patch | 72 ++++++++++++++++++++++ .../files/gnushogi-1.4.1-xshogi-parser.patch | 25 ++++++++ ...gi-1.4.1-r1.ebuild => gnushogi-1.4.1-r2.ebuild} | 21 +++---- 3 files changed, 104 insertions(+), 14 deletions(-) diff --git a/games-board/gnushogi/files/gnushogi-1.4.1-makefile.patch b/games-board/gnushogi/files/gnushogi-1.4.1-makefile.patch new file mode 100644 index 000000000000..e6b046ba7dd3 --- /dev/null +++ b/games-board/gnushogi/files/gnushogi-1.4.1-makefile.patch @@ -0,0 +1,72 @@ +Fix for the build system. +Allows propagating errors upwards, replaces sometimes dubious +if well-meaning seds from ebuild +--- a/Makefile.in ++++ b/Makefile.in +@@ -44,19 +44,19 @@ + # + + gnushogi_compile: +- -cd $(GNUSHOGIDIR) && $(MAKE) $(PROGNAME) ++ $(MAKE) -C $(GNUSHOGIDIR) $(PROGNAME) + + pat2inc: +- -cd $(GNUSHOGIDIR) && $(MAKE) pat2inc ++ $(MAKE) -C $(GNUSHOGIDIR) pat2inc + + sizetest: +- -cd $(GNUSHOGIDIR) && $(MAKE) sizetest ++ $(MAKE) -C $(GNUSHOGIDIR) sizetest + + xshogi_compile: +- -cd $(XSHOGIDIR) && $(MAKE) ++ $(MAKE) -C $(XSHOGIDIR) + +-bbk: ++bbk: gnushogi_compile pat2inc sizetest +- -cd $(GNUSHOGIDIR) && $(MAKE) $(PROGNAME).bbk ++ $(MAKE) -C $(GNUSHOGIDIR) $(PROGNAME).bbk + + + # +@@ -73,10 +73,10 @@ + install: gnushogi_install @XSHOGIINSTALL@ + + gnushogi_install: +- -cd $(GNUSHOGIDIR) && $(MAKE) install ++ $(MAKE) -C $(GNUSHOGIDIR) install + + xshogi_install: $(XSHOGIDIR)/xshogi +- -cd $(XSHOGIDIR) && $(MAKE) install ++ $(MAKE) -C $(XSHOGIDIR) install + + + +@@ -87,13 +87,13 @@ + clean: gnushogi_clean @XSHOGICLEAN@ doc_clean + + gnushogi_clean: +- cd $(GNUSHOGIDIR) && $(MAKE) clean ++ $(MAKE) -C $(GNUSHOGIDIR) clean + + xshogi_clean: +- cd $(XSHOGIDIR) && $(MAKE) clean ++ $(MAKE) -C $(XSHOGIDIR) clean + + doc_clean: +- cd $(BUILDROOT)/doc && $(MAKE) clean ++ $(MAKE) -C $(BUILDROOT)/doc clean + + + # +--- a/gnushogi/Makefile.in ++++ b//gnushogi/Makefile.in +@@ -51,7 +51,7 @@ + + # Where the language description, the book, and the + # persistent hashtable live. +-LIBDIR = $(prefix)/lib/$(PROGNAME) ++LIBDIR = @libdir@ + + # Where the man page goes. + MANDIR = $(prefix)/man/man6 diff --git a/games-board/gnushogi/files/gnushogi-1.4.1-xshogi-parser.patch b/games-board/gnushogi/files/gnushogi-1.4.1-xshogi-parser.patch new file mode 100644 index 000000000000..3b1f865bb5a7 --- /dev/null +++ b/games-board/gnushogi/files/gnushogi-1.4.1-xshogi-parser.patch @@ -0,0 +1,25 @@ +Fix compilation with modern C: add correct function declarations +https://bugs.gentoo.org/883893 +https://bugs.gentoo.org/930372 +https://bugs.gentoo.org/932280 +--- a/xshogi/parser.y ++++ b/xshogi/parser.y +@@ -70,7 +70,9 @@ + + enum { False, True }; + +-static void yyerror(); ++static void yyerror(char *); ++extern int yyparse (void); ++extern int yylex (void); + + static ShogiMove move_type; + static int from_x, from_y, to_x, to_y; +@@ -88,6 +90,7 @@ + extern void SendToProgram(char *message, FILE *fp); + extern void MakeMove(ShogiMove *move_type, int from_x, int from_y, + int to_x, int to_y); ++extern void DisplayMessage(char *message, int toRemotePlayer); + + %} + diff --git a/games-board/gnushogi/gnushogi-1.4.1-r1.ebuild b/games-board/gnushogi/gnushogi-1.4.1-r2.ebuild similarity index 72% rename from games-board/gnushogi/gnushogi-1.4.1-r1.ebuild rename to games-board/gnushogi/gnushogi-1.4.1-r2.ebuild index dbee91130b0c..4e53dacb0b22 100644 --- a/games-board/gnushogi/gnushogi-1.4.1-r1.ebuild +++ b/games-board/gnushogi/gnushogi-1.4.1-r2.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit desktop @@ -22,18 +22,11 @@ BDEPEND=" >=sys-devel/bison-1.34 app-alternatives/lex" -PATCHES=( "${FILESDIR}"/${PN}-1.4.1-fno-common.patch ) - -src_prepare() { - default - - sed -i \ - -e '/^bbk:/s/$/ gnushogi_compile pat2inc sizetest/' \ - Makefile.in || die - sed -i \ - -e "/^LIBDIR/s:=.*:=\"$(get_libdir)\":" \ - gnushogi/Makefile.in || die -} +PATCHES=( + "${FILESDIR}"/"${P}-fno-common.patch" + "${FILESDIR}"/"${P}-makefile.patch" + "${FILESDIR}"/"${P}-xshogi-parser.patch" +) src_configure() { econf \
