mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-03 05:28:53 +02:00
Add recipe for flare
This commit is contained in:
66
games-rpg/flare/flare-0.19.recipe
Normal file
66
games-rpg/flare/flare-0.19.recipe
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
SUMMARY="Single-player 2D action RPG."
|
||||||
|
DESCRIPTION="Flare is a a single-player 2D action RPG with fast-paced action \
|
||||||
|
and a dark fantasy style."
|
||||||
|
HOMEPAGE="http://flarerpg.org"
|
||||||
|
SRC_URI="http://downloads.sourceforge.net/project/flare-game/Linux/flare.0.19.tar.gz"
|
||||||
|
CHECKSUM_SHA256="c96995fff6b71d44ddeae611b1ae4cd35162655f73088000786d03478f0a924e"
|
||||||
|
SOURCE_DIR="flare.0.19"
|
||||||
|
REVISION="1"
|
||||||
|
LICENSE="GNU GPL v3"
|
||||||
|
COPYRIGHT="2010-2013 Clint Bellanger"
|
||||||
|
|
||||||
|
ARCHITECTURES="x86 x86_64"
|
||||||
|
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||||
|
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
|
||||||
|
else
|
||||||
|
ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
|
||||||
|
fi
|
||||||
|
SECONDARY_ARCHITECTURES="x86"
|
||||||
|
|
||||||
|
PROVIDES="
|
||||||
|
flare$secondaryArchSuffix = $portVersion
|
||||||
|
app:Flare$secondaryArchSuffix = $portVersion
|
||||||
|
"
|
||||||
|
|
||||||
|
REQUIRES="
|
||||||
|
haiku$secondaryArchSuffix >= $haikuVersion
|
||||||
|
lib:libsdl$secondaryArchSuffix
|
||||||
|
lib:libsdl_mixer$secondaryArchSuffix
|
||||||
|
lib:libsdl_image$secondaryArchSuffix
|
||||||
|
lib:libsdl_ttf$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
|
||||||
|
BUILD_REQUIRES="
|
||||||
|
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||||
|
devel:libsdl$secondaryArchSuffix
|
||||||
|
devel:sdl_mixer$secondaryArchSuffix
|
||||||
|
devel:sdl_image$secondaryArchSuffix
|
||||||
|
devel:sdl_ttf$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
|
||||||
|
BUILD_PREREQUIRES="
|
||||||
|
cmd:make
|
||||||
|
cmd:cmake
|
||||||
|
cmd:gcc$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
|
||||||
|
PATCHES="flare-0.19.patch"
|
||||||
|
|
||||||
|
USER_SETTINGS_FILES="
|
||||||
|
settings/flare
|
||||||
|
"
|
||||||
|
|
||||||
|
BUILD()
|
||||||
|
{
|
||||||
|
cmake .
|
||||||
|
make $jobArgs
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTALL()
|
||||||
|
{
|
||||||
|
mkdir -p $appsDir
|
||||||
|
mkdir -p $dataDir/flare
|
||||||
|
cp flare $appsDir
|
||||||
|
cp -r mods $dataDir/flare/
|
||||||
|
addAppDeskbarSymlink $appsDir/flare "Flare"
|
||||||
|
}
|
||||||
58
games-rpg/flare/patches/flare-0.19.patch
Normal file
58
games-rpg/flare/patches/flare-0.19.patch
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index ef6577f..b7631b7 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -23,6 +23,10 @@ elseif ()
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-enforce-eh-specs")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
+if(HAIKU)
|
||||||
|
+ set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}" "-lbe")
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -g0")
|
||||||
|
elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||||
|
diff --git a/src/Settings.cpp b/src/Settings.cpp
|
||||||
|
index 8beaeed..c22cc09 100644
|
||||||
|
--- a/src/Settings.cpp
|
||||||
|
+++ b/src/Settings.cpp
|
||||||
|
@@ -34,6 +34,12 @@ using namespace std;
|
||||||
|
#include "UtilsFileSystem.h"
|
||||||
|
#include "SharedResources.h"
|
||||||
|
|
||||||
|
+#ifdef __HAIKU__
|
||||||
|
+#include <String.h>
|
||||||
|
+#include <Path.h>
|
||||||
|
+#include <FindDirectory.h>
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define log2(x) logf(x)/logf(2)
|
||||||
|
#endif
|
||||||
|
@@ -232,6 +238,25 @@ void setPaths() {
|
||||||
|
if (dirExists(CUSTOM_PATH_DATA)) PATH_DATA = CUSTOM_PATH_DATA;
|
||||||
|
else if (!CUSTOM_PATH_DATA.empty()) fprintf(stderr, "Error: Could not find specified game data directory.\n");
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+#elif __HAIKU__
|
||||||
|
+// Haiku paths
|
||||||
|
+void setPaths() {
|
||||||
|
+ BPath path;
|
||||||
|
+ find_directory(B_USER_SETTINGS_DIRECTORY, &path);
|
||||||
|
+ BString str = path.Path();
|
||||||
|
+ str << "/flare/";
|
||||||
|
+ createDir(str.String());
|
||||||
|
+ PATH_CONF = str;
|
||||||
|
+ PATH_USER = str;
|
||||||
|
+ PATH_DEFAULT_USER = str;
|
||||||
|
+ find_directory(B_SYSTEM_DATA_DIRECTORY, &path);
|
||||||
|
+ str = path.Path();
|
||||||
|
+ str << "/flare/";
|
||||||
|
+ PATH_DATA = str;
|
||||||
|
+ PATH_DEFAULT_DATA = str;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
#else
|
||||||
|
void setPaths() {
|
||||||
|
|
||||||
Reference in New Issue
Block a user