From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- games-board/gnugo/Manifest | 6 +++ .../gnugo/files/gnugo-3.9.1-format-security.patch | 60 ++++++++++++++++++++++ .../gnugo/files/gnugo-3.9.1-invalid-move.patch | 21 ++++++++ games-board/gnugo/gnugo-3.9.1-r1.ebuild | 33 ++++++++++++ games-board/gnugo/gnugo-3.9.1-r2.ebuild | 30 +++++++++++ games-board/gnugo/metadata.xml | 8 +++ 6 files changed, 158 insertions(+) create mode 100644 games-board/gnugo/Manifest create mode 100644 games-board/gnugo/files/gnugo-3.9.1-format-security.patch create mode 100644 games-board/gnugo/files/gnugo-3.9.1-invalid-move.patch create mode 100644 games-board/gnugo/gnugo-3.9.1-r1.ebuild create mode 100644 games-board/gnugo/gnugo-3.9.1-r2.ebuild create mode 100644 games-board/gnugo/metadata.xml (limited to 'games-board/gnugo') diff --git a/games-board/gnugo/Manifest b/games-board/gnugo/Manifest new file mode 100644 index 000000000000..6af0f6bff655 --- /dev/null +++ b/games-board/gnugo/Manifest @@ -0,0 +1,6 @@ +AUX gnugo-3.9.1-format-security.patch 1943 BLAKE2B 2dd1c6f7b69da62baac53336e1b017136b16392b85a343aeb41d47fd10f5464a98eee1c8383e31531b21f72456a037bf72fb206752818f2fb39939d46bccb35a SHA512 5d53c53173980c9e73ce1f19c5c5e9228308cb00a61a623e942a3cc8598b73cc188ef24fda0b44feddcf0f381dbebdccf85716a187de730a9bb6412d1f9d61a7 +AUX gnugo-3.9.1-invalid-move.patch 727 BLAKE2B 5c5a13e3b00175627a45a4ef1d32b4a3dc049114281219ec70a22985c2deb027938b2e4ee1c0a58c1da8759800fdd9f98d6bb4981405f51af6269e0a01dedb74 SHA512 a1f20761e714670e2173b36390492304252bf30e46f93e37dee3cc72de346a59a8daaaaa6f0cf2e20834637598831f0f55d4c6c0825021d6fd00055a57db2bdb +DIST gnugo-3.9.1.tar.gz 3207748 BLAKE2B 4251e125eac20188926210db8640f1ae4ff2b79f6a59b429af9e10fcfd6b0d34f9bf180b32194c519a7b59905a4b5e8bc1a2e45a071a8b8696bf16dd04f6a342 SHA512 b2b215fb8c1ebb0b58e54d14dcc02af3b76bde3a1b84a842a11a0a6018c77a2464c44b26fe0e7ad73b2b2e7fa22005466821bf762108c2c2e04428d3d459af97 +EBUILD gnugo-3.9.1-r1.ebuild 662 BLAKE2B 48296b632f9c05b031b7550e76af9a25217e21c7503a17f65fd859b4170ef8436251fa8ec911278cf4c469c5544f41c79975a197612c0938169211a89554de73 SHA512 287f9f4e6b7a7daa14cbfa7efe45d8f784c08fd4805a1b6f249e269156d9320a9d490ae1204a7c7bf52881e4bfd3b9e4982b3428a73f1cbae2f4db45f452fc58 +EBUILD gnugo-3.9.1-r2.ebuild 628 BLAKE2B 2e8947dbf827d1c757764f3aac8d269f5bc33082c2b1a3bd2a04a410d8f15c8ceea9ea8b914f65be8135c2acc9907da5e4bb796a6007e07206ddba6352b79970 SHA512 5d960b3058ec6289cac727d7549f78e9320e9bd0ea524f9306a0105169568393aa58e6d8d8960124115585e26d6bc8c1b638878ece3481f84ce2df11aeaba81c +MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 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 +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-r1.ebuild b/games-board/gnugo/gnugo-3.9.1-r1.ebuild new file mode 100644 index 000000000000..aba4225ac342 --- /dev/null +++ b/games-board/gnugo/gnugo-3.9.1-r1.ebuild @@ -0,0 +1,33 @@ +# 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 new file mode 100644 index 000000000000..64afb5b85e90 --- /dev/null +++ b/games-board/gnugo/gnugo-3.9.1-r2.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +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" + +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 +) + +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..78274e0fa550 --- /dev/null +++ b/games-board/gnugo/metadata.xml @@ -0,0 +1,8 @@ + + + + + games@gentoo.org + Gentoo Games Project + + -- cgit v1.2.3