colobot: bump version (#9755)

This commit is contained in:
TheZeldakatze
2023-11-22 08:13:12 +01:00
committed by GitHub
parent 5ccdc4cdef
commit 9067e030de
4 changed files with 201 additions and 35 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="633ce4ec9b54c657942453e769a2339befb2d0afff8b8b3589a73d005e097ab6"
CHECKSUM_SHA256="e2a6df3cb5e713da6ac13b5b4cb9fe9d22dbffab3b7163a886060c38a0d0639e"
SOURCE_DIR="colobot-colobot-gold-$portVersion-alpha"
PATCHES="colobot-$portVersion.patchset"
ADDITIONAL_FILES="colobot.rdef.in"
@@ -44,9 +44,9 @@ REQUIRES="
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libboost_filesystem$secondaryArchSuffix >= 1.69.0
devel:libboost_system$secondaryArchSuffix >= 1.69.0
devel:libboost_regex$secondaryArchSuffix >= 1.69.0
devel:libboost_filesystem$secondaryArchSuffix >= 1.83.0
devel:libboost_system$secondaryArchSuffix >= 1.83.0
devel:libboost_regex$secondaryArchSuffix >= 1.83.0
devel:libGL$secondaryArchSuffix
devel:libglew$secondaryArchSuffix
devel:libglu$secondaryArchSuffix

View File

@@ -1,14 +1,14 @@
From 27ce5b3b824c1bc9516bf0ec16d10ef2ad85c941 Mon Sep 17 00:00:00 2001
From 410a918038b208699e26f393c6883c608450d999 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 26 Sep 2021 14:31:33 +1000
Subject: Add Haiku support
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 700d37b..2d41f24 100644
index 5458b26..751b67d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,6 +61,7 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
@@ -65,6 +65,7 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
set(PLATFORM_LINUX 0)
set(PLATFORM_MACOSX 0)
set(PLATFORM_FREEBSD 0)
@@ -16,7 +16,7 @@ index 700d37b..2d41f24 100644
set(PLATFORM_OTHER 0)
# Platform-dependent implementation of system.h
@@ -73,11 +74,25 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
@@ -77,11 +78,25 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
set(PLATFORM_GNU 1)
set(PLATFORM_MACOSX 0)
set(PLATFORM_FREEBSD 0)
@@ -42,7 +42,7 @@ index 700d37b..2d41f24 100644
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "kFreeBSD" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "GNU")
message(STATUS "Build for kFreeBSD system")
set(PLATFORM_WINDOWS 0)
@@ -85,6 +100,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "kFreeBSD" OR "${CMAKE_SYSTEM_NAME}" STREQ
@@ -89,6 +104,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "kFreeBSD" OR "${CMAKE_SYSTEM_NAME}" STREQ
set(PLATFORM_GNU 1)
set(PLATFORM_MACOSX 0)
set(PLATFORM_FREEBSD 0)
@@ -50,7 +50,7 @@ index 700d37b..2d41f24 100644
set(PLATFORM_OTHER 0)
# Platform-dependent implementation of system.h
@@ -96,6 +112,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
@@ -100,6 +116,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
set(PLATFORM_LINUX 0)
set(PLATFORM_GNU 0)
set(PLATFORM_MACOSX 1)
@@ -58,7 +58,7 @@ index 700d37b..2d41f24 100644
set(PLATFORM_OTHER 0)
set(PLATFORM_FREEBSD 0)
@@ -111,6 +128,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD")
@@ -117,6 +134,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD")
set(PLATFORM_GNU 0)
set(PLATFORM_MACOSX 0)
set(PLATFORM_FREEBSD 1)
@@ -66,7 +66,7 @@ index 700d37b..2d41f24 100644
set(PLATFORM_OTHER 0)
# Platform-dependent implementation of system.h
@@ -126,6 +144,7 @@ else()
@@ -132,6 +150,7 @@ else()
set(PLATFORM_GNU 0)
set(PLATFORM_MACOSX 0)
set(PLATFORM_FREEBSD 0)
@@ -75,20 +75,20 @@ index 700d37b..2d41f24 100644
# Platform-dependent implementation of system.h
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3c5f406..1ae67d6 100644
index f1cd79c..f0b700e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -108,6 +108,8 @@ elseif(PLATFORM_GNU)
@@ -559,6 +559,8 @@ elseif(PLATFORM_GNU)
elseif(PLATFORM_LINUX)
# for clock_gettime
set(PLATFORM_LIBS "-lrt")
target_link_libraries(colobotbase PUBLIC -lrt)
+elseif(PLATFORM_HAIKU)
+ set(PLATFORM_LIBS "-lbe -lintl")
+ target_link_libraries(colobotbase PUBLIC -lbe -lintl)
elseif(PLATFORM_MACOSX)
find_library(LIBINTL_LIBRARY NAMES intl libintl)
find_path(LIBINTL_INCLUDE_PATH NAMES libintl.h)
find_package(Intl REQUIRED)
target_link_libraries(colobotbase PUBLIC Gettext::Intl)
diff --git a/src/app/signal_handlers.cpp b/src/app/signal_handlers.cpp
index ebcfe27..292888f 100644
index bc1768d..a0052fe 100644
--- a/src/app/signal_handlers.cpp
+++ b/src/app/signal_handlers.cpp
@@ -32,6 +32,12 @@
@@ -105,7 +105,7 @@ index ebcfe27..292888f 100644
void CSignalHandlers::Init(CSystemUtils* systemUtils)
@@ -181,6 +187,9 @@ void CSignalHandlers::ReportError(const std::string& errorMessage)
m_systemUtils->SystemDialog(SDT_INFO, "Try to save?", "Saving finished.\nPlease restart the game now");
m_systemUtils->SystemDialog(SystemDialogType::INFO, "Try to save?", "Saving finished.\nPlease restart the game now");
}
}
-
@@ -116,7 +116,7 @@ index ebcfe27..292888f 100644
+#endif
}
diff --git a/src/common/config.h.cmake b/src/common/config.h.cmake
index 556e067..d523ded 100644
index 7d15865..7bc470a 100644
--- a/src/common/config.h.cmake
+++ b/src/common/config.h.cmake
@@ -5,6 +5,7 @@
@@ -128,7 +128,7 @@ index 556e067..d523ded 100644
#ifdef PLATFORM_MACOSX
diff --git a/src/common/system/system.cpp b/src/common/system/system.cpp
index b489365..4bc139b 100644
index 640447c..43123be 100644
--- a/src/common/system/system.cpp
+++ b/src/common/system/system.cpp
@@ -28,6 +28,8 @@
@@ -140,7 +140,7 @@ index b489365..4bc139b 100644
#else
#include "common/system/system_other.h"
#endif
@@ -47,6 +49,8 @@ std::unique_ptr<CSystemUtils> CSystemUtils::Create()
@@ -48,6 +50,8 @@ std::unique_ptr<CSystemUtils> CSystemUtils::Create()
instance = MakeUnique<CSystemUtilsLinux>();
#elif defined(PLATFORM_MACOSX)
instance = MakeUnique<CSystemUtilsMacOSX>();
@@ -150,20 +150,20 @@ index b489365..4bc139b 100644
instance = MakeUnique<CSystemUtilsOther>();
#endif
--
2.30.2
2.42.0
From ac3427450ac58cf7d98b09e86bbd15779a38e167 Mon Sep 17 00:00:00 2001
From c35b22c0f2f5967a82c7972e35a3dddb38471f4f 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
index e22326e..df0aca4 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -847,6 +847,7 @@ bool CApplication::CreateVideoSurface()
@@ -861,6 +861,7 @@ bool CApplication::CreateVideoSurface()
m_private->glcontext = SDL_GL_CreateContext(m_private->window);
@@ -171,7 +171,7 @@ index 1e4515e..78deca3 100644
int vsync = 0;
if (GetConfigFile().GetIntProperty("Setup", "VSync", vsync))
{
@@ -857,7 +858,7 @@ bool CApplication::CreateVideoSurface()
@@ -871,7 +872,7 @@ bool CApplication::CreateVideoSurface()
GetLogger()->Info("Using Vsync: %s\n", (vsync == -1 ? "adaptive" : (vsync ? "true" : "false")));
}
@@ -304,10 +304,10 @@ index 0000000..81168d0
+
+//@end-colobot-lint-exclude
--
2.30.2
2.42.0
From fc70040e81f0246bd4230f6aa3c79d777df14964 Mon Sep 17 00:00:00 2001
From 2bd6417d862b5bd707f7b86cd3ccae1119201553 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 26 Sep 2021 14:48:34 +1000
Subject: Add missing method after API changes
@@ -348,5 +348,147 @@ index 81168d0..0e45f1e 100644
};
--
2.30.2
2.42.0
From 4bb23c002b0cab902fc5ad3c0dadb27789ffac75 Mon Sep 17 00:00:00 2001
From: Maite Gamper <victor@wenzeslaus.de>
Date: Tue, 14 Nov 2023 14:58:29 +0100
Subject: bump to 0.2.1
diff --git a/src/common/system/system_haiku.cpp b/src/common/system/system_haiku.cpp
index aea53a1..80b4c3a 100644
--- a/src/common/system/system_haiku.cpp
+++ b/src/common/system/system_haiku.cpp
@@ -17,20 +17,20 @@ SystemDialogResult CSystemUtilsHaiku::SystemDialog(SystemDialogType type, const
std::string buttons = "";
switch (type) {
- case SDT_INFO:
+ case SystemDialogType::INFO:
default:
options = "--info";
break;
- case SDT_WARNING:
+ case SystemDialogType::WARNING:
options = "--warning";
break;
- case SDT_ERROR:
+ case SystemDialogType::ERROR_MSG:
options = "--stop";
break;
- case SDT_YES_NO:
+ case SystemDialogType::YES_NO:
buttons = "Yes No";
break;
- case SDT_OK_CANCEL:
+ case SystemDialogType::OK_CANCEL:
buttons = "OK Cancel";
break;
}
@@ -38,14 +38,14 @@ SystemDialogResult CSystemUtilsHaiku::SystemDialog(SystemDialogType type, const
std::string command = "alert " + options + " \"" + message + "\" " + buttons;
int code = system(command.c_str());
- SystemDialogResult result = SDR_OK;
+ SystemDialogResult result = SystemDialogResult::OK;
switch (type)
{
- case SDT_YES_NO:
- result = (code == 0) ? SDR_YES : SDR_NO;
+ case SystemDialogType::YES_NO:
+ result = (code == 0) ? SystemDialogResult::YES : SystemDialogResult::NO;
break;
- case SDT_OK_CANCEL:
- result = (code == 0) ? SDR_OK : SDR_CANCEL;
+ case SystemDialogType::OK_CANCEL:
+ result = (code == 0) ? SystemDialogResult::OK : SystemDialogResult::CANCEL;
break;
default:
break;
@@ -54,21 +54,6 @@ SystemDialogResult CSystemUtilsHaiku::SystemDialog(SystemDialogType type, const
return result;
}
-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;
-}
-
std::string CSystemUtilsHaiku::GetSaveDir()
{
static char settingsDir[PATH_MAX] = "";
@@ -82,7 +67,35 @@ std::string CSystemUtilsHaiku::GetSaveDir()
return savegameDir;
}
-void CSystemUtilsHaiku::Usleep(int usec)
+std::string CSystemUtilsHaiku::GetEnvVar(const std::string& name)
{
- SDL_Delay(usec / 1000);
+ char* envVar = getenv(name.c_str());
+ if (envVar != nullptr)
+ {
+ GetLogger()->Trace("Detected environment variable %s = %s\n", name.c_str(), envVar);
+ return std::string(envVar);
+ }
+ return "";
+}
+
+bool CSystemUtilsHaiku::OpenPath(const std::string& path)
+{
+ int result = system(("open \"" + path + "\"").c_str());
+ if (result != 0)
+ {
+ GetLogger()->Error("Failed to open path: %s, error code: %i\n", path.c_str(), result);
+ return false;
+ }
+ return true;
+}
+
+bool CSystemUtilsHaiku::OpenWebsite(const std::string& url)
+{
+ int result = system(("open \"" + url + "\"").c_str());
+ if (result != 0)
+ {
+ GetLogger()->Error("Failed to open website: %s, error code: %i\n", url.c_str(), result);
+ return false;
+ }
+ return true;
}
diff --git a/src/common/system/system_haiku.h b/src/common/system/system_haiku.h
index 0e45f1e..dffa8af 100644
--- a/src/common/system/system_haiku.h
+++ b/src/common/system/system_haiku.h
@@ -20,13 +20,12 @@ 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;
+ std::string GetEnvVar(const std::string& name) override;
+
+ bool OpenPath(const std::string& path) override;
+ bool OpenWebsite(const std::string& url) override;
};
//@end-colobot-lint-exclude
--
2.42.0

View File

@@ -6,10 +6,11 @@ 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-data/archive/colobot-gold-$portVersion-alpha.zip"
CHECKSUM_SHA256="524bad3e1e87a61bfda746b62f4fdfb49f76d0f83bc8f2194e3f6d76f82bdb5e"
CHECKSUM_SHA256="e6ff3b0fd7b65daf747fb51c0e5094b797d620e3ea725bc4a6e9de0f3c3aa95d"
SOURCE_DIR="colobot-data-colobot-gold-$portVersion-alpha"
PATCHES="colobot_data-$portVersion.patchset"
ARCHITECTURES="any"
@@ -27,7 +28,7 @@ BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc
cmd:make
cmd:python2
cmd:python3
cmd:unzip
cmd:wget
"
@@ -37,6 +38,7 @@ BUILD()
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCOLOBOT_INSTALL_DATA_DIR=$dataDir/Colobot \
-DMUSIC=ON
make $jobArgs

View File

@@ -0,0 +1,22 @@
From 491a05567d18a83e1473193e34a2f66897c7fbed Mon Sep 17 00:00:00 2001
From: Maite Gamper <victor@wenzeslaus.de>
Date: Tue, 21 Nov 2023 20:10:02 +0100
Subject: colobot-data: use Python 3
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3992dcc..86fc400 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16)
option(TRANSLATIONS "Enable translations of help and level files" ON)
if(TRANSLATIONS)
- find_package(PythonInterp 2.7 REQUIRED)
+ find_package(PythonInterp 3.1 REQUIRED)
else()
message(STATUS "Translations disabled; only English files will be installed")
endif()
--
2.42.0