pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

wip/fs2open: update to fs2_open-26.2.0



Module Name:	pkgsrc-wip
Committed By:	Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By:	yhardy
Date:		Wed Nov 18 20:53:28 2026 +0000
Changeset:	7b5ac4e656234a9eb160d062f9bab5d2e43cd66e

Modified Files:
	fs2open/Makefile
	fs2open/distinfo
	fs2open/patches/patch-cmake_toolchain-clang.cmake
	fs2open/patches/patch-cmake_toolchain-gcc.cmake
	fs2open/patches/patch-lib_antlr4-cpp-runtime_CMakeLists.txt
Added Files:
	fs2open/patches/patch-lib_antlr4-cpp-runtime_runtime_CMakeLists.txt
	fs2open/patches/patch-lib_libpcpnatpmp_src_net_gateway.c
	fs2open/patches/patch-lib_libpcpnatpmp_src_net_sock__ntop.c
	fs2open/patches/patch-lib_opengl_gl_CMakeLists.txt
	fs2open/patches/patch-lib_openxr_src_CMakeLists.txt
Removed Files:
	fs2open/patches/patch-code_osapi_dialogs.cpp
	fs2open/patches/patch-lib_libpcp_src_net_gateway.c
	fs2open/patches/patch-lib_libpcp_src_net_sock__ntop.c

Log Message:
wip/fs2open: update to fs2_open-26.2.0

Changelogs not provided. Release notes on forums:

 Release: 26.2.0
 https://www.hard-light.net/forums/index.php?topic=100192.0

 Release: 26.0.1
 https://www.hard-light.net/forums/index.php?topic=100145.0

 Release: 26.0.0
 https://www.hard-light.net/forums/index.php?topic=100019.0

 Release: 25.0.1
 https://www.hard-light.net/forums/index.php?topic=99931.0

 Release: 25.0.0
 https://www.hard-light.net/forums/index.php?topic=99860.0

 Release: 24.2.0
 https://www.hard-light.net/forums/index.php?topic=99435.0

 Release: 24.0.2
 https://www.hard-light.net/forums/index.php?topic=99271.0

 Release: 24.0.1
 https://www.hard-light.net/forums/index.php?topic=99238.0

 Release: 24.0.0
 https://www.hard-light.net/forums/index.php?topic=99166.0

 Release: 23.2.1
 https://www.hard-light.net/forums/index.php?topic=99015.0

 Release: 23.2.0
 https://www.hard-light.net/forums/index.php?topic=98984.0

 Release: 23.0.0
 https://www.hard-light.net/forums/index.php?topic=98682.0

 Release: 22.2.0
 https://www.hard-light.net/forums/index.php?topic=98360.0

 Release: 22.0.0
 https://www.hard-light.net/forums/index.php?topic=98125.0

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=7b5ac4e656234a9eb160d062f9bab5d2e43cd66e

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 fs2open/Makefile                                   | 21 ++++++------
 fs2open/distinfo                                   | 29 ++++++++---------
 fs2open/patches/patch-cmake_toolchain-clang.cmake  | 12 +++----
 fs2open/patches/patch-cmake_toolchain-gcc.cmake    |  8 ++---
 fs2open/patches/patch-code_osapi_dialogs.cpp       | 37 ----------------------
 .../patch-lib_antlr4-cpp-runtime_CMakeLists.txt    | 31 ++++++++++++------
 ...h-lib_antlr4-cpp-runtime_runtime_CMakeLists.txt | 26 +++++++++++++++
 fs2open/patches/patch-lib_libpcp_src_net_gateway.c | 15 ---------
 .../patches/patch-lib_libpcp_src_net_sock__ntop.c  | 16 ----------
 .../patch-lib_libpcpnatpmp_src_net_gateway.c       | 15 +++++++++
 .../patch-lib_libpcpnatpmp_src_net_sock__ntop.c    | 17 ++++++++++
 fs2open/patches/patch-lib_opengl_gl_CMakeLists.txt | 15 +++++++++
 .../patches/patch-lib_openxr_src_CMakeLists.txt    | 19 +++++++++++
 13 files changed, 147 insertions(+), 114 deletions(-)

