summaryrefslogtreecommitdiff
path: root/games-arcade/epiar
diff options
context:
space:
mode:
authorPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
committerPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
commitecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch)
treeb89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /games-arcade/epiar
parent1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff)
downloadbaldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip
Updating liguros repo
Diffstat (limited to 'games-arcade/epiar')
-rw-r--r--games-arcade/epiar/Manifest1
-rw-r--r--games-arcade/epiar/epiar-0.5-r1.ebuild50
-rw-r--r--games-arcade/epiar/files/epiar-0.5-Makefile.linux.patch20
-rw-r--r--games-arcade/epiar/files/epiar-0.5-gcc41.patch10
-rw-r--r--games-arcade/epiar/files/epiar-0.5-paths.patch86
-rw-r--r--games-arcade/epiar/files/epiar-0.5-underlink.patch10
-rw-r--r--games-arcade/epiar/metadata.xml22
7 files changed, 199 insertions, 0 deletions
diff --git a/games-arcade/epiar/Manifest b/games-arcade/epiar/Manifest
new file mode 100644
index 000000000000..baa5cbae42a2
--- /dev/null
+++ b/games-arcade/epiar/Manifest
@@ -0,0 +1 @@
+DIST epiar-0.5.0-src.zip 8809392 BLAKE2B c29c541f5841da91d13f7ccddfa2d2175265a434ae03e2ed87a64cd5c177d7139ff2cf44ec679ec023fe783427868f0f234c6f5f49d0d52ab08be852d424ba59 SHA512 22d8655aefd3aa071de064aeeed40d8780fb32ee702e657c8b8a723c381b6825ae9b5820cf5b29991e14bc264c443d0b24f88656b4997a6270383aa080c15f3e
diff --git a/games-arcade/epiar/epiar-0.5-r1.ebuild b/games-arcade/epiar/epiar-0.5-r1.ebuild
new file mode 100644
index 000000000000..203d8500f903
--- /dev/null
+++ b/games-arcade/epiar/epiar-0.5-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit flag-o-matic eutils games
+
+DESCRIPTION="A space adventure/combat game"
+HOMEPAGE="https://sourceforge.net/projects/epiar/"
+SRC_URI="mirror://sourceforge/epiar/${P}.0-src.zip"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+RDEPEND="media-libs/libsdl[video]
+ media-libs/sdl-image[png]"
+DEPEND="${RDEPEND}
+ x11-libs/libX11
+ virtual/opengl
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_prepare() {
+ sed -i \
+ -e "/^CFLAGS/s:-pg -g:${CFLAGS} ${LDFLAGS}:" \
+ Makefile.linux || die
+ epatch \
+ "${FILESDIR}"/${P}-paths.patch \
+ "${FILESDIR}"/${P}-gcc41.patch \
+ "${FILESDIR}"/${P}-Makefile.linux.patch \
+ "${FILESDIR}"/${P}-underlink.patch
+ sed -i \
+ -e "s:GENTOO_DATADIR:${GAMES_DATADIR}/${PN}/:" \
+ src/main.c || die
+}
+
+src_compile() {
+ emake -f Makefile.linux
+}
+
+src_install() {
+ dogamesbin epiar
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r missions *.eaf
+ keepdir "${GAMES_DATADIR}"/${PN}/plugins
+ dodoc AUTHORS ChangeLog README
+ prepgamesdirs
+}
diff --git a/games-arcade/epiar/files/epiar-0.5-Makefile.linux.patch b/games-arcade/epiar/files/epiar-0.5-Makefile.linux.patch
new file mode 100644
index 000000000000..3086bd13ef9a
--- /dev/null
+++ b/games-arcade/epiar/files/epiar-0.5-Makefile.linux.patch
@@ -0,0 +1,20 @@
+--- Makefile.linux.old 2007-04-05 16:42:30 +0000
++++ Makefile.linux 2007-04-05 16:42:47 +0000
+@@ -24,7 +24,7 @@
+ @echo Building Epiar 0.5.0 ...
+ @$(CC) $(CFLAGS) -I/usr/X11R6/lib/ $(OBJS) -o epiar $(LIBS)
+ @echo Building plugins ...
+- @make -f Makefile.linux plugin
++ @$(MAKE) -f Makefile.linux plugin
+ @echo Epiar 0.5.0 build complete.
+ @echo
+ @echo Type './epiar' to play.
+@@ -33,7 +33,7 @@
+ @echo Building Epiar 0.5.0 and linking statically ...
+ @$(CC) $(CFLAGS) -L/usr/X11R6/lib -L/opt/gnome-2.1/lib $(OBJS) -o epiar $(STATIC_LIBS)
+ @echo Building plugins ...
+- @make plugin
++ @$(MAKE) plugin
+ @echo Epiar 0.5.0 build complete.
+ @echo
+ @echo Type './epiar' to play.
diff --git a/games-arcade/epiar/files/epiar-0.5-gcc41.patch b/games-arcade/epiar/files/epiar-0.5-gcc41.patch
new file mode 100644
index 000000000000..65f08b2691d1
--- /dev/null
+++ b/games-arcade/epiar/files/epiar-0.5-gcc41.patch
@@ -0,0 +1,10 @@
+--- src/game/game.h.old 2006-04-23 22:13:36.000000000 +0200
++++ src/game/game.h 2006-04-23 22:13:50.000000000 +0200
+@@ -2,7 +2,6 @@
+ #include "includes.h"
+
+ extern Uint32 average_loop_time;
+-extern Uint32 game_start_time;
+ extern Uint32 total_play_time, total_frames_drawn;
+ extern float average_session_fps, current_fps;
+
diff --git a/games-arcade/epiar/files/epiar-0.5-paths.patch b/games-arcade/epiar/files/epiar-0.5-paths.patch
new file mode 100644
index 000000000000..41266c7272b1
--- /dev/null
+++ b/games-arcade/epiar/files/epiar-0.5-paths.patch
@@ -0,0 +1,86 @@
+--- src/input/input.c
++++ src/input/input.c
+@@ -240,7 +240,10 @@
+ *
+ ******************************************************************************/
+ int load_input_cfg(void) {
+- FILE *fp = fopen("./.epiar-input.ecf", "rb");
++ char filename[PATH_MAX];
++ FILE *fp;
++ snprintf(filename, sizeof(filename), "%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[PATH_MAX];
+ float file_version = 0.2f;
+ FILE *fp;
+
+- fp = fopen("./.epiar-input.ecf", "wb");
++ snprintf(filename, sizeof(filename), "%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;
+--- src/main.c
++++ src/main.c
+@@ -16,7 +16,7 @@
+ unsigned char view_mode = 0;
+ int ship_to_follow = 0;
+ int desired_bpp = 16;
+-char *game_path;
++const char * const game_path = "GENTOO_DATADIR";
+ unsigned char use_ogl = 0;
+ unsigned char skip_intro = 0;
+ FILE *epiar_eaf = NULL, *main_eaf = NULL;
+@@ -78,8 +78,6 @@
+
+ parse_commandline(argc, argv);
+
+- get_absolute_path(argv[0]);
+-
+ init(desired_bpp);
+
+ menu();
+--- src/main.h
++++ src/main.h
+@@ -1,2 +1,2 @@
+ extern char epiar_version[6];
+-extern char *game_path;
++extern const char * const game_path;
+--- src/system/init.c
++++ src/system/init.c
+@@ -89,9 +89,6 @@
+ main_eaf = NULL;
+ }
+
+- assert(game_path != NULL);
+- free(game_path);
+- game_path = NULL;
+
+ if (average_loop_time == 0) average_loop_time = 18; /* in case they quit on menu */
+ #ifndef NDEBUG
+--- src/system/path.c
++++ src/system/path.c
+@@ -45,7 +45,7 @@
+ }
+ #endif
+
+-#ifdef LINUX
++#if 0
+ char *strip_path_of_binary(char *argv) {
+ int len = 0, i, blen = 0;
+ char *stripped = NULL;
diff --git a/games-arcade/epiar/files/epiar-0.5-underlink.patch b/games-arcade/epiar/files/epiar-0.5-underlink.patch
new file mode 100644
index 000000000000..13146cb68b27
--- /dev/null
+++ b/games-arcade/epiar/files/epiar-0.5-underlink.patch
@@ -0,0 +1,10 @@
+--- Makefile.linux.old 2011-06-22 15:15:50.000000000 +0200
++++ Makefile.linux 2011-06-22 15:17:01.000000000 +0200
+@@ -1,6 +1,6 @@
+ CFLAGS=-W -Wall `sdl-config --cflags` -Isrc/ -DLINUX -DDEVEL -export-dynamic -I/usr/include/SDL -I/usr/local/include/SDL -DBLIT_METHOD_2 -DNAUDIO -O2 -march=pentium4 -pipe -mfpmath=sse -ggdb -Wl,-O1 -Wl,--as-needed
+
+-LIBS=-lm `sdl-config --libs` -lSDL_image
++LIBS=-lm `sdl-config --libs` -lSDL_image -ldl
+ STATIC_LIBS=-lm /usr/local/lib/libSDL.a /usr/local/lib/libSDL_image.a /usr/local/lib/libSDL_ttf.a /usr/local/lib/libopenal.a /usr/local/lib/libvorbisfile.a /usr/local/lib/libvorbis.a /usr/local/lib/libogg.a /usr/lib/libpng.a /usr/lib/libz.a -lpthread -ldl -lfreetype /usr/lib/libjpeg.a -lX11 -lXext -lesd
+
+ OBJS=main.o init.o video.o backbuffer.o debug.o audio.o linux_video.o \
diff --git a/games-arcade/epiar/metadata.xml b/games-arcade/epiar/metadata.xml
new file mode 100644
index 000000000000..52c2dde0e477
--- /dev/null
+++ b/games-arcade/epiar/metadata.xml
@@ -0,0 +1,22 @@
+<?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>
+ <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>
+ <upstream>
+ <remote-id type="sourceforge">epiar</remote-id>
+ </upstream>
+ <origin>gentoo-staging</origin>
+</pkgmetadata>