pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
openmohaa: import openmohaa-0.80.0 as wip/openmohaa
Module Name: pkgsrc-wip
Committed By: Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By: yhardy
Date: Fri Dec 27 22:58:23 2024 +0200
Changeset: ad4ebe5dd2ebe2003c1ba5b661cc28db180e084d
Modified Files:
Makefile
Added Files:
openmohaa/COMMIT_MSG
openmohaa/DESCR
openmohaa/Makefile
openmohaa/PLIST
openmohaa/distinfo
openmohaa/files/omohaaded.sh
openmohaa/files/openmohaa.sh
openmohaa/patches/patch-CMakeLists.txt
openmohaa/patches/patch-code_client_cl__input.cpp
openmohaa/patches/patch-code_fgame_VehicleTank.cpp
openmohaa/patches/patch-code_fgame_actor.cpp
openmohaa/patches/patch-code_fgame_actorpath.cpp
openmohaa/patches/patch-code_fgame_scriptthread.cpp
openmohaa/patches/patch-code_fgame_vehicle.cpp
openmohaa/patches/patch-code_gamespy_common_gsPlatform.h
openmohaa/patches/patch-code_parser_lex__source.txt
openmohaa/patches/patch-code_qcommon_q__platform.h
openmohaa/patches/patch-code_sys_sys__unix.c
Log Message:
openmohaa: import openmohaa-0.80.0 as wip/openmohaa
OpenMoHAA is an open source game engine for the game "Medal of
Honor: Allied Assault". The main goal of OpenMoHAA is to ensure
the future and continuity of "Medal of Honor: Allied Assault" on
all platforms/architectures by providing new patches and features.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=ad4ebe5dd2ebe2003c1ba5b661cc28db180e084d
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
openmohaa/COMMIT_MSG | 6 +++
openmohaa/DESCR | 4 ++
openmohaa/Makefile | 47 ++++++++++++++++++++++
openmohaa/PLIST | 15 +++++++
openmohaa/distinfo | 16 ++++++++
openmohaa/files/omohaaded.sh | 5 +++
openmohaa/files/openmohaa.sh | 20 +++++++++
openmohaa/patches/patch-CMakeLists.txt | 26 ++++++++++++
openmohaa/patches/patch-code_client_cl__input.cpp | 14 +++++++
openmohaa/patches/patch-code_fgame_VehicleTank.cpp | 15 +++++++
openmohaa/patches/patch-code_fgame_actor.cpp | 17 ++++++++
openmohaa/patches/patch-code_fgame_actorpath.cpp | 15 +++++++
.../patches/patch-code_fgame_scriptthread.cpp | 22 ++++++++++
openmohaa/patches/patch-code_fgame_vehicle.cpp | 15 +++++++
.../patches/patch-code_gamespy_common_gsPlatform.h | 15 +++++++
.../patches/patch-code_parser_lex__source.txt | 14 +++++++
openmohaa/patches/patch-code_qcommon_q__platform.h | 27 +++++++++++++
openmohaa/patches/patch-code_sys_sys__unix.c | 17 ++++++++
19 files changed, 311 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index dd7d621aba..fba9a31cc4 100644
--- a/Makefile
+++ b/Makefile
@@ -2684,6 +2684,7 @@ SUBDIR+= opengrok
SUBDIR+= openjdk8-openjfx-hg
SUBDIR+= openjkdf2
SUBDIR+= openlogos
+SUBDIR+= openmohaa
SUBDIR+= openmp
SUBDIR+= opennurbs
SUBDIR+= openra
diff --git a/openmohaa/COMMIT_MSG b/openmohaa/COMMIT_MSG
new file mode 100644
index 0000000000..59e52a9e1b
--- /dev/null
+++ b/openmohaa/COMMIT_MSG
@@ -0,0 +1,6 @@
+openmohaa: import openmohaa-0.80.0 as games/openmohaa
+
+OpenMoHAA is an open source game engine for the game "Medal of
+Honor: Allied Assault". The main goal of OpenMoHAA is to ensure
+the future and continuity of "Medal of Honor: Allied Assault" on
+all platforms/architectures by providing new patches and features.
diff --git a/openmohaa/DESCR b/openmohaa/DESCR
new file mode 100644
index 0000000000..45af2dd5c5
--- /dev/null
+++ b/openmohaa/DESCR
@@ -0,0 +1,4 @@
+OpenMoHAA is an open source game engine for the game "Medal of
+Honor: Allied Assault". The main goal of OpenMoHAA is to ensure
+the future and continuity of "Medal of Honor: Allied Assault" on
+all platforms/architectures by providing new patches and features.
diff --git a/openmohaa/Makefile b/openmohaa/Makefile
new file mode 100644
index 0000000000..693fbf97cf
--- /dev/null
+++ b/openmohaa/Makefile
@@ -0,0 +1,47 @@
+# $NetBSD$
+
+GITHUB_TAG= v${PKGVERSION_NOREV}
+DISTNAME= openmohaa-0.80.0
+CATEGORIES= games
+MASTER_SITES= ${MASTER_SITE_GITHUB:=openmoh/}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://www.openmohaa.org/
+COMMENT= Open re-implementation of Medal of Honor: Allied Assault
+LICENSE= gnu-gpl-v2
+
+USE_TOOLS+= bison flex pkg-config
+USE_LANGUAGES= c c++
+
+INSTALLATION_DIRS+= bin
+CMAKE_CONFIGURE_ARGS+= -DUSE_INTERNAL_LIBS=OFF
+CMAKE_CONFIGURE_ARGS+= -DUSE_INTERNAL_MAD=OFF
+CMAKE_CONFIGURE_ARGS+= -DUSE_INTERNAL_JPEG=OFF
+CMAKE_CONFIGURE_ARGS+= -DUSE_INTERNAL_ZLIB=OFF
+CMAKE_CONFIGURE_ARGS+= -DUSE_SYSTEM_LIBS=ON
+PKGCONFIG_OVERRIDE+= code/libmad/packaging/mad.pc.in
+PLIST_SUBST+= MACHINE_GNU_ARCH=${MACHINE_GNU_ARCH:Q}
+
+SUBST_CLASSES+= scripts
+SUBST_STAGE.scripts= pre-configure
+SUBST_FILES.scripts= omohaaded.sh openmohaa.sh
+SUBST_VARS.scripts+= MACHINE_GNU_ARCH
+SUBST_VARS.scripts+= PREFIX
+
+post-extract:
+ ${CP} ${FILESDIR}/omohaaded.sh ${WRKSRC}/
+ ${CP} ${FILESDIR}/openmohaa.sh ${WRKSRC}/
+
+post-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/omohaaded.sh ${DESTDIR}${PREFIX}/bin/omohaaded
+ ${INSTALL_SCRIPT} ${WRKSRC}/openmohaa.sh ${DESTDIR}${PREFIX}/bin/openmohaa
+
+.include "../../audio/libmad/buildlink3.mk"
+.include "../../audio/openal-soft/buildlink3.mk"
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../devel/cmake/build.mk"
+.include "../../devel/libexecinfo/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/openmohaa/PLIST b/openmohaa/PLIST
new file mode 100644
index 0000000000..b140ea4f6c
--- /dev/null
+++ b/openmohaa/PLIST
@@ -0,0 +1,15 @@
+@comment $NetBSD$
+bin/omohaaded
+bin/openmohaa
+lib/openmohaa/cgame.${MACHINE_GNU_ARCH}.so
+lib/openmohaa/game.${MACHINE_GNU_ARCH}.so
+lib/openmohaa/launch_openmohaa_base.${MACHINE_GNU_ARCH}
+lib/openmohaa/launch_openmohaa_breakthrough.${MACHINE_GNU_ARCH}
+lib/openmohaa/launch_openmohaa_spearhead.${MACHINE_GNU_ARCH}
+lib/openmohaa/omohaaded.${MACHINE_GNU_ARCH}
+lib/openmohaa/openmohaa.${MACHINE_GNU_ARCH}
+share/applications/org.openmoh.openmohaa.desktop
+share/applications/org.openmoh.openmohaab.desktop
+share/applications/org.openmoh.openmohaas.desktop
+share/icons/hicolor/symbolic/apps/org.openmoh.openmohaa.svg
+share/metainfo/org.openmoh.openmohaa.metainfo.xml
diff --git a/openmohaa/distinfo b/openmohaa/distinfo
new file mode 100644
index 0000000000..ee0e65487c
--- /dev/null
+++ b/openmohaa/distinfo
@@ -0,0 +1,16 @@
+$NetBSD$
+
+BLAKE2s (openmohaa-0.80.0.tar.gz) = ed6b3d2ead4ff41d52eae115113a8c46410f813d6b4bac5b662ed370e901b56a
+SHA512 (openmohaa-0.80.0.tar.gz) = 44c6b8ff4e70d9cc390fa10e6ab66163bad341d5a99784aadfd4bc5dd45d29cdde8020231b885c7de50bdfdf8dbcb99e283ce518b5f929010fe27418f0f072cd
+Size (openmohaa-0.80.0.tar.gz) = 35038966 bytes
+SHA1 (patch-CMakeLists.txt) = 4b2bf76c25bebad5d19c4fdce571ad9d9c2cc53c
+SHA1 (patch-code_client_cl__input.cpp) = 8a0305d028d38c159b3dd3c3a562e3ecdcc782bd
+SHA1 (patch-code_fgame_VehicleTank.cpp) = b881248148077a9aee7071f849f00b29f7a04d2b
+SHA1 (patch-code_fgame_actor.cpp) = d28b513056ed86580475499e42f059a56f4c044a
+SHA1 (patch-code_fgame_actorpath.cpp) = 5aaaa171e2c51b10312cf389a6d9bf909c0df13b
+SHA1 (patch-code_fgame_scriptthread.cpp) = 4440e2c13f3421f37926ab7bbc3d0b54c147b9c6
+SHA1 (patch-code_fgame_vehicle.cpp) = c9d72daafdfd9317b7558eb52d9b39c76825f3c6
+SHA1 (patch-code_gamespy_common_gsPlatform.h) = b362c06823fa66a503c5eb31ae4c65390c7e56dd
+SHA1 (patch-code_parser_lex__source.txt) = bf40b0d51be6ffecf3786155390fb85fe1cdb8a2
+SHA1 (patch-code_qcommon_q__platform.h) = ee0228797385ca2058ea5bdc9273350273678848
+SHA1 (patch-code_sys_sys__unix.c) = 8229e616c6a4913227f52b462ae95cad571248e7
diff --git a/openmohaa/files/omohaaded.sh b/openmohaa/files/omohaaded.sh
new file mode 100644
index 0000000000..c1e989cbde
--- /dev/null
+++ b/openmohaa/files/omohaaded.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd @PREFIX@/lib/openmohaa/
+
+exec ./omohaaded.@MACHINE_GNU_ARCH@
diff --git a/openmohaa/files/openmohaa.sh b/openmohaa/files/openmohaa.sh
new file mode 100644
index 0000000000..5305e00509
--- /dev/null
+++ b/openmohaa/files/openmohaa.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+cd @PREFIX@/lib/openmohaa/
+
+if [ $# -gt 1 ]; then
+ echo Usage: >&2
+ echo " $0" >&2
+ echo " $0 [base|breakthrough|spearhead]" >&2
+ exit 1
+fi
+
+if [ $# -eq 0 ]; then
+ LAUNCH=base
+fi
+
+if [ $# -eq 1 ]; then
+ LAUNCH=$1
+fi
+
+exec ./launch_openmohaa_${LAUNCH}.@MACHINE_GNU_ARCH@
diff --git a/openmohaa/patches/patch-CMakeLists.txt b/openmohaa/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..f0644da63c
--- /dev/null
+++ b/openmohaa/patches/patch-CMakeLists.txt
@@ -0,0 +1,26 @@
+$NetBSD$
+
+Ensure that pkgsrc libraries are used.
+Backtrace support must be provided by libexecinfo.
+
+--- CMakeLists.txt.orig 2024-11-24 17:03:15.000000000 +0000
++++ CMakeLists.txt
+@@ -5,7 +5,7 @@ include(TargetArch.cmake)
+
+ target_architecture(TARGET_ARCH)
+
+-set(USE_INTERNAL_LIBS ON)
++set(USE_INTERNAL_LIBS OFF)
+ if(USE_SYSTEM_LIBS)
+ set(USE_INTERNAL_LIBS OFF)
+ endif()
+@@ -202,6 +202,9 @@ if (NOT BUILD_NO_CLIENT)
+ target_link_libraries(openmohaa PRIVATE ${JPEG_LIBRARIES})
+ endif()
+
++ include(FindBacktrace)
++ target_link_libraries(openmohaa PRIVATE ${Backtrace_LIBRARIES})
++
+ INSTALL(TARGETS openmohaa DESTINATION ${CMAKE_INSTALL_BINDIR}/${BIN_INSTALL_SUBDIR})
+
+ if (MSVC)
diff --git a/openmohaa/patches/patch-code_client_cl__input.cpp b/openmohaa/patches/patch-code_client_cl__input.cpp
new file mode 100644
index 0000000000..f4c8b36276
--- /dev/null
+++ b/openmohaa/patches/patch-code_client_cl__input.cpp
@@ -0,0 +1,14 @@
+$NetBSD$
+
+The code mixes C++ and C (math.h), ensure that isfinite resolves correctly.
+
+--- code/client/cl_input.cpp.orig 2024-12-27 09:20:15.514136633 +0000
++++ code/client/cl_input.cpp
+@@ -47,6 +47,7 @@ at the same time.
+ ===============================================================================
+ */
+
++using std::isfinite;
+
+ kbutton_t in_left, in_right, in_forward, in_back;
+ kbutton_t in_lookup, in_lookdown, in_moveleft, in_moveright;
diff --git a/openmohaa/patches/patch-code_fgame_VehicleTank.cpp b/openmohaa/patches/patch-code_fgame_VehicleTank.cpp
new file mode 100644
index 0000000000..f6441b30fb
--- /dev/null
+++ b/openmohaa/patches/patch-code_fgame_VehicleTank.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+The code mixes C++ and C (math.h), ensure that isfinite resolves correctly.
+
+--- code/fgame/VehicleTank.cpp.orig 2024-12-27 08:28:41.728714713 +0000
++++ code/fgame/VehicleTank.cpp
+@@ -25,6 +25,8 @@ Foundation, Inc., 51 Franklin St, Fifth
+ #include "player.h"
+ #include "g_phys.h"
+
++using std::isfinite;
++
+ CLASS_DECLARATION(DrivableVehicle, VehicleTank, "VehicleTank") {
+ {&EV_Damage, &VehicleTank::EventDamage},
+ {NULL, NULL }
diff --git a/openmohaa/patches/patch-code_fgame_actor.cpp b/openmohaa/patches/patch-code_fgame_actor.cpp
new file mode 100644
index 0000000000..13ff6fa8e0
--- /dev/null
+++ b/openmohaa/patches/patch-code_fgame_actor.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+The code mixes C++ and C (math.h), ensure that isfinite and
+signbit resolve correctly.
+
+--- code/fgame/actor.cpp.orig 2024-12-27 08:29:26.159996729 +0000
++++ code/fgame/actor.cpp
+@@ -63,6 +63,9 @@ const char *gGermanVoices[] = {"a", "c
+ static const float DEFAULT_NEARBY_SQUAD_DIST = 1024;
+ static const float MIN_BADPLACE_UPDATE_DIST = 256;
+
++using std::isfinite;
++using std::signbit;
++
+ Event EV_Actor_SetGun
+ (
+ "gun",
diff --git a/openmohaa/patches/patch-code_fgame_actorpath.cpp b/openmohaa/patches/patch-code_fgame_actorpath.cpp
new file mode 100644
index 0000000000..66183d5c8b
--- /dev/null
+++ b/openmohaa/patches/patch-code_fgame_actorpath.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+The code mixes C++ and C (math.h), ensure that isfinite resolves correctly.
+
+--- code/fgame/actorpath.cpp.orig 2024-12-27 08:31:37.361294660 +0000
++++ code/fgame/actorpath.cpp
+@@ -24,6 +24,8 @@ Foundation, Inc., 51 Franklin St, Fifth
+
+ #include "actor.h"
+
++using std::isfinite;
++
+ ActorPath::ActorPath()
+ {
+ m_FallHeight = 96;
diff --git a/openmohaa/patches/patch-code_fgame_scriptthread.cpp b/openmohaa/patches/patch-code_fgame_scriptthread.cpp
new file mode 100644
index 0000000000..3e2775d2c9
--- /dev/null
+++ b/openmohaa/patches/patch-code_fgame_scriptthread.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+The code mixes C++ and C (math.h), ensure that isnan resolves correctly.
+
+--- code/fgame/scriptthread.cpp.orig 2024-12-27 08:39:31.399112650 +0000
++++ code/fgame/scriptthread.cpp
+@@ -55,6 +55,8 @@ Foundation, Inc., 51 Franklin St, Fifth
+
+ #define scriptfiles sv_scriptfiles
+
++using std::isnan;
++
+ Event EV_ScriptThread_GetCvar
+ (
+ "getcvar",
+@@ -7049,4 +7051,4 @@ void ScriptThread::TraceDetails(Event *e
+ array.setArrayAtRef(entityIndex, entityValue);
+
+ ev->AddValue(array);
+-}
+\ No newline at end of file
++}
diff --git a/openmohaa/patches/patch-code_fgame_vehicle.cpp b/openmohaa/patches/patch-code_fgame_vehicle.cpp
new file mode 100644
index 0000000000..3dda5e1bda
--- /dev/null
+++ b/openmohaa/patches/patch-code_fgame_vehicle.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+The code mixes C++ and C (math.h), ensure that isfinite resolves correctly.
+
+--- code/fgame/vehicle.cpp.orig 2024-12-27 08:41:15.476957628 +0000
++++ code/fgame/vehicle.cpp
+@@ -36,6 +36,8 @@ Foundation, Inc., 51 Franklin St, Fifth
+ #include "scriptexception.h"
+ #include "debuglines.h"
+
++using std::isfinite;
++
+ Event EV_Vehicle_Start
+ (
+ "start",
diff --git a/openmohaa/patches/patch-code_gamespy_common_gsPlatform.h b/openmohaa/patches/patch-code_gamespy_common_gsPlatform.h
new file mode 100644
index 0000000000..98d2858f61
--- /dev/null
+++ b/openmohaa/patches/patch-code_gamespy_common_gsPlatform.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Support *BSD as well.
+
+--- code/gamespy/common/gsPlatform.h.orig 2024-12-27 07:58:52.772504167 +0000
++++ code/gamespy/common/gsPlatform.h
+@@ -34,7 +34,7 @@
+ #endif
+ #endif
+
+-#if defined(_LINUX) || defined(_MACOSX) || defined(__APPLE__)
++#if defined(_LINUX) || defined(_MACOSX) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+ #define _UNIX
+ #endif
+
diff --git a/openmohaa/patches/patch-code_parser_lex__source.txt b/openmohaa/patches/patch-code_parser_lex__source.txt
new file mode 100644
index 0000000000..493b480687
--- /dev/null
+++ b/openmohaa/patches/patch-code_parser_lex__source.txt
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Include cstdlib for strtol(3)
+
+--- code/parser/lex_source.txt.orig 2024-12-27 08:47:52.809968281 +0000
++++ code/parser/lex_source.txt
+@@ -27,6 +27,7 @@
+ #include "scriptcompiler.h"
+ #include "./yyParser.hpp"
+
++#include <cstdlib>
+ #include <stdio.h>
+
+ void fprintf2( FILE *f, const char *format, ... )
diff --git a/openmohaa/patches/patch-code_qcommon_q__platform.h b/openmohaa/patches/patch-code_qcommon_q__platform.h
new file mode 100644
index 0000000000..a0a73775d7
--- /dev/null
+++ b/openmohaa/patches/patch-code_qcommon_q__platform.h
@@ -0,0 +1,27 @@
+$NetBSD$
+
+alloca.h is linux specific.
+Define ARCH_STRING for *BSD on x86_64.
+
+--- code/qcommon/q_platform.h.orig 2024-12-27 07:51:08.003536135 +0000
++++ code/qcommon/q_platform.h
+@@ -89,7 +89,8 @@ Foundation, Inc., 51 Franklin St, Fifth
+ // alloca
+ #ifdef _MSC_VER
+ # include <malloc.h>
+-#else
++#endif
++#ifdef __linux__
+ # include <alloca.h>
+ #endif
+
+@@ -313,6 +314,9 @@ Foundation, Inc., 51 Franklin St, Fifth
+ #elif defined __axp__
+ #define ARCH_STRING "alpha"
+ #endif
++#if defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64)
++#define ARCH_STRING "x86_64"
++#endif
+
+ #if __BIG_ENDIAN__
+ # define Q3_BIG_ENDIAN
diff --git a/openmohaa/patches/patch-code_sys_sys__unix.c b/openmohaa/patches/patch-code_sys_sys__unix.c
new file mode 100644
index 0000000000..183cb6a929
--- /dev/null
+++ b/openmohaa/patches/patch-code_sys_sys__unix.c
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Sys_ListFilteredFiles is called with a "const char *" argument for
+the filter argument which results in a compile time error. The filter
+is not modified in the function, so give it a const type as well.
+
+--- code/sys/sys_unix.c.orig 2024-12-27 08:53:06.275829131 +0000
++++ code/sys/sys_unix.c
+@@ -370,7 +370,7 @@ Sys_ListFilteredFiles
+ ==================
+ */
+ void Sys_ListFilteredFiles(
+- const char *basedir, char *subdirs, char *filter, qboolean wantsubs, char **list, int *numfiles
++ const char *basedir, char *subdirs, const char *filter, qboolean wantsubs, char **list, int *numfiles
+ )
+ {
+ char search[MAX_OSPATH], newsubdirs[MAX_OSPATH];
Home |
Main Index |
Thread Index |
Old Index