diffs:
diff --git a/fs2open/Makefile b/fs2open/Makefile
index ad13050d16..d676ee295f 100644
--- a/fs2open/Makefile
+++ b/fs2open/Makefile
@@ -1,23 +1,18 @@
 # $NetBSD: Makefile,v 1.9 2015/08/18 20:48:41 yhardy Exp $
 #
 
-DISTNAME=	release_21_4_0
-PKGNAME=	fs2_open-21.4.0
+DISTNAME=	release_26_2_0
+PKGNAME=	fs2_open-26.2.0
 CATEGORIES=	games
 MASTER_SITES=	${MASTER_SITE_GITHUB:=scp-fs2open/fs2open.github.com/archive/}
 DIST_SUBDIR=	fs2_open
 DISTFILES+=	${DEFAULT_DISTFILES}
-DISTFILES+=	${GIT_CMAKE_MOD}.tar.gz
 DISTFILES+=	${GIT_LIBROCKET}.tar.gz
 
-GIT_CMAKE_MOD=	0875d124fd6f0a7b775227e1790f17dcf45a7ec6 #asarium
-GIT_CMAKE_MOD=	6a748896188fdf3f885820ccd686393ea5215dbf #rpavlik
-GIT_LIBROCKET=	ecd648a43aff8a9f3daf064d75ca5725237d5b38
+GIT_LIBROCKET=	b0c18e17d257a46db8395485895185915f483ede
 
-SITES.${GIT_CMAKE_MOD}.tar.gz= \
-		${MASTER_SITE_GITHUB:=rpavlik/}cmake-modules/archive/
 SITES.${GIT_LIBROCKET}.tar.gz= \
-		${MASTER_SITE_GITHUB:=asarium/}libRocket/archive/
+		${MASTER_SITE_GITHUB:=scp-fs2open/}libRocket/archive/
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=	http://scp.indiegames.us/
@@ -34,22 +29,24 @@ CMAKE_ARG_PATH=	..
 CMAKE_CONFIGURE_ARGS+=	-DBINARY_DESTINATION=bin
 CMAKE_CONFIGURE_ARGS+=	-DENABLE_COTIRE=OFF
 CMAKE_CONFIGURE_ARGS+=	-DFSO_BUILD_INCLUDED_LIBS=OFF
+CMAKE_CONFIGURE_ARGS+=	-DFSO_BUILD_QTFRED=OFF
+CMAKE_CONFIGURE_ARGS+=	-DFSO_BUILD_WITH_OPENXR=OFF
 CMAKE_CONFIGURE_ARGS+=	-DFSO_BUILD_WITH_VULKAN=OFF
 
 LUA_VERSIONS_ACCEPTED=	51
 
 pre-configure:
 	${MKDIR} ${WRKSRC}/build
