games-puzzle/braincurses: Stop using games.eclass
authorPacho Ramos <pacho@gentoo.org>
Sat, 14 Apr 2018 21:40:05 +0000 (23:40 +0200)
committerPacho Ramos <pacho@gentoo.org>
Sat, 14 Apr 2018 21:40:05 +0000 (23:40 +0200)
Package-Manager: Portage-2.3.28, Repoman-2.3.9

games-puzzle/braincurses/braincurses-0.5b-r1.ebuild [new file with mode: 0644]
games-puzzle/braincurses/files/braincurses-0.5b-as-needed.patch
games-puzzle/braincurses/files/braincurses-0.5b-gcc43.patch

diff --git a/games-puzzle/braincurses/braincurses-0.5b-r1.ebuild b/games-puzzle/braincurses/braincurses-0.5b-r1.ebuild
new file mode 100644 (file)
index 0000000..609bfa2
--- /dev/null
@@ -0,0 +1,34 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="An ncurses-based mastermind clone"
+HOMEPAGE="http://freshmeat.net/projects/braincurses/"
+SRC_URI="mirror://sourceforge/braincurses/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_prepare() {
+       default
+
+       eapply "${FILESDIR}"/${P}-gcc43.patch \
+               "${FILESDIR}"/${P}-as-needed.patch
+
+       # fix buffer overflow (bug #301033)
+       sed -i \
+               -e 's/guessLabel\[2/guessLabel[3/' \
+               curses/windows.cpp \
+               || die 'sed failed'
+}
+
+src_install() {
+       dobin braincurses
+       einstalldocs
+}
index d1f36152403f29c2418185f07ce7155cb901e05a..2101602c63727bdb8c14827bca042f8b77d34c9a 100644 (file)
@@ -1,5 +1,5 @@
---- Makefile.old       2009-02-09 16:04:47.000000000 +0100
-+++ Makefile   2009-02-09 16:14:41.000000000 +0100
+--- a/Makefile.old     2009-02-09 16:04:47.000000000 +0100
++++ b/Makefile 2009-02-09 16:14:41.000000000 +0100
 @@ -1,22 +1,9 @@
  # Makefile for braincurses game
  # written by Brian Derr
index eafa39e4b9b848638ec9b9780580b78afec98292..6fa5509a7786bcecadfe34447398da5f50ebd0da 100644 (file)
@@ -1,5 +1,5 @@
---- braincurses.h
-+++ braincurses.h
+--- a/braincurses.h
++++ b/braincurses.h
 @@ -12,6 +12,7 @@
  #include <cstddef>
  #include <cstdlib>