mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
S25RTTR: new recipe (#6988)
* S25RTTR: new recipe * Constrain boost version
This commit is contained in:
66
games-strategy/s25rttr/patches/s25rttr-0.9.5.patchset
Normal file
66
games-strategy/s25rttr/patches/s25rttr-0.9.5.patchset
Normal file
@@ -0,0 +1,66 @@
|
||||
From 0bc2faa19e54d137eec0d5cc926b29288c81c1b7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Sat, 11 Jun 2022 20:07:08 +0200
|
||||
Subject: Haiku support for getExecutablePath
|
||||
|
||||
|
||||
diff --git a/external/libutil/libs/common/src/getExecutablePath.cpp b/external/libutil/libs/common/src/getExecutablePath.cpp
|
||||
index 6cd69b5..6e3d4d1 100644
|
||||
--- a/external/libutil/libs/common/src/getExecutablePath.cpp
|
||||
+++ b/external/libutil/libs/common/src/getExecutablePath.cpp
|
||||
@@ -121,6 +121,25 @@ std::string getExecutablePath()
|
||||
return ec ? "" : p.make_preferred().string();
|
||||
}
|
||||
|
||||
+#elif(BOOST_OS_HAIKU)
|
||||
+
|
||||
+# include <kernel/image.h>
|
||||
+
|
||||
+std::string getExecutablePath()
|
||||
+{
|
||||
+ std::string ret;
|
||||
+ int32 cookie = 0;
|
||||
+ image_info info;
|
||||
+ while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK)
|
||||
+ {
|
||||
+ if (info.type == B_APP_IMAGE)
|
||||
+ {
|
||||
+ ret = info.name;
|
||||
+ }
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
#else
|
||||
|
||||
# error Unsupported plattform!
|
||||
--
|
||||
2.36.1
|
||||
|
||||
|
||||
From 9ba7557aecb9cba0c944b5eaf8495371d1f6e079 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Sat, 11 Jun 2022 20:38:09 +0200
|
||||
Subject: Locale fix
|
||||
|
||||
|
||||
diff --git a/external/libutil/libs/common/src/LocaleHelper.cpp b/external/libutil/libs/common/src/LocaleHelper.cpp
|
||||
index 3b6ed4b..a06baf1 100644
|
||||
--- a/external/libutil/libs/common/src/LocaleHelper.cpp
|
||||
+++ b/external/libutil/libs/common/src/LocaleHelper.cpp
|
||||
@@ -78,6 +78,12 @@ std::locale createUtf8Locale()
|
||||
// Don't change the locale on OSX. Using "" fails with 'locale::facet::_S_create_c_locale name not valid'
|
||||
return LocaleHelper::getBfsDefaultLocale();
|
||||
}
|
||||
+#elif BOOST_OS_HAIKU
|
||||
+std::locale createUtf8Locale()
|
||||
+{
|
||||
+ // Don't change the locale on HAIKU. Using "" fails with 'locale::facet::_S_create_c_locale name not valid'
|
||||
+ return LocaleHelper::getBfsDefaultLocale();
|
||||
+}
|
||||
#else
|
||||
std::locale createUtf8Locale()
|
||||
{
|
||||
--
|
||||
2.36.1
|
||||
|
||||
117
games-strategy/s25rttr/s25rttr-0.9.5.recipe
Normal file
117
games-strategy/s25rttr/s25rttr-0.9.5.recipe
Normal file
@@ -0,0 +1,117 @@
|
||||
SUMMARY="Open Source remake of The Settlers II game"
|
||||
DESCRIPTION="Return To The Roots is a fan-project, which aims to renew the \
|
||||
original The Settlers 2.
|
||||
|
||||
To play this game the original game data should be placed in the
|
||||
/boot/home/config/non-packaged/data/s25rttr/S2
|
||||
folder!"
|
||||
HOMEPAGE="https://www.siedler25.org/"
|
||||
COPYRIGHT="2005-2022 Settlers Freaks"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/Return-To-The-Roots/s25client/releases/download/v${portVersion}/s25client_src_v${portVersion}.tar.gz"
|
||||
CHECKSUM_SHA256="c6a9ef5b90943b5f2e81543f1e3290ff773663a45ebbbcc5a786bb5f5495fbec"
|
||||
SOURCE_DIR="s25client_v${portVersion}"
|
||||
PATCHES="s25rttr-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="?x86_gcc2 ?x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
s25rttr$secondaryArchSuffix = $portVersion
|
||||
app:s25client = $portVersion
|
||||
app:s25edit = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libboost_chrono$secondaryArchSuffix
|
||||
lib:libboost_filesystem$secondaryArchSuffix
|
||||
lib:libboost_iostreams$secondaryArchSuffix
|
||||
lib:libboost_locale$secondaryArchSuffix
|
||||
lib:libboost_program_options$secondaryArchSuffix
|
||||
lib:libboost_random$secondaryArchSuffix
|
||||
lib:libboost_regex$secondaryArchSuffix
|
||||
lib:libboost_system$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libexecinfo$secondaryArchSuffix
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:liblua$secondaryArchSuffix
|
||||
lib:libminiupnpc$secondaryArchSuffix
|
||||
lib:libSDL_1.2$secondaryArchSuffix
|
||||
lib:libSDL_mixer_1.2$secondaryArchSuffix
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
lib:libSDL2_mixer_2.0$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libboost_chrono$secondaryArchSuffix >= 1.69.0
|
||||
devel:libboost_filesystem$secondaryArchSuffix >= 1.69.0
|
||||
devel:libboost_iostreams$secondaryArchSuffix >= 1.69.0
|
||||
devel:libboost_locale$secondaryArchSuffix >= 1.69.0
|
||||
devel:libboost_program_options$secondaryArchSuffix >= 1.69.0
|
||||
devel:libboost_random$secondaryArchSuffix >= 1.69.0
|
||||
devel:libboost_regex$secondaryArchSuffix >= 1.69.0
|
||||
devel:libboost_system$secondaryArchSuffix >= 1.69.0
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libexecinfo$secondaryArchSuffix
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:liblua$secondaryArchSuffix
|
||||
devel:libminiupnpc$secondaryArchSuffix
|
||||
devel:libSDL_1.2$secondaryArchSuffix
|
||||
devel:libSDL_mixer_1.2$secondaryArchSuffix
|
||||
devel:libSDL2_2.0$secondaryArchSuffix
|
||||
devel:libSDL2_mixer$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:awk
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:git
|
||||
cmd:gettext
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
defineDebugInfoPackage s25rttr$secondaryArchSuffix \
|
||||
"$appsDir"/RTTR/s25client \
|
||||
"$appsDir"/RTTR/s25edit
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p haiku_build && cd haiku_build
|
||||
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DCMAKE_INSTALL_PREFIX="$appsDir/RTTR" \
|
||||
-DCMAKE_INSTALL_BINDIR="$appsDir/RTTR" \
|
||||
-DCMAKE_INSTALL_DOCDIR="$docDir" \
|
||||
-DRTTR_DOCDIR="$docDir" \
|
||||
-DCMAKE_INSTALL_DATADIR="$dataDir" \
|
||||
-DRTTR_DATADIR="s25rttr" \
|
||||
-DRTTR_GAMEDIR="`finddir B_USER_NONPACKAGED_DATA_DIRECTORY`/s25rttr/S2" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-lnetwork -lexecinfo"
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd haiku_build
|
||||
make install
|
||||
|
||||
addAppDeskbarSymlink "$appsDir"/RTTR/s25client
|
||||
addAppDeskbarSymlink "$appsDir"/RTTR/s25edit
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cd haiku_build
|
||||
make test
|
||||
}
|
||||
Reference in New Issue
Block a user