Colobot: bump version

This commit is contained in:
Gerasim Troeglazov
2021-09-26 14:52:41 +10:00
parent 6f88ae81ad
commit 9a970f7424
2 changed files with 103 additions and 50 deletions

View File

@@ -6,9 +6,9 @@ humanity and get programming skills!"
HOMEPAGE="https://colobot.info/"
COPYRIGHT="Epsitec and TerranovaTeam"
LICENSE="GNU GPL v3"
REVISION="2"
REVISION="1"
SOURCE_URI="https://github.com/colobot/colobot/archive/colobot-gold-$portVersion-alpha.tar.gz"
CHECKSUM_SHA256="38e01a6fb8c670203b86e7a100c79ed4ab4a9a4dcc01fd26a6a57f40fa1a8b5c"
CHECKSUM_SHA256="633ce4ec9b54c657942453e769a2339befb2d0afff8b8b3589a73d005e097ab6"
SOURCE_DIR="colobot-colobot-gold-$portVersion-alpha"
PATCHES="colobot-$portVersion.patchset"
ADDITIONAL_FILES="colobot.rdef.in"
@@ -18,7 +18,7 @@ SECONDARY_ARCHITECTURES="x86"
PROVIDES="
colobot$secondaryArchSuffix = $portVersion
app:Colobot$secondaryArchSuffix = $portVersion
app:Colobot = $portVersion
"
REQUIRES="
colobot_data
@@ -44,9 +44,9 @@ REQUIRES="
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libboost_filesystem$secondaryArchSuffix
devel:libboost_system$secondaryArchSuffix
devel:libboost_regex$secondaryArchSuffix
devel:libboost_filesystem$secondaryArchSuffix >= 1.69.0
devel:libboost_system$secondaryArchSuffix >= 1.69.0
devel:libboost_regex$secondaryArchSuffix >= 1.69.0
devel:libgl$secondaryArchSuffix
devel:libglew$secondaryArchSuffix
devel:libglu$secondaryArchSuffix

View File

