gnugo: fix compilation error due to duplicate symbols

-fcommon works around issue for cross-compilation, but with ubuntu
21.10 issue happens for hostbuild as well. Fix core issue instead
having to change hostbuild flags as well.
This commit is contained in:
Henrik Grimler 2022-02-08 07:52:31 +01:00
parent 3b57cf86ea
commit e491b059f5
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
2 changed files with 27 additions and 5 deletions

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Program that plays the game of Go"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=3.8
TERMUX_PKG_REVISION=4
TERMUX_PKG_REVISION=5
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/gnugo/gnugo-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=da68d7a65f44dcf6ce6e4e630b6f6dd9897249d34425920bfdd4e07ff1866a72
TERMUX_PKG_DEPENDS="ncurses, readline"
@ -11,10 +11,6 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-readline"
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_GROUPS="games"
termux_step_pre_configure() {
CFLAGS+=" -Wno-overflow -fcommon"
}
termux_step_post_configure () {
cp $TERMUX_PKG_HOSTBUILD_DIR/patterns/mkeyes $TERMUX_PKG_BUILDDIR/patterns/mkeyes
cp $TERMUX_PKG_HOSTBUILD_DIR/patterns/uncompress_fuseki $TERMUX_PKG_BUILDDIR/patterns/uncompress_fuseki

View File

@ -0,0 +1,26 @@
--- ../unconditional.c.orig 2022-02-08 06:47:33.832807668 +0000
+++ ./engine/unconditional.c 2022-02-08 06:47:59.759417274 +0000
@@ -29,6 +29,10 @@
#include "liberty.h"
+/* Unconditionally meaningless moves. */
+int meaningless_black_moves[BOARDMAX];
+int meaningless_white_moves[BOARDMAX];
+
/* Capture as many strings of the given color as we can. Played stones
* are left on the board and the number of played stones is returned.
* Strings marked in the exceptions array are excluded from capturing
--- ../liberty.h.orig 2022-02-08 06:41:21.633651516 +0000
+++ ./engine/liberty.h 2022-02-08 06:47:51.259435972 +0000
@@ -856,10 +856,6 @@
extern struct worm_data worm[BOARDMAX];
-/* Unconditionally meaningless moves. */
-int meaningless_black_moves[BOARDMAX];
-int meaningless_white_moves[BOARDMAX];
-
/* Surround cache (see surround.c) */
#define MAX_SURROUND 10