From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SdHEJ-0003Bb-8o for garchives@archives.gentoo.org; Sat, 09 Jun 2012 08:41:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C0DC6E00C2; Sat, 9 Jun 2012 08:40:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 7B91BE00C2 for ; Sat, 9 Jun 2012 08:40:54 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B46151B4015 for ; Sat, 9 Jun 2012 08:40:53 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id DF80FE5432 for ; Sat, 9 Jun 2012 08:40:51 +0000 (UTC) From: "Marcel Unbehaun" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Marcel Unbehaun" Message-ID: <1339231318.bb4b6b33e3f39ee4a0ce812265c9170328bf66dc.frostwork@gentoo> Subject: [gentoo-commits] proj/gamerlay:master commit in: games-arcade/hurrican/, games-arcade/hurrican/files/ X-VCS-Repository: proj/gamerlay X-VCS-Files: games-arcade/hurrican/files/hurrican-homedir.patch games-arcade/hurrican/hurrican-9999.ebuild games-arcade/hurrican/metadata.xml X-VCS-Directories: games-arcade/hurrican/ games-arcade/hurrican/files/ X-VCS-Committer: frostwork X-VCS-Committer-Name: Marcel Unbehaun X-VCS-Revision: bb4b6b33e3f39ee4a0ce812265c9170328bf66dc X-VCS-Branch: master Date: Sat, 9 Jun 2012 08:40:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 52ba2f42-b1d2-47bc-9cc0-e31306d7130a X-Archives-Hash: dd85271735fc45f84dfe640efec2b45e commit: bb4b6b33e3f39ee4a0ce812265c9170328bf66dc Author: Marcel Unbehaun frostworx de> AuthorDate: Sat Jun 9 08:41:58 2012 +0000 Commit: Marcel Unbehaun gmx de> CommitDate: Sat Jun 9 08:41:58 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gamerlay.git;= a=3Dcommit;h=3Dbb4b6b33 [games-arcade/hurrican] initial and ugly hurrican-9999.ebuild --- games-arcade/hurrican/files/hurrican-homedir.patch | 105 ++++++++++++++= ++++++ games-arcade/hurrican/hurrican-9999.ebuild | 56 +++++++++++ games-arcade/hurrican/metadata.xml | 5 + 3 files changed, 166 insertions(+), 0 deletions(-) diff --git a/games-arcade/hurrican/files/hurrican-homedir.patch b/games-a= rcade/hurrican/files/hurrican-homedir.patch new file mode 100644 index 0000000..3f3e27c --- /dev/null +++ b/games-arcade/hurrican/files/hurrican-homedir.patch @@ -0,0 +1,105 @@ +diff -Naur src/Gameplay.cpp src/Gameplay.cpp +--- src/Gameplay.cpp 2012-06-07 11:40:47.000000000 +0200 ++++ src/Gameplay.cpp 2012-06-09 10:35:30.029915087 +0200 +@@ -33,6 +33,7 @@ + #include "Projectiles.h" + #include "Tileengine.h" + #include "Timer.h" ++#include +=20 + // --------------------------------------------------------------------= ------------------ + // Gameplay Variablen +@@ -71,6 +72,16 @@ +=20 + int DisplayHintNr =3D -1; +=20 ++// file in HOME ++ ++std::string homefile(std::string file) ++{ ++ std::string home=3Dgetenv("HOME"); ++ std::string hurrihome=3Dhome+"/.config/hurrican/"; ++ mkdir(hurrihome.c_str(), 0755); ++ return hurrihome+file;=09 ++} ++ + // --------------------------------------------------------------------= ------------------ + // Ein neues Spiel initialisieren + // --------------------------------------------------------------------= ------------------ +@@ -683,8 +694,8 @@ + float Sound, Musik; +=20 + FILE *Datei =3D NULL; +- +- fopen_s(&Datei, CONFIGFILE, "rb"); // versuchen Datei zu =F6ffnen ++=09 ++ fopen_s(&Datei, homefile(CONFIGFILE).c_str(), "rb"); // versuchen Date= i zu =F6ffnen +=20 + if (Datei =3D=3D NULL) + return false; +@@ -769,8 +780,8 @@ + float Sound, Musik; +=20 + FILE *Datei =3D NULL; +- +- fopen_s(&Datei, CONFIGFILE, "wb"); ++=09 ++ fopen_s(&Datei, homefile(CONFIGFILE).c_str(), "wb"); + if (Datei =3D=3D NULL) + { + Protokoll.WriteText("Config file saving failed !\n", false); +diff -Naur src/Gameplay.h src/Gameplay.h +--- src/Gameplay.h 2012-06-07 11:40:47.000000000 +0200 ++++ src/Gameplay.h 2012-06-09 10:35:30.029915087 +0200 +@@ -86,6 +86,7 @@ + extern const float ShockWaveY; +=20 + extern char StageReihenfolge[256][100]; ++extern std::string homefile(std::string file); +=20 + #endif +=20 +diff -Naur src/Main.cpp src/Main.cpp +--- src/Main.cpp 2012-06-07 11:40:48.000000000 +0200 ++++ src/Main.cpp 2012-06-09 10:36:06.479914736 +0200 +@@ -102,7 +102,7 @@ + #if defined(__AROS__) + Logdatei Protokoll("T:Game_Log.txt"); // Protokoll Datei + #else +-Logdatei Protokoll("Game_Log.txt"); // Protokoll Datei ++Logdatei Protokoll(homefile("Game_Log.txt").c_str()); // Protokoll = Datei + #endif + CSoundManager *pSoundManager =3D NULL; // Sound Manager + DirectGraphicsFont *pDefaultFont =3D new(DirectGraphicsFont); +@@ -559,7 +559,7 @@ +=20 + // Kein Fehler im Game? Dann Logfile l=F6schen + if (Protokoll.delLogFile =3D=3D true) +- DeleteFile("Game_Log.txt"); ++ DeleteFile(homefile("Game_Log.txt").c_str()); +=20 + #if defined(PLATFORM_DIRECTX) + return(message.wParam); // R=FCckkehr zu Windows +diff -Naur src/Menu.cpp src/Menu.cpp +--- src/Menu.cpp 2012-06-07 11:40:47.000000000 +0200 ++++ src/Menu.cpp 2012-06-09 10:35:30.029915087 +0200 +@@ -2666,8 +2666,8 @@ + // Versuchen, die Highscore Datei zu =F6ffnen + // falls sie nicht existiert oder es eine Fehler gibt, wird die Standa= rd + // Highscore gesetzt +- fopen_s(&Datei, "Hurrican.hsl", "rb"); +=20 ++ fopen_s(&Datei, homefile("Hurrican.hsl").c_str(), "rb"); +=20 + // Fehler beim =D6ffnen ? Dann standard Highscore setzen + // +@@ -2722,7 +2722,8 @@ + FILE *Datei; // Savegame Datei +=20 + // Highscore Datei =F6ffnen +- fopen_s(&Datei, "Hurrican.hsl", "wb"); ++ ++ fopen_s(&Datei, homefile("Hurrican.hsl").c_str(), "wb"); +=20 + // Fehler beim =D6ffnen ? Dann standard Highscore setzen + // diff --git a/games-arcade/hurrican/hurrican-9999.ebuild b/games-arcade/hu= rrican/hurrican-9999.ebuild new file mode 100644 index 0000000..885b7ef --- /dev/null +++ b/games-arcade/hurrican/hurrican-9999.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3D"3" + +inherit eutils games subversion + +DESCRIPTION=3D"a free and opensource Remake of the famous Turrican" +HOMEPAGE=3D"http://http://www.hurrican-game.de" +ESVN_REPO_URI=3D"svn://svn.code.sf.net/p/${PN}/code/trunk/Hurrican/" +ESVN_PROJECT=3D"${PN}" + +LICENSE=3D"GPL-2" +SLOT=3D"0" +KEYWORDS=3D"" +IUSE=3D"debug" + +RDEPEND=3D"media-libs/libmodplug + >=3Dmedia-libs/libsdl-1.2 + media-libs/sdl-image + media-libs/sdl-mixer + virtual/opengl" + +DEPEND=3D"${RDEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-homedir.patch || die + # Respect GAMES_DATADIR + sed -i -e "s:hurricanlinux:hurrican:g" -i src/Makefile || die + sed -i -e "s:data\/:${GAMES_DATADIR}/${PN}/data\/:g" -i src/Console.cpp= || die + sed -i -e "s:data\/:${GAMES_DATADIR}/${PN}/data\/:g" -i src/DX8Font.cpp= || die + sed -i -e "s:data\/:${GAMES_DATADIR}/${PN}/data\/:g" -i src/DX8Sound.cp= p || die + sed -i -e "s:data\/:${GAMES_DATADIR}/${PN}/data\/:g" -i src/DX8Sprite.c= pp || die + sed -i -e "s:data\/:${GAMES_DATADIR}/${PN}/data\/:g" -i src/lightmap.cp= p || die + sed -i -e "s:data\/:${GAMES_DATADIR}/${PN}/data\/:g" -i src/Texts.cpp |= | die + sed -i -e "s:data\/:${GAMES_DATADIR}/${PN}/data\/:g" -i src/Tileengine.= cpp || die + sed -i -e "s:english.lng:${GAMES_DATADIR}/${PN}/english.lng:g" -i src/G= ameplay.cpp || die + +} + +src_compile() { + cd src + emake || die "make failed" +} + +src_install() { + dogamesbin ${PN} + local datadir=3D"${GAMES_DATADIR}"/"${PN}" + dodir ${datadir} + insinto "${GAMES_DATADIR}"/"${PN}" + doins -r data lang english.lng || die + make_desktop_entry "${PN}" "${PN}" + dodoc readme.txt + prepgamesdirs +} diff --git a/games-arcade/hurrican/metadata.xml b/games-arcade/hurrican/m= etadata.xml new file mode 100644 index 0000000..4a5a466 --- /dev/null +++ b/games-arcade/hurrican/metadata.xml @@ -0,0 +1,5 @@ + + + +playboys +