edgar, bump version (#3534)

This commit is contained in:
Schrijvers Luc
2019-02-09 08:40:13 +01:00
committed by GitHub
parent c58d014acf
commit dacd75a5de
2 changed files with 118 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
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="https://www.parallelrealities.co.uk/games/edgar/"
COPYRIGHT="2009-2018 Parallel Realities"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://github.com/riksweeney/edgar/releases/download/$portVersion/edgar-$portVersion-1.tar.gz"
CHECKSUM_SHA256="5dc782f999b22ee5dc6c1cb767137205c840a40cfd1a483147cb82d7c6d00b2e"
SOURCE_FILENAME="edgar-$portVersion.tar.gz"
SOURCE_DIR="edgar-$portVersion"
PATCHES="edgar-$portVersion.patchset"
ADDITIONAL_FILES="edgar.rdef.in"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PROVIDES="
edgar = $portVersion
app:edgar = $portVersion
"
REQUIRES="
haiku
lib:libintl
lib:libpng16
lib:libSDL
lib:libSDL_image
lib:libSDL_mixer
lib:libSDL_ttf
lib:libz
"
BUILD_REQUIRES="
haiku_devel
devel:libintl
devel:libpng16
devel:libSDL
devel:libSDL_image
devel:libSDL_mixer
devel:libSDL_ttf
devel:libz
"
BUILD_PREREQUIRES="
cmd:gcc
cmd:make
"
BUILD()
{
make PREFIX=$prefix BIN_DIR=$appsDir/ \
DATA_DIR=$dataDir/edgar/ DOC_DIR=$docDir/ \
MAN_DIR=$manDir/man6 LOCALE_DIR=$dataDir/locale/ $jobArgs
}
INSTALL()
{
make install PREFIX=$prefix BIN_DIR=$appsDir/ \
DATA_DIR=$dataDir/edgar/ DOC_DIR=$docDir/ \
MAN_DIR=$manDir/man6 LOCALE_DIR=$dataDir/locale/
rm -rf $prefix/share
mv $appsDir/edgar $appsDir/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
addAppDeskbarSymlink $appsDir/Edgar
}

View File

@@ -0,0 +1,40 @@
From 04f238abd162bc62a3d4bd846ef34d644c5e9f3b Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Fri, 4 Jan 2019 08:58:59 +0100
Subject: correct load/save path
diff --git a/src/system/load_save.c b/src/system/load_save.c
index 2d55feb..b6b136d 100644
--- a/src/system/load_save.c
+++ b/src/system/load_save.c
@@ -73,7 +73,7 @@ extern Game game;
#if MACOS == 1
snprintf(dir, sizeof(dir), "%s/Library/Application Support", userHome);
#else
- snprintf(dir, sizeof(dir), "%s/.parallelrealities", userHome);
+ snprintf(dir, sizeof(dir), "%s/config/settings/parallelrealities", userHome);
#endif
if ((mkdir(dir, S_IRWXU|S_IRWXG|S_IROTH|S_IXOTH) != 0) && (errno != EEXIST))
@@ -86,7 +86,7 @@ extern Game game;
#if MACOS == 1
snprintf(dir, sizeof(dir), "%s/Library/Application Support/Edgar", userHome);
#else
- snprintf(dir, sizeof(dir), "%s/.parallelrealities/edgar", userHome);
+ snprintf(dir, sizeof(dir), "%s/config/settings/parallelrealities/Edgar", userHome);
#endif
if ((mkdir(dir, S_IRWXU|S_IRWXG|S_IROTH|S_IXOTH) != 0) && (errno != EEXIST))
@@ -99,7 +99,7 @@ extern Game game;
#if MACOS == 1
snprintf(gameSavePath, sizeof(gameSavePath), "%s/Library/Application Support/Edgar/", userHome);
#else
- snprintf(gameSavePath, sizeof(gameSavePath), "%s/.parallelrealities/edgar/", userHome);
+ snprintf(gameSavePath, sizeof(gameSavePath), "%s/config/settings/parallelrealities/Edgar/", userHome);
#endif
snprintf(tempFile, sizeof(tempFile), "%stmpsave", gameSavePath);
--
2.19.1