summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Unbehaun <frostworks@gmx.de>2009-08-28 12:29:50 +0200
committerMarcel Unbehaun <frostworks@gmx.de>2009-08-28 12:29:50 +0200
commit579d345ccb995f15e168b4c297f72752f5f84b41 (patch)
tree61c2231e55388933d29b2f870697ef3942d86e02 /games-action/gunroarhi
parent(games-action/gunroar) rm files/digest-gunroar-0.15 (diff)
downloadgamerlay-579d345ccb995f15e168b4c297f72752f5f84b41.tar.gz
gamerlay-579d345ccb995f15e168b4c297f72752f5f84b41.tar.bz2
gamerlay-579d345ccb995f15e168b4c297f72752f5f84b41.zip
(games-action/gunroarhi) using debian patches gunroarhi-0.30.ebuild
(games-action/gunroarhi) new Manifest (games-action/gunroarhi) fixed patch files/03_put_prefs_in_home_dir.diff
Diffstat (limited to 'games-action/gunroarhi')
-rw-r--r--games-action/gunroarhi/Manifest6
-rw-r--r--games-action/gunroarhi/files/03_put_prefs_in_home_dir.diff92
-rw-r--r--games-action/gunroarhi/gunroarhi-0.30.ebuild35
3 files changed, 119 insertions, 14 deletions
diff --git a/games-action/gunroarhi/Manifest b/games-action/gunroarhi/Manifest
index 46fc6a1..d3d6319 100644
--- a/games-action/gunroarhi/Manifest
+++ b/games-action/gunroarhi/Manifest
@@ -1,5 +1,5 @@
-AUX gunroarhi-0.30.diff 5154 RMD160 c1aaf017b13622a8cf9474ec34f245b96e8cd601 SHA1 662f35305195cc68b9b89cc16b54e70723e7c344 SHA256 0aba15b7e043e40f2f033ff619f909d9f371b670c2d6d3f4d546a5d9a2ff447a
-AUX gunroarhi.png 3544 RMD160 f98b11eb0250eaf0bd859d8b3aad3545d52e404e SHA1 8694da4a1fbb34cf7dedc7ead192f62d2b43350a SHA256 c855b79b3c1c95da5fcdf592261f56568114a03252821f71a2cd9a1e60c15e65
+AUX 03_put_prefs_in_home_dir.diff 2801 RMD160 bb6b5911b374eb409dde50dc8b4b0b55e259aaf1 SHA1 9ea9de8405a10e639fdb0c2a7e386dfb4a73445b SHA256 a58b9977d869844c3dd845d6f966e35ffcd5d0df19e408f66f70a5e5355f74be
DIST gr_hi0_30.zip 5502395 RMD160 d321ba0f8a4eaa2f1f84c6c3a48f4d29f43c7f07 SHA1 4238a995f5d766f22ea396ccce86036886b32205 SHA256 c2adc4d1aa616736e968d4214a2bc52b0d2a21ae1dbbe5a01e9c57826901692a
-EBUILD gunroarhi-0.30.ebuild 1497 RMD160 10c59046203f579eb9578e309faadfbcb0318d23 SHA1 422f115e24b06338f093f85f61329cedf0fada78 SHA256 10a24bcf9ff65efd269996762c6cc148adb51adfb5aad8521abcab2e26a42674
+DIST gunroar_0.15.dfsg1-3.diff.gz 20960 RMD160 7fc3fef8476b796cb1729f9f4031f5492b284ea4 SHA1 d5e6c695665e2da6385865dd0b7fc20414886c62 SHA256 4ba7b1cd43ae9fc0fa6c055e83aefb82541733e3ce9d68217efdb942ad165137
+EBUILD gunroarhi-0.30.ebuild 2810 RMD160 97d018f706a07c771f3a669d390c9f6acd8635d7 SHA1 7a60ebf29459ddbc0d0a7ce1b7316c058fbea2c7 SHA256 b846d44733375b6308b3c3553fe571bbaf2bc64520b692390959674b4453f98f
MISC metadata.xml 249 RMD160 220cde0fc1a8d7d355705f0f6772bd8d77cdc17a SHA1 34b33eb8d24cd8bfef2ddfb8e80334fd77cc9488 SHA256 3875fd5008d7f5bfe7f3cf7bf330c209a5034f5988d37c1699fb3be35a7be906
diff --git a/games-action/gunroarhi/files/03_put_prefs_in_home_dir.diff b/games-action/gunroarhi/files/03_put_prefs_in_home_dir.diff
new file mode 100644
index 0000000..7f5b9aa
--- /dev/null
+++ b/games-action/gunroarhi/files/03_put_prefs_in_home_dir.diff
@@ -0,0 +1,92 @@
+diff -Naur gr_hi/src/abagames/gr/prefmanager.d gr_hi-p/src/abagames/gr/prefmanager.d
+--- gr_hi/src/abagames/gr/prefmanager.d 2005-09-11 02:47:40.000000000 +0200
++++ gr_hi-p/src/abagames/gr/prefmanager.d 2009-08-28 12:09:08.000000000 +0200
+@@ -6,6 +6,9 @@
+ module abagames.gr.prefmanager;
+
+ private import std.stream;
++private import std.c.stdlib;
++private import std.string;
++private import std.file;
+ private import abagames.util.prefmanager;
+ private import abagames.gr.gamemanager;
+
+@@ -16,18 +19,31 @@
+ private:
+ static const int VERSION_NUM = 14;
+ static const int VERSION_NUM_13 = 13;
+- static const char[] PREF_FILE = "gr.prf";
++ static const char[] PREF_FILE = "gunroar.prf";
+ PrefData _prefData;
+
+ public this() {
+ _prefData = new PrefData;
+ }
+
++ public static char[] pref_dir()
++ {
++ char * home = getenv("HOME");
++ if (home is null)
++ throw new Error("HOME environment variable not defined");
++ char[] dir = std.string.toString(home) ~ "/.gunroarhi";
++ try {
++ mkdir(dir);
++ } catch (FileException e) {
++ }
++ return dir;
++ }
++
+ public void load() {
+ auto File fd = new File;
+ try {
+ int ver;
+- fd.open(PREF_FILE);
++ fd.open(pref_dir() ~ "/" ~ PREF_FILE);
+ fd.read(ver);
+ if (ver == VERSION_NUM_13)
+ _prefData.loadVer13(fd);
+@@ -45,7 +61,7 @@
+
+ public void save() {
+ auto File fd = new File;
+- fd.create(PREF_FILE);
++ fd.create(pref_dir() ~ "/" ~ PREF_FILE);
+ fd.write(VERSION_NUM);
+ _prefData.save(fd);
+ fd.close();
+diff -Naur gr_hi/src/abagames/gr/replay.d gr_hi-p/src/abagames/gr/replay.d
+--- gr_hi/src/abagames/gr/replay.d 2006-04-06 11:02:54.000000000 +0200
++++ gr_hi-p/src/abagames/gr/replay.d 2009-08-28 12:10:19.000000000 +0200
+@@ -12,13 +12,13 @@
+ private import abagames.util.sdl.mouse;
+ private import abagames.gr.gamemanager;
+ private import abagames.gr.mouseandpad;
++private import abagames.gr.prefmanager;
+
+ /**
+ * Save/Load a replay data.
+ */
+ public class ReplayData {
+ public:
+- static const char[] dir = "replay";
+ static const int VERSION_NUM = -11; //otoyan change
+ InputRecord!(PadState) padInputRecord;
+ InputRecord!(TwinStickState) twinStickInputRecord;
+@@ -32,7 +32,7 @@
+
+ public void save(char[] fileName) {
+ auto File fd = new File;
+- fd.create(dir ~ "/" ~ fileName);
++ fd.create(PrefManager.pref_dir() ~ "/" ~ fileName);
+ fd.write(VERSION_NUM);
+ fd.write(seed);
+ fd.write(score);
+@@ -59,7 +59,7 @@
+
+ public void load(char[] fileName) {
+ auto File fd = new File;
+- fd.open(dir ~ "/" ~ fileName);
++ fd.open(PrefManager.pref_dir() ~ "/" ~ fileName);
+ int ver;
+ fd.read(ver);
+ if (ver != VERSION_NUM)
diff --git a/games-action/gunroarhi/gunroarhi-0.30.ebuild b/games-action/gunroarhi/gunroarhi-0.30.ebuild
index 0ccd94b..609e280 100644
--- a/games-action/gunroarhi/gunroarhi-0.30.ebuild
+++ b/games-action/gunroarhi/gunroarhi-0.30.ebuild
@@ -6,12 +6,16 @@ EAPI="2"
inherit d-games
+MY_PD=gunroar
+MY_PDV=0_15
+MY_PDPV=0.15
MY_PN=gr_hi
MY_PV=${PV//./_}
DESCRIPTION="Guns, Guns, Guns! 360-degree gunboat shooter, fork of ABAs 'Gunroar'"
HOMEPAGE="http://www.edit.ne.jp/~otoyan/soft/gr_hi.html"
-SRC_URI="http://www.edit.ne.jp/~otoyan/soft/gr_hi/${MY_PN}${MY_PV}.zip"
+SRC_URI="http://www.edit.ne.jp/~otoyan/soft/gr_hi/${MY_PN}${MY_PV}.zip
+ mirror://debian/pool/main/g/${MY_PD}/${MY_PD}_${MY_PDPV}.dfsg1-3.diff.gz"
LICENSE="BSD"
SLOT="0"
@@ -21,34 +25,43 @@ IUSE=""
RDEPEND="media-libs/libsdl
media-libs/mesa
media-libs/sdl-mixer"
+
DEPEND="${RDEPEND}"
S=${WORKDIR}/${MY_PN}
src_prepare(){
- epatch "${FILESDIR}"/${P}.diff
+ # using frostworks patches with debian's cleanups and minor patches
+ epatch "${WORKDIR}"/${MY_PD}_${MY_PDPV}.dfsg1-3.diff
+ sed -i -e "s:a7xpg-0.11.dfsg1/::g" -i "${S}"/${MY_PD}-${MY_PDPV}.dfsg1/debian/patches/makefile.patch
+ sed -i -e "s:${MY_PD}:${PN}:g" -i "${S}"/${MY_PD}-${MY_PDPV}.dfsg1/debian/patches/makefile.patch
+ sed -i -e "s:${MY_PD}_${MY_PDPV}.dfsg1.orig/:old-gr:g" -i "${S}"/${MY_PD}-${MY_PDPV}.dfsg1/debian/patches/03_put_prefs_in_home_dir.diff
+ sed -i -e "s:${MY_PD}_${MY_PDPV}.dfsg1/:new-gr:g" -i "${S}"/${MY_PD}-${MY_PDPV}.dfsg1/debian/patches/03_put_prefs_in_home_dir.diff
+ sed -i -e "s:${MY_PD}_${MY_PDPV}.dfsg1.hi.orig/:old-gr:g" -i "${S}"/${MY_PD}-${MY_PDPV}.dfsg1/debian/patches/gunroar-hot-iron.patch
+ sed -i -e "s:${MY_PD}_${MY_PDPV}.dfsg1.hi/:new-gr:g" -i "${S}"/${MY_PD}-${MY_PDPV}.dfsg1/debian/patches/gunroar-hot-iron.patch
+ epatch "${S}"/${MY_PD}-${MY_PDPV}.dfsg1/debian/patches/01_sdl_fix_imports.diff
+ epatch "${S}"/${MY_PD}-${MY_PDPV}.dfsg1/debian/patches/02_d_language_changes.diff
+ epatch "${S}"/${MY_PD}-${MY_PDPV}.dfsg1/debian/patches/04_adapt_build_file_to_linux.diff
+ epatch "${S}"/${MY_PD}-${MY_PDPV}.dfsg1/debian/patches/windowed.patch
+ epatch "${S}"/${MY_PD}-${MY_PDPV}.dfsg1/debian/patches/makefile.patch
+ epatch "${S}"/${MY_PD}-${MY_PDPV}.dfsg1/debian/patches/gdc-0.24-semantics-for-version.patch
+ epatch "${S}"/${MY_PD}-${MY_PDPV}.dfsg1/debian/patches/window-resizing.patch
+ epatch "${S}"/${MY_PD}-${MY_PDPV}.dfsg1/debian/patches/avoid-segfault-when-sdl-fails.patch
+ epatch "${FILESDIR}"/03_put_prefs_in_home_dir.diff
sed -i \
-e 's:"\(images/[^"]*\)":"'${GAMES_DATADIR}'/'${PN}'/\1":g' -i src/abagames/util/sdl/texture.d \
-e 's:"\(sounds/[^"]*\)":"'${GAMES_DATADIR}'/'${PN}'/\1":g' -i src/abagames/util/sdl/sound.d \
- -e 's:"\(gr.prf[^"]*\)":"'${GAMES_STATEDIR}'/'${PN}'/\1":g' -i src/abagames/gr/prefmanager.d \
|| die "sed failed"
}
src_install() {
dogamesbin ${PN}
- dodir "${GAMES_STATEDIR}/${PN}" "${GAMES_STATEDIR}/${PN}/replay"
- local statedir="${GAMES_STATEDIR}"/${PN}
-
- if [ ! -e ${D}"${GAMES_STATEDIR}"/${PN}/gr.prf ]; then
- touch ${D}"${GAMES_STATEDIR}"/${PN}/gr.prf
- chmod ug+rw ${D}"${GAMES_STATEDIR}"/${PN}/gr.prf
- fi
local datadir="${GAMES_DATADIR}"/${PN}
dodir ${datadir}
insinto "${GAMES_DATADIR}"/${PN}
doins -r images sounds || die
- newicon "${FILESDIR}"/${PN}.png ${PN}.png
+ newicon "${S}"/${MY_PD}-${MY_PDPV}.dfsg1/debian/${MY_PD}.xpm ${PN}.xpm
make_desktop_entry ${PN} ${PN}
dodoc readme*
prepgamesdirs