summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-board/gnugo')
-rw-r--r--games-board/gnugo/files/gnugo-3.9.1-autotools.patch10
-rw-r--r--games-board/gnugo/files/gnugo-3.9.1-fno-common.patch25
-rw-r--r--games-board/gnugo/gnugo-3.9.1-r1.ebuild33
-rw-r--r--games-board/gnugo/gnugo-3.9.1-r2.ebuild19
-rw-r--r--games-board/gnugo/metadata.xml2
5 files changed, 50 insertions, 39 deletions
diff --git a/games-board/gnugo/files/gnugo-3.9.1-autotools.patch b/games-board/gnugo/files/gnugo-3.9.1-autotools.patch
new file mode 100644
index 000000000000..79e28fa9b7bf
--- /dev/null
+++ b/games-board/gnugo/files/gnugo-3.9.1-autotools.patch
@@ -0,0 +1,10 @@
+--- a/configure.in
++++ b/configure.in
+@@ -151,6 +151,7 @@
+
+ AC_PROG_CPP
+ AC_PROG_RANLIB
++AM_PROG_AR
+
+ dnl required since we use SUBDIRS in Makefile.am
+ AC_PROG_MAKE_SET
diff --git a/games-board/gnugo/files/gnugo-3.9.1-fno-common.patch b/games-board/gnugo/files/gnugo-3.9.1-fno-common.patch
new file mode 100644
index 000000000000..db8215ecf90f
--- /dev/null
+++ b/games-board/gnugo/files/gnugo-3.9.1-fno-common.patch
@@ -0,0 +1,25 @@
+--- a/engine/globals.c
++++ b/engine/globals.c
+@@ -136,6 +136,9 @@
+ * move generation is enabled.
+ */
+
++int meaningless_white_moves[BOARDMAX];
++int meaningless_black_moves[BOARDMAX];
++
+ float best_move_values[10];
+ int best_moves[10];
+ float white_score;
+--- a/engine/liberty.h
++++ b/engine/liberty.h
+@@ -859,8 +859,8 @@
+ extern struct worm_data worm[BOARDMAX];
+
+ /* Unconditionally meaningless moves. */
+-int meaningless_black_moves[BOARDMAX];
+-int meaningless_white_moves[BOARDMAX];
++extern int meaningless_black_moves[BOARDMAX];
++extern int meaningless_white_moves[BOARDMAX];
+
+ /* Surround cache (see surround.c) */
+
diff --git a/games-board/gnugo/gnugo-3.9.1-r1.ebuild b/games-board/gnugo/gnugo-3.9.1-r1.ebuild
deleted file mode 100644
index aba4225ac342..000000000000
--- a/games-board/gnugo/gnugo-3.9.1-r1.ebuild
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit eutils games
-
-DESCRIPTION="A Go-playing program"
-HOMEPAGE="https://www.gnu.org/software/gnugo/devel.html"
-SRC_URI="mirror://gentoo/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="amd64 ~arm ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos"
-IUSE="readline"
-
-DEPEND="readline? ( sys-libs/readline:0= )
- >=sys-libs/ncurses-5.2-r3:0="
-RDEPEND=${DEPEND}
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}-invalid-move.patch
-}
-
-src_configure() {
- egamesconf \
- $(use_with readline) \
- --enable-cache-size=32
-}
-
-src_install() {
- default
- prepgamesdirs
-}
diff --git a/games-board/gnugo/gnugo-3.9.1-r2.ebuild b/games-board/gnugo/gnugo-3.9.1-r2.ebuild
index cfcbcca0fbbb..20cca3ae0945 100644
--- a/games-board/gnugo/gnugo-3.9.1-r2.ebuild
+++ b/games-board/gnugo/gnugo-3.9.1-r2.ebuild
@@ -1,7 +1,9 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
+
+inherit autotools
DESCRIPTION="A Go-playing program"
HOMEPAGE="https://www.gnu.org/software/gnugo/devel.html"
@@ -9,20 +11,27 @@ SRC_URI="mirror://gentoo/${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="amd64 ~arm arm64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos"
+KEYWORDS="amd64 ~arm arm64 ~loong ppc64 ~riscv x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="readline"
RDEPEND="
readline? ( sys-libs/readline:0= )
- >=sys-libs/ncurses-5.2-r3:0=
-"
+ >=sys-libs/ncurses-5.2-r3:0="
DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${P}-invalid-move.patch
"${FILESDIR}"/${P}-format-security.patch
+ "${FILESDIR}"/${P}-autotools.patch
+ "${FILESDIR}"/${P}-fno-common.patch
)
+src_prepare() {
+ default
+ mv configure.{in,ac} || die
+ eautoreconf
+}
+
src_configure() {
econf \
$(use_with readline) \
diff --git a/games-board/gnugo/metadata.xml b/games-board/gnugo/metadata.xml
index 78274e0fa550..1c3ba213c494 100644
--- a/games-board/gnugo/metadata.xml
+++ b/games-board/gnugo/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>games@gentoo.org</email>