git: 093b4d49280f - main - games/pioneer: update 20220203 → 20230203

From: Dmitry Marakasov <amdmi3_at_FreeBSD.org>
Date: Mon, 06 Feb 2023 17:52:50 UTC
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=093b4d49280fd471804c3ae8429364f90bb812f1

commit 093b4d49280fd471804c3ae8429364f90bb812f1
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2023-02-03 15:49:28 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2023-02-06 17:52:42 +0000

    games/pioneer: update 20220203 → 20230203
---
 games/pioneer/Makefile                          |  3 +--
 games/pioneer/distinfo                          |  6 ++---
 games/pioneer/files/patch-CMakeLists.txt        | 12 ++++++++++
 games/pioneer/files/patch-buildopts.h.cmakein   | 10 +++++++++
 games/pioneer/files/patch-src_lua_LuaPushPull.h | 30 +++++++++++++++++++++++++
 games/pioneer/files/patch-src_lua_LuaShip.cpp   | 11 +++++++++
 6 files changed, 67 insertions(+), 5 deletions(-)

diff --git a/games/pioneer/Makefile b/games/pioneer/Makefile
index 91f1e891aba7..dadf5b9ba77b 100644
--- a/games/pioneer/Makefile
+++ b/games/pioneer/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	pioneer
-DISTVERSION=	20220203
-PORTREVISION=	1
+DISTVERSION=	20230203
 CATEGORIES=	games
 
 MAINTAINER=	amdmi3@FreeBSD.org
diff --git a/games/pioneer/distinfo b/games/pioneer/distinfo
index 1e6fe981fee5..74a0bd8859d3 100644
--- a/games/pioneer/distinfo
+++ b/games/pioneer/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1644231168
-SHA256 (pioneerspacesim-pioneer-20220203_GH0.tar.gz) = 415b55bab7f011f7244348428e13006fa67a926b9be71f2c4ad24e92cfeb051c
-SIZE (pioneerspacesim-pioneer-20220203_GH0.tar.gz) = 427362275
+TIMESTAMP = 1675424098
+SHA256 (pioneerspacesim-pioneer-20230203_GH0.tar.gz) = 80eea94e0f7e4d8e6a0c4629bdfb89201f82aae2f59ee7a1f7a487eeeccf27c7
+SIZE (pioneerspacesim-pioneer-20230203_GH0.tar.gz) = 541032264
diff --git a/games/pioneer/files/patch-CMakeLists.txt b/games/pioneer/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..cb5c75eabff1
--- /dev/null
+++ b/games/pioneer/files/patch-CMakeLists.txt
@@ -0,0 +1,12 @@
+--- CMakeLists.txt.orig	2023-02-03 14:29:13 UTC
++++ CMakeLists.txt
+@@ -71,6 +71,9 @@ if (HAS_FECLEAREXCEPT AND HAS_FEENABLEEXCEPT AND HAS_F
+ 	set(HAS_FPE_OPS ON)
+ endif()
+ 
++include(CheckCXXSourceCompiles)
++check_cxx_source_compiles("#include <cstddef>\nvoid foo(size_t){}; void foo(unsigned int){};int main(){}" SIZE_T_AND_UNSIGNED_INT_ARE_DIFFERENT_TYPES)
++
+ if (NOT CMAKE_BUILD_TYPE)
+ 	set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
+ 		"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel."
diff --git a/games/pioneer/files/patch-buildopts.h.cmakein b/games/pioneer/files/patch-buildopts.h.cmakein
new file mode 100644
index 000000000000..5f8eae1bd327
--- /dev/null
+++ b/games/pioneer/files/patch-buildopts.h.cmakein
@@ -0,0 +1,10 @@
+--- buildopts.h.cmakein.orig	2023-02-03 08:11:26 UTC
++++ buildopts.h.cmakein
+@@ -9,6 +9,7 @@
+ #cmakedefine01 WITH_OBJECTVIEWER
+ #cmakedefine01 WITH_DEVKEYS
+ #cmakedefine01 HAS_FPE_OPS
++#cmakedefine01 SIZE_T_AND_UNSIGNED_INT_ARE_DIFFERENT_TYPES
+ #cmakedefine REMOTE_LUA_REPL
+ 
+ #endif /* BUILDOPTS_H */
diff --git a/games/pioneer/files/patch-src_lua_LuaPushPull.h b/games/pioneer/files/patch-src_lua_LuaPushPull.h
new file mode 100644
index 000000000000..6c0c26b13cda
--- /dev/null
+++ b/games/pioneer/files/patch-src_lua_LuaPushPull.h
@@ -0,0 +1,30 @@
+--- src/lua/LuaPushPull.h.orig	2023-02-03 08:11:26 UTC
++++ src/lua/LuaPushPull.h
+@@ -5,6 +5,7 @@
+ #define _LUAPUSHPULL_H
+ 
+ #include "Lua.h"
++#include "buildopts.h"
+ #include <lua.hpp>
+ 
+ #include <cstddef>
+@@ -15,7 +16,9 @@ inline void pi_lua_generic_push(lua_State *l, bool val
+ inline void pi_lua_generic_push(lua_State *l, int value) { lua_pushinteger(l, value); }
+ inline void pi_lua_generic_push(lua_State *l, int64_t value) { lua_pushinteger(l, value); }
+ inline void pi_lua_generic_push(lua_State *l, unsigned int value) { lua_pushinteger(l, value); }
++#if SIZE_T_AND_UNSIGNED_INT_ARE_DIFFERENT_TYPES
+ inline void pi_lua_generic_push(lua_State *l, size_t value) { lua_pushinteger(l, value); }
++#endif
+ inline void pi_lua_generic_push(lua_State *l, double value) { lua_pushnumber(l, value); }
+ inline void pi_lua_generic_push(lua_State *l, const char *value) { lua_pushstring(l, value); }
+ inline void pi_lua_generic_push(lua_State *l, const std::string &value)
+@@ -32,7 +35,9 @@ inline void pi_lua_generic_pull(lua_State *l, int inde
+ inline void pi_lua_generic_pull(lua_State *l, int index, int &out) { out = luaL_checkinteger(l, index); }
+ inline void pi_lua_generic_pull(lua_State *l, int index, int64_t &out) { out = luaL_checkinteger(l, index); }
+ inline void pi_lua_generic_pull(lua_State *l, int index, unsigned int &out) { out = luaL_checkunsigned(l, index); }
++#if SIZE_T_AND_UNSIGNED_INT_ARE_DIFFERENT_TYPES
+ inline void pi_lua_generic_pull(lua_State *l, int index, size_t &out) { out = luaL_checkunsigned(l, index); }
++#endif
+ inline void pi_lua_generic_pull(lua_State *l, int index, float &out) { out = luaL_checknumber(l, index); }
+ inline void pi_lua_generic_pull(lua_State *l, int index, double &out) { out = luaL_checknumber(l, index); }
+ inline void pi_lua_generic_pull(lua_State *l, int index, const char *&out) { out = luaL_checkstring(l, index); }
diff --git a/games/pioneer/files/patch-src_lua_LuaShip.cpp b/games/pioneer/files/patch-src_lua_LuaShip.cpp
new file mode 100644
index 000000000000..2bde51af87ba
--- /dev/null
+++ b/games/pioneer/files/patch-src_lua_LuaShip.cpp
@@ -0,0 +1,11 @@
+--- src/lua/LuaShip.cpp.orig	2023-02-03 08:11:26 UTC
++++ src/lua/LuaShip.cpp
+@@ -19,7 +19,7 @@
+ #include "SpaceStation.h"
+ #include "ship/PlayerShipController.h"
+ #include "ship/PrecalcPath.h"
+-#include "src/lua.h"
++#include "lua.h"
+ 
+ /*
+  * Class: Ship