edgar, bump version (#7488)

This commit is contained in:
Schrijvers Luc
2022-11-26 15:33:33 +01:00
committed by GitHub
parent 69d9121c3f
commit 59d9ba2ed5
4 changed files with 2 additions and 212 deletions

View File

@@ -1,82 +0,0 @@
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="3"
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="all"
USER_SETTINGS_FILES="
settings/parallelrealities/Edgar directory
"
PROVIDES="
edgar = $portVersion
app:edgar = $portVersion
"
REQUIRES="
haiku
lib:libintl
lib:libpng16
lib:libSDL_1.2
lib:libSDL_image_1.2
lib:libSDL_mixer_1.2
lib:libSDL_ttf_2.0
lib:libz
"
BUILD_REQUIRES="
haiku_devel
devel:libintl
devel:libpng16
devel:libSDL_1.2
devel:libSDL_image_1.2
devel:libSDL_mixer_1.2
devel:libSDL_ttf_2.0
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

@@ -6,14 +6,13 @@ 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-2021 Parallel Realities"
COPYRIGHT="2009-2022 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="f4793f9a14cc0cddf516fe5dadaa91d87836852668ab1188cee88dc90bce4184"
CHECKSUM_SHA256="0793815208f64ba396bd10ab56e325a9e2d65c7f1baea840ff138448e3389743"
SOURCE_FILENAME="edgar-$portVersion.tar.gz"
SOURCE_DIR="edgar-$portVersion"
PATCHES="edgar-$portVersion.patchset"
ADDITIONAL_FILES="edgar.rdef.in"
ARCHITECTURES="all !x86_gcc2"

View File

@@ -1,65 +0,0 @@
From 75a7140e56071a2214ede84ac404013661890b8e Mon Sep 17 00:00:00 2001
From: TURX <turx2003@gmail.com>
Date: Tue, 21 Jan 2020 23:14:22 +0800
Subject: [PATCH] fix Haiku support
---
src/system/load_save.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/system/load_save.c b/src/system/load_save.c
index 2d55feba5..b2309a4c3 100644
--- a/src/system/load_save.c
+++ b/src/system/load_save.c
@@ -41,6 +41,10 @@ Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
#include "load_save.h"
#include "resources.h"
+#ifdef __HAIKU__
+#include <FindDirectory.h>
+#endif
+
static char gameSavePath[MAX_PATH_LENGTH], tempFile[MAX_PATH_LENGTH], saveFileIndex[MAX_PATH_LENGTH], continueFile[MAX_PATH_LENGTH];
static int temporaryDataExists;
@@ -57,6 +61,7 @@ extern Game game;
{
char *userHome;
char dir[MAX_PATH_LENGTH];
+ char path[MAX_PATH_LENGTH];
struct passwd *pass;
pass = getpwuid(geteuid());
@@ -72,6 +77,9 @@ extern Game game;
#if MACOS == 1
snprintf(dir, sizeof(dir), "%s/Library/Application Support", userHome);
+ #elif defined(__HAIKU__)
+ find_directory(B_USER_SETTINGS_DIRECTORY, 0, true, path, sizeof(path));
+ snprintf(dir, sizeof(dir), "%s/parallelrealities", path);
#else
snprintf(dir, sizeof(dir), "%s/.parallelrealities", userHome);
#endif
@@ -85,6 +93,9 @@ extern Game game;
#if MACOS == 1
snprintf(dir, sizeof(dir), "%s/Library/Application Support/Edgar", userHome);
+ #elif defined(__HAIKU__)
+ find_directory(B_USER_SETTINGS_DIRECTORY, 0, true, path, sizeof(path));
+ snprintf(dir, sizeof(dir), "%s/parallelrealities/Edgar", path);
#else
snprintf(dir, sizeof(dir), "%s/.parallelrealities/edgar", userHome);
#endif
@@ -98,6 +109,9 @@ extern Game game;
#if MACOS == 1
snprintf(gameSavePath, sizeof(gameSavePath), "%s/Library/Application Support/Edgar/", userHome);
+ #elif defined(__HAIKU__)
+ find_directory(B_USER_SETTINGS_DIRECTORY, 0, true, path, sizeof(path));
+ snprintf(gameSavePath, sizeof(gameSavePath), "%s/parallelrealities/Edgar", path);
#else
snprintf(gameSavePath, sizeof(gameSavePath), "%s/.parallelrealities/edgar/", userHome);
#endif
--
2.20.1

View File

@@ -1,62 +0,0 @@
From d5c7d8ff829dcc9953e496e77c695f3e5cfdb3db Mon Sep 17 00:00:00 2001
From: TURX <turx2003@gmail.com>
Date: Tue, 21 Jan 2020 23:14:22 +0800
Subject: [PATCH] fix Haiku support
diff --git a/src/system/load_save.c b/src/system/load_save.c
index 98d2283..4293283 100644
--- a/src/system/load_save.c
+++ b/src/system/load_save.c
@@ -42,6 +42,10 @@ Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
#include "load_save.h"
#include "resources.h"
+#ifdef __HAIKU__
+#include <FindDirectory.h>
+#endif
+
static char gameSavePath[MAX_PATH_LENGTH], tempFile[MAX_PATH_LENGTH], saveFileIndex[MAX_PATH_LENGTH], continueFile[MAX_PATH_LENGTH];
static int temporaryDataExists;
@@ -58,6 +62,7 @@ extern Game game;
{
char *userHome;
char dir[MAX_PATH_LENGTH];
+ char path[MAX_PATH_LENGTH];
struct passwd *pass;
pass = getpwuid(geteuid());
@@ -73,6 +78,9 @@ extern Game game;
#if MACOS == 1
SNPRINTF(dir, sizeof(dir), "%s/Library/Application Support", userHome);
+ #elif defined(__HAIKU__)
+ find_directory(B_USER_SETTINGS_DIRECTORY, 0, true, path, sizeof(path));
+ snprintf(dir, sizeof(dir), "%s/parallelrealities", path);
#else
SNPRINTF(dir, sizeof(dir), "%s/.parallelrealities", userHome);
#endif
@@ -86,6 +94,9 @@ extern Game game;
#if MACOS == 1
SNPRINTF(dir, sizeof(dir), "%s/Library/Application Support/Edgar", userHome);
+ #elif defined(__HAIKU__)
+ find_directory(B_USER_SETTINGS_DIRECTORY, 0, true, path, sizeof(path));
+ snprintf(dir, sizeof(dir), "%s/parallelrealities/Edgar", path);
#else
SNPRINTF(dir, sizeof(dir), "%s/.parallelrealities/edgar", userHome);
#endif
@@ -99,6 +110,9 @@ extern Game game;
#if MACOS == 1
SNPRINTF(gameSavePath, sizeof(gameSavePath), "%s/Library/Application Support/Edgar/", userHome);
+ #elif defined(__HAIKU__)
+ find_directory(B_USER_SETTINGS_DIRECTORY, 0, true, path, sizeof(path));
+ snprintf(gameSavePath, sizeof(gameSavePath), "%s/parallelrealities/Edgar", path);
#else
SNPRINTF(gameSavePath, sizeof(gameSavePath), "%s/.parallelrealities/edgar/", userHome);
#endif
--
2.30.2