summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-03-28 09:59:55 +0000
committerMike Frysinger <vapier@gentoo.org>2004-03-28 09:59:55 +0000
commitc608c0255e6d969b8bfdc5b8d7f0ab8cd74840ea (patch)
tree6f1f05545a6d4d5a4f7a8da81898d4e0625a94c8 /games-arcade/epiar
parentInitial ebuild. Submitted by Antonio <netbix@netbix.net>. Closes #45930. (Man... (diff)
downloadgentoo-2-c608c0255e6d969b8bfdc5b8d7f0ab8cd74840ea.tar.gz
gentoo-2-c608c0255e6d969b8bfdc5b8d7f0ab8cd74840ea.tar.bz2
gentoo-2-c608c0255e6d969b8bfdc5b8d7f0ab8cd74840ea.zip
initial ebuild #39091
Diffstat (limited to 'games-arcade/epiar')
-rw-r--r--games-arcade/epiar/ChangeLog8
-rw-r--r--games-arcade/epiar/epiar-0.5.ebuild55
-rw-r--r--games-arcade/epiar/files/0.5-gentoo-paths.patch59
-rw-r--r--games-arcade/epiar/files/digest-epiar-0.51
-rw-r--r--games-arcade/epiar/metadata.xml15
5 files changed, 138 insertions, 0 deletions
diff --git a/games-arcade/epiar/ChangeLog b/games-arcade/epiar/ChangeLog
new file mode 100644
index 000000000000..ff8bb34d8504
--- /dev/null
+++ b/games-arcade/epiar/ChangeLog
@@ -0,0 +1,8 @@
+# ChangeLog for games-arcade/epiar
+# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-arcade/epiar/ChangeLog,v 1.1 2004/03/28 09:59:55 vapier Exp $
+
+*epiar-0.5 (28 Mar 2004)
+
+ 28 Mar 2004; Mike Frysinger <vapier@gentoo.org> :
+ Initial import. Ebuild submitted by Martti Rannanjärvi #39091.
diff --git a/games-arcade/epiar/epiar-0.5.ebuild b/games-arcade/epiar/epiar-0.5.ebuild
new file mode 100644
index 000000000000..c75be7e181bb
--- /dev/null
+++ b/games-arcade/epiar/epiar-0.5.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-arcade/epiar/epiar-0.5.ebuild,v 1.1 2004/03/28 09:59:55 vapier Exp $
+
+inherit games flag-o-matic
+
+DESCRIPTION="A space adventure/combat game"
+HOMEPAGE="http://epiar.net/"
+SRC_URI="mirror://sourceforge/epiar/epiar-0.5.0-src.zip"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="alsa debug"
+
+RDEPEND="virtual/x11
+ virtual/glibc
+ media-libs/aalib
+ media-libs/jpeg
+ media-libs/libpng
+ media-libs/libsdl
+ media-libs/sdl-image
+ sys-libs/ncurses
+ sys-libs/zlib
+ alsa? ( media-libs/alsa-lib )"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ sed -i "/^CFLAGS/s:-pg -g:${CFLAGS}:" Makefile.linux
+ epatch ${FILESDIR}/${PV}-gentoo-paths.patch
+ sed -i "s:GENTOO_DATAPATH:${GAMES_DATADIR}/${PN}/:" src/system/path.c
+}
+
+src_compile() {
+ emake -f Makefile.linux || die
+}
+
+src_install() {
+ dogamesbin epiar || die
+
+ insinto ${GAMES_DATADIR}/${PN}
+ doins *.eaf || die
+ insinto ${GAMES_DATADIR}/${PN}/missions
+ doins missions/*.eaf
+ dodir ${GAMES_DATADIR}/${PN}/plugins
+
+ dodoc AUTHORS ChangeLog README
+
+ prepgamesdirs
+}
diff --git a/games-arcade/epiar/files/0.5-gentoo-paths.patch b/games-arcade/epiar/files/0.5-gentoo-paths.patch
new file mode 100644
index 000000000000..b46f56195aa7
--- /dev/null
+++ b/games-arcade/epiar/files/0.5-gentoo-paths.patch
@@ -0,0 +1,59 @@
+--- src/system/path.c.orig 2004-03-28 04:42:23.329963224 -0500
++++ src/system/path.c 2004-03-28 04:42:47.375307776 -0500
+@@ -187,6 +187,7 @@
+ free(stripped);
+ if (argv)
+ free(argv);
++ goto portage_path;
+ return (0);
+ }
+
+@@ -212,6 +213,11 @@
+ free(stripped);
+ if (argv)
+ free(argv);
++
++portage_path:
++ if (game_path) free(game_path);
++ game_path = (char *)malloc(sizeof(char) * strlen("/usr/share/games/epiar/\0"));
++ sprintf(game_path, "/usr/share/games/epiar/");
+
+ return (0);
+ }
+--- src/input/input.c.orig 2004-03-28 04:48:49.925191816 -0500
++++ src/input/input.c 2004-03-28 04:52:57.184602672 -0500
+@@ -240,7 +240,10 @@
+ *
+ ******************************************************************************/
+ int load_input_cfg(void) {
+- FILE *fp = fopen("./.epiar-input.ecf", "rb");
++ char filename[1024];
++ FILE *fp;
++ snprintf(filename, 1000, "%s/.epiar-input.ecf", getenv("HOME"));
++ fp = fopen(filename, "rb");
+
+ /* make sure all keys are enabled */
+ unlock_keys();
+@@ -282,7 +285,7 @@
+ } else {
+ float file_version = 0.0f;
+ /* read the file into the struct */
+- fp = fopen("./.epiar-input.ecf", "rb");
++ fp = fopen(filename, "rb");
+
+ if (fp == NULL) {
+ fprintf(stdout, "Could not open \"./.epiar-input.ecf\" for reading, assuming default bindings.\n");
+@@ -472,10 +475,12 @@
+ }
+
+ void save_keybindings(void) {
++ char filename[1024];
+ float file_version = 0.2f;
+ FILE *fp;
+
+- fp = fopen("./.epiar-input.ecf", "wb");
++ snprintf(filename, 1000, "%s/.epiar-input.ecf", getenv("HOME"));
++ fp = fopen(filename, "wb");
+ if (fp == NULL) {
+ fprintf(stdout, "Could not create '~/.epiar-input.ecf' to save keybindings\n");
+ return;
diff --git a/games-arcade/epiar/files/digest-epiar-0.5 b/games-arcade/epiar/files/digest-epiar-0.5
new file mode 100644
index 000000000000..ec12b6bba049
--- /dev/null
+++ b/games-arcade/epiar/files/digest-epiar-0.5
@@ -0,0 +1 @@
+MD5 5f9bef3bfbd758d9a2937acf9a91e77f epiar-0.5.0-src.zip 8809392
diff --git a/games-arcade/epiar/metadata.xml b/games-arcade/epiar/metadata.xml
new file mode 100644
index 000000000000..8f0dfef8f5c0
--- /dev/null
+++ b/games-arcade/epiar/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription>
+Epiar is a space adventure/combat game written in C with SDL
+(Simple DirectMedia Layer). It is absolutely free (released
+under the General Public License v2).
+In Epiar, you begin as a shuttle pilot in a galaxy generally
+ruled by anarchy, with few stable governments and numerous
+rebel factions. You start your adventure off doing whatever
+you want, but generally trying to save up money for a new
+starship, and your adventure takes off from there ...
+</longdescription>
+</pkgmetadata>