diff options
-rw-r--r-- | games-arcade/opentyrian/ChangeLog | 11 | ||||
-rw-r--r-- | games-arcade/opentyrian/files/20081211-datapath.diff | 25 | ||||
-rw-r--r-- | games-arcade/opentyrian/metadata.xml | 9 | ||||
-rw-r--r-- | games-arcade/opentyrian/opentyrian-20081211.ebuild | 47 |
4 files changed, 92 insertions, 0 deletions
diff --git a/games-arcade/opentyrian/ChangeLog b/games-arcade/opentyrian/ChangeLog new file mode 100644 index 000000000000..ac8fdd4d989c --- /dev/null +++ b/games-arcade/opentyrian/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for games-arcade/opentyrian +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-arcade/opentyrian/ChangeLog,v 1.1 2008/12/12 14:22:46 chainsaw Exp $ + +*opentyrian-20081211 (11 Dec 2008) + + 11 Dec 2008; <chainsaw@gentoo.org> +files/20081211-datapath.diff, + +metadata.xml, +opentyrian-20081211.ebuild: + Initial commit, ebuild by me. Closes bug #223743. With thanks to Mr_Bones + & nyhm for review comments. + diff --git a/games-arcade/opentyrian/files/20081211-datapath.diff b/games-arcade/opentyrian/files/20081211-datapath.diff new file mode 100644 index 000000000000..130e465160be --- /dev/null +++ b/games-arcade/opentyrian/files/20081211-datapath.diff @@ -0,0 +1,25 @@ +diff -uNr opentyrian.ORIG/Makefile opentyrian/Makefile +--- opentyrian.ORIG/Makefile 2008-07-10 21:42:20.000000000 +0100 ++++ opentyrian/Makefile 2008-07-10 21:42:52.000000000 +0100 +@@ -46,6 +46,9 @@ + CFLAGS += -DSVN_REV=\"$(SVN_REV)\" + endif + ++ifneq ($(DATA_PATH), ) ++ CFLAGS += -DDATA_PATH=\"$(DATA_PATH)\" ++endif + #################################################### + + all : $(TARGET) +diff -uNr opentyrian.ORIG/src/error.c opentyrian/src/error.c +--- opentyrian.ORIG/src/error.c 2008-07-10 21:42:20.000000000 +0100 ++++ opentyrian/src/error.c 2008-07-10 21:43:45.000000000 +0100 +@@ -38,7 +38,7 @@ + char err_msg[1000] = "No error!?"; + + #ifndef TARGET_MACOSX +-static const char *tyrian_searchpaths[] = { "data", "tyrian", "tyrian2k" }; ++static const char *tyrian_searchpaths[] = { DATA_PATH , "data", "tyrian", "tyrian2k" }; + #endif + + long get_stream_size( FILE *f ) diff --git a/games-arcade/opentyrian/metadata.xml b/games-arcade/opentyrian/metadata.xml new file mode 100644 index 000000000000..1dceee43bf7c --- /dev/null +++ b/games-arcade/opentyrian/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>chainsaw@gentoo.org</email> + <name>Tony Vroon</name> +</maintainer> +<herd>games</herd> +</pkgmetadata> diff --git a/games-arcade/opentyrian/opentyrian-20081211.ebuild b/games-arcade/opentyrian/opentyrian-20081211.ebuild new file mode 100644 index 000000000000..edced97879cf --- /dev/null +++ b/games-arcade/opentyrian/opentyrian-20081211.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-arcade/opentyrian/opentyrian-20081211.ebuild,v 1.1 2008/12/12 14:22:46 chainsaw Exp $ + +inherit eutils games + +DESCRIPTION="Open-source port of the DOS game Tyrian, vertical scrolling shooter" +HOMEPAGE="http://code.google.com/p/opentyrian/" +SRC_URI="http://darklomax.org/tyrian/tyrian21.zip + mirror://gentoo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="debug" + +RDEPEND="media-libs/libsdl + media-libs/sdl-net" +DEPEND="${RDEPEND} + app-arch/unzip + dev-util/subversion" + +S=${WORKDIR}/${PN} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/${PV}-datapath.diff" + if ! use debug; then + sed -i -e "s@DEBUG := 1@DEBUG := 0@" "${S}/Makefile" || die "sed failed" + fi +} + +src_compile() { + emake DATA_PATH="${GAMES_DATADIR}/${PN}" || die "Compilation failed" +} + +src_install() { + dogamesbin tyrian || die "Failed to install game binary" + dodoc CREDITS NEWS README || die "Failed to install documentation" + domenu opentyrian.desktop || die "Failed to install desktop file" + doicon tyrian.xpm || die "Failed to install program icon" + insinto "${GAMES_DATADIR}/${PN}" + cd "${WORKDIR}/tyrian21" + doins * || die "Failed to install game data" + prepgamesdirs +} |