mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
openclonk, update srcGitRev, fix build for changed freealut (#8288)
This commit is contained in:
@@ -8,10 +8,10 @@ building a mine or fight each other on an arena-like map."
|
||||
HOMEPAGE="https://www.openclonk.org/"
|
||||
COPYRIGHT="2009-2019 OpenClonk Team and contributors"
|
||||
LICENSE="ISC"
|
||||
REVISION="5"
|
||||
srcGitRev="a080958de3b3f95edcc5756cdd2fe56adb0cf64f"
|
||||
REVISION="6"
|
||||
srcGitRev="701bcf38c9f3c4877e1b4a8651b9ce922b15969e"
|
||||
SOURCE_URI="https://github.com/openclonk/openclonk/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="30c0c71f22e586b5c0e2c60aceb210bf39e519c8779b83e495a5791db48a5929"
|
||||
CHECKSUM_SHA256="4b26ada9a1234aa900fcd24125df3b35d6c0f3c9ede9172aa8ade19c2dd4d40a"
|
||||
SOURCE_DIR="openclonk-$srcGitRev"
|
||||
PATCHES="openclonk-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="openclonk.rdef.in"
|
||||
@@ -28,6 +28,8 @@ PROVIDES="
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libalut$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libepoxy$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libgio_2.0$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
@@ -53,6 +55,8 @@ REQUIRES="
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libalut$secondaryArchSuffix
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libepoxy$secondaryArchSuffix
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libgio_2.0$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
From 9e263bbfa015b600b0dfd7955631057263fcaec7 Mon Sep 17 00:00:00 2001
|
||||
From 95165f77dfe95c072607600f2b5766ac88100f4c Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Mon, 9 Sep 2019 00:15:38 +1000
|
||||
Subject: Fix build for Haiku
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3aef3ba..443afb8 100644
|
||||
index 838afc5..6ea9a69 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -205,7 +205,11 @@ CHECK_INCLUDE_FILE_CXX(sys/timerfd.h HAVE_SYS_TIMERFD_H)
|
||||
@@ -206,7 +206,11 @@ CHECK_INCLUDE_FILE_CXX(sys/timerfd.h HAVE_SYS_TIMERFD_H)
|
||||
CHECK_INCLUDE_FILE_CXX(sys/socket.h HAVE_SYS_SOCKET_H)
|
||||
CHECK_INCLUDE_FILE_CXX(sys/eventfd.h HAVE_SYS_EVENTFD_H)
|
||||
CHECK_INCLUDE_FILE_CXX(sys/file.h HAVE_SYS_FILE_H)
|
||||
@@ -20,7 +20,7 @@ index 3aef3ba..443afb8 100644
|
||||
CHECK_CXX_SOURCE_COMPILES("#include <getopt.h>\nint main(int argc, char * argv[]) { getopt_long(argc, argv, \"\", 0, 0); }" HAVE_GETOPT_H)
|
||||
|
||||
############################################################################
|
||||
@@ -1053,9 +1057,12 @@ endif()
|
||||
@@ -1104,9 +1108,12 @@ endif()
|
||||
if(HAVE_PTHREAD)
|
||||
target_link_libraries(libmisc pthread)
|
||||
endif()
|
||||
@@ -35,10 +35,10 @@ index 3aef3ba..443afb8 100644
|
||||
add_library(libc4script STATIC
|
||||
src/C4Include.cpp
|
||||
diff --git a/config.h.cmake b/config.h.cmake
|
||||
index e2cec4c..cfe20bb 100644
|
||||
index 433f683..c91f81e 100644
|
||||
--- a/config.h.cmake
|
||||
+++ b/config.h.cmake
|
||||
@@ -107,7 +107,11 @@
|
||||
@@ -103,7 +103,11 @@
|
||||
|
||||
/* Path to data directory */
|
||||
#ifdef WITH_APPDIR_INSTALLATION
|
||||
@@ -51,49 +51,35 @@ index e2cec4c..cfe20bb 100644
|
||||
#define OC_SYSTEM_DATA_DIR "${CMAKE_INSTALL_PREFIX}/share/games/openclonk"
|
||||
#endif
|
||||
diff --git a/src/config/C4Config.cpp b/src/config/C4Config.cpp
|
||||
index ed44d42..d045723 100644
|
||||
index 05989ff..5bacae8 100644
|
||||
--- a/src/config/C4Config.cpp
|
||||
+++ b/src/config/C4Config.cpp
|
||||
@@ -110,8 +110,8 @@ void C4ConfigGraphics::CompileFunc(StdCompiler *pComp)
|
||||
{
|
||||
pComp->Value(mkNamingAdapt(ResX, "ResolutionX", -1 ,false, true));
|
||||
pComp->Value(mkNamingAdapt(ResY, "ResolutionY", -1 ,false, true));
|
||||
- pComp->Value(mkNamingAdapt(WindowX, "WindowX", 800 ,false, true));
|
||||
- pComp->Value(mkNamingAdapt(WindowY, "WindowY", 600 ,false, true));
|
||||
+ pComp->Value(mkNamingAdapt(WindowX, "WindowX", 640 ,false, true));
|
||||
+ pComp->Value(mkNamingAdapt(WindowY, "WindowY", 480 ,false, true));
|
||||
pComp->Value(mkNamingAdapt(RefreshRate, "RefreshRate", 0 ));
|
||||
pComp->Value(mkNamingAdapt(SplitscreenDividers, "SplitscreenDividers", 1 ));
|
||||
pComp->Value(mkNamingAdapt(ShowStartupMessages, "ShowStartupMessages", 1 ,false, true));
|
||||
@@ -121,14 +121,14 @@ void C4ConfigGraphics::CompileFunc(StdCompiler *pComp)
|
||||
pComp->Value(mkNamingAdapt(ShowClock, "ShowClock", 0 ,false, true));
|
||||
pComp->Value(mkNamingAdapt(ShowCrewNames, "ShowCrewNames", 1 ,false, true));
|
||||
pComp->Value(mkNamingAdapt(ShowCrewCNames, "ShowCrewCNames", 0 ,false, true));
|
||||
- pComp->Value(mkNamingAdapt(Windowed, "Windowed", 0 ,false, true));
|
||||
+ pComp->Value(mkNamingAdapt(Windowed, "Windowed", 1 ,false, true));
|
||||
pComp->Value(mkNamingAdapt(PXSGfx, "PXSGfx" , 1 ));
|
||||
pComp->Value(mkNamingAdapt(Gamma, "Gamma" , 100 ));
|
||||
pComp->Value(mkNamingAdapt(Currency, "Currency" , 0 ));
|
||||
pComp->Value(mkNamingAdapt(Monitor, "Monitor", 0 )); // 0 = D3DADAPTER_DEFAULT
|
||||
pComp->Value(mkNamingAdapt(MaxRefreshDelay, "MaxRefreshDelay", 30 ));
|
||||
pComp->Value(mkNamingAdapt(NoOffscreenBlits, "NoOffscreenBlits", 1 ));
|
||||
- pComp->Value(mkNamingAdapt(MultiSampling, "MultiSampling", 4 ));
|
||||
+ pComp->Value(mkNamingAdapt(MultiSampling, "MultiSampling", 0 ));
|
||||
pComp->Value(mkNamingAdapt(AutoFrameSkip, "AutoFrameSkip", 1 ));
|
||||
pComp->Value(mkNamingAdapt(MouseCursorSize, "MouseCursorSize", 50 ));
|
||||
@@ -134,13 +134,13 @@ void C4ConfigGraphics::CompileFunc(StdCompiler *compiler)
|
||||
compiler->Value(mkNamingAdapt(ShowClock, "ShowClock", 0 ,false, true));
|
||||
compiler->Value(mkNamingAdapt(ShowCrewNames, "ShowCrewNames", 1 ,false, true));
|
||||
compiler->Value(mkNamingAdapt(ShowCrewCNames, "ShowCrewCNames", 0 ,false, true));
|
||||
- compiler->Value(mkNamingAdapt(Windowed, "Windowed", 0 ,false, true));
|
||||
+ compiler->Value(mkNamingAdapt(Windowed, "Windowed", 1 ,false, true));
|
||||
compiler->Value(mkNamingAdapt(PXSGfx, "PXSGfx" , 1 ));
|
||||
compiler->Value(mkNamingAdapt(Gamma, "Gamma" , 100 ));
|
||||
compiler->Value(mkNamingAdapt(Monitor, "Monitor", 0 )); // 0 = D3DADAPTER_DEFAULT
|
||||
compiler->Value(mkNamingAdapt(MaxRefreshDelay, "MaxRefreshDelay", 30 ));
|
||||
compiler->Value(mkNamingAdapt(NoOffscreenBlits, "NoOffscreenBlits", 1 ));
|
||||
- compiler->Value(mkNamingAdapt(MultiSampling, "MultiSampling", 4 ));
|
||||
+ compiler->Value(mkNamingAdapt(MultiSampling, "MultiSampling", 0 ));
|
||||
compiler->Value(mkNamingAdapt(AutoFrameSkip, "AutoFrameSkip", 1 ));
|
||||
compiler->Value(mkNamingAdapt(MouseCursorSize, "MouseCursorSize", 50 ));
|
||||
}
|
||||
@@ -209,7 +209,9 @@ void C4ConfigSecurity::CompileFunc(StdCompiler *pComp)
|
||||
pComp->Value(mkNamingAdapt(s(KeyPath), "KeyPath", R"(%APPDATA%\)" C4ENGINENAME, false, true));
|
||||
@@ -223,6 +223,8 @@ void C4ConfigSecurity::CompileFunc(StdCompiler *compiler)
|
||||
compiler->Value(mkNamingAdapt(s(KeyPath), "KeyPath", R"(%APPDATA%\)" C4ENGINENAME, false, true));
|
||||
#elif defined(__linux__)
|
||||
pComp->Value(mkNamingAdapt(s(KeyPath), "KeyPath", "$HOME/.clonk/" C4ENGINENICK, false, true));
|
||||
-#elif defined(__APPLE__)
|
||||
compiler->Value(mkNamingAdapt(s(KeyPath), "KeyPath", "$HOME/.clonk/" C4ENGINENICK, false, true));
|
||||
+#elif defined(__HAIKU__)
|
||||
+ pComp->Value(mkNamingAdapt(s(KeyPath), "KeyPath", "$HOME/config/settings/" C4ENGINENICK, false, true));
|
||||
+#elif defined(__APPLE__)#elif defined(__APPLE__)
|
||||
pComp->Value(mkNamingAdapt(s(KeyPath), "KeyPath", "$HOME/Library/Application Support/" C4ENGINENAME, false, true));
|
||||
+ compiler->Value(mkNamingAdapt(s(KeyPath), "KeyPath", "$HOME/config/settings/" C4ENGINENICK, false, true));
|
||||
#elif defined(__APPLE__)
|
||||
compiler->Value(mkNamingAdapt(s(KeyPath), "KeyPath", "$HOME/Library/Application Support/" C4ENGINENAME, false, true));
|
||||
#endif
|
||||
}
|
||||
@@ -301,6 +303,8 @@ void C4Config::GetConfigFileName(StdStrBuf &filename, const char *szConfigFile)
|
||||
@@ -318,6 +320,8 @@ void C4Config::GetConfigFileName(StdStrBuf &filename, const char *config_file)
|
||||
filename.Copy(home);
|
||||
#ifdef __APPLE__
|
||||
filename += "Library/Preferences/" C4ENGINEID ".config";
|
||||
@@ -102,13 +88,13 @@ index ed44d42..d045723 100644
|
||||
#else
|
||||
filename += ".clonk/" C4ENGINENICK "/config";
|
||||
#endif
|
||||
@@ -340,6 +344,15 @@ bool C4Config::Load(const char *szConfigFile)
|
||||
@@ -360,6 +364,15 @@ bool C4Config::Load(const char *config_file)
|
||||
filename += ".clonk/" C4ENGINENICK;
|
||||
CreatePath(filename.getData());
|
||||
}
|
||||
+#endif
|
||||
+#ifdef __HAIKU__
|
||||
+ if (!szConfigFile)
|
||||
+ if (!config_file)
|
||||
+ {
|
||||
+ StdStrBuf filename(getenv("HOME"));
|
||||
+ if (filename) { filename += "/"; }
|
||||
@@ -118,7 +104,16 @@ index ed44d42..d045723 100644
|
||||
#endif
|
||||
// Buggy StdCompiler crashes when compiling a Null-StdStrBuf
|
||||
buf.Ref(" ");
|
||||
@@ -500,6 +513,8 @@ void C4ConfigGeneral::DeterminePaths()
|
||||
@@ -522,6 +535,8 @@ void C4ConfigGeneral::DeterminePaths()
|
||||
SCopy(ExePath.getMData(),SystemDataPath);
|
||||
#elif defined(__APPLE__)
|
||||
SCopy(::Application.GetGameDataPath().c_str(), SystemDataPath);
|
||||
+#elif defined(__HAIKU__)
|
||||
+ SCopy("/boot/system/apps/OpenClonk/data", SystemDataPath);
|
||||
#elif defined(WITH_AUTOMATIC_UPDATE) && defined(WITH_APPDIR_INSTALLATION)
|
||||
// AppDir: layout like normal unix installation, but relative to executable.
|
||||
auto str = FormatString("%s%s", ExePath.getMData(), OC_SYSTEM_DATA_DIR);
|
||||
@@ -549,6 +564,8 @@ void C4ConfigGeneral::DeterminePaths()
|
||||
SCopy(R"(%APPDATA%\)" C4ENGINENAME, UserDataPath);
|
||||
#elif defined(__APPLE__)
|
||||
SCopy("$HOME/Library/Application Support/" C4ENGINENAME, UserDataPath);
|
||||
@@ -158,19 +153,18 @@ index a7c69dd..746cee6 100644
|
||||
backward::SignalHandling sh;
|
||||
#elif defined(HAVE_SIGNAL_H)
|
||||
diff --git a/src/network/C4NetIO.cpp b/src/network/C4NetIO.cpp
|
||||
index 7ff84a8..ddf82ee 100644
|
||||
index 24a5c6b..ab3ebde 100644
|
||||
--- a/src/network/C4NetIO.cpp
|
||||
+++ b/src/network/C4NetIO.cpp
|
||||
@@ -696,7 +696,7 @@ std::vector<C4NetIO::HostAddress> C4NetIO::GetLocalAddresses()
|
||||
fclose(f);
|
||||
@@ -697,6 +697,7 @@ std::vector<C4NetIO::HostAddress> C4NetIO::GetLocalAddresses()
|
||||
}
|
||||
#endif
|
||||
-
|
||||
|
||||
+#ifndef __HAIKU__
|
||||
struct ifaddrs* addrs;
|
||||
if (getifaddrs(&addrs) < 0)
|
||||
return result;
|
||||
@@ -711,6 +711,7 @@ std::vector<C4NetIO::HostAddress> C4NetIO::GetLocalAddresses()
|
||||
@@ -711,6 +712,7 @@ std::vector<C4NetIO::HostAddress> C4NetIO::GetLocalAddresses()
|
||||
}
|
||||
}
|
||||
freeifaddrs(addrs);
|
||||
@@ -179,5 +173,5 @@ index 7ff84a8..ddf82ee 100644
|
||||
|
||||
return result;
|
||||
--
|
||||
2.23.0
|
||||
2.37.3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user