edgar: bump version (#1161)

* enable x86 and x86_64.
This commit is contained in:
Schrijvers Luc
2017-02-22 07:02:54 +00:00
committed by Jérôme Duval
parent 00ee0cb83a
commit e46e5d1c63
3 changed files with 35 additions and 73 deletions

View File

@@ -0,0 +1,12 @@
resource app_signature "application/x-vnd.edgar";
resource app_flags B_SINGLE_LAUNCH | B_ARGV_ONLY;
resource app_version {
major = @MAJOR@,
middle = @MIDDLE@,
variety = B_APPV_FINAL,
internal = 0,
short_info = "Edgar",
long_info = "The Legend of Edgar is a platform game"
};

View File

@@ -6,20 +6,19 @@ 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"
COPYRIGHT="2009-2014 Parallel Realities"
COPYRIGHT="2009-2017 Parallel Realities"
LICENSE="GNU GPL v2"
REVISION="2"
SOURCE_URI="http://sourceforge.net/projects/legendofedgar/files/1.16/edgar-1.16-1.tar.gz"
CHECKSUM_SHA256="33884b1adb09f826dbe653ea19004bd0c11baf4f25651c4e49f05d2def5dc8f4"
SOURCE_DIR="edgar-1.16"
PATCHES="edgar-1.16.patch"
REVISION="1"
SOURCE_URI="https://github.com/riksweeney/edgar/releases/download/$portVersion/edgar-1.26-1.tar.gz"
CHECKSUM_SHA256="d8de6ec2963f3d2d005594a93c4daf5fb618618b55411d6c7319689008cbc71d"
SOURCE_DIR="edgar-$portVersion"
ADDITIONAL_FILES="edgar.rdef.in"
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PROVIDES="
edgar = $portVersion
app:edgar = $portVersion
cmd:edgar = $portVersion
"
REQUIRES="
haiku
@@ -49,14 +48,26 @@ BUILD_PREREQUIRES="
BUILD()
{
make $jobArgs
make PREFIX=$appsDir/Edgar $jobArgs
}
INSTALL()
{
installDir=$appsDir/"Edgar/"
installDir=$appsDir/Edgar/
mkdir -p "$installDir"
make install DESTDIR="$installDir" BIN_DIR="$installDir" DATA_DIR="$installDir"games/edgar/
make install PREFIX="$installDir"
addAppDeskbarSymlink $appsDir/Edgar/edgar Edgar
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
$portDir/additional-files/edgar.rdef.in > edgar.rdef
addResourcesToBinaries edgar.rdef \
$appsDir/Edgar/games/edgar
ln -s $appsDir/Edgar/games/edgar $appsDir/Edgar/Edgar
addAppDeskbarSymlink $appsDir/Edgar/Edgar
}

View File

@@ -1,61 +0,0 @@
--- 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 <unistd.h>
+#include <libgen.h>
+#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<argc;i++)