mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
Flare: bump version
This commit is contained in:
27
games-rpg/flare/additional-files/flare.rdef.in
Normal file
27
games-rpg/flare/additional-files/flare.rdef.in
Normal file
@@ -0,0 +1,27 @@
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = 0,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "Flare",
|
||||
long_info = "@LONG_INFO@"
|
||||
};
|
||||
|
||||
resource app_signature "@APP_SIGNATURE@";
|
||||
|
||||
resource vector_icon {
|
||||
$"6E63696603020106023E30000000000000003E10004840004AF00000FFD965FF"
|
||||
$"DE7B060500040167040614BFFBBBAAE63D553D55BD6CC88CB823C034B526C82E"
|
||||
$"B7D5BC16B823BDAAB690BBD5B919BE1E324232BBE3BAEFBDEBB969B9DB322F37"
|
||||
$"36BA14BAB1BE32BABF3B243F294126463646B9EAC3EBBC464B324D3CC5DFBC98"
|
||||
$"C2E3BF2BC28DBFB24E4447473E4234483E4C4C3451BE7CC813BD37C750BE7CC8"
|
||||
$"130604FA3F4C47484D4B47494C4E47514C4F424E02043C2AC3A82AB8A72A2343"
|
||||
$"23BB7123C6723C5CB8A75CC3A85C554355C67255BB710A044228482A492E412C"
|
||||
$"060A020102023FD67FBC41253A2A0F3DAF324619A04A8C580A00010210011785"
|
||||
$"10040A010102000A020103000A0101001001178410040A0002000100"
|
||||
};
|
||||
@@ -1,60 +0,0 @@
|
||||
SUMMARY="A single-player 2D action role playing game"
|
||||
DESCRIPTION="Flare is a single-player 2D action RPG with fast-paced action \
|
||||
and a dark fantasy style."
|
||||
HOMEPAGE="https://flarerpg.org"
|
||||
COPYRIGHT="2010-2013 Clint Bellanger"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="5"
|
||||
SOURCE_URI="https://downloads.sourceforge.net/project/flare-game/Linux/flare.0.19.tar.gz"
|
||||
CHECKSUM_SHA256="c96995fff6b71d44ddeae611b1ae4cd35162655f73088000786d03478f0a924e"
|
||||
SOURCE_DIR="flare.0.19"
|
||||
PATCHES="flare-0.19.patch"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
USER_SETTINGS_FILES="
|
||||
settings/flare
|
||||
"
|
||||
|
||||
PROVIDES="
|
||||
flare$secondaryArchSuffix = $portVersion
|
||||
app:Flare$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
flare_data
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libsdl$secondaryArchSuffix
|
||||
lib:libsdl_image$secondaryArchSuffix
|
||||
lib:libsdl_mixer$secondaryArchSuffix
|
||||
lib:libsdl_ttf$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libsdl$secondaryArchSuffix
|
||||
devel:sdl_image$secondaryArchSuffix
|
||||
devel:sdl_mixer$secondaryArchSuffix
|
||||
devel:sdl_ttf$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake .
|
||||
make $jobArgs
|
||||
addResourcesToBinaries distribution/flare.rdef flare
|
||||
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir
|
||||
|
||||
cp flare $appsDir
|
||||
addAppDeskbarSymlink $appsDir/flare "Flare"
|
||||
}
|
||||
76
games-rpg/flare/flare-1.11.recipe
Normal file
76
games-rpg/flare/flare-1.11.recipe
Normal file
@@ -0,0 +1,76 @@
|
||||
SUMMARY="A single-player 2D action role playing game"
|
||||
DESCRIPTION="Flare is a single-player 2D action RPG with fast-paced action \
|
||||
and a dark fantasy style."
|
||||
HOMEPAGE="https://flarerpg.org"
|
||||
COPYRIGHT="2010-2021 Clint Bellanger"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/flareteam/flare-engine/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="035ffd936d9e120dc2eb792779a0b7ff64574d4a29a1124946deaf7946d1059d"
|
||||
SOURCE_DIR="flare-engine-$portVersion"
|
||||
PATCHES="flare-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="flare.rdef.in"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
flare$secondaryArchSuffix = $portVersion
|
||||
app:Flare$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
flare_data
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libsdl2_2.0$secondaryArchSuffix
|
||||
lib:libsdl2_image_2.0$secondaryArchSuffix
|
||||
lib:libsdl2_mixer_2.0$secondaryArchSuffix
|
||||
lib:libsdl2_ttf_2.0$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libsdl2_2.0$secondaryArchSuffix
|
||||
devel:libsdl2_image_2.0$secondaryArchSuffix
|
||||
devel:libsdl2_mixer_2.0$secondaryArchSuffix
|
||||
devel:libsdl2_ttf_2.0$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake .. \
|
||||
-DSDL2_INCLUDE_DIR=/system/$relativeIncludeDir/SDL2 \
|
||||
-DSDL2_IMAGE_INCLUDE_DIR=/system/$relativeIncludeDir/SDL2 \
|
||||
-DSDL2_MIXER_INCLUDE_DIR=/system/$relativeIncludeDir/SDL2 \
|
||||
-DSDL2_TTF_INCLUDE_DIR=/system/$relativeIncludeDir/SDL2
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir $dataDir/flare
|
||||
cp build/flare $appsDir/Flare
|
||||
cp -r mods $dataDir/flare
|
||||
|
||||
local APP_SIGNATURE="application/x-vnd.flare"
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/flare.rdef.in > $sourceDir/flare.rdef
|
||||
|
||||
addResourcesToBinaries $sourceDir/flare.rdef $appsDir/Flare
|
||||
addAppDeskbarSymlink $appsDir/Flare
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
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() {
|
||||
|
||||
|
||||
From d54ff21849b9d0d9d98a0388efe95aadd00e4e3a Mon Sep 17 00:00:00 2001
|
||||
From: Humdinger <humdingerb@gmail.com>
|
||||
Date: Mon, 15 Dec 2014 16:35:51 +0100
|
||||
Subject: Adding flare.rdef for a vector icon and an app signature.
|
||||
|
||||
|
||||
diff --git a/distribution/flare.rdef b/distribution/flare.rdef
|
||||
new file mode 100644
|
||||
index 0000000..2f804f0
|
||||
--- /dev/null
|
||||
+++ b/distribution/flare.rdef
|
||||
@@ -0,0 +1,30 @@
|
||||
+resource app_signature "application/x-vnd.flare";
|
||||
+
|
||||
+resource app_flags B_SINGLE_LAUNCH;
|
||||
+
|
||||
+resource app_version {
|
||||
+ major = 0,
|
||||
+ middle = 1,
|
||||
+ minor = 9,
|
||||
+
|
||||
+ /* 0 = development 1 = alpha 2 = beta
|
||||
+ 3 = gamma 4 = golden master 5 = final */
|
||||
+ variety = 1,
|
||||
+
|
||||
+ internal = 0,
|
||||
+
|
||||
+ short_info = "Single-player 2D action RPG",
|
||||
+ long_info = "Single-player 2D RPG with fast-paced action and a dark fantasy style."
|
||||
+};
|
||||
+
|
||||
+resource vector_icon {
|
||||
+ $"6E63696603020106023E30000000000000003E10004840004AF00000FFD965FF"
|
||||
+ $"DE7B060500040167040614BFFBBBAAE63D553D55BD6CC88CB823C034B526C82E"
|
||||
+ $"B7D5BC16B823BDAAB690BBD5B919BE1E324232BBE3BAEFBDEBB969B9DB322F37"
|
||||
+ $"36BA14BAB1BE32BABF3B243F294126463646B9EAC3EBBC464B324D3CC5DFBC98"
|
||||
+ $"C2E3BF2BC28DBFB24E4447473E4234483E4C4C3451BE7CC813BD37C750BE7CC8"
|
||||
+ $"130604FA3F4C47484D4B47494C4E47514C4F424E02043C2AC3A82AB8A72A2343"
|
||||
+ $"23BB7123C6723C5CB8A75CC3A85C554355C67255BB710A044228482A492E412C"
|
||||
+ $"060A020102023FD67FBC41253A2A0F3DAF324619A04A8C580A00010210011785"
|
||||
+ $"10040A010102000A020103000A0101001001178410040A0002000100"
|
||||
+};
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
165
games-rpg/flare/patches/flare-1.11.patchset
Normal file
165
games-rpg/flare/patches/flare-1.11.patchset
Normal file
@@ -0,0 +1,165 @@
|
||||
From 760d8c6dfe207eb581ec101bd14a36d2d20bb3d8 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 12 Mar 2021 20:09:18 +1000
|
||||
Subject: Add Haiku support
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f8f1842..ab2c7f5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -319,6 +319,10 @@ Set (FLARE_HEADERS
|
||||
./src/WidgetTooltip.h
|
||||
)
|
||||
|
||||
+if(HAIKU)
|
||||
+ set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}" "-lbe")
|
||||
+endif()
|
||||
+
|
||||
# Add icon and file info to executable for Windows systems
|
||||
IF (WIN32)
|
||||
SET(FLARE_SOURCES
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index 11727c6..331ad34 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -58,6 +58,8 @@ public:
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "PlatformWin32.cpp"
|
||||
+#elif __HAIKU__
|
||||
+#include "PlatformHaiku.cpp"
|
||||
#elif __ANDROID__
|
||||
#include "PlatformAndroid.cpp"
|
||||
#elif __IPHONEOS__
|
||||
diff --git a/src/PlatformHaiku.cpp b/src/PlatformHaiku.cpp
|
||||
new file mode 100644
|
||||
index 0000000..4430bef
|
||||
--- /dev/null
|
||||
+++ b/src/PlatformHaiku.cpp
|
||||
@@ -0,0 +1,122 @@
|
||||
+/*
|
||||
+Copyright © 2021 Gerasim Troeglazov
|
||||
+
|
||||
+FLARE is free software: you can redistribute it and/or modify it under the terms
|
||||
+of the GNU General Public License as published by the Free Software Foundation,
|
||||
+either version 3 of the License, or (at your option) any later version.
|
||||
+
|
||||
+FLARE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
+
|
||||
+You should have received a copy of the GNU General Public License along with
|
||||
+FLARE. If not, see http://www.gnu.org/licenses/
|
||||
+*/
|
||||
+
|
||||
+#ifdef PLATFORM_CPP_INCLUDE
|
||||
+#ifndef PLATFORM_CPP
|
||||
+#define PLATFORM_CPP
|
||||
+
|
||||
+#include "Platform.h"
|
||||
+#include "Settings.h"
|
||||
+#include "SharedResources.h"
|
||||
+#include "Utils.h"
|
||||
+#include "UtilsFileSystem.h"
|
||||
+#include "UtilsParsing.h"
|
||||
+
|
||||
+#include <SDL.h>
|
||||
+
|
||||
+#include <String.h>
|
||||
+#include <Path.h>
|
||||
+#include <FindDirectory.h>
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <errno.h>
|
||||
+#include <unistd.h>
|
||||
+#include <sys/stat.h>
|
||||
+
|
||||
+Platform platform;
|
||||
+
|
||||
+Platform::Platform()
|
||||
+ : has_exit_button(true)
|
||||
+ , is_mobile_device(false)
|
||||
+ , force_hardware_cursor(false)
|
||||
+ , has_lock_file(false)
|
||||
+ , config_menu_type(CONFIG_MENU_TYPE_DESKTOP)
|
||||
+ , default_renderer("")
|
||||
+ , config_video(Platform::Video::COUNT, true)
|
||||
+ , config_audio(Platform::Audio::COUNT, true)
|
||||
+ , config_interface(Platform::Interface::COUNT, true)
|
||||
+ , config_input(Platform::Input::COUNT, true)
|
||||
+ , config_misc(Platform::Misc::COUNT, true)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+Platform::~Platform() {
|
||||
+}
|
||||
+
|
||||
+void Platform::setPaths() {
|
||||
+ BPath path;
|
||||
+ find_directory(B_USER_SETTINGS_DIRECTORY, &path);
|
||||
+ settings->path_conf = std::string(path.Path()) + "/flare/";
|
||||
+ Filesystem::createDir(settings->path_conf);
|
||||
+
|
||||
+ settings->path_user = settings->path_conf;
|
||||
+ Filesystem::createDir(settings->path_user + "mods/");
|
||||
+ Filesystem::createDir(settings->path_user + "saves/");
|
||||
+
|
||||
+ bool path_data = false;
|
||||
+
|
||||
+ if (Filesystem::pathExists(settings->custom_path_data)) {
|
||||
+ if (!path_data) settings->path_data = settings->custom_path_data;
|
||||
+ path_data = true;
|
||||
+ }
|
||||
+ else if (!settings->custom_path_data.empty()) {
|
||||
+ Utils::logError("Settings: Could not find specified game data directory.");
|
||||
+ settings->custom_path_data = "";
|
||||
+ }
|
||||
+
|
||||
+ if (Filesystem::pathExists("./mods")) {
|
||||
+ if (!path_data) settings->path_data = "./";
|
||||
+ path_data = true;
|
||||
+ }
|
||||
+
|
||||
+#if defined DATA_INSTALL_DIR
|
||||
+ if (!path_data) settings->path_data = DATA_INSTALL_DIR "/";
|
||||
+ if (!path_data && Filesystem::pathExists(settings->path_data)) path_data = true;
|
||||
+#endif
|
||||
+
|
||||
+ find_directory(B_SYSTEM_DATA_DIRECTORY, &path);
|
||||
+
|
||||
+ if (!path_data) settings->path_data = std::string(path.Path()) + "/flare/";
|
||||
+ if (!path_data && Filesystem::pathExists(settings->path_data)) path_data = true;
|
||||
+ if (!path_data) settings->path_data = "./";
|
||||
+}
|
||||
+
|
||||
+bool Platform::dirCreate(const std::string& path) {
|
||||
+ if (mkdir(path.c_str(), S_IRWXU | S_IRWXG | S_IRWXO) == -1) {
|
||||
+ std::string error_msg = "Platform::dirCreate (" + path + ")";
|
||||
+ perror(error_msg.c_str());
|
||||
+ return false;
|
||||
+ }
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+bool Platform::dirRemove(const std::string& path) {
|
||||
+ if (rmdir(path.c_str()) == -1) {
|
||||
+ std::string error_msg = "Platform::dirRemove (" + path + ")";
|
||||
+ perror(error_msg.c_str());
|
||||
+ return false;
|
||||
+ }
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+// unused
|
||||
+void Platform::FSInit() {}
|
||||
+bool Platform::FSCheckReady() { return true; }
|
||||
+void Platform::FSCommit() {}
|
||||
+void Platform::setScreenSize() {}
|
||||
+void Platform::setExitEventFilter() {}
|
||||
+
|
||||
+#endif // PLATFORM_CPP
|
||||
+#endif // PLATFORM_CPP_INCLUDE
|
||||
--
|
||||
2.30.2
|
||||
|
||||
Reference in New Issue
Block a user