public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-arcade/tomatoes/, games-arcade/tomatoes/files/
@ 2021-04-07  9:14 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2021-04-07  9:14 UTC (permalink / raw
  To: gentoo-commits

commit:     9e5dfc090362bd7c5ea3c05d789e85446ef69fe1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  7 09:13:27 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Apr  7 09:13:27 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e5dfc09

games-arcade/tomatoes: port to EAPI 7, games.eclass--, respect CXX

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../tomatoes/files/tomatoes-1.55-c_str.patch       |  4 +-
 .../tomatoes/files/tomatoes-1.55-gcc43.patch       |  4 +-
 .../tomatoes/files/tomatoes-1.55-underlink.patch   |  4 +-
 games-arcade/tomatoes/tomatoes-1.55-r2.ebuild      | 62 ------------------
 games-arcade/tomatoes/tomatoes-1.55-r3.ebuild      | 75 ++++++++++++++++++++++
 5 files changed, 81 insertions(+), 68 deletions(-)

diff --git a/games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch b/games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch
index dd6927e5415..f001179a837 100644
--- a/games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch
+++ b/games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch
@@ -1,5 +1,5 @@
---- src/config.cpp.orig	2004-09-27 11:35:48.000000000 +0200
-+++ src/config.cpp	2006-02-13 00:00:01.000000000 +0100
+--- a/src/config.cpp
++++ b/src/config.cpp
 @@ -78,6 +78,7 @@
  // makefile.
  char *get_config_location(bool write) {

diff --git a/games-arcade/tomatoes/files/tomatoes-1.55-gcc43.patch b/games-arcade/tomatoes/files/tomatoes-1.55-gcc43.patch
index cd85e31e593..95bf7ba6edd 100644
--- a/games-arcade/tomatoes/files/tomatoes-1.55-gcc43.patch
+++ b/games-arcade/tomatoes/files/tomatoes-1.55-gcc43.patch
@@ -1,5 +1,5 @@
---- src/config.cpp
-+++ src/config.cpp
+--- a/src/config.cpp
++++ b/src/config.cpp
 @@ -27,8 +27,9 @@
  
  *************************************************************************/

diff --git a/games-arcade/tomatoes/files/tomatoes-1.55-underlink.patch b/games-arcade/tomatoes/files/tomatoes-1.55-underlink.patch
index c028c79ba4a..bc7763bf492 100644
--- a/games-arcade/tomatoes/files/tomatoes-1.55-underlink.patch
+++ b/games-arcade/tomatoes/files/tomatoes-1.55-underlink.patch
@@ -1,5 +1,5 @@
---- makefile.old	2011-06-18 17:35:38.947020335 +0200
-+++ makefile	2011-06-18 17:37:42.337811088 +0200
+--- a/makefile
++++ b/makefile
 @@ -48,7 +47,7 @@
  LDFLAGS = `sdl-config --libs` -lSDL_image -lSDL_mixer -lGL -lGLU -pg
  else

diff --git a/games-arcade/tomatoes/tomatoes-1.55-r2.ebuild b/games-arcade/tomatoes/tomatoes-1.55-r2.ebuild
deleted file mode 100644
index dd5658f861b..00000000000
--- a/games-arcade/tomatoes/tomatoes-1.55-r2.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit eutils games
-
-DATA_PV=1.5
-DESCRIPTION="How many tomatoes can you smash in ten short minutes?"
-HOMEPAGE="http://tomatoes.sourceforge.net/about.html"
-SRC_URI="mirror://sourceforge/tomatoes/tomatoes-linux-src-${PV}.tar.bz2
-	mirror://sourceforge/tomatoes/tomatoes-linux-${DATA_PV}.tar.bz2"
-
-LICENSE="ZLIB"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc64 ~x86"
-IUSE=""
-
-DEPEND="virtual/opengl
-	virtual/glu
-	media-libs/libsdl[sound,video]
-	media-libs/sdl-image[jpeg,png]
-	media-libs/sdl-mixer[mod]"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
-	mv ../tomatoes-1.5/* . || die "mv failed"
-	mv icon.png ${PN}.png
-
-	epatch \
-		"${FILESDIR}"/${P}-c_str.patch \
-		"${FILESDIR}"/${P}-underlink.patch \
-		"${FILESDIR}"/${P}-gcc43.patch
-
-	sed -i \
-		-e "/^MPKDIR = /s:./:${GAMES_DATADIR}/${PN}/:" \
-		-e "/^MUSICDIR = /s:./music/:${GAMES_DATADIR}/${PN}/music/:" \
-		-e "/^HISCOREDIR = /s:./:${GAMES_STATEDIR}/${PN}/:" \
-		-e "/^CONFIGDIR = /s:./:${GAMES_SYSCONFDIR}/${PN}/:" \
-		-e "/^OVERRIDEDIR = /s:./data/:${GAMES_DATADIR}/${PN}/data/:" \
-		makefile \
-		|| die "sed failed"
-}
-
-src_install() {
-	dogamesbin tomatoes
-	dodoc README README-src
-
-	insinto "${GAMES_DATADIR}"/${PN}
-	doins -r tomatoes.mpk music
-
-	doicon ${PN}.png
-	make_desktop_entry tomatoes "I Have No Tomatoes"
-
-	dodir "${GAMES_STATEDIR}"/${PN}
-	touch "${D}${GAMES_STATEDIR}"/${PN}/hiscore.lst || die "touch failed"
-	fperms 660 "${GAMES_STATEDIR}"/${PN}/hiscore.lst
-
-	insinto "${GAMES_SYSCONFDIR}"/${PN}
-	doins config.cfg
-
-	prepgamesdirs
-}

diff --git a/games-arcade/tomatoes/tomatoes-1.55-r3.ebuild b/games-arcade/tomatoes/tomatoes-1.55-r3.ebuild
new file mode 100644
index 00000000000..088f0a4563b
--- /dev/null
+++ b/games-arcade/tomatoes/tomatoes-1.55-r3.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop toolchain-funcs
+
+DATA_PV=1.5
+DESCRIPTION="How many tomatoes can you smash in ten short minutes?"
+HOMEPAGE="http://tomatoes.sourceforge.net/about.html"
+SRC_URI="mirror://sourceforge/tomatoes/tomatoes-linux-src-${PV}.tar.bz2
+	mirror://sourceforge/tomatoes/tomatoes-linux-${DATA_PV}.tar.bz2"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+
+DEPEND="
+	media-libs/libsdl[sound,video]
+	media-libs/sdl-image[jpeg,png]
+	media-libs/sdl-mixer[mod]
+	virtual/opengl
+	virtual/glu
+"
+RDEPEND="
+	${DEPEND}
+	acct-group/gamestat
+"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-c_str.patch
+	"${FILESDIR}"/${P}-underlink.patch
+	"${FILESDIR}"/${P}-gcc43.patch
+)
+
+src_prepare() {
+	default
+
+	mv ../tomatoes-1.5/* . || die "mv failed"
+	mv icon.png ${PN}.png || die
+
+	sed -i \
+		-e "/^MPKDIR = /s:./:/usr/share/${PN}/:" \
+		-e "/^MUSICDIR = /s:./music/:/usr/share/${PN}/music/:" \
+		-e "/^HISCOREDIR = /s:./:/var/games/${PN}/:" \
+		-e "/^CONFIGDIR = /s:./:/etc/${PN}/:" \
+		-e "/^OVERRIDEDIR = /s:./data/:/usr/share/${PN}/data/:" \
+		makefile \
+		|| die "sed failed"
+}
+
+src_configure() {
+	tc-export CXX
+}
+
+src_install() {
+	dobin tomatoes
+	dodoc README README-src
+
+	insinto /usr/share/${PN}
+	doins -r tomatoes.mpk music
+
+	doicon ${PN}.png
+	make_desktop_entry tomatoes "I Have No Tomatoes"
+
+	dodir /var/games/${PN}
+	touch "${ED}"/var/games/${PN}/hiscore.lst || die "touch failed"
+
+	fperms 660 /var/games/${PN}/hiscore.lst
+	fowners -R root:gamestat /var/games/${PN}
+	fperms g+s /usr/bin/${PN}
+
+	insinto /etc/${PN}
+	doins config.cfg
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-07  9:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-07  9:14 [gentoo-commits] repo/gentoo:master commit in: games-arcade/tomatoes/, games-arcade/tomatoes/files/ Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox