summaryrefslogtreecommitdiff
path: root/games-engines/odamex/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-20 01:00:14 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-20 01:00:14 +0000
commitf4106f0cb3d17dc4c85cd4d45816e2c18a8d29e2 (patch)
tree30f32cdcaa065cf7695f6f848d3fa7bfa998619a /games-engines/odamex/files
parent8cb1b7629fb6936b7008bd364b5e4ec3ecf6f6cd (diff)
gentoo auto-resync : 20:03:2024 - 01:00:13
Diffstat (limited to 'games-engines/odamex/files')
-rw-r--r--games-engines/odamex/files/odamex-lto.patch41
-rw-r--r--games-engines/odamex/files/odamex-odalaunch-prefix.patch64
2 files changed, 105 insertions, 0 deletions
diff --git a/games-engines/odamex/files/odamex-lto.patch b/games-engines/odamex/files/odamex-lto.patch
new file mode 100644
index 000000000000..20d9d88c002b
--- /dev/null
+++ b/games-engines/odamex/files/odamex-lto.patch
@@ -0,0 +1,41 @@
+https://github.com/odamex/odamex/pull/942
+
+diff --git a/client/src/cl_parse.cpp b/client/src/cl_parse.cpp
+index cdadbbdf2..e15c45edc 100644
+--- a/client/src/cl_parse.cpp
++++ b/client/src/cl_parse.cpp
+@@ -2354,7 +2354,7 @@ static void CL_SectorProperties(const odaproto::svc::SectorProperties* msg)
+ break;
+ }
+ case SPC_Gravity:
+- *(int*)&sector->gravity = msg->sector().gravity();
++ *&sector->gravity = msg->sector().gravity();
+ break;
+ case SPC_Panning:
+ sector->ceiling_xoffs = msg->sector().ceiling_offs().x();
+diff --git a/common/p_spec.cpp b/common/p_spec.cpp
+index df1a42a6a..d0a5af419 100644
+--- a/common/p_spec.cpp
++++ b/common/p_spec.cpp
+@@ -465,7 +465,7 @@ void DPusher::Serialize (FArchive &arc)
+ else
+ {
+ arc >> m_Type;
+- arc.ReadObject((DObject*&)m_Source, DPusher::StaticType());
++ arc.ReadObject((DObject*&)*m_Source, DPusher::StaticType());
+ arc >> m_Xmag >> m_Ymag >> m_Magnitude >> m_Radius >> m_X >> m_Y >> m_Affectee;
+ }
+ }
+diff --git a/odalpapi/net_io.cpp b/odalpapi/net_io.cpp
+index d6dd666fe..16f136374 100644
+--- a/odalpapi/net_io.cpp
++++ b/odalpapi/net_io.cpp
+@@ -194,7 +194,7 @@ void BufferedSocket::SetRemoteAddress(const string& Address, const uint16_t& Por
+
+ m_RemoteAddress.sin_family = PF_INET;
+ m_RemoteAddress.sin_port = htons(Port);
+- m_RemoteAddress.sin_addr.s_addr = *((unsigned long*)&(((sockaddr_in*)result->ai_addr)->sin_addr));
++ m_RemoteAddress.sin_addr = ((sockaddr_in*)result->ai_addr)->sin_addr;
+ memset(m_RemoteAddress.sin_zero, '\0', sizeof m_RemoteAddress.sin_zero);
+
+ freeaddrinfo(result);
diff --git a/games-engines/odamex/files/odamex-odalaunch-prefix.patch b/games-engines/odamex/files/odamex-odalaunch-prefix.patch
new file mode 100644
index 000000000000..cf293e60f9e1
--- /dev/null
+++ b/games-engines/odamex/files/odamex-odalaunch-prefix.patch
@@ -0,0 +1,64 @@
+From 04e38b9fcb8a71a7b0b1b5bc1c1f229f2ff7a0a8 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Mon, 18 Mar 2024 22:54:16 +0000
+Subject: [PATCH] Always define INSTALL_PREFIX to fix paths for odalaunch
+
+Without INSTALL_PREFIX, it was falling back to the current directory and
+failing to launch the game.
+---
+ CMakeLists.txt | 5 +++++
+ client/CMakeLists.txt | 5 -----
+ server/CMakeLists.txt | 5 -----
+ 3 files changed, 5 insertions(+), 10 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 147060cb1..97c447424 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -26,6 +26,11 @@ include(GNUInstallDirs OPTIONAL)
+ add_definitions(-DINSTALL_BINDIR="${CMAKE_INSTALL_BINDIR}")
+ add_definitions(-DINSTALL_DATADIR="${CMAKE_INSTALL_DATADIR}")
+
++# Set up FHS installation path
++if(NOT APPLE AND NOT WIN32)
++ add_definitions(-DINSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
++endif()
++
+ if(WIN32)
+ set(USE_INTERNAL_LIBS 1)
+ else()
+diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
+index 56caf04f8..0559564c7 100644
+--- a/client/CMakeLists.txt
++++ b/client/CMakeLists.txt
+@@ -128,11 +128,6 @@ if(APPLE)
+ ${AUDIOUNIT_LIBRARY})
+ endif()
+
+-# Set up FHS installation path
+-if(NOT APPLE AND NOT WIN32)
+- add_definitions(-DINSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
+-endif()
+-
+ # Client target
+ if(TARGET SDL2::SDL2 OR TARGET SDL::SDL)
+
+diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt
+index e5b54d8de..9afc6c2c6 100644
+--- a/server/CMakeLists.txt
++++ b/server/CMakeLists.txt
+@@ -37,11 +37,6 @@ if(WIN32 AND NOT MSVC)
+ add_definitions(-DWINVER=0x0500)
+ endif()
+
+-# Set up FHS installation path
+-if(NOT APPLE AND NOT WIN32)
+- add_definitions(-DINSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
+-endif()
+-
+ add_executable(odasrv
+ ${COMMON_SOURCES} ${SERVER_SOURCES} ${SERVER_WIN32_SOURCES})
+ odamex_target_settings(odasrv)
+--
+2.43.2
+