games-arcade/sdb: Stop using games.eclass
authorPacho Ramos <pacho@gentoo.org>
Tue, 24 Apr 2018 17:18:54 +0000 (19:18 +0200)
committerPacho Ramos <pacho@gentoo.org>
Tue, 24 Apr 2018 19:25:54 +0000 (21:25 +0200)
Package-Manager: Portage-2.3.31, Repoman-2.3.9

games-arcade/sdb/files/sdb-1.0.2-gcc43.patch
games-arcade/sdb/files/sdb-1.0.2-ldflags.patch
games-arcade/sdb/sdb-1.0.2-r1.ebuild [new file with mode: 0644]

index db32209339ad974447e29589ac20169d1ded1b08..731ce7df3b520eb4c1969ce56ac2d636bd2ac50b 100644 (file)
@@ -1,5 +1,5 @@
---- src/sdb.h
-+++ src/sdb.h
+--- a/src/sdb.h
++++ b/src/sdb.h
 @@ -35,6 +35,7 @@
  #include <vector>
  #include <fstream>
index 6b071e2daf54aa4bf018427a5e8171bf088f1d8f..653fb814f4c08cd5137295e43970bdb43ef9b75e 100644 (file)
@@ -1,5 +1,5 @@
---- src/Makefile.old   2010-09-21 10:30:41.000000000 +0200
-+++ src/Makefile       2010-09-21 10:30:58.000000000 +0200
+--- a/src/Makefile.old 2010-09-21 10:30:41.000000000 +0200
++++ b/src/Makefile     2010-09-21 10:30:58.000000000 +0200
 @@ -40,7 +40,7 @@
        rm -f $(OBJ) $(BIN)
  
diff --git a/games-arcade/sdb/sdb-1.0.2-r1.ebuild b/games-arcade/sdb/sdb-1.0.2-r1.ebuild
new file mode 100644 (file)
index 0000000..155c5d3
--- /dev/null
@@ -0,0 +1,49 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop
+
+DESCRIPTION="A 2D top-down action game; escape a facility full of walking death machines"
+HOMEPAGE="http://sdb.gamecreation.org/"
+SRC_URI="http://gcsociety.sp.cs.cmu.edu/~frenzy/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="virtual/opengl
+       media-libs/libsdl
+       media-libs/sdl-image[png]
+       media-libs/sdl-mixer"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+       default
+       sed -i \
+               -e "s:models/:/usr/share/${PN}/models/:" \
+               -e "s:snd/:/usr/share/${PN}/snd/:" \
+               -e "s:sprites/:/usr/share/${PN}/sprites/:" \
+               -e "s:levels/:/usr/share/${PN}/levels/:" \
+               src/sdb.h src/game.cpp || die "setting game paths"
+       eapply \
+               "${FILESDIR}"/${P}-endian.patch \
+               "${FILESDIR}"/${P}-gcc43.patch \
+               "${FILESDIR}"/${P}-ldflags.patch
+}
+
+src_compile() {
+       emake \
+               -C src \
+               CXXFLAGS="${CXXFLAGS} $(sdl-config --cflags)"
+}
+
+src_install() {
+       dobin src/sdb
+       insinto /usr/share/${PN}
+       doins -r levels models snd sprites
+       newicon sprites/barrel.png ${PN}.png
+       make_desktop_entry sdb "Shotgun Debugger"
+       einstalldocs
+}