games-arcade/conveysdl: Stop using games.eclass
authorPacho Ramos <pacho@gentoo.org>
Sun, 15 Apr 2018 18:37:25 +0000 (20:37 +0200)
committerPacho Ramos <pacho@gentoo.org>
Sun, 15 Apr 2018 19:00:21 +0000 (21:00 +0200)
Package-Manager: Portage-2.3.28, Repoman-2.3.9

games-arcade/conveysdl/conveysdl-1.3-r1.ebuild [new file with mode: 0644]
games-arcade/conveysdl/files/conveysdl-1.3-arrays.patch
games-arcade/conveysdl/files/conveysdl-1.3-speed.patch

diff --git a/games-arcade/conveysdl/conveysdl-1.3-r1.ebuild b/games-arcade/conveysdl/conveysdl-1.3-r1.ebuild
new file mode 100644 (file)
index 0000000..5c39dd3
--- /dev/null
@@ -0,0 +1,55 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop toolchain-funcs
+
+DESCRIPTION="Guide the blob along the conveyer belt collecting the red blobs"
+HOMEPAGE="http://www.cloudsprinter.com/software/conveysdl/"
+SRC_URI="http://www.cloudsprinter.com/software/conveysdl/${P/-/.}.tar"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND="media-libs/libsdl[sound,video]
+       media-libs/sdl-mixer"
+RDEPEND=${DEPEND}
+
+S="${WORKDIR}"
+
+src_prepare() {
+       default
+
+       # Incomplete readme
+       sed -i \
+               -e 's:I k:use -nosound to disable sound\n\nI k:' \
+               readme || die
+
+       sed -i \
+               -e 's:SDL_Mi:SDL_mi:' \
+               main.c || die
+
+       eapply \
+               "${FILESDIR}"/${P}-arrays.patch \
+               "${FILESDIR}"/${P}-speed.patch
+}
+
+src_compile() {
+       emake main \
+               CC="$(tc-getCC)" \
+               CFLAGS="${CFLAGS} $(sdl-config --cflags) \
+                       -DDATA_PREFIX=\\\"/usr/share/${PN}/\\\" \
+                       -DENABLE_SOUND" \
+               LDLIBS="-lSDL_mixer $(sdl-config --libs)"
+}
+
+src_install() {
+       newbin main ${PN}
+       insinto /usr/share/${PN}
+       doins -r gfx sounds levels
+       newicon gfx/jblob.bmp ${PN}.bmp
+       make_desktop_entry ${PN} Convey /usr/share/pixmaps/${PN}.bmp
+       einstalldocs
+}
index a3894e58d3d355285f7aff0bff32c1dfb1299eb5..a6286d96f1456eb88df7a24f416196f311cc29c9 100644 (file)
@@ -1,5 +1,5 @@
---- main.c.org 2010-07-28 13:16:20.552161148 +0300
-+++ main.c     2010-07-29 20:43:14.714543259 +0300
+--- a/main.c.org       2010-07-28 13:16:20.552161148 +0300
++++ b/main.c   2010-07-29 20:43:14.714543259 +0300
 @@ -22,7 +22,7 @@
  
  SDL_Surface *bletters;
index 2b5a6205650cd8ab03305a608fbbc811f91a2018..6d6d13eb11be4cdddc5c48d838218a0bd987d267 100644 (file)
@@ -1,5 +1,5 @@
---- org/main.c 2010-07-30 10:41:21.392783010 +0300
-+++ main.c     2010-07-30 10:44:35.791690958 +0300
+--- a/main.c   2010-07-30 10:41:21.392783010 +0300
++++ b/main.c   2010-07-30 10:44:35.791690958 +0300
 @@ -52,6 +52,7 @@