diff --git a/srcpkgs/gnushogi/patches/gcc-10-globals.patch b/srcpkgs/gnushogi/patches/gcc-10-globals.patch new file mode 100644 index 0000000000..f173bfcc60 --- /dev/null +++ b/srcpkgs/gnushogi/patches/gcc-10-globals.patch @@ -0,0 +1,86 @@ +Patch from https://salsa.debian.org/debian/gnushogi/-/commit/ae9ff5c5d4a047e895030add12cc0e75480026b5 + +Index: gnushogi-1.4.2/gnushogi/commondsp.c +=================================================================== +--- gnushogi-1.4.2.orig/gnushogi/commondsp.c ++++ gnushogi-1.4.2/gnushogi/commondsp.c +@@ -53,6 +53,7 @@ char mvstr[4][6]; + char *InPtr; + int InBackground = false; + ++unsigned short MV[MAXDEPTH]; + + #if defined(BOOKTEST) + +@@ -2034,7 +2035,7 @@ InputCommand(char *command) + { + int i; + +- printf(" %6d ", MSCORE); ++ printf(" %6d ", 0); + + for (i = 1; MV[i] > 0; i++) + { +Index: gnushogi-1.4.2/gnushogi/cursesdsp.c +=================================================================== +--- gnushogi-1.4.2.orig/gnushogi/cursesdsp.c ++++ gnushogi-1.4.2/gnushogi/cursesdsp.c +@@ -62,18 +62,12 @@ + + #define FLUSH_SCANW fflush(stdout), scanw + +-int mycnt1, mycnt2; +- + #define MARGIN (5) + #define TAB (58) + + #define VIR_C(s) ((flag.reverse) ? (NO_COLS - 1 - column(s)) : column(s)) + #define VIR_R(s) ((flag.reverse) ? (NO_ROWS - 1 - row(s)) : row(s)) + +-unsigned short MV[MAXDEPTH]; +-int MSCORE; +-char *DRAW; +- + /* Forward declarations. */ + /* FIXME: change this name, puh-leeze! */ + +Index: gnushogi-1.4.2/gnushogi/globals.c +=================================================================== +--- gnushogi-1.4.2.orig/gnushogi/globals.c ++++ gnushogi-1.4.2/gnushogi/globals.c +@@ -201,3 +201,6 @@ char *DRAW; + char *DRAW_REPETITION = "Repetition"; + char *DRAW_MAXMOVES = "Max Moves"; + char *DRAW_JUSTDRAW = "Drawn game!"; ++ ++int mycnt1, mycnt2; ++ +Index: gnushogi-1.4.2/gnushogi/gnushogi.h +=================================================================== +--- gnushogi-1.4.2.orig/gnushogi/gnushogi.h ++++ gnushogi-1.4.2/gnushogi/gnushogi.h +@@ -685,8 +685,6 @@ extern long znodes; + extern char ColorStr[2][10]; + + extern char mvstr[4][6]; +-extern unsigned short MV[MAXDEPTH]; +-extern int MSCORE; + extern int mycnt1, mycnt2; + extern short ahead; + extern struct leaf rootnode; +Index: gnushogi-1.4.2/gnushogi/rawdsp.c +=================================================================== +--- gnushogi-1.4.2.orig/gnushogi/rawdsp.c ++++ gnushogi-1.4.2/gnushogi/rawdsp.c +@@ -44,11 +44,6 @@ + #include "gnushogi.h" + #include "rawdsp.h" + +-unsigned short MV[MAXDEPTH]; +-int MSCORE; +- +-int mycnt1, mycnt2; +-char *DRAW; + extern char *InPtr; + extern short pscore[]; + diff --git a/srcpkgs/gnushogi/template b/srcpkgs/gnushogi/template new file mode 100644 index 0000000000..c3f29d9c40 --- /dev/null +++ b/srcpkgs/gnushogi/template @@ -0,0 +1,20 @@ +# Template file for 'gnushogi' +pkgname=gnushogi +version=1.4.2 +revision=1 +build_style=gnu-configure +short_desc="GNU Shogi (Japanese chess)" +maintainer="Leah Neukirchen " +license="GPL-3.0-or-later" +homepage="https://www.gnu.org/software/gnushogi/" +distfiles="${GNU_SITE}/gnushogi/${pkgname}-${version}.tar.gz" +checksum=1ecc48a866303c63652552b325d685e7ef5e9893244080291a61d96505d52b29 +disable_parallel_build=yes +nocross=yes + +do_install() { + make -C gnushogi prefix=${DESTDIR}/usr install + vmkdir usr/share + mv ${DESTDIR}/usr/man ${DESTDIR}/usr/share/man + mv ${DESTDIR}/usr/info ${DESTDIR}/usr/share/info +}