pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
wip/descent3: import descent3-1.5.0 as wip/descent3
Module Name: pkgsrc-wip
Committed By: Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By: yhardy
Date: Sun Aug 25 17:38:53 2024 +0200
Changeset: c1312dbf544afae1b3dcde03a3f0b8d5eb7161b1
Modified Files:
Makefile
Added Files:
descent3/COMMIT_MSG
descent3/DESCR
descent3/Makefile
descent3/PLIST
descent3/distinfo
descent3/patches/patch-CMakeLists.txt
descent3/patches/patch-Descent3_Mission.cpp
descent3/patches/patch-Descent3_OsirisLoadandBind.cpp
descent3/patches/patch-ddebug_CMakeLists.txt
descent3/patches/patch-ddio_CMakeLists.txt
descent3/patches/patch-ddio_lnxio.cpp
descent3/patches/patch-mem_CMakeLists.txt
descent3/patches/patch-mem_mem.cpp
descent3/patches/patch-module_module.cpp
descent3/patches/patch-scripts_CMakeLists.txt
Log Message:
wip/descent3: import descent3-1.5.0 as wip/descent3
This is the Descent 3 open source engine, licensed under GPL-3.0.
It includes the '1.5' patch written by Kevin Bentley and Jeff
Slutter several years ago and brought to a stable condition by the
Descent community. In order to use this, you must provide your
own game files.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c1312dbf544afae1b3dcde03a3f0b8d5eb7161b1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
descent3/COMMIT_MSG | 7 ++++
descent3/DESCR | 5 +++
descent3/Makefile | 25 +++++++++++++
descent3/PLIST | 20 +++++++++++
descent3/distinfo | 15 ++++++++
descent3/patches/patch-CMakeLists.txt | 25 +++++++++++++
descent3/patches/patch-Descent3_Mission.cpp | 15 ++++++++
.../patches/patch-Descent3_OsirisLoadandBind.cpp | 15 ++++++++
descent3/patches/patch-ddebug_CMakeLists.txt | 15 ++++++++
descent3/patches/patch-ddio_CMakeLists.txt | 15 ++++++++
descent3/patches/patch-ddio_lnxio.cpp | 22 ++++++++++++
descent3/patches/patch-mem_CMakeLists.txt | 17 +++++++++
descent3/patches/patch-mem_mem.cpp | 16 +++++++++
descent3/patches/patch-module_module.cpp | 41 ++++++++++++++++++++++
descent3/patches/patch-scripts_CMakeLists.txt | 28 +++++++++++++++
16 files changed, 282 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index 95b946b7a1..93942dc90b 100644
--- a/Makefile
+++ b/Makefile
@@ -662,6 +662,7 @@ SUBDIR+= delve
SUBDIR+= dendrite
SUBDIR+= denise
SUBDIR+= depsolver
+SUBDIR+= descent3
SUBDIR+= deskcribe
SUBDIR+= desktop-data-model
SUBDIR+= desktop-installer
diff --git a/descent3/COMMIT_MSG b/descent3/COMMIT_MSG
new file mode 100644
index 0000000000..76a3a5d364
--- /dev/null
+++ b/descent3/COMMIT_MSG
@@ -0,0 +1,7 @@
+games/descent3: import descent3-1.5.0 as games/descent3
+
+This is the Descent 3 open source engine, licensed under GPL-3.0.
+It includes the '1.5' patch written by Kevin Bentley and Jeff
+Slutter several years ago and brought to a stable condition by the
+Descent community. In order to use this, you must provide your
+own game files.
diff --git a/descent3/DESCR b/descent3/DESCR
new file mode 100644
index 0000000000..a302ebf960
--- /dev/null
+++ b/descent3/DESCR
@@ -0,0 +1,5 @@
+This is the Descent 3 open source engine, licensed under GPL-3.0.
+It includes the '1.5' patch written by Kevin Bentley and Jeff
+Slutter several years ago and brought to a stable condition by the
+Descent community. In order to use this, you must provide your
+own game files.
diff --git a/descent3/Makefile b/descent3/Makefile
new file mode 100644
index 0000000000..d1ff2e5ace
--- /dev/null
+++ b/descent3/Makefile
@@ -0,0 +1,25 @@
+# $NetBSD$
+
+DISTNAME= Descent3-1.5.0-Source
+PKGNAME= descent3-1.5.0
+CATEGORIES= games
+MASTER_SITES= ${MASTER_SITE_GITHUB:=DescentDevelopers/Descent3/releases/download/v1.5.0/}
+EXTRACT_SUFX= .tar.xz
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/DescentDevelopers/Descent3
+COMMENT= Descent 3 open source engine
+LICENSE= gnu-gpl-v3
+
+USE_LANGUAGES= c c++
+USE_TOOLS+= gmake
+
+CMAKE_CONFIGURE_ARGS+= -DFORCE_PORTABLE_INSTALL:BOOL=Off
+CMAKE_CONFIGURE_ARGS+= -DCMAKE_INSTALL_DATADIR:PATH=${PREFIX}/share/Descent3
+CMAKE_CONFIGURE_ARGS+= -DCMAKE_INSTALL_LIBDIR:PATH=${PREFIX}/lib/Descent3
+CMAKE_USE_GNU_INSTALL_DIRS= no
+
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../devel/cmake/build.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/descent3/PLIST b/descent3/PLIST
new file mode 100644
index 0000000000..7a3d188304
--- /dev/null
+++ b/descent3/PLIST
@@ -0,0 +1,20 @@
+@comment $NetBSD$
+bin/Descent3
+lib/Descent3/netgames/anarchy.d3m
+lib/Descent3/netgames/coop.d3m
+lib/Descent3/netgames/ctf.d3m
+lib/Descent3/netgames/entropy.d3m
+lib/Descent3/netgames/hoard.d3m
+lib/Descent3/netgames/hyperanarchy.d3m
+lib/Descent3/netgames/monsterball.d3m
+lib/Descent3/netgames/roboanarchy.d3m
+lib/Descent3/netgames/tanarchy.d3m
+share/Descent3/d3-linux.hog
+share/Descent3/online/Direct TCP~IP.d3c
+share/Descent3/online/Parallax Online.d3c
+share/doc/Descent3/BUILD.md
+share/doc/Descent3/CHANGELOG.md
+share/doc/Descent3/LICENSE
+share/doc/Descent3/README.md
+share/doc/Descent3/THIRD_PARTY.md
+share/doc/Descent3/USAGE.md
diff --git a/descent3/distinfo b/descent3/distinfo
new file mode 100644
index 0000000000..b4068dc42c
--- /dev/null
+++ b/descent3/distinfo
@@ -0,0 +1,15 @@
+$NetBSD$
+
+BLAKE2s (Descent3-1.5.0-Source.tar.xz) = e95856d7375e4675d74e0ef7cd7e0500b5759644077a833b179496f2ce702c61
+SHA512 (Descent3-1.5.0-Source.tar.xz) = 4beb530c93ee9995149a701c3a1e2ee715b49d6e2ee5cf7bc5da20e839cf5ffc9cda6e10c1347a3922f93d8620df70171ff43e2886ff2a01aabf3a9f3d041513
+Size (Descent3-1.5.0-Source.tar.xz) = 10332432 bytes
+SHA1 (patch-CMakeLists.txt) = 397d7e21520a9f9841beb2c2ff813995ce0f0520
+SHA1 (patch-Descent3_Mission.cpp) = 2732efddba7785f79379b7db71ff6a5f2e48771c
+SHA1 (patch-Descent3_OsirisLoadandBind.cpp) = d62b628a785fdd1ea28eb15015a944b99dd57a68
+SHA1 (patch-ddebug_CMakeLists.txt) = 449571d7c530db770d8df9235938d79af52e7408
+SHA1 (patch-ddio_CMakeLists.txt) = f21dd8f95b4740f9b5ebadaf7f0171382610353c
+SHA1 (patch-ddio_lnxio.cpp) = fc37f00318f887e4ea90a6cc224e00e4ff708108
+SHA1 (patch-mem_CMakeLists.txt) = 0bb6d1a111297a49257586931a7962a03ee6c65a
+SHA1 (patch-mem_mem.cpp) = fe9cdffca866ce75ce6834722d4fba41789b7277
+SHA1 (patch-module_module.cpp) = 7057aef877191fe64f995e20a1e4ee552d1a4dd2
+SHA1 (patch-scripts_CMakeLists.txt) = c90a19eec688dc69fd970220cac69a3c140e162b
diff --git a/descent3/patches/patch-CMakeLists.txt b/descent3/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..6b99101cc9
--- /dev/null
+++ b/descent3/patches/patch-CMakeLists.txt
@@ -0,0 +1,25 @@
+$NetBSD$
+
+Support *BSD.
+
+--- CMakeLists.txt.orig 2024-08-16 21:53:25.000000000 +0000
++++ CMakeLists.txt
+@@ -144,6 +144,18 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwi
+ message("Building for MAC OSX")
+ add_compile_definitions(POSIX MACOSX=1 _USE_OGL_ACTIVE_TEXTURES PRIMARY_HOG=\"d3-osx.hog\")
+ set(PLATFORM_INCLUDES "lib/linux" ${SDL2_INCLUDE_DIR} ${SDL2_INCLUDE_DIRS})
++elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
++ message("Building for FreeBSD")
++ add_compile_definitions(POSIX _USE_OGL_ACTIVE_TEXTURES PRIMARY_HOG=\"d3-freebsd.hog\")
++ set(PLATFORM_INCLUDES "lib/linux" ${SDL2_INCLUDE_DIR} ${SDL2_INCLUDE_DIRS})
++elseif(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
++ message("Building for NetBSD")
++ add_compile_definitions(POSIX _USE_OGL_ACTIVE_TEXTURES PRIMARY_HOG=\"d3-netbsd.hog\")
++ set(PLATFORM_INCLUDES "lib/linux" ${SDL2_INCLUDE_DIR} ${SDL2_INCLUDE_DIRS})
++elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
++ message("Building for OpenBSD")
++ add_compile_definitions(POSIX _USE_OGL_ACTIVE_TEXTURES PRIMARY_HOG=\"d3-openbsd.hog\")
++ set(PLATFORM_INCLUDES "lib/linux" ${SDL2_INCLUDE_DIR} ${SDL2_INCLUDE_DIRS})
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ # Windows.h defines to avoid as many issues as possible.
+ add_compile_definitions(WIN32_LEAN_AND_MEAN NOMINMAX NODRAWTEXT NOBITMAP NOMCX NOSERVICE PRIMARY_HOG=\"d3-win.hog\"
diff --git a/descent3/patches/patch-Descent3_Mission.cpp b/descent3/patches/patch-Descent3_Mission.cpp
new file mode 100644
index 0000000000..e8482237f6
--- /dev/null
+++ b/descent3/patches/patch-Descent3_Mission.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Support *BSD.
+
+--- Descent3/Mission.cpp.orig 2024-08-24 19:30:47.752421171 +0000
++++ Descent3/Mission.cpp
+@@ -1691,7 +1691,7 @@ void InitLevelScript() {
+ strcat(filename, ".dll");
+ #elif defined(MACOSX)
+ strcat(filename, ".dylib");
+-#elif defined(__LINUX__)
++#elif defined(__LINUX__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ strcat(filename, ".so");
+ #else
+ #error Unsupported platform!
diff --git a/descent3/patches/patch-Descent3_OsirisLoadandBind.cpp b/descent3/patches/patch-Descent3_OsirisLoadandBind.cpp
new file mode 100644
index 0000000000..608b1088dd
--- /dev/null
+++ b/descent3/patches/patch-Descent3_OsirisLoadandBind.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Support *BSD.
+
+--- Descent3/OsirisLoadandBind.cpp.orig 2024-08-24 19:41:44.121690971 +0000
++++ Descent3/OsirisLoadandBind.cpp
+@@ -3145,7 +3145,7 @@ int Osiris_ExtractScriptsFromHog(int lib
+ const char *script_extension;
+ #if defined(MACOSX)
+ script_extension = "*.dylib";
+-#elif defined(__LINUX__)
++#elif defined(__LINUX__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ script_extension = "*.so";
+ #elif defined(WIN32)
+ script_extension = "*.dll";
diff --git a/descent3/patches/patch-ddebug_CMakeLists.txt b/descent3/patches/patch-ddebug_CMakeLists.txt
new file mode 100644
index 0000000000..c7ad8faf8b
--- /dev/null
+++ b/descent3/patches/patch-ddebug_CMakeLists.txt
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Support *BSD.
+
+--- ddebug/CMakeLists.txt.orig 2024-08-24 18:38:21.358398028 +0000
++++ ddebug/CMakeLists.txt
+@@ -4,7 +4,7 @@ set(HEADERS
+ mono.h)
+ set(CPPS
+ debug.cpp
+- $<$<PLATFORM_ID:Darwin,Linux>:
++ $<$<PLATFORM_ID:Darwin,Linux,FreeBSD,NetBSD,OpenBSD>:
+ lnxdebug.cpp
+ lnxmono.cpp
+ >
diff --git a/descent3/patches/patch-ddio_CMakeLists.txt b/descent3/patches/patch-ddio_CMakeLists.txt
new file mode 100644
index 0000000000..074dc43770
--- /dev/null
+++ b/descent3/patches/patch-ddio_CMakeLists.txt
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Support *BSD.
+
+--- ddio/CMakeLists.txt.orig 2024-08-24 18:38:47.867589860 +0000
++++ ddio/CMakeLists.txt
+@@ -16,7 +16,7 @@ set(CPPS
+ lnxkey_null.cpp
+ lnxmouse.cpp
+ lnxkey_sdl.cpp
+- $<$<PLATFORM_ID:Darwin,Linux>:
++ $<$<PLATFORM_ID:Darwin,Linux,FreeBSD,NetBSD,OpenBSD>:
+ lnxfile.cpp
+ >
+ $<$<PLATFORM_ID:Windows>:
diff --git a/descent3/patches/patch-ddio_lnxio.cpp b/descent3/patches/patch-ddio_lnxio.cpp
new file mode 100644
index 0000000000..d868003577
--- /dev/null
+++ b/descent3/patches/patch-ddio_lnxio.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+Support *BSD.
+
+--- ddio/lnxio.cpp.orig 2024-08-18 20:19:29.228315892 +0000
++++ ddio/lnxio.cpp
+@@ -123,6 +123,15 @@ bool ddio_GetBinaryPath(char *exec_path,
+ perror("realpath");
+ return false;
+ }
++#elif defined(__FreeBSD__)
++ perror("realpath");
++ return false;
++#elif defined(__NetBSD__)
++ perror("realpath");
++ return false;
++#elif defined(__OpenBSD__)
++ perror("realpath");
++ return false;
+ #else
+ if (GetModuleFileName(NULL, exec_path, len) == 0) {
+ DWORD error = GetLastError();
diff --git a/descent3/patches/patch-mem_CMakeLists.txt b/descent3/patches/patch-mem_CMakeLists.txt
new file mode 100644
index 0000000000..7582415168
--- /dev/null
+++ b/descent3/patches/patch-mem_CMakeLists.txt
@@ -0,0 +1,17 @@
+$NetBSD$
+
+jemalloc(3) provides malloc_usable_size().
+It would be better to find a more portable solution!
+
+--- mem/CMakeLists.txt.orig 2024-08-24 20:57:03.516510445 +0000
++++ mem/CMakeLists.txt
+@@ -7,6 +7,9 @@ target_compile_definitions(mem PUBLIC
+ )
+ target_link_libraries(mem PRIVATE
+ misc
++ $<$<PLATFORM_ID:FreeBSD,NetBSD>:
++ jemalloc
++ >
+ )
+ target_include_directories(mem PUBLIC
+ $<BUILD_INTERFACE:
diff --git a/descent3/patches/patch-mem_mem.cpp b/descent3/patches/patch-mem_mem.cpp
new file mode 100644
index 0000000000..7393ecc814
--- /dev/null
+++ b/descent3/patches/patch-mem_mem.cpp
@@ -0,0 +1,16 @@
+$NetBSD$
+
+jemalloc(3) provides malloc_usable_size().
+It would be better to find a more portable solution!
+
+--- mem/mem.cpp.orig 2024-08-24 19:59:36.438438241 +0000
++++ mem/mem.cpp
+@@ -194,6 +194,8 @@
+ #if defined(MACOSX)
+
+ #include <malloc/malloc.h>
++#elseif defined(__FreeBSD__) || defined(__NetBSD__)
++#include <jemalloc/jemalloc.h>
+ #else
+ #include <malloc.h>
+ #endif
diff --git a/descent3/patches/patch-module_module.cpp b/descent3/patches/patch-module_module.cpp
new file mode 100644
index 0000000000..c204d86bb9
--- /dev/null
+++ b/descent3/patches/patch-module_module.cpp
@@ -0,0 +1,41 @@
+$NetBSD$
+
+Support *BSD.
+
+--- module/module.cpp.orig 2024-08-18 20:31:34.039638457 +0000
++++ module/module.cpp
+@@ -283,6 +283,12 @@ void mod_GetRealModuleName(const char *m
+ strcat(filename, ".dll");
+ #elif defined(__LINUX__)
+ strcat(filename, ".so");
++#elif defined(__FreeBSD__)
++ strcat(filename, ".so");
++#elif defined(__NetBSD__)
++ strcat(filename, ".so");
++#elif defined(__OpenBSD__)
++ strcat(filename, ".so");
+ #elif defined(MACOSX)
+ strcat(filename, ".dylib");
+ #else
+@@ -299,6 +305,21 @@ void mod_GetRealModuleName(const char *m
+ strcat(filename, ".so");
+ else
+ strcat(filename, extension);
++#elif defined(__FreeBSD__)
++ if (!stricmp(extension, ".dll") || !stricmp(extension, "msl") || !stricmp(extension, "dylib"))
++ strcat(filename, ".so");
++ else
++ strcat(filename, extension);
++#elif defined(__NetBSD__)
++ if (!stricmp(extension, ".dll") || !stricmp(extension, "msl") || !stricmp(extension, "dylib"))
++ strcat(filename, ".so");
++ else
++ strcat(filename, extension);
++#elif defined(__OpenBSD__)
++ if (!stricmp(extension, ".dll") || !stricmp(extension, "msl") || !stricmp(extension, "dylib"))
++ strcat(filename, ".so");
++ else
++ strcat(filename, extension);
+ #elif defined(MACOSX)
+ if (!stricmp(extension, ".dll") || !stricmp(extension, "msl") || !stricmp(extension, "so"))
+ strcat(filename, ".dylib");
diff --git a/descent3/patches/patch-scripts_CMakeLists.txt b/descent3/patches/patch-scripts_CMakeLists.txt
new file mode 100644
index 0000000000..aad1309628
--- /dev/null
+++ b/descent3/patches/patch-scripts_CMakeLists.txt
@@ -0,0 +1,28 @@
+$NetBSD$
+
+Support *BSD.
+
+--- scripts/CMakeLists.txt.orig 2024-08-16 21:53:25.000000000 +0000
++++ scripts/CMakeLists.txt
+@@ -7,7 +7,7 @@ set(HEADERS
+ osiris_import.h
+ osiris_vector.h)
+ set(CPPS
+- $<$<PLATFORM_ID:Darwin,Linux>:
++ $<$<PLATFORM_ID:Darwin,Linux,FreeBSD,NetBSD,OpenBSD>:
+ linux_lib.cpp
+ >
+ )
+@@ -89,6 +89,12 @@ endforeach()
+
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(HOG_NAME "linux")
++elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
++ set(HOG_NAME "linux")
++elseif(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
++ set(HOG_NAME "linux")
++elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
++ set(HOG_NAME "linux")
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ set(HOG_NAME "osx")
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
Home |
Main Index |
Thread Index |
Old Index