mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
fheroes2: bump version
* add hvif icon * add game launcher
This commit is contained in:
61
games-rpg/fheroes2/additional-files/fheroes2.rdef.in
Normal file
61
games-rpg/fheroes2/additional-files/fheroes2.rdef.in
Normal file
@@ -0,0 +1,61 @@
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = @MINOR@,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "fHeroes2",
|
||||
long_info = "@LONG_INFO@"
|
||||
};
|
||||
|
||||
resource app_signature "@APP_SIGNATURE@";
|
||||
|
||||
resource vector_icon array {
|
||||
$"6E63696605040066050002010602BD5C2F3FC03BBAE068B893AE48E42B45127B"
|
||||
$"00FFFFFFFF00337F02011602BD8B503FB566BB0F0EB8EC574AAF504691FF00FF"
|
||||
$"FFAB020006023DC0000000000000003E000048600048400000FFFFFFFFFFBF00"
|
||||
$"080405FE03275D315E2E5E405E5D4B54575D4B513FC6EA42433F273F353F273F"
|
||||
$"0608FE7F275D23462351233C30242B29BC07B4764423BEB0B453C377285432C5"
|
||||
$"982D5432464C4D443F54275D345D275D5D0606EF06302430242B292346233C23"
|
||||
$"51275D44232F3A3D253024240606FB07464C464C4D44543244234A2A2F3A275D"
|
||||
$"275D345D464C3F54464C4C0665FEBFBBBB77BBFFEDEEDCBB8FBBBFFEFEFBFBFB"
|
||||
$"ECEEEEEEDEAE033C34422B423042B71A4125C0B9B5DABFEBB4A64423C1CA2341"
|
||||
$"234321C0FF213F213E22BF3CB4143D213921BD18B361322233273426BAB8B5A3"
|
||||
$"352537253627BBF7B596352835283928BC76B616BD75B6493A29372DBD1DB78B"
|
||||
$"BB54B8BC312F2D2D312A2930322D362DBB2F2DBC61382B3CB70FBC8B2C412F3F"
|
||||
$"3B45BBB8C11041473E4C3E52BE9DC60ABF14C7413E54BF08C7DFBEEBC7A74052"
|
||||
$"BF5955BFE151435443534355593E57BFAA573D573C593E59BEA4C99BBF3DC9CE"
|
||||
$"3F5A3D5BBEDCCA33BE43CACC3C5D3E5C3D5CBF265C3F3E5DBF0BCB06BED9CB9E"
|
||||
$"5F405EBF3FCBE2BFDECBA9465CC141CB02C2B5CAD7485D485A495CC2C3C9C246"
|
||||
$"594656C212C8B4C235C8524754C249C7F848534A48524A51C3E2C6F9494E444E"
|
||||
$"454B424EC256C38946454A4C4846C401C55752514E52C8A6C617524A554DC6A1"
|
||||
$"C371534851455142C66FC0FBC6A2BFFF543EC794BE90C7DDBF5C55445243C8B8"
|
||||
$"C18B57415542C864C0FAC7C4BFFF533C583BC6C4BE445041513FC5DFC0A74E41"
|
||||
$"4EC025C4C6C0424C404D43C4D3C03CC508C1A84E49C4F1C299C5D8C454534EC7"
|
||||
$"21C49EC784C612504F4B4A4C4FC3F5C2DE4742C378C146C1F0C01343404541BF"
|
||||
$"D5BF313F3C463DC0A4BEC3C32DBE684E3AC43FBD74C716BD34565338C806BCDD"
|
||||
$"C6A1BC444F375334C6A8BBA1C80CBA3D56305331C7E0B98951BA1D4F33532FC6"
|
||||
$"99B9E7C7FEB81C562A532BC819B6E5C681B7E44E2F5126512C51214E214D2B4F"
|
||||
$"26C476B88D4A2F4A2A4A2D4A284925472BC2A4B5F1C271B8BB324530C22EB9B4"
|
||||
$"C164B91D432F443244B9C044BA8B433341314136C0A03640360621EE3E7B7BFB"
|
||||
$"EEF6BB033C4233453A44B93BC1EE2D48304A2C49BA2DC3EF334D304FB9F4C525"
|
||||
$"B903C6162E532E522EC79B2D2C4FB852C644B756C548284E2A502AC5BF2A5151"
|
||||
$"2850B67650B5B85026512852B5DAC696B670C72C532653B5A6C741B4EBC77025"
|
||||
$"5428552754B6D1C8BF2C56B780C854B86CC8F12E5A3055B8D1C8F4BA01C72B34"
|
||||
$"513551BB26C64EBBB4C6DC3653503750BBDAC5DEBC72C65B395239C71C39C6B9"
|
||||
$"394EBD43C5EE384C374B3A4ABCB04A3C4A404B3F474049BEC9C1690615DEEEEE"
|
||||
$"FE3C022E2C2C2AB803B773B7A4B6B4282D252DB58D2D222B222C242CB3B32C26"
|
||||
$"2B262923B705B4A1B63BB3D727222925B672B4932A2828262725B644B52EB545"
|
||||
$"B4C9232426272525B58CB61A2829B5FAB6602A2B282DB64DB810272E26282FB5"
|
||||
$"D4B955B69DB88C2A2CB6C9B7FAB727B79C2B2D2D0612B23BB77B0C2B3B292937"
|
||||
$"B6E0BCD8B648BB7426342838B618BBEDB64BBD4F273B2537B579BCA5B47ABBA6"
|
||||
$"222539B4AABC6BB542BD683B223AB43D3AB3413A203B2640253CB58DC0672543"
|
||||
$"2842B5E1C10EB67AC00F3E2C2C3CB7E4BE7DB7B2BDE7060A000100000A010101"
|
||||
$"1001178422040A020102000A030103000A010404050607123E29EA3BF02DBC00"
|
||||
$"053E32A1482110442A8C01178422040A040404050607023E29EA3BF02DBC0005"
|
||||
$"3E32A1482110442A8C"
|
||||
};
|
||||
115
games-rpg/fheroes2/fheroes2-0.9.7.recipe
Normal file
115
games-rpg/fheroes2/fheroes2-0.9.7.recipe
Normal file
@@ -0,0 +1,115 @@
|
||||
SUMMARY="Free implementation of Heroes of the Might and Magic II engine"
|
||||
DESCRIPTION="Free Heroes 2 is a turn based strategy video game.
|
||||
The original game was voted the sixth best PC game of all time by PC Gamer \
|
||||
magazine in May 1997."
|
||||
HOMEPAGE="https://github.com/ihhub/fheroes2/"
|
||||
COPYRIGHT="2006-2021 fheroes2 team"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/ihhub/fheroes2/archive/refs/tags/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="02e777485906b8112636173c7e241d2824b2dce7707b5ebf6b3bab70ea9865f7"
|
||||
SOURCE_DIR="fheroes2-$portVersion"
|
||||
srcGitRev2="4f376fe483a6881a44d2565c98a81b3c5c72daad"
|
||||
SOURCE_URI_2="https://github.com/EXL/BeGameLauncher/archive/$srcGitRev2.tar.gz"
|
||||
CHECKSUM_SHA256_2="4dbad52eca89eab9e5fadf1bfdfb88db29d471f4286995088df5d1278bba2c51"
|
||||
SOURCE_DIR_2="BeGameLauncher-$srcGitRev2"
|
||||
PATCHES="fheroes2-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="fheroes2.rdef.in"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
fheroes2$secondaryArchSuffix = $portVersion
|
||||
app:FHeroes2 = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libogg$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libSDL_1.2$secondaryArchSuffix
|
||||
lib:libSDL_image_1.2$secondaryArchSuffix
|
||||
lib:libSDL_mixer_1.2$secondaryArchSuffix
|
||||
lib:libSDL_net_1.2$secondaryArchSuffix
|
||||
lib:libSDL_ttf_2.0$secondaryArchSuffix
|
||||
lib:libvorbis$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libgettextlib$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libogg$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libSDL_1.2$secondaryArchSuffix
|
||||
devel:libSDL_image_1.2$secondaryArchSuffix
|
||||
devel:libSDL_mixer_1.2$secondaryArchSuffix
|
||||
devel:libSDL_net_1.2$secondaryArchSuffix
|
||||
devel:libSDL_ttf_2.0$secondaryArchSuffix
|
||||
devel:libvorbis$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake .. \
|
||||
-DCMAKE_INSTALL_PREFIX=$appsDir/fHeroes2 \
|
||||
-DCMAKE_INSTALL_BINDIR=$appsDir/fHeroes2 \
|
||||
-DCONFIGURE_FHEROES2_DATA=$appsDir/fHeroes2 \
|
||||
-DCMAKE_INSTALL_DOCDIR=$appsDir/fHeroes2/docs \
|
||||
-DGET_HOMM2_DEMO=OFF \
|
||||
-DUSE_SDL_VERSION=SDL \
|
||||
-DENABLE_IMAGE=ON
|
||||
|
||||
make $jobArgs
|
||||
|
||||
cd $sourceDir2
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLAUNCHER=fheroes2
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
|
||||
mv $appsDir/fHeroes2/fheroes2 $appsDir/fHeroes2/fHeroes2
|
||||
cp $sourceDir/fheroes2.key $appsDir/fHeroes2
|
||||
|
||||
cp $sourceDir2/build/fHeroes2Launcher $appsDir/fHeroes2/fHeroes2-Launcher
|
||||
|
||||
local APP_SIGNATURE="application/x-vnd.fheroes2"
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/fheroes2.rdef.in > $sourceDir/fheroes2.rdef
|
||||
|
||||
addResourcesToBinaries $sourceDir/fheroes2.rdef $appsDir/fHeroes2/fHeroes2
|
||||
|
||||
addAppDeskbarSymlink $appsDir/fHeroes2/fHeroes2-Launcher "Free Heroes 2"
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
SUMMARY="Free implementation of Heroes of the Might and Magic II engine"
|
||||
DESCRIPTION="Free implementation of Heroes of the Might and Magic II engine. \
|
||||
SDL is used. Free Heroes 2 is a turn based strategy video game.
|
||||
The original game was voted the sixth best PC game of all time by PC Gamer \
|
||||
magazine in May 1997."
|
||||
HOMEPAGE="https://sourceforge.net/projects/fheroes2/"
|
||||
COPYRIGHT="2006-2015 Andrey Afletdinov"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://sourceforge.net/code-snapshots/svn/f/fh/fheroes2/code/fheroes2-code-$portVersion-trunk.zip"
|
||||
CHECKSUM_SHA256="cef66a47b87efa9174672ad0038798a2ed7519ba9a4bfad17ff631f4cb87b290"
|
||||
SOURCE_DIR="fheroes2-code-$portVersion-trunk"
|
||||
PATCHES="fheroes2-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
fheroes2$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libogg$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libSDL_1.2$secondaryArchSuffix
|
||||
lib:libSDL_image_1.2$secondaryArchSuffix
|
||||
lib:libSDL_mixer_1.2$secondaryArchSuffix
|
||||
lib:libSDL_net_1.2$secondaryArchSuffix
|
||||
lib:libSDL_ttf_2.0$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libgettextlib$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libogg$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libSDL_1.2$secondaryArchSuffix
|
||||
devel:libSDL_image_1.2$secondaryArchSuffix
|
||||
devel:libSDL_mixer_1.2$secondaryArchSuffix
|
||||
devel:libSDL_net_1.2$secondaryArchSuffix
|
||||
devel:libSDL_ttf_2.0$secondaryArchSuffix
|
||||
devel:libvorbis$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd fheroes2
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir/FHeroes2
|
||||
|
||||
cd fheroes2
|
||||
cp -rf fheroes2* README $appsDir/FHeroes2
|
||||
cp -rf files $appsDir/FHeroes2
|
||||
mv $appsDir/FHeroes2/fheroes2 "$appsDir/FHeroes2/Free Heroes 2"
|
||||
|
||||
addAppDeskbarSymlink "$appsDir/FHeroes2/Free Heroes 2"
|
||||
}
|
||||
85
games-rpg/fheroes2/patches/fheroes2-0.9.7.patchset
Normal file
85
games-rpg/fheroes2/patches/fheroes2-0.9.7.patchset
Normal file
@@ -0,0 +1,85 @@
|
||||
From aeaf9d7806c0b9895bd6b3a0a237cf54b3b5b037 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sat, 18 Sep 2021 14:18:51 +1000
|
||||
Subject: Fix build for Haiku
|
||||
|
||||
|
||||
diff --git a/src/engine/endian_h2.h b/src/engine/endian_h2.h
|
||||
index 7d1fa27..7a194c3 100644
|
||||
--- a/src/engine/endian_h2.h
|
||||
+++ b/src/engine/endian_h2.h
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifndef ENDIAN_H2_H
|
||||
#define ENDIAN_H2_H
|
||||
|
||||
-#if defined( __linux__ )
|
||||
+#if defined( __linux__ ) || defined( __HAIKU__)
|
||||
#include <endian.h>
|
||||
|
||||
#elif defined( __FreeBSD__ ) || defined( __OpenBSD__ )
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From 13f0f36dc651f726ab842fd109ab10f1a1d09ec2 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 19 Sep 2021 22:22:50 +1000
|
||||
Subject: Use find_directory for settings and data dirs
|
||||
|
||||
|
||||
diff --git a/src/engine/system.cpp b/src/engine/system.cpp
|
||||
index ae342ed..47231ed 100644
|
||||
--- a/src/engine/system.cpp
|
||||
+++ b/src/engine/system.cpp
|
||||
@@ -25,6 +25,11 @@
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
+#if defined( __HAIKU__ )
|
||||
+#include <Path.h>
|
||||
+#include <FindDirectory.h>
|
||||
+#endif
|
||||
+
|
||||
#if defined( ANDROID ) || defined( _MSC_VER )
|
||||
#include <clocale>
|
||||
#endif
|
||||
@@ -128,6 +133,11 @@ std::string System::GetConfigDirectory( const std::string & prog )
|
||||
|
||||
return std::string();
|
||||
#else
|
||||
+#if defined( __HAIKU__ )
|
||||
+ BPath settingsDir;
|
||||
+ if (find_directory(B_USER_SETTINGS_DIRECTORY, &settingsDir) == B_OK)
|
||||
+ return std::string(settingsDir.Path()) + std::string("/fheroes2");
|
||||
+#endif
|
||||
return GetHomeDirectory( prog );
|
||||
#endif
|
||||
}
|
||||
@@ -147,6 +157,11 @@ std::string System::GetDataDirectory( const std::string & prog )
|
||||
|
||||
return std::string();
|
||||
#else
|
||||
+#if defined( __HAIKU__ )
|
||||
+ BPath dataDir;
|
||||
+ if (find_directory(B_USER_SETTINGS_DIRECTORY, &dataDir) == B_OK)
|
||||
+ return std::string(dataDir.Path()) + std::string("/fheroes2");
|
||||
+#endif
|
||||
return GetHomeDirectory( prog );
|
||||
#endif
|
||||
}
|
||||
diff --git a/src/fheroes2/CMakeLists.txt b/src/fheroes2/CMakeLists.txt
|
||||
index f209934..e53a94c 100644
|
||||
--- a/src/fheroes2/CMakeLists.txt
|
||||
+++ b/src/fheroes2/CMakeLists.txt
|
||||
@@ -46,4 +46,8 @@ target_link_libraries(fheroes2
|
||||
ZLIB::ZLIB
|
||||
)
|
||||
|
||||
+if(HAIKU)
|
||||
+ target_link_libraries(fheroes2 be)
|
||||
+endif(HAIKU)
|
||||
+
|
||||
install(TARGETS fheroes2 DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
From 93a2bfd4f37f0b337a3d498b1c63ad93313f09a4 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Wed, 30 Jan 2019 15:37:22 +0300
|
||||
Subject: Add missing libs
|
||||
|
||||
|
||||
diff --git a/fheroes2/src/Makefile b/fheroes2/src/Makefile
|
||||
index 967b32f..72f9a86 100644
|
||||
--- a/fheroes2/src/Makefile
|
||||
+++ b/fheroes2/src/Makefile
|
||||
@@ -94,7 +94,7 @@ PLATFORM := all
|
||||
endif
|
||||
ifeq ($(OS),Haiku)
|
||||
PLATFORM := all
|
||||
-LIBS := -liconv
|
||||
+LIBS := -liconv -lpng -lz -lSDL -lSDL_mixer -lSDL_image -lSDL_ttf
|
||||
endif
|
||||
endif
|
||||
|
||||
--
|
||||
2.19.1
|
||||
|
||||
Reference in New Issue
Block a user