diff options
| author | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
|---|---|---|
| committer | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
| commit | ecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch) | |
| tree | b89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /games-board/gnugo | |
| parent | 1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff) | |
| download | baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip | |
Updating liguros repo
Diffstat (limited to 'games-board/gnugo')
| -rw-r--r-- | games-board/gnugo/Manifest | 1 | ||||
| -rw-r--r-- | games-board/gnugo/files/gnugo-3.9.1-autotools.patch | 10 | ||||
| -rw-r--r-- | games-board/gnugo/files/gnugo-3.9.1-fno-common.patch | 25 | ||||
| -rw-r--r-- | games-board/gnugo/files/gnugo-3.9.1-format-security.patch | 60 | ||||
| -rw-r--r-- | games-board/gnugo/files/gnugo-3.9.1-invalid-move.patch | 21 | ||||
| -rw-r--r-- | games-board/gnugo/gnugo-3.9.1-r2.ebuild | 39 | ||||
| -rw-r--r-- | games-board/gnugo/metadata.xml | 9 |
7 files changed, 165 insertions, 0 deletions
diff --git a/games-board/gnugo/Manifest b/games-board/gnugo/Manifest new file mode 100644 index 000000000000..591dbd081820 --- /dev/null +++ b/games-board/gnugo/Manifest @@ -0,0 +1 @@ +DIST gnugo-3.9.1.tar.gz 3207748 BLAKE2B 4251e125eac20188926210db8640f1ae4ff2b79f6a59b429af9e10fcfd6b0d34f9bf180b32194c519a7b59905a4b5e8bc1a2e45a071a8b8696bf16dd04f6a342 SHA512 b2b215fb8c1ebb0b58e54d14dcc02af3b76bde3a1b84a842a11a0a6018c77a2464c44b26fe0e7ad73b2b2e7fa22005466821bf762108c2c2e04428d3d459af97 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/files/gnugo-3.9.1-format-security.patch b/games-board/gnugo/files/gnugo-3.9.1-format-security.patch new file mode 100644 index 000000000000..7828187c571d --- /dev/null +++ b/games-board/gnugo/files/gnugo-3.9.1-format-security.patch @@ -0,0 +1,60 @@ +diff --git a/patterns/dfa.c b/patterns/dfa.c +index 3689616..2d2f8c6 100644 +--- a/patterns/dfa.c ++++ b/patterns/dfa.c +@@ -279,7 +279,7 @@ resize_dfa(dfa_t *pdfa, int max_states, int max_indexes) + * dump a dfa (debugging purpose). + */ + +-static const char *line = ++static const char line[] = + "----------------------------------------------------\n"; + + void +diff --git a/patterns/mkpat.c b/patterns/mkpat.c +index 70a6964..5f1f1dd 100644 +--- a/patterns/mkpat.c ++++ b/patterns/mkpat.c +@@ -1419,7 +1419,7 @@ generate_autohelper_code(int funcno, int number_of_params, int *labels) + /* A common case. Just use the labels as parameters. */ + switch (number_of_params) { + case 0: +- code_pos += sprintf(code_pos, autohelper_functions[funcno].code); ++ code_pos += sprintf(code_pos, "%s", autohelper_functions[funcno].code); + break; + case 1: + code_pos += sprintf(code_pos, autohelper_functions[funcno].code, +diff --git a/patterns/uncompress_fuseki.c b/patterns/uncompress_fuseki.c +index 3290b05..c67a733 100644 +--- a/patterns/uncompress_fuseki.c ++++ b/patterns/uncompress_fuseki.c +@@ -224,9 +224,9 @@ main(int argc, char *argv[]) + + assert(boardsize > 0); + if (boardsize > MAX_BOARD) { +- printf(output_strings[PREAMBLE]); ++ printf("%s", output_strings[PREAMBLE]); + printf(output_strings[HEADER], boardsize); +- printf(output_strings[FOOTER]); ++ printf("%s", output_strings[FOOTER]); + return EXIT_SUCCESS; + } + +@@ -251,7 +251,7 @@ main(int argc, char *argv[]) + board[k][boardsize + 1] = '|'; + } + +- printf(output_strings[PREAMBLE]); ++ printf("%s", output_strings[PREAMBLE]); + printf(output_strings[HEADER], boardsize); + + +@@ -308,7 +308,7 @@ main(int argc, char *argv[]) + if (mode == C_OUTPUT) + write_pattern_c_code(NULL, board1d, NO_MOVE, 0, boardsize, -1); + +- printf(output_strings[FOOTER]); ++ printf("%s", output_strings[FOOTER]); + + return EXIT_SUCCESS; + } diff --git a/games-board/gnugo/files/gnugo-3.9.1-invalid-move.patch b/games-board/gnugo/files/gnugo-3.9.1-invalid-move.patch new file mode 100644 index 000000000000..1da388a043b5 --- /dev/null +++ b/games-board/gnugo/files/gnugo-3.9.1-invalid-move.patch @@ -0,0 +1,21 @@ +From 84a32e9cee2a70c0ec6ef58c1be279fed84a9a53 Mon Sep 17 00:00:00 2001 +From: Gunnar Farnebäck <gunnar@lysator.liu.se> +Date: Thu, 13 Jun 2013 18:45:03 +0000 +Subject: Avoid crashing due to registering an invalid loss move reason. + +--- +diff --git a/engine/value_moves.c b/engine/value_moves.c +index e9f2daa..7ec8fdd 100644 +--- a/engine/value_moves.c ++++ b/engine/value_moves.c +@@ -383,7 +383,7 @@ do_find_more_owl_attack_and_defense_moves(int color, int pos, + int dcode = owl_does_defend(pos, dd, &kworm); + + if (dcode >= DRAGON2(dd).owl_defense_code) { +- if (dcode == LOSS) ++ if (dcode == LOSS && kworm != NO_MOVE) + add_loss_move(pos, dd, kworm); + else + add_owl_defense_move(pos, dd, dcode); +-- +cgit v0.9.0.2 diff --git a/games-board/gnugo/gnugo-3.9.1-r2.ebuild b/games-board/gnugo/gnugo-3.9.1-r2.ebuild new file mode 100644 index 000000000000..b0bf4b8a8278 --- /dev/null +++ b/games-board/gnugo/gnugo-3.9.1-r2.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +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 arm64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="readline" + +RDEPEND=" + readline? ( sys-libs/readline: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) \ + --enable-cache-size=32 +} diff --git a/games-board/gnugo/metadata.xml b/games-board/gnugo/metadata.xml new file mode 100644 index 000000000000..972e3be0ecc4 --- /dev/null +++ b/games-board/gnugo/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>games@gentoo.org</email> + <name>Gentoo Games Project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> |