-	${CP} -R ${WRKDIR}/cmake-modules-${GIT_CMAKE_MOD}/* ${WRKSRC}/cmake/external/rpavlik-cmake-modules/
 	${CP} -R ${WRKDIR}/libRocket-${GIT_LIBROCKET}/* ${WRKSRC}/lib/libRocket/
 
 .include "../../audio/openal-soft/buildlink3.mk"
-.include "../../devel/SDL2/buildlink3.mk"
+.include "../../devel/SDL3/buildlink3.mk"
 .include "../../devel/libexecinfo/buildlink3.mk"
+.include "../../devel/libusb1/buildlink3.mk"
 .include "../../graphics/freetype2/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
 .include "../../lang/lua/buildlink3.mk"
 .include "../../mk/jpeg.buildlink3.mk"
-.include "../../multimedia/ffmpeg4/buildlink3.mk"
+.include "../../multimedia/ffmpeg9/buildlink3.mk"
 .include "../../textproc/jansson/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/fs2open/distinfo b/fs2open/distinfo
index 4612ee6257..76e97e83fa 100644
--- a/fs2open/distinfo
+++ b/fs2open/distinfo
@@ -1,22 +1,21 @@
 $NetBSD: distinfo,v 1.6 2015/08/18 20:48:41 yhardy Exp $
 
-RMD160 (fs2_open/6a748896188fdf3f885820ccd686393ea5215dbf.tar.gz) = ad15a96122bfec222ee4c87895346937e8fdfad6
-SHA512 (fs2_open/6a748896188fdf3f885820ccd686393ea5215dbf.tar.gz) = 25e6589d11605cbbcc3918a2d6faf9cc39dc47e8a0ccc9f491e63a8d7da339da5679a4073c3529b6d141a281e096e6aae9406712b7a66285afb948163f0e5a11
-Size (fs2_open/6a748896188fdf3f885820ccd686393ea5215dbf.tar.gz) = 241373 bytes
-RMD160 (fs2_open/ecd648a43aff8a9f3daf064d75ca5725237d5b38.tar.gz) = 63cd363719f397dcfa62828d0ce983697337dd86
-SHA512 (fs2_open/ecd648a43aff8a9f3daf064d75ca5725237d5b38.tar.gz) = 700e242ecb5207faf729ca7d23ac4f28be819c0ef7a0ba51ca18de1592f1016040cd5e4c1c75a573f91cea69dd43549966ac089804a52c0f1b0cfbaabefc4346
-Size (fs2_open/ecd648a43aff8a9f3daf064d75ca5725237d5b38.tar.gz) = 2417905 bytes
-RMD160 (fs2_open/release_21_4_0.tar.gz) = 992f1275f4855bda9a7726648bab244129099ef6
-SHA512 (fs2_open/release_21_4_0.tar.gz) = f49e273c6d75fda117f4ac6c4312cf8e5a2b5072172d90a7a30e5227e1f4857cef5c80de9688656ba21bac75b4c02e1bbac5a1f86b8ba64d4ae46223e6c314b0
-Size (fs2_open/release_21_4_0.tar.gz) = 10430306 bytes
+BLAKE2s (fs2_open/b0c18e17d257a46db8395485895185915f483ede.tar.gz) = b2c92935cf3b0b78c4802483555504dfbccb7b5221c2dcd3af2acc512dfd9141
+SHA512 (fs2_open/b0c18e17d257a46db8395485895185915f483ede.tar.gz) = eb6714100e5228eabe9e0f3dbe8f10f8e5733c1decc45548aaab20acef74222fb6838b9cf21f1d2d45b7ac346e329d2612c93f92c07b05ace9c81beb3740b861
+Size (fs2_open/b0c18e17d257a46db8395485895185915f483ede.tar.gz) = 2418288 bytes
+BLAKE2s (fs2_open/release_26_2_0.tar.gz) = fb1e91832807af887984efff7a5ded790d63ca65cc5aadf1899287b37321527b
+SHA512 (fs2_open/release_26_2_0.tar.gz) = d0aed93c80345897d71e07ef295a6151ab3bd4d9f1f756b5877eaf39a870b4ebccaf423551a6e90056f2144362a3bcf91d088d9084679a78ea55cbc6421073fa
+Size (fs2_open/release_26_2_0.tar.gz) = 13328683 bytes
 SHA1 (patch-cmake_platform-unix.cmake) = 54de840e05b9ac738e84e9e33f17ce623599ec6d
 SHA1 (patch-cmake_platforms.cmake) = b91c2544b2225f7d00fa35272dd2b20725e1ba3e
-SHA1 (patch-cmake_toolchain-clang.cmake) = b3c9375059a56d2963e60d83bac38e690ea6eabc
-SHA1 (patch-cmake_toolchain-gcc.cmake) = 3ff59fe7a0a9381ee392b7964610580f272cdd7c
+SHA1 (patch-cmake_toolchain-clang.cmake) = 0d73cf0e9a7079732a017674d3fef595f07454ee
+SHA1 (patch-cmake_toolchain-gcc.cmake) = d389d1618a1808368fede196b9d5be94a463b314
 SHA1 (patch-code_network_psnet2.cpp) = dbdf0451182918c1d2f934afa3ccf58e8774898c
-SHA1 (patch-code_osapi_dialogs.cpp) = ba8156bccffde88b97903f7d263ac1138bfe4eef
 SHA1 (patch-freespace2_CMakeLists.txt) = 78cfadc9c91c90636c60bba164be387bf39b9a11
 SHA1 (patch-lib_CMakeLists.txt) = 534d5c89b47e926a1093c040f358adc01dd30196
-SHA1 (patch-lib_antlr4-cpp-runtime_CMakeLists.txt) = 148d82805e564374baf962191092c2b3940cde5b
-SHA1 (patch-lib_libpcp_src_net_gateway.c) = a05116a7ce0fcde029b27745488d4328d739ecd1
-SHA1 (patch-lib_libpcp_src_net_sock__ntop.c) = 8d1dc4326c714010f6632ab7d229874e4357a982
+SHA1 (patch-lib_antlr4-cpp-runtime_CMakeLists.txt) = cea3dba7a91f7d7115dd728fe9d7705230bb12c0
+SHA1 (patch-lib_antlr4-cpp-runtime_runtime_CMakeLists.txt) = 2176339cf2591a5b8e37aba8f2fa46a96e3dcb4e
+SHA1 (patch-lib_libpcpnatpmp_src_net_gateway.c) = 0cd4e767cc0e139ac6ee9491ff2589dce66bcbe2
+SHA1 (patch-lib_libpcpnatpmp_src_net_sock__ntop.c) = a8d13d03d3cf827488bd893faef3ada2208b0e32
+SHA1 (patch-lib_opengl_gl_CMakeLists.txt) = 18e96e5ebb745549257841051156e72eceaff76a
+SHA1 (patch-lib_openxr_src_CMakeLists.txt) = 47e85336b6ecf08138d28c1a822293daddc07958
diff --git a/fs2open/patches/patch-cmake_toolchain-clang.cmake b/fs2open/patches/patch-cmake_toolchain-clang.cmake
index 92b8c1a4ce..336570e0b6 100644
--- a/fs2open/patches/patch-cmake_toolchain-clang.cmake
+++ b/fs2open/patches/patch-cmake_toolchain-clang.cmake
@@ -2,14 +2,14 @@ $NetBSD$
 
 Keep the linker flags (which include the rpath).
 
---- cmake/toolchain-clang.cmake.orig	2019-12-15 18:44:11.111523660 +0000
+--- cmake/toolchain-clang.cmake.orig	2026-09-15 10:00:09.000000000 +0000
 +++ cmake/toolchain-clang.cmake
-@@ -97,7 +97,7 @@ set(CMAKE_CXX_FLAGS_DEBUG ${COMPILER_FLA
- set(CMAKE_C_FLAGS_DEBUG ${COMPILER_FLAGS_DEBUG})
- 
+@@ -148,7 +148,7 @@ set(CMAKE_C_FLAGS_DEBUG ${C_FLAGS_DEBUG})
+ set(CMAKE_CXX_FLAGS_DEBUG ${CXX_FLAGS_DEBUG})
+ set(CMAKE_C_FLAGS_DEBUG ${C_FLAGS_DEBUG})
  
 -set(CMAKE_EXE_LINKER_FLAGS "")
 +#set(CMAKE_EXE_LINKER_FLAGS "")
  
- if (CLANG_USE_LIBCXX)
- 	set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lc++abi")
+ if(DEFINED ENV{LDFLAGS})
+     set(CMAKE_EXE_LINKER_FLAGS $ENV{LDFLAGS})
diff --git a/fs2open/patches/patch-cmake_toolchain-gcc.cmake b/fs2open/patches/patch-cmake_toolchain-gcc.cmake
index 4d6073c123..5d04a63865 100644
--- a/fs2open/patches/patch-cmake_toolchain-gcc.cmake
+++ b/fs2open/patches/patch-cmake_toolchain-gcc.cmake
@@ -2,11 +2,11 @@ $NetBSD$
 
 Keep the linker flags (which include the rpath).
 
---- cmake/toolchain-gcc.cmake.orig	2021-01-27 17:07:03.000000000 +0000
+--- cmake/toolchain-gcc.cmake.orig	2026-09-15 10:00:09.000000000 +0000
 +++ cmake/toolchain-gcc.cmake
-@@ -122,7 +122,7 @@ set(CMAKE_C_FLAGS_RELEASE ${COMPILER_FLA
- set(CMAKE_CXX_FLAGS_DEBUG ${COMPILER_FLAGS_DEBUG})
- set(CMAKE_C_FLAGS_DEBUG ${COMPILER_FLAGS_DEBUG})
+@@ -190,7 +190,7 @@ set(CMAKE_C_FLAGS_DEBUG ${C_FLAGS_DEBUG})
+ set(CMAKE_CXX_FLAGS_DEBUG ${CXX_FLAGS_DEBUG})
+ set(CMAKE_C_FLAGS_DEBUG ${C_FLAGS_DEBUG})
  
 -set(CMAKE_EXE_LINKER_FLAGS "${LINKER_FLAGS}")
 +#set(CMAKE_EXE_LINKER_FLAGS "${LINKER_FLAGS}")
diff --git a/fs2open/patches/patch-code_osapi_dialogs.cpp b/fs2open/patches/patch-code_osapi_dialogs.cpp
deleted file mode 100644
index 9fdbc434e7..0000000000
--- a/fs2open/patches/patch-code_osapi_dialogs.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-$NetBSD$
-
-Provide fallback error messages to stderr.
-
---- code/osapi/dialogs.cpp.orig	2021-01-27 17:07:03.000000000 +0000
-+++ code/osapi/dialogs.cpp
-@@ -11,6 +11,7 @@
- 
- #include <string>
- #include <algorithm>
-+#include <iostream>
- 
- extern "C" {
- #include <lauxlib.h>
-@@ -248,6 +249,9 @@ namespace os
- 			if (SDL_ShowMessageBox(&boxData, &buttonId) < 0)
- 			{
- 				// Call failed
-+				std::cerr << "(SDL_ShowMessageBox failed: " << SDL_GetError() << ")" << std::endl;
-+				std::cerr << boxData.message << std::endl;
-+				std::cerr.flush();
- 				buttonId = 1; // No action
- 			}
- 
-@@ -332,6 +336,12 @@ namespace os
- 			if (SDL_ShowMessageBox(&boxData, &buttonId) < 0)
- 			{
- 				// Call failed
-+				std::cerr << "(SDL_ShowMessageBox failed: " << SDL_GetError() << ")" << std::endl;
-+				std::cerr << boxData.message << std::endl;
-+				std::cerr.flush();
-+				std::cerr << "(SDL_ShowMessageBox failed: " << SDL_GetError() << ")" << std::endl;
-+				std::cerr << boxData.message << std::endl;
-+				std::cerr.flush();
- 				abort();
- 			}
- 
diff --git a/fs2open/patches/patch-lib_antlr4-cpp-runtime_CMakeLists.txt b/fs2open/patches/patch-lib_antlr4-cpp-runtime_CMakeLists.txt
index 77c88965e3..7fb0024ab3 100644
--- a/fs2open/patches/patch-lib_antlr4-cpp-runtime_CMakeLists.txt
+++ b/fs2open/patches/patch-lib_antlr4-cpp-runtime_CMakeLists.txt
@@ -3,18 +3,31 @@ $NetBSD$
 Why is a license installed to the binary destination? Other licenses
 are not installed, so just take it out.
 
---- lib/antlr4-cpp-runtime/CMakeLists.txt.orig	2021-01-27 17:07:03.000000000 +0000
+--- lib/antlr4-cpp-runtime/CMakeLists.txt.orig	2026-09-15 10:00:09.000000000 +0000
 +++ lib/antlr4-cpp-runtime/CMakeLists.txt
-@@ -191,9 +191,9 @@ configure_package_config_file(
+@@ -181,16 +181,16 @@ endif(ANTLR4_INSTALL)
+ 
  endif(ANTLR4_INSTALL)
  
- # Slight changes from the standard distribution to fit better with how we handle things
+-if(EXISTS LICENSE.txt)
 -install(FILES LICENSE.txt
--        DESTINATION "${BINARY_DESTINATION}"
--        RENAME "Antlr4_LICENSE.txt")
+-        DESTINATION "share/doc/libantlr4")
+-elseif(EXISTS ../../LICENSE.txt)
+-install(FILES ../../LICENSE.txt
+-    DESTINATION "share/doc/libantlr4")
+-endif()
++#if(EXISTS LICENSE.txt)
 +#install(FILES LICENSE.txt
-+#        DESTINATION "${BINARY_DESTINATION}"
-+#        RENAME "Antlr4_LICENSE.txt")
++#        DESTINATION "share/doc/libantlr4")
++#elseif(EXISTS ../../LICENSE.txt)
++#install(FILES ../../LICENSE.txt
++#    DESTINATION "share/doc/libantlr4")
++#endif()
+ 
+-install(FILES README.md VERSION
+-    DESTINATION "share/doc/libantlr4")
++#install(FILES README.md VERSION
++#    DESTINATION "share/doc/libantlr4")
  
- #if(EXISTS LICENSE.txt)
- #install(FILES LICENSE.txt
+ set(CPACK_PACKAGE_CONTACT "antlr-discussion%googlegroups.com@localhost")
+ set(CPACK_PACKAGE_VERSION ${ANTLR_VERSION})
diff --git a/fs2open/patches/patch-lib_antlr4-cpp-runtime_runtime_CMakeLists.txt b/fs2open/patches/patch-lib_antlr4-cpp-runtime_runtime_CMakeLists.txt
new file mode 100644
index 0000000000..285b5ccca8
--- /dev/null
+++ b/fs2open/patches/patch-lib_antlr4-cpp-runtime_runtime_CMakeLists.txt
@@ -0,0 +1,26 @@
+$NetBSD$
+
+Don't install files that are not part of the engine
+(antlr is a separate package).
+
+--- lib/antlr4-cpp-runtime/runtime/CMakeLists.txt.orig	2026-11-02 23:24:02.663911238 +0000
++++ lib/antlr4-cpp-runtime/runtime/CMakeLists.txt
+@@ -128,10 +128,10 @@ endif()
+           RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ endif()
+ 
+-if (TARGET antlr4_static)
+-  install(TARGETS antlr4_static
+-          EXPORT antlr4-targets
+-          ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+-          LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+-          RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+-endif()
+\ No newline at end of file
++#if (TARGET antlr4_static)
++#  install(TARGETS antlr4_static
++#          EXPORT antlr4-targets
++#          ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++#          LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++#          RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
++#endif()
diff --git a/fs2open/patches/patch-lib_libpcp_src_net_gateway.c b/fs2open/patches/patch-lib_libpcp_src_net_gateway.c
deleted file mode 100644
index 77b4a15965..0000000000
--- a/fs2open/patches/patch-lib_libpcp_src_net_gateway.c
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-Also support NetBSD and OpenBSD.
-
---- lib/libpcp/src/net/gateway.c.orig	2021-01-27 17:07:03.000000000 +0000
-+++ lib/libpcp/src/net/gateway.c
-@@ -50,7 +50,7 @@
- #define USE_NETLINK
- #elif defined(WIN32)
- #define USE_WIN32_CODE
--#elif defined(__APPLE__) || defined(__FreeBSD__)
-+#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
- #define USE_SYSCTL_NET_ROUTE
- #elif defined(BSD) || defined(__FreeBSD_kernel__)
- #define USE_SYSCTL_NET_ROUTE
diff --git a/fs2open/patches/patch-lib_libpcp_src_net_sock__ntop.c b/fs2open/patches/patch-lib_libpcp_src_net_sock__ntop.c
deleted file mode 100644
index 9f2c4c7458..0000000000
--- a/fs2open/patches/patch-lib_libpcp_src_net_sock__ntop.c
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
-AI_V4MAPPED is not defined on all platforms, define to 0 if necessary.
-
---- lib/libpcp/src/net/sock_ntop.c.orig	2019-12-15 06:53:29.678798451 +0000
-+++ lib/libpcp/src/net/sock_ntop.c
-@@ -175,6 +175,9 @@ sock_pton(const char* cp, struct sockadd
-         memset(&hints, 0, sizeof hints);
-         hints.ai_family = AF_UNSPEC;
-         hints.ai_socktype = SOCK_DGRAM;
-+#ifndef AI_V4MAPPED
-+# define AI_V4MAPPED 0
-+#endif
-         hints.ai_flags = AI_V4MAPPED;
- 
-         if ((rv = getaddrinfo(host_name, port, &hints, &servinfo)) != 0) {
diff --git a/fs2open/patches/patch-lib_libpcpnatpmp_src_net_gateway.c b/fs2open/patches/patch-lib_libpcpnatpmp_src_net_gateway.c
new file mode 100644
index 0000000000..bdf4a90b39
--- /dev/null
+++ b/fs2open/patches/patch-lib_libpcpnatpmp_src_net_gateway.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Add support for NetBSD and OpenBSD.
+
+--- lib/libpcpnatpmp/src/net/gateway.c.orig	2026-11-02 22:33:35.357871972 +0000
++++ lib/libpcpnatpmp/src/net/gateway.c
+@@ -65,7 +65,7 @@
+ #include "pcp_win_defines.h"
+ #endif
+ 
+-#if defined(__APPLE__) || defined(__FreeBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+ #include <net/if_dl.h> //struct sockaddr_dl
+ 
+ #include <sys/sysctl.h>
diff --git a/fs2open/patches/patch-lib_libpcpnatpmp_src_net_sock__ntop.c b/fs2open/patches/patch-lib_libpcpnatpmp_src_net_sock__ntop.c
new file mode 100644
index 0000000000..984ded2b2d
--- /dev/null
+++ b/fs2open/patches/patch-lib_libpcpnatpmp_src_net_sock__ntop.c
@@ -0,0 +1,17 @@
+$NetBSD$
+
+AI_V4MAPPED is not defined on all platforms, define to 0 if necessary.
+
+--- lib/libpcpnatpmp/src/net/sock_ntop.c.orig	2026-11-02 21:26:49.118820793 +0000
++++ lib/libpcpnatpmp/src/net/sock_ntop.c
+@@ -54,6 +54,10 @@
+ #include <net/if_dl.h>
+ #endif
+ 
++#ifndef AI_V4MAPPED
++#define AI_V4MAPPED 0
++#endif
++
+ /* include sock_ntop */
+ char *sock_ntop(const struct sockaddr *sa, socklen_t salen) {
+     char portstr[8];
diff --git a/fs2open/patches/patch-lib_opengl_gl_CMakeLists.txt b/fs2open/patches/patch-lib_opengl_gl_CMakeLists.txt
new file mode 100644
index 0000000000..27781e5d5a
--- /dev/null
+++ b/fs2open/patches/patch-lib_opengl_gl_CMakeLists.txt
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Support BSD as well.
+
+--- lib/opengl/gl/CMakeLists.txt.orig	2026-11-02 21:47:41.361283002 +0000
++++ lib/opengl/gl/CMakeLists.txt
+@@ -48,7 +48,7 @@ if (WIN32)	
+ 		suppress_warnings(glad)
+ 		target_link_libraries(glad_wgl PUBLIC glad)
+ 	endif()
+-elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
++elseif(CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "BSD")
+ 	add_library(glad_glx STATIC
+ 			"glad_glx/include/glad/glad_glx.h"
+ 			"glad_glx/include/KHR/khrplatform.h"
diff --git a/fs2open/patches/patch-lib_openxr_src_CMakeLists.txt b/fs2open/patches/patch-lib_openxr_src_CMakeLists.txt
new file mode 100644
index 0000000000..c3091c3926
--- /dev/null
+++ b/fs2open/patches/patch-lib_openxr_src_CMakeLists.txt
@@ -0,0 +1,19 @@
+$NetBSD$
+
+Support BSD as well.
+
+--- lib/openxr/src/CMakeLists.txt.orig	2026-11-02 21:36:03.901177171 +0000
++++ lib/openxr/src/CMakeLists.txt
+@@ -137,6 +137,12 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+     add_definitions(-DNOMINMAX)
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+     add_definitions(-DXR_OS_LINUX)
++elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
++    add_definitions(-DXR_OS_LINUX)
++elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
++    add_definitions(-DXR_OS_LINUX)
++elseif(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
++    add_definitions(-DXR_OS_LINUX)
+ elseif(ANDROID)
+     add_definitions(-DXR_OS_ANDROID)
+ elseif(APPLE)


Home | Main Index | Thread Index | Old Index