summaryrefslogtreecommitdiff
path: root/games-arcade/methane
diff options
context:
space:
mode:
Diffstat (limited to 'games-arcade/methane')
-rw-r--r--games-arcade/methane/Manifest1
-rw-r--r--games-arcade/methane/files/methane-1.5.1-gentoo.patch62
-rw-r--r--games-arcade/methane/metadata.xml8
-rw-r--r--games-arcade/methane/methane-1.5.1.ebuild43
4 files changed, 114 insertions, 0 deletions
diff --git a/games-arcade/methane/Manifest b/games-arcade/methane/Manifest
new file mode 100644
index 00000000000..74b8a93dc62
--- /dev/null
+++ b/games-arcade/methane/Manifest
@@ -0,0 +1 @@
+DIST methane-1.5.1.tgz 1057881 SHA256 ac1de7009e638c784b4d413b56a4387be94a31bd5fe3050db7b51e39ccfdd248 SHA512 3506f288179a127f8508bd9d4225618d8dcd93794c559822ed2836bb46a318ce3c199f951f564064091b1125375118f2d64c50a27059dcd0e49c8379fa8c3155 WHIRLPOOL b8f52b981b0a6789b4d854548787810c994c87792b57f150af8ed0d8819dc057e38a04edf1ed5791ab24cba7a7eec66a40e5e71d5260dbabe1c110c8e2044cf4
diff --git a/games-arcade/methane/files/methane-1.5.1-gentoo.patch b/games-arcade/methane/files/methane-1.5.1-gentoo.patch
new file mode 100644
index 00000000000..9e49ecdff25
--- /dev/null
+++ b/games-arcade/methane/files/methane-1.5.1-gentoo.patch
@@ -0,0 +1,62 @@
+--- Makefile.old 2012-11-26 18:58:48.201837870 +0100
++++ Makefile 2012-11-27 12:30:16.038998128 +0100
+@@ -1,5 +1,5 @@
+-METHANE_FLAGS = -DENABLE_SOUND `pkg-config --cflags clanCore-2.2 clanDisplay-2.2 clanApp-2.2 clanGL-2.2 clanGL1-2.2 clanSWRender-2.2 clanSound-2.2 clanMikMod-2.2`
+-METHANE_LIBS = `pkg-config --libs clanCore-2.2 clanDisplay-2.2 clanApp-2.2 clanGL-2.2 clanGL1-2.2 clanSWRender-2.2 clanSound-2.2 clanMikMod-2.2`
++METHANE_FLAGS = -DENABLE_SOUND `pkg-config --cflags clanCore-2.3 clanDisplay-2.3 clanApp-2.3 clanGL-2.3 clanGL1-2.3 clanSWRender-2.3 clanSound-2.3 clanMikMod-2.3`
++METHANE_LIBS = `pkg-config --libs clanCore-2.3 clanDisplay-2.3 clanApp-2.3 clanGL-2.3 clanGL1-2.3 clanSWRender-2.3 clanSound-2.3 clanMikMod-2.3`
+
+ OBJF = build/game.o build/baddie.o build/methane.o build/target.o build/maps.o build/gfxoff.o build/mapdata.o build/objlist.o build/doc.o build/bitdraw.o build/global.o build/suck.o build/power.o build/goodie.o build/bititem.o build/player.o build/weapon.o build/bitgroup.o build/boss.o build/sound.o build/gasobj.o build/misc.o
+
+@@ -10,7 +10,7 @@
+ @echo "================================="
+
+ methane: ${OBJF}
+- g++ ${CXXFLAGS} ${OBJF} -o methane ${METHANE_LIBS}
++ $(CXX) ${LDFLAGS} ${CXXFLAGS} ${OBJF} -o methane ${METHANE_LIBS}
+
+ clean:
+ @rm -Rf build
+@@ -23,6 +23,6 @@
+ build/%.o : sources/%.cpp
+ @echo " Compiling $<..."
+ @if [ ! -d build ]; then mkdir build; fi
+- gcc ${CXXFLAGS} ${METHANE_FLAGS} -c $< -o $@
++ $(CXX) ${CXXFLAGS} ${METHANE_FLAGS} -c $< -o $@
+
+
+--- sources/methane.cpp.old 2012-11-27 13:49:22.993003266 +0100
++++ sources/methane.cpp 2012-11-27 17:37:23.051913777 +0100
+@@ -80,15 +80,15 @@
+ return 0;
+ }
+
+- CL_AutoPtr<CL_SetupSound> setup_sound;
+- CL_AutoPtr<CL_SoundOutput> sound_output;
+- CL_AutoPtr<CL_SetupMikMod> setup_mikmod;
++ CL_UniquePtr<CL_SetupSound> setup_sound;
++ CL_UniquePtr<CL_SoundOutput> sound_output;
++ CL_UniquePtr<CL_SetupMikMod> setup_mikmod;
+
+ if (GLOBAL_SoundEnable)
+ {
+- setup_sound = new CL_SetupSound;
+- sound_output = new CL_SoundOutput(44100);
+- setup_mikmod = new CL_SetupMikMod;
++ setup_sound = cl_move(CL_UniquePtr<CL_SetupSound>(new CL_SetupSound));
++ sound_output = cl_move(CL_UniquePtr<CL_SoundOutput>(new CL_SoundOutput(44100)));
++ setup_mikmod = cl_move(CL_UniquePtr<CL_SetupMikMod>(new CL_SetupMikMod));
+ }
+
+ // Set the video mode
+--- sources/target.cpp.old 2012-11-28 21:34:32.666878913 +0100
++++ sources/target.cpp 2012-11-28 21:35:16.371247221 +0100
+@@ -132,7 +132,7 @@
+ CL_GraphicContext gc = m_pWindow->get_gc();
+
+ // Find the resources directory:
+- CL_String resource_dir = CL_Directory::get_resourcedata("methane");
++ CL_String resource_dir = "@GENTOO_DATADIR@/methane/";
+ CL_String dataname("page_01.png");
+ CL_String filename = resource_dir + dataname;
+ if (!CL_FileHelp::file_exists(filename))
diff --git a/games-arcade/methane/metadata.xml b/games-arcade/methane/metadata.xml
new file mode 100644
index 00000000000..bccd79d620d
--- /dev/null
+++ b/games-arcade/methane/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">methane</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-arcade/methane/methane-1.5.1.ebuild b/games-arcade/methane/methane-1.5.1.ebuild
new file mode 100644
index 00000000000..b2c5cd1346f
--- /dev/null
+++ b/games-arcade/methane/methane-1.5.1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils games
+
+DESCRIPTION="Port from an old amiga game"
+HOMEPAGE="http://methane.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="dev-games/clanlib:2.3[opengl,mikmod]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ sed -i \
+ -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}:" \
+ sources/target.cpp
+
+ # fix weird parallel make issue wrt #450422
+ mkdir build || die
+}
+
+src_install() {
+ dogamesbin methane
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins resources/*
+ dodir "${GAMES_STATEDIR}"
+ touch "${D}/${GAMES_STATEDIR}"/methanescores
+ fperms g+w "${GAMES_STATEDIR}"/methanescores
+ newicon docs/puff.gif ${PN}.gif
+ make_desktop_entry ${PN} "Super Methane Brothers" /usr/share/pixmaps/${PN}.gif
+ dodoc authors.txt history.txt readme.txt
+ dohtml docs/*
+ prepgamesdirs
+}