@@ -1,28 +1,27 @@
From ad6405899157317c9721ae4f19f60d9f8bbebf65 Mon Sep 17 00:00:00 2001
From 27ce5b3b824c1bc9516bf0ec16d10ef2ad85c941 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 15 Oct 2018 19:45:43 +1000
Date: Sun, 26 Sep 2021 14:31:33 +1000
Subject: Add Haiku support
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c40e08..164c84b 100644
index 700d37b..2d41f24 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,6 +60,7 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
set(PLATFORM_GNU 0)
@@ -61,6 +61,7 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
set(PLATFORM_LINUX 0)
set(PLATFORM_MACOSX 0)
set(PLATFORM_FREEBSD 0)
+ set(PLATFORM_HAIKU 0)
set(PLATFORM_OTHER 0)
# Platform-dependent implementation of system.h
@@ -71,17 +72,31 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
set(PLATFORM_LINUX 1)
@@ -73,11 +74,25 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
set(PLATFORM_GNU 1)
set(PLATFORM_MACOSX 0)
- set(PLATFORM_OTHER 0)
set(PLATFORM_FREEBSD 0)
+ set(PLATFORM_HAIKU 0)
+ set(PLATFORM_OTHER 0)
set(PLATFORM_OTHER 0)
# Platform-dependent implementation of system.h
set(SYSTEM_CPP_MODULE "system_linux.cpp")
@@ -33,6 +32,7 @@ index 0c40e08..164c84b 100644
+ set(PLATFORM_LINUX 0)
+ set(PLATFORM_GNU 0)
+ set(PLATFORM_MACOSX 0)
+ set(PLATFORM_FREEBSD 0)
+ set(PLATFORM_HAIKU 1)
+ set(PLATFORM_OTHER 0)
+
@@ -42,34 +42,43 @@ index 0c40e08..164c84b 100644
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "kFreeBSD" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "GNU")
message(STATUS "Build for kFreeBSD system")
set(PLATFORM_WINDOWS 0)
set(PLATFORM_LINUX 0)
@@ -85,6 +100,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "kFreeBSD" OR "${CMAKE_SYSTEM_NAME}" STREQ
set(PLATFORM_GNU 1)
set(PLATFORM_MACOSX 0)
set(PLATFORM_FREEBSD 0)
+ set(PLATFORM_HAIKU 0)
set(PLATFORM_OTHER 0)
# Platform-dependent implementation of system.h
@@ -93,6 +108,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
@@ -96,6 +112,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
set(PLATFORM_LINUX 0)
set(PLATFORM_GNU 0)
set(PLATFORM_MACOSX 1)
+ set(PLATFORM_HAIKU 0)
set(PLATFORM_OTHER 0)
set(PLATFORM_FREEBSD 0)
# Platform-dependent implementation of system.h
@@ -106,6 +122,7 @@ else()
set(PLATFORM_LINUX 0)
@@ -111,6 +128,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD")
set(PLATFORM_GNU 0)
set(PLATFORM_MACOSX 0)
set(PLATFORM_FREEBSD 1)
+ set(PLATFORM_HAIKU 0)
set(PLATFORM_OTHER 0)
# Platform-dependent implementation of system.h
@@ -126,6 +144,7 @@ else()
set(PLATFORM_GNU 0)
set(PLATFORM_MACOSX 0)
set(PLATFORM_FREEBSD 0)
+ set(PLATFORM_HAIKU 0)
set(PLATFORM_OTHER 1)
# Platform-dependent implementation of system.h
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c58172b..667834d 100644
index 3c5f406..1ae67d6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -97,6 +97,8 @@ elseif(PLATFORM_GNU)
@@ -108,6 +108,8 @@ elseif(PLATFORM_GNU)
elseif(PLATFORM_LINUX)
# for clock_gettime
set(PLATFORM_LIBS "-lrt")
@@ -79,7 +88,7 @@ index c58172b..667834d 100644
find_library(LIBINTL_LIBRARY NAMES intl libintl)
find_path(LIBINTL_INCLUDE_PATH NAMES libintl.h)
diff --git a/src/app/signal_handlers.cpp b/src/app/signal_handlers.cpp
index 03771da..fbde859 100644
index ebcfe27..292888f 100644
--- a/src/app/signal_handlers.cpp
+++ b/src/app/signal_handlers.cpp
@@ -32,6 +32,12 @@
@@ -107,7 +116,7 @@ index 03771da..fbde859 100644
+#endif
}
diff --git a/src/common/config.h.cmake b/src/common/config.h.cmake
index f6d0bca..45f0d75 100644
index 556e067..d523ded 100644
--- a/src/common/config.h.cmake
+++ b/src/common/config.h.cmake
@@ -5,6 +5,7 @@
@@ -119,7 +128,7 @@ index f6d0bca..45f0d75 100644
#ifdef PLATFORM_MACOSX
diff --git a/src/common/system/system.cpp b/src/common/system/system.cpp
index 12dc1d3..873f125 100644
index b489365..4bc139b 100644
--- a/src/common/system/system.cpp
+++ b/src/common/system/system.cpp
@@ -28,6 +28,8 @@
@@ -131,7 +140,7 @@ index 12dc1d3..873f125 100644
#else
#include "common/system/system_other.h"
#endif
@@ -46,6 +48,8 @@ std::unique_ptr<CSystemUtils> CSystemUtils::Create()
@@ -47,6 +49,8 @@ std::unique_ptr<CSystemUtils> CSystemUtils::Create()
instance = MakeUnique<CSystemUtilsLinux>();
#elif defined(PLATFORM_MACOSX)
instance = MakeUnique<CSystemUtilsMacOSX>();
@@ -140,6 +149,37 @@ index 12dc1d3..873f125 100644
#else
instance = MakeUnique<CSystemUtilsOther>();
#endif
--
2.30.2
From ac3427450ac58cf7d98b09e86bbd15779a38e167 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 26 Sep 2021 14:31:42 +1000
Subject: Disable vsync for Haiku
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 1e4515e..78deca3 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -847,6 +847,7 @@ bool CApplication::CreateVideoSurface()
m_private->glcontext = SDL_GL_CreateContext(m_private->window);
+#ifndef __HAIKU__
int vsync = 0;
if (GetConfigFile().GetIntProperty("Setup", "VSync", vsync))
{
@@ -857,7 +858,7 @@ bool CApplication::CreateVideoSurface()
GetLogger()->Info("Using Vsync: %s\n", (vsync == -1 ? "adaptive" : (vsync ? "true" : "false")));
}
-
+#endif
return true;
}
diff --git a/src/common/system/system_haiku.cpp b/src/common/system/system_haiku.cpp
new file mode 100644
index 0000000..538aa94
@@ -264,36 +304,49 @@ index 0000000..81168d0
+
+//@end-colobot-lint-exclude
--
2.19.1
2.30.2
From ea25b62d587742c85fce4ddbc0fb025686ed00fb Mon Sep 17 00:00:00 2001
From fc70040e81f0246bd4230f6aa3c79d777df14964 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 1 Apr 2019 19:20:42 +1000
Subject: Disable vsync for Haiku
Date: Sun, 26 Sep 2021 14:48:34 +1000
Subject: Add missing method after API changes
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 6f86457..587e660 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -814,6 +814,7 @@ bool CApplication::CreateVideoSurface()
m_private->glcontext = SDL_GL_CreateContext(m_private->window);
+#ifndef __HAIKU__
int vsync = 0;
if (GetConfigFile().GetIntProperty("Setup", "VSync", vsync))
{
@@ -839,7 +840,7 @@ bool CApplication::CreateVideoSurface()
GetLogger()->Info("Using Vsync: %s\n", (vsync == -1 ? "adaptive" : (vsync ? "true" : "false")));
}
-
+#endif
return true;
diff --git a/src/common/system/system_haiku.cpp b/src/common/system/system_haiku.cpp
index 538aa94..aea53a1 100644
--- a/src/common/system/system_haiku.cpp
+++ b/src/common/system/system_haiku.cpp
@@ -59,6 +59,11 @@ void CSystemUtilsHaiku::GetCurrentTimeStamp(SystemTimeStamp *stamp)
stamp->sdlTicks = SDL_GetTicks();
}
+void CSystemUtilsHaiku::InterpolateTimeStamp(SystemTimeStamp *dst, SystemTimeStamp *a, SystemTimeStamp *b, float i)
+{
+ dst->sdlTicks = a->sdlTicks + static_cast<Uint32>((b->sdlTicks - a->sdlTicks) * i);
+}
+
long long CSystemUtilsHaiku::TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after)
{
return (after->sdlTicks - before->sdlTicks) * 1000000ll;
diff --git a/src/common/system/system_haiku.h b/src/common/system/system_haiku.h
index 81168d0..0e45f1e 100644
--- a/src/common/system/system_haiku.h
+++ b/src/common/system/system_haiku.h
@@ -19,9 +19,13 @@ class CSystemUtilsHaiku : public CSystemUtils
public:
void Init() override;
SystemDialogResult SystemDialog(SystemDialogType type, const std::string& title, const std::string& message) override;
+
+ void InterpolateTimeStamp(SystemTimeStamp *dst, SystemTimeStamp *a, SystemTimeStamp *b, float i) override;
void GetCurrentTimeStamp(SystemTimeStamp *stamp) override;
long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) override;
+
std::string GetSaveDir() override;
+
void Usleep(int usec) override;
};
--
2.19.1
2.30.2