diff --git a/games-arcade/edgar/edgar-1.16_1.recipe b/games-arcade/edgar/edgar-1.16_1.recipe new file mode 100644 index 000000000..07c0aa503 --- /dev/null +++ b/games-arcade/edgar/edgar-1.16_1.recipe @@ -0,0 +1,66 @@ +SUMMARY="The Legend of Edgar is a platform game." +DESCRIPTION="Edgar must battle his way across the world, solving puzzles and \ +defeating powerful enemies to achieve his quest. When Edgar's father fails \ +to return home after venturing out one dark and stormy night, Edgar fears the \ +worst: he has been captured by the evil sorceror who lives in a fortress \ +beyond the forbidden swamp. Donning his armour, Edgar sets off to rescue him, \ +but his quest will not be easy..." +HOMEPAGE="http://www.parallelrealities.co.uk/p/legend-of-edgar.html" +LICENSE="GNU GPL v2" +COPYRIGHT="Copyright (C) 2009-2014 Parallel Realities" +SRC_URI="http://sourceforge.net/projects/legendofedgar/files/1.16/edgar-1.16-1.tar.gz" +CHECKSUM_SHA256="33884b1adb09f826dbe653ea19004bd0c11baf4f25651c4e49f05d2def5dc8f4" +REVISION="1" + +ARCHITECTURES="x86_gcc2 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="?x86 ?x86_64" + +SOURCE_DIR="edgar-1.16" + +PATCHES="edgar-1.16.patch" + +PROVIDES=" + edgar = $portVersion + app:edgar = $portVersion + cmd:edgar = $portVersion + " +REQUIRES=" + haiku >= $haikuVersion + lib:libintl + lib:libpng + lib:libSDL + lib:libSDL_image + lib:libSDL_mixer + lib:libSDL_ttf + lib:libz + " + +BUILD_REQUIRES=" + haiku_devel >= $haikuVersion + devel:libintl + devel:libpng + devel:libSDL + devel:libSDL_image + devel:libSDL_mixer + devel:libSDL_ttf + devel:libz + " + +BUILD_PREREQUIRES=" + cmd:make + cmd:gcc + " + +BUILD() +{ + make $jobArgs +} + +INSTALL() +{ + installDir=$appsDir/"Edgar/" + mkdir -p "$installDir" + make install DESTDIR="$installDir" BIN_DIR="$installDir" DATA_DIR="$installDir"games/edgar/ + + addAppDeskbarSymlink $appsDir/Edgar/edgar Edgar +} diff --git a/games-arcade/edgar/patches/edgar-1.16.patch b/games-arcade/edgar/patches/edgar-1.16.patch new file mode 100644 index 000000000..179aa43e0 --- /dev/null +++ b/games-arcade/edgar/patches/edgar-1.16.patch @@ -0,0 +1,61 @@ +--- edgar-1.16/makefile.org 2014-05-25 09:27:07.000000000 +0200 ++++ edgar-1.16/makefile 2014-07-18 14:29:20.147062784 +0200 +@@ -22,27 +22,27 @@ + + CC = gcc + +-PREFIX = $(DESTDIR)/usr ++PREFIX = $(DESTDIR)/ + BIN_DIR = $(PREFIX)/games/ +-DOC_DIR = $(PREFIX)/share/doc/$(PROG)/ +-ICON_DIR = $(PREFIX)/share/icons/hicolor/ +-DESKTOP_DIR = $(PREFIX)/share/applications/ +-LOCALE_DIR = $(PREFIX)/share/locale/ ++DOC_DIR = $(PREFIX)/doc/$(PROG)/ ++ICON_DIR = $(PREFIX)/icons/hicolor/ ++DESKTOP_DIR = $(PREFIX)/applications/ ++LOCALE_DIR = $(PREFIX)/locale/ + LOCALE_MO = $(patsubst %.po,%.mo,$(wildcard locale/*.po)) + + ifeq ($(UNIX),0) + DATA_DIR = + else +-DATA_DIR = $(PREFIX)/share/games/edgar/ ++DATA_DIR = $(PREFIX)games/edgar/ + endif + + ifeq ($(DEV),1) +-CFLAGS = -Wall -Werror -g -pedantic -DVERSION=$(VERSION) -DRELEASE=$(RELEASE) -DDEV=$(DEV) -DINSTALL_PATH=\"$(DATA_DIR)\" -DLOCALE_DIR=\"$(LOCALE_DIR)\" -DPAK_FILE=\"$(PAK_FILE)\" -DUNIX=$(UNIX) ++CFLAGS = -Wall -g -pedantic -DVERSION=$(VERSION) -DRELEASE=$(RELEASE) -DDEV=$(DEV) -DINSTALL_PATH=\"$(DATA_DIR)\" -DLOCALE_DIR=\"$(LOCALE_DIR)\" -DPAK_FILE=\"$(PAK_FILE)\" -DUNIX=$(UNIX) + else + CFLAGS = -Wall -pedantic -DVERSION=$(VERSION) -DRELEASE=$(RELEASE) -DDEV=$(DEV) -DINSTALL_PATH=\"$(DATA_DIR)\" -DLOCALE_DIR=\"$(LOCALE_DIR)\" -DPAK_FILE=\"$(PAK_FILE)\" -DUNIX=$(UNIX) + endif + +-LFLAGS = `sdl-config --libs` -lSDL -lSDL_image -lSDL_mixer -lSDL_ttf -lz -lm ++LFLAGS = `sdl-config --libs` -lSDL -lSDL_image -lSDL_mixer -lSDL_ttf -lz + + TILE_OBJS = tile_creator.o save_png.o + PAK_OBJS = pak_creator.o +--- edgar-1.16/src/main.c.org 2013-12-31 17:36:52.043778048 +0100 ++++ edgar-1.16/src/main.c 2014-09-13 14:51:24.000000000 +0200 +@@ -43,6 +43,11 @@ + #include "system/resources.h" + #include "title.h" + ++#ifdef __HAIKU__ ++#include ++#include ++#endif ++ + Input input, menuInput; + Entity *self; + Game game; +@@ -67,6 +72,8 @@ + + showCredits = FALSE; + ++ chdir(dirname(argv[0])); ++ + /* Load the resources */ + + for (i=1;i