games-puzzle/tong: Stop using games.eclass
authorPacho Ramos <pacho@gentoo.org>
Tue, 1 May 2018 14:37:52 +0000 (16:37 +0200)
committerPacho Ramos <pacho@gentoo.org>
Tue, 1 May 2018 19:34:33 +0000 (21:34 +0200)
Package-Manager: Portage-2.3.31, Repoman-2.3.9

games-puzzle/tong/files/tong-1.2-datadir.patch
games-puzzle/tong/files/tong-1.2-fps.patch
games-puzzle/tong/files/tong-1.2-makefile.patch
games-puzzle/tong/tong-1.2-r1.ebuild [new file with mode: 0644]

index d0279ac3b874c6db1159661c2e32002fe8bb52d8..92a8bb4c18a1458bc2e7dc9876d65e525818c654 100644 (file)
@@ -1,5 +1,5 @@
---- tong.cpp.orig
-+++ tong.cpp
+--- a/tong.cpp.orig
++++ b/tong.cpp
 @@ -202,7 +202,6 @@
        Tetrad *tetrad, *nexttetrad;
        Paddle *paddle;
index 8ce66ebf1d31b41765737463e68eb07bbf9394ef..86566646b8d61a1a7ee629fec67a16428aa2242b 100644 (file)
@@ -1,5 +1,5 @@
---- tong.cpp.orig
-+++ tong.cpp
+--- a/tong.cpp.orig
++++ b/tong.cpp
 @@ -64,6 +64,8 @@
  
  #define DEMO_TIME           8000
index 68b4547d94277912887ca451e04efe71305af647..ad9b283f47857a94f402ad5e86605a42add57436 100644 (file)
@@ -1,5 +1,5 @@
---- Makefile.orig
-+++ Makefile
+--- a/Makefile.orig
++++ b/Makefile
 @@ -1,11 +1,10 @@
  # TONG! makefile, tweak as you see fit
  
diff --git a/games-puzzle/tong/tong-1.2-r1.ebuild b/games-puzzle/tong/tong-1.2-r1.ebuild
new file mode 100644 (file)
index 0000000..a16067f
--- /dev/null
@@ -0,0 +1,44 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop
+
+DESCRIPTION="Tetris and Pong in the same place at the same time"
+HOMEPAGE="http://www.nongnu.org/tong/"
+SRC_URI="http://www.nongnu.org/tong/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="media-libs/libsdl[sound,joystick,video]
+       media-libs/sdl-image[png]
+       media-libs/sdl-mixer[vorbis]"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+       default
+       eapply \
+               "${FILESDIR}/${P}-makefile.patch" \
+               "${FILESDIR}/${P}-fps.patch" \
+               "${FILESDIR}/${P}-datadir.patch"
+       sed -i \
+               -e "s:\"media/:\"/usr/share/${PN}/media/:" \
+               media.cpp option.cpp option.h pong.cpp tetris.cpp text.cpp \
+               || die
+       cp media/icon.png "${T}/${PN}.png" || die
+}
+
+src_install() {
+       dobin tong
+       dodir "/usr/share/${PN}"
+       cp -r media/ "${ED}/usr/share/${PN}" || die
+       dodoc CHANGELOG README making-of.txt CREDITS
+
+       make_desktop_entry tong TONG
+       doicon "${T}/${PN}.png"
+}