Update Flare to 1.14, separate data into mod packages, add extra mods (#12247)

Removed old patch, makes linking fail
This commit is contained in:
Peppersawce
2025-08-25 07:55:46 +02:00
committed by GitHub
parent aa13a8eaae
commit ccf52e7fef
6 changed files with 200 additions and 277 deletions

View File

@@ -1,76 +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-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="all !x86_gcc2"
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
}

View File

@@ -0,0 +1,134 @@
SUMMARY="Free/Libre Action Roleplaying Engine"
DESCRIPTION="Flare is an open source, 2D action RPG licensed under the GPL3 license. Its game play \
can be likened to the games in the Diablo series.
While the core engine is written in C++ with SDL2, there is an easy to use modding interface, \
by using it, its possible to create entirely new games. On the Flare website's Mods page, \
you can find games made by the Flare team, as well a few select community projects.
This package only provides the Flare engine, gameplay mods can be installed through \
other packages or by putting them manually in 'non-packaged/data/flare/mods'."
HOMEPAGE="https://flarerpg.org/"
COPYRIGHT="2010-2022 Clint Bellanger & Flare team"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/flareteam/flare-engine/archive/v$portVersion/flare-engine-v$portVersion.tar.gz"
CHECKSUM_SHA256="2c1bafeaa5ac26c10449bfcb7151b06e8a22547aa7364d2a39bbcb135aa50a09"
SOURCE_DIR="flare-engine-$portVersion"
SOURCE_URI_2="https://github.com/flareteam/flare-game/archive/v$portVersion/flare-game-v$portVersion.tar.gz"
CHECKSUM_SHA256_2="65758462070aa88842084f8ee69083d8226e93cfbf83481663276d8307494b8e"
SOURCE_DIR_2="flare-game-$portVersion"
ADDITIONAL_FILES="flare.rdef.in"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
flare$secondaryArchSuffix = $portVersion
app:Flare = $portVersion
"
REQUIRES="
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
"
SUMMARY_mod_empyrean="${SUMMARY} - Empyrean Campaign"
DESCRIPTION_mod_empyrean="The Empyrean campaign is the official campaign for Flare, the Free/Libre Action Roleplaying Engine."
ARCHITECTURES_mod_empyrean="any"
PROVIDES_mod_empyrean="
flare_mod_empyrean = $portVersion
"
REQUIRES_mod_empyrean="
flare_mod_fantasycore == $portVersion base
"
SUMMARY_mod_fantasycore="${SUMMARY} - Fantasycore mods"
DESCRIPTION_mod_fantasycore="This package includes the Fantasycore core mod, the Alpha demo gameplay mod and other basic mods for Flare."
ARCHITECTURES_mod_fantasycore="any"
PROVIDES_mod_fantasycore="
flare_mod_fantasycore = $portVersion
"
REQUIRES_mod_fantasycore="
app:Flare == $portVersion base
"
REPLACES_mod_fantasycore="flare_data"
SUMMARY_mod_minicore="${SUMMARY} - Minicore mods"
DESCRIPTION_mod_minicore="Set of Flare mods for smaller displays and handhelds."
ARCHITECTURES_mod_minicore="any"
PROVIDES_mod_minicore="
flare_mod_minicore = $portVersion
"
REQUIRES_mod_minicore="
flare_mod_fantasycore == $portVersion base
"
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()
{
sdl2dir=$(finddir B_SYSTEM_HEADERS_DIRECTORY)${secondaryArchSubDir}/SDL2
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release -Wno-dev \
-DSDL2_INCLUDE_DIR=$sdl2dir \
-DSDL2_IMAGE_INCLUDE_DIR=$sdl2dir \
-DSDL2_MIXER_INCLUDE_DIR=$sdl2dir \
-DSDL2_TTF_INCLUDE_DIR=$sdl2dir
make -C build $jobArgs
}
INSTALL()
{
mkdir -p $appsDir $dataDir/flare
cp build/flare $appsDir/Flare
cp -r mods $sourceDir2/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
packageEntries mod_empyrean $dataDir/flare/mods/empyrean_campaign
packageEntries mod_fantasycore \
$dataDir/flare/mods/alpha_demo \
$dataDir/flare/mods/centered_statbars \
$dataDir/flare/mods/devlab \
$dataDir/flare/mods/fantasycore
packageEntries mod_minicore \
$dataDir/flare/mods/gcw0_defaults \
$dataDir/flare/mods/minicore \
$dataDir/flare/mods/minicore_alpha
addResourcesToBinaries $sourceDir/flare.rdef $appsDir/Flare
addAppDeskbarSymlink $appsDir/Flare
}

View File

@@ -1,165 +0,0 @@
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

View File

@@ -1,36 +0,0 @@
SUMMARY="Data files for the game Flare"
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-game/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="c13231c7dd021252487f6cf117f7f2bb24bbda40af0a2b2902d72b5e2d4c242a"
SOURCE_DIR="flare-game-$portVersion"
ARCHITECTURES="any"
DISABLE_SOURCE_PACKAGE="yes"
PROVIDES="
flare_data = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
"
BUILD()
{
true
}
INSTALL()
{
mkdir -p $dataDir/flare
cp -r mods $dataDir/flare/
}

View File

@@ -0,0 +1,29 @@
SUMMARY="Free/Libre Action Roleplaying Engine - Noname mod"
DESCRIPTION="This is an as yet nameless mod for Clint Bellangers Flare engine. The basic goals are \
to create a small game which will work on the v1 flare engine, which can be completed with an \
achievable scope, which shows off some of the newer engine features and shows off some of the \
previously unused flare art from opengameart.org."
HOMEPAGE="https://github.com/igorko/flare-mod-noname"
COPYRIGHT="The Flare community"
LICENSE="Artistic"
REVISION="1"
srcGitRev=d85a6f86d11a3744b8cc97cc75c44c8c6dfc07b1
SOURCE_URI="https://github.com/igorko/flare-mod-noname/archive/$srcGitRev.zip"
CHECKSUM_SHA256="08c5d4fb2acd117641276356c7d8320b1c37ffa15e3514285576b62beca1fd31"
SOURCE_DIR="flare-mod-noname-$srcGitRev"
ARCHITECTURES="any"
DISABLE_SOURCE_PACKAGE="yes"
PROVIDES="
flare_mod_nonamemod = $portVersion
"
REQUIRES="
flare_mod_fantasycore
"
INSTALL()
{
mkdir -p $dataDir/flare/mods
cp -r new_game_mod $dataDir/flare/mods
}

View File

@@ -0,0 +1,37 @@
SUMMARY="Free/Libre Action Roleplaying Engine - Laurelia's Polymorphable Citizen"
DESCRIPTION="Originally created for the 2012 Liberated Pixel Cup, this game is based upon \
Clint Bellanger's FLARE engine. Our goal is to create a game which draws upon several \
different classics in the genre, with a heavy emphasis on a polymorphable main character.
Laurelia's Polymorphable Citizen (or just Polymorphable for short) is an action-rpg \
based on the Flare engine. We're aiming a little more towards an 8-bit adventure classic \
feel, only with more RPG aspects (ie. attribute choices on level up!)
The core mechanic in Polymorphable is using different talismans to polymorph into different \
forms so you can reach different areas. Imagine being blocked by a pit, so you transform \
into a bat to fly across. Or perhaps there's a wall of fire in front of you, so you turn \
into ghost form to phase right through."
HOMEPAGE="https://github.com/makrohn/polymorphable"
COPYRIGHT="Thane Brimhall & Matthew Krohn"
LICENSE="GNU GPL v3"
REVISION="1"
srcGitRev=b8ececd9c2fffd4e69ac0c69e147c7de337b328b
SOURCE_URI="https://github.com/makrohn/polymorphable/archive/$srcGitRev.zip"
CHECKSUM_SHA256="0f09a70e6dba6be70ff175fc8874baea31dd487a671897b7895948e17bad4339"
SOURCE_DIR="polymorphable-$srcGitRev"
ARCHITECTURES="any"
DISABLE_SOURCE_PACKAGE="yes"
PROVIDES="
flare_mod_polymorphable = $portVersion
"
REQUIRES="
app:Flare
"
INSTALL()
{
mkdir -p $dataDir/flare
cp -r mods $dataDir/flare
}