summaryrefslogtreecommitdiff
path: root/games-arcade/balloonchase
diff options
context:
space:
mode:
Diffstat (limited to 'games-arcade/balloonchase')
-rw-r--r--games-arcade/balloonchase/Manifest6
-rw-r--r--games-arcade/balloonchase/balloonchase-0.9.6.ebuild34
-rw-r--r--games-arcade/balloonchase/files/0.9.6-gentoo.patch183
-rw-r--r--games-arcade/balloonchase/metadata.xml8
4 files changed, 231 insertions, 0 deletions
diff --git a/games-arcade/balloonchase/Manifest b/games-arcade/balloonchase/Manifest
new file mode 100644
index 000000000000..8822af7d05a5
--- /dev/null
+++ b/games-arcade/balloonchase/Manifest
@@ -0,0 +1,6 @@
+AUX 0.9.6-gentoo.patch 6146 SHA256 a226c13d164644089541704b74d7dc6e4886cd587165b00fc14b825cc5838670 SHA512 80b1027436d5e13f16f4c98265480035684fb0d6ea2000f9beccbecaf94f5678e5930ad961e58e78572c08935f856d2c6330d99bd97cb2f7791fb6cebc7dbcb2 WHIRLPOOL 8ecdca4655a1f796fc25319ddb46737e3ca29e5449b6f91368ab9b750c13423d40e6fed5e90ace3a9db07a3135bb5fa9cf59a7ad7a046977661076d1e55c7186
+DIST balloonchase-0.9.6.tar.bz2 523085 SHA256 6bf3e3db80a9b38941cace397232e33c8f00597e32c0036abbe927590d04d86c SHA512 ab5617713c96187564926fd5ecbdbf5186f78c23cfb43b26b28b9d18e71330efd77700cf7cd02e04be7fd8e33f2d30bf59f64954135ac82802d1d839dc2e7767 WHIRLPOOL 2033b329a5529d5f2d995de99f4848419d85c942eedbaee307000b797253b5c3b96cb043dc79130b2e736737ce5d074f5aa11d7ff0a09663838e13c829066505
+EBUILD balloonchase-0.9.6.ebuild 859 SHA256 5cebff17af0840640f9feb460c497b548f8cbe178f1da9c6414407b498b9bd97 SHA512 42628323b8090a6512739fe06b73dc3ef3682d9c662b9a0b7962230ec904cf3ae3c48a52c7db6ad39778b3e8441a421653b0625bd61f4a28d05182a5859f3690 WHIRLPOOL d01a784d0a28aad0ac2448a8113320bb974f712d98b99a19b5ee240000a91e5d3c30e569a1ea91b1ee76f6c4718056a7e8e125874e6e315042ede21ad1e5d5c9
+MISC ChangeLog 2617 SHA256 17084c60a979a97dd4dfdf9e3e3baa76630d05ebb41dd0bd60f63cf885a97872 SHA512 cdba69486795e5b5d4e8a1dec4580a0bbe2b95fcb781bbfba32cf8b0128ae218e3ef0b961b074a6c5cc4b7da4b1452d8b101acff3813ae9a7a69640d5b4474f5 WHIRLPOOL f971c120cb1f6490d621d29aa9172a99a287b4402f3d5a9ff454758142118d1b14363128692c97fc76f75f251d7782457d8d0a2dcd09f7032dc288e8505c5b32
+MISC ChangeLog-2015 1071 SHA256 62d9fa36753ea7f5d7d8ccad1f6c9dbf4e7d5f86eec975fa0fbe4fc9ab434ee2 SHA512 a1f5faad18586255a4782e9d10b45ccb72dfca46d767abb136750f6e16427219de6a2de221bfd4e822530a1b819547531396f3ebb8175003a7d2dd5a5ce0350a WHIRLPOOL 194c460cf9d4576fd41be432276be8162c1b8c29171e9fc658719d49a03d8066e60797d114de2d0cb28fcd00f5d5b4add055433c504437edf7798ce1d437605a
+MISC metadata.xml 249 SHA256 943b9ce0cd072229b43569ab668dd7ec741d9dfefd942c8921dabd4490b27b0c SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 WHIRLPOOL b10e21575c78e201a652c8582cd16e3f7c86b13dd20a30f4cea44066fb139440b3c186147dbaae83478f11a20b6f457a99c8b29ee1239a4caaa21eee01250088
diff --git a/games-arcade/balloonchase/balloonchase-0.9.6.ebuild b/games-arcade/balloonchase/balloonchase-0.9.6.ebuild
new file mode 100644
index 000000000000..607d33f8c6db
--- /dev/null
+++ b/games-arcade/balloonchase/balloonchase-0.9.6.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils toolchain-funcs games
+
+DESCRIPTION="Fly a hot air balloon and try to blow the other player out of the screen"
+HOMEPAGE="http://koti.mbnet.fi/makegho/c/bchase/"
+SRC_URI="http://koti.mbnet.fi/makegho/c/bchase/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="media-libs/libsdl[video]"
+RDEPEND=${DEPEND}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-gentoo.patch
+ sed -i "s:g++:$(tc-getCXX):" Makefile || die
+ sed -i \
+ -e "s:GENTOODIR:${GAMES_DATADIR}/${PN}:" src/main.c || die
+}
+
+src_install() {
+ dogamesbin ${PN}
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r images
+ newicon images/kp2b.bmp ${PN}.bmp
+ make_desktop_entry ${PN} "Balloon Chase" /usr/share/pixmaps/${PN}.bmp
+ dodoc README
+ prepgamesdirs
+}
diff --git a/games-arcade/balloonchase/files/0.9.6-gentoo.patch b/games-arcade/balloonchase/files/0.9.6-gentoo.patch
new file mode 100644
index 000000000000..55e978850bbe
--- /dev/null
+++ b/games-arcade/balloonchase/files/0.9.6-gentoo.patch
@@ -0,0 +1,183 @@
+--- Makefile
++++ Makefile
+@@ -1,4 +1,3 @@
+-LDFLAGS= -lSDL -lpthread -s
+ CFLAGS= -Wall # -DDEBUG
+ PKG_BCDIR=balloonchase-`cat src/ver`
+ PKG_BCVER=`cat src/ver`
+@@ -9,8 +8,8 @@
+ clean:
+ rm balloonchase src/*.o
+ main: src/main.c
+- g++ -c -o src/main.o `sdl-config --cflags` src/main.c
+- g++ -o balloonchase src/main.o `sdl-config --libs`
++ g++ $(CXXFLAGS) -c -o src/main.o `sdl-config --cflags` src/main.c
++ g++ $(LDFLAGS) -o balloonchase src/main.o `sdl-config --libs`
+ pkg:
+ @echo $(PKG_BCVERSION) >VERSION
+ rm balloonchase src/*.o
+--- src/main.c
++++ src/main.c
+@@ -333,47 +333,47 @@
+
+ int InitImages()
+ {
+- back = SDL_LoadBMP("images/back.bmp");
++ back = SDL_LoadBMP("GENTOODIR/images/back.bmp");
+
+- num3 = SDL_LoadBMP("images/num3.bmp");
++ num3 = SDL_LoadBMP("GENTOODIR/images/num3.bmp");
+ SDL_SetColorKey(num3, SDL_SRCCOLORKEY, SDL_MapRGB(num3->format, 0xFF, 0xFF, 0xFF));
+- num2 = SDL_LoadBMP("images/num2.bmp");
++ num2 = SDL_LoadBMP("GENTOODIR/images/num2.bmp");
+ SDL_SetColorKey(num2, SDL_SRCCOLORKEY, SDL_MapRGB(num2->format, 0xFF, 0xFF, 0xFF));
+- num1 = SDL_LoadBMP("images/num1.bmp");
++ num1 = SDL_LoadBMP("GENTOODIR/images/num1.bmp");
+ SDL_SetColorKey(num1, SDL_SRCCOLORKEY, SDL_MapRGB(num1->format, 0xFF, 0xFF, 0xFF));
+- num0 = SDL_LoadBMP("images/num0.bmp");
++ num0 = SDL_LoadBMP("GENTOODIR/images/num0.bmp");
+ SDL_SetColorKey(num0, SDL_SRCCOLORKEY, SDL_MapRGB(num0->format, 0xFF, 0xFF, 0xFF));
+- numv = SDL_LoadBMP("images/num-.bmp");
++ numv = SDL_LoadBMP("GENTOODIR/images/num-.bmp");
+ SDL_SetColorKey(numv, SDL_SRCCOLORKEY, SDL_MapRGB(numv->format, 0xFF, 0xFF, 0xFF));
+
+- menu = SDL_LoadBMP("images/menu.bmp");
+- menu_onoff = SDL_LoadBMP("images/menu_onoff.bmp");
++ menu = SDL_LoadBMP("GENTOODIR/images/menu.bmp");
++ menu_onoff = SDL_LoadBMP("GENTOODIR/images/menu_onoff.bmp");
+
+
+-// arrow[0] = SDL_LoadBMP("images/down.bmp");
++// arrow[0] = SDL_LoadBMP("GENTOODIR/images/down.bmp");
+ // SDL_SetColorKey(arrow[0], SDL_SRCCOLORKEY, SDL_MapRGB(arrow[0]->format, 0x00, 0x00, 0x00));
+-// arrow[1] = SDL_LoadBMP("images/down.bmp");
++// arrow[1] = SDL_LoadBMP("GENTOODIR/images/down.bmp");
+ // SDL_SetColorKey(arrow[1], SDL_SRCCOLORKEY, SDL_MapRGB(arrow[1]->format, 0x00, 0x00, 0x00));
+
+- kp1 = SDL_LoadBMP("images/kp1.bmp");
++ kp1 = SDL_LoadBMP("GENTOODIR/images/kp1.bmp");
+ SDL_SetColorKey(kp1, SDL_SRCCOLORKEY, SDL_MapRGB(kp1->format, 0xFF, 0xFF, 0xFF));
+- kp1b = SDL_LoadBMP("images/kp1b.bmp");
++ kp1b = SDL_LoadBMP("GENTOODIR/images/kp1b.bmp");
+ SDL_SetColorKey(kp1b, SDL_SRCCOLORKEY, SDL_MapRGB(kp1b->format, 0xFF, 0xFF, 0xFF));
+
+- kp2 = SDL_LoadBMP("images/kp2.bmp");
++ kp2 = SDL_LoadBMP("GENTOODIR/images/kp2.bmp");
+ SDL_SetColorKey(kp2, SDL_SRCCOLORKEY, SDL_MapRGB(kp2->format, 0xFF, 0xFF, 0xFF));
+- kp2b = SDL_LoadBMP("images/kp2b.bmp");
++ kp2b = SDL_LoadBMP("GENTOODIR/images/kp2b.bmp");
+ SDL_SetColorKey(kp2b, SDL_SRCCOLORKEY, SDL_MapRGB(kp2b->format, 0xFF, 0xFF, 0xFF));
+
+- font2 = SDL_LoadBMP("images/font.bmp");
++ font2 = SDL_LoadBMP("GENTOODIR/images/font.bmp");
+ font = SDL_CreateRGBSurface(SDL_SWSURFACE, 1288, 100, 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF);
+ SDL_SetColorKey(font, SDL_SRCCOLORKEY, SDL_MapRGB(font->format, 0x00, 0x00, 0x00));
+ DrawIMG (font, font2, 0, 0);
+
+- blobtrox = SDL_LoadBMP("images/blobtrox.bmp");
++ blobtrox = SDL_LoadBMP("GENTOODIR/images/blobtrox.bmp");
+ //SDL_SetColorKey(blobtrox, SDL_SRCCOLORKEY, SDL_MapRGB(blobtrox->format, 0x01, 0x01, 0x01));
+
+- balloonchase = SDL_LoadBMP("images/balloonchase.bmp");
++ balloonchase = SDL_LoadBMP("GENTOODIR/images/balloonchase.bmp");
+
+ TMP = SDL_CreateRGBSurface(SDL_SWSURFACE, 259, 200, 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF);
+ blursurface = SDL_CreateRGBSurface(SDL_SWSURFACE, 640, 480, 32, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
+@@ -578,7 +578,7 @@
+
+ void createdat(int winsneed, int option_wave_effect)
+ {
+- FILE *OPTFILE=fopen ("balloonchase.dat", "w+");
++ FILE *OPTFILE=fopen (".balloonchaserc", "w+");
+ char datmsg[60];
+ sprintf (datmsg, "Balloon Chase settings file -- Do not edit manually!");
+ char tmp2;
+@@ -588,52 +588,32 @@
+ }
+ fputc (winsneed, OPTFILE);
+ fputc (option_wave_effect+2, OPTFILE);
+- fprintf (stderr, "Saved configuration to balloonchase.dat\n");
++ fprintf (stderr, "Saved configuration to .balloonchaserc\n");
+ fclose (OPTFILE);
+ }
+
+ void checkfiles()
+ {
+- char found=0;
+- #ifdef WIN32
+- WIN32_FIND_DATA fileinfo;
+- BOOL rc = 0;
+- HANDLE hFile;
+- hFile = FindFirstFile("*", &fileinfo);
+- while(rc)
+- {
+- rc = FindNextFile(hFile, &fileinfo);
+- if (strcmp (fileinfo.cFileName, "balloonchase.dat")==0)
+- {
+- fprintf(stderr, "Found balloonchase.dat\n");
+- found = 1;
+- _findclose(hFile);
+- #endif
+- #ifndef WIN32
+- struct dirent *filelist[255];
+- int i=0;
+- int j=0;
+ DIR *dp;
+- dp=opendir("./");
+- int filenum=0;
+- while( filelist[filenum]=readdir(dp) )
+- filenum++;
+- closedir(dp);
+- if (filenum>=2)
+- for (i=0;i<filenum;i++)
+- {
+- if (strcmp(filelist[i]->d_name,"balloonchase.dat")==0)
+- {
+- fprintf (stderr, "Found balloonchase.dat\n");
+- found=1;
+- }
++
++ if (getenv("HOME")) {
++ chdir(getenv("HOME"));
++ }
++ if ((dp = opendir("./"))) {
++ struct dirent *f;
++
++ while(f=readdir(dp)) {
++ if (strcmp(f->d_name, ".balloonchaserc") == 0) {
++ fprintf (stderr, "Found .balloonchaserc\n");
++ closedir(dp);
++ return;
+ }
+- #endif
+- if (found==0)
+- {
+- fprintf (stderr, "Balloonchase.dat not found!\nCreating new...\n");
+- if (found==0) createdat(2, 1);
+ }
++ closedir(dp);
++ fprintf (stderr,
++ "Balloonchase.dat not found!\nCreating new...\n");
++ createdat(2, 1);
++ }
+ }
+
+ Uint32 rgb(Uint8 r, Uint8 g, Uint8 b)
+@@ -1257,7 +1237,7 @@
+ SDL_WM_SetCaption ("Balloon Chase", 0);
+ checkfiles();
+
+- FILE *OPTFILE=fopen ("balloonchase.dat", "r");
++ FILE *OPTFILE=fopen (".balloonchaserc", "r");
+ char datmsg[60];
+ char varmistus[60];
+
+@@ -1275,7 +1255,7 @@
+ {
+ winsneeded=fgetc(OPTFILE);
+ option_wave_effect=fgetc(OPTFILE)-2;
+- fprintf (stderr, "Successfully loaded balloonchase.dat\n");
++ fprintf (stderr, "Successfully loaded .balloonchaserc\n");
+ }
+ else
+ {
diff --git a/games-arcade/balloonchase/metadata.xml b/games-arcade/balloonchase/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-arcade/balloonchase/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>