mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
Update to latest fs2open release 25.0.0. Re-enabling vulkan backend,
however it doesn't produce the right window output here and may need more work. (The default is still opengl; start with '-vulkan' to test.)
This commit is contained in:
+24
-15
@@ -3,7 +3,7 @@ ONLY_FOR_ARCHS = aarch64 amd64 i386
|
||||
|
||||
COMMENT = open source game engine based on FreeSpace 2
|
||||
|
||||
V = 24.2.0
|
||||
V = 25.0.0
|
||||
PKGNAME = fs2open-${V}
|
||||
|
||||
CATEGORIES = games
|
||||
@@ -17,17 +17,16 @@ PERMIT_DISTFILES = no license at all
|
||||
# GL is dlopen'd
|
||||
WANTLIB += ${COMPILER_LIBCXX} GL SDL2 avcodec avformat avutil c freetype iconv
|
||||
WANTLIB += jansson jpeg ${MODLUA_WANTLIB} m openal png swresample swscale
|
||||
WANTLIB += usb-1.0 z
|
||||
WANTLIB += usb-1.0 vulkan z
|
||||
|
||||
DIST_TUPLE += github scp-fs2open fs2open.github.com release_${V:S/./_/g} .
|
||||
DIST_TUPLE += github asarium cmake-modules \
|
||||
7cef9577d6fc35057ea57f46b4986a8a28aeff50 \
|
||||
cmake/external/rpavlik-cmake-modules # Boost License 1.0
|
||||
DIST_TUPLE += github asarium libRocket \
|
||||
ecd648a43aff8a9f3daf064d75ca5725237d5b38 \
|
||||
ae8a8d98ae4801e6539ceeda377bb03028ce3334 \
|
||||
lib/libRocket # MIT
|
||||
|
||||
# c++11
|
||||
COMPILER = base-clang ports-gcc
|
||||
MODULES = devel/cmake \
|
||||
lang/lua
|
||||
@@ -36,35 +35,45 @@ LIB_DEPENDS = audio/openal \
|
||||
devel/libusb1 \
|
||||
devel/sdl2 \
|
||||
graphics/ffmpeg \
|
||||
graphics/png
|
||||
graphics/png \
|
||||
graphics/vulkan-loader
|
||||
|
||||
CXXFLAGS += -I${X11BASE}/include -I${LOCALBASE}/include
|
||||
MODCMAKE_LDFLAGS = -L${X11BASE}/lib -L${LOCALBASE}/lib
|
||||
|
||||
CONFIGURE_ARGS = -DCMAKE_INSTALL_PREFIX=${LOCALBASE}/share/fs2open \
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON \
|
||||
-DFSO_BUILD_WITH_DISCORD=OFF \
|
||||
-DFSO_BUILD_WITH_OPENXR=OFF \
|
||||
-DFSO_BUILD_WITH_VULKAN=ON
|
||||
|
||||
CONFIGURE_ENV += C_OPT_FLAG_DEBUG="${CFLAGS}" \
|
||||
C_OPT_FLAG_RELEASE="${CFLAGS}" \
|
||||
CXX_OPT_FLAG_DEBUG="${CXXFLAGS}" \
|
||||
CXX_OPT_FLAG_RELEASE="${CXXFLAGS}"
|
||||
#CONFIGURE_ENV += C_OPT_FLAG_DEBUG="${CFLAGS}" \
|
||||
# C_OPT_FLAG_RELEASE="${CFLAGS}" \
|
||||
# CXX_OPT_FLAG_DEBUG="${CXXFLAGS}" \
|
||||
# CXX_OPT_FLAG_RELEASE="${CXXFLAGS}"
|
||||
|
||||
MODCMAKE_POLICY_VERSION_OVERRIDE = Yes
|
||||
#MODCMAKE_POLICY_VERSION_OVERRIDE = Yes
|
||||
|
||||
# currently not building; would be ${WRKBUILD}/bin/unittests
|
||||
NO_TEST = Yes
|
||||
|
||||
#CFLAGS += -I${LOCALBASE}/include
|
||||
CXXFLAGS += -I${LOCALBASE}/include \
|
||||
-I${LOCALBASE}/include/SDL2
|
||||
|
||||
WRKDIST = ${WRKDIR}/fs2open.github.com-release_${V:S/./_/g}
|
||||
|
||||
pre-configure:
|
||||
find ${WRKSRC}/ -name "CMakeLists.txt" -type f -exec sed -i \
|
||||
-E 's/cmake_minimum_required\([[:space:]]*VERSION[[:space:]]+[^)]+\)/cmake_minimum_required(VERSION 3.5)/g' \
|
||||
{} \;
|
||||
#pre-configure:
|
||||
# find ${WRKSRC}/ -name "CMakeLists.txt" -type f -exec sed -i \
|
||||
# -E 's/cmake_minimum_required\([[:space:]]*VERSION[[:space:]]+[^)]+\)/cmake_minimum_required(VERSION 3.5)/g' \
|
||||
# {} \;
|
||||
|
||||
do-gen:
|
||||
${SUBST_CMD} ${WRKSRC}/CMakeLists.txt
|
||||
|
||||
# remove share/fs2open/lib which only holds an unneeded static library
|
||||
post-install:
|
||||
${SUBST_CMD} -c -m 755 ${FILESDIR}/fs2open ${PREFIX}/bin/fs2open
|
||||
rm -rf ${PREFIX}/share/fs2open/lib/
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SHA256 (asarium-cmake-modules-7cef9577d6fc35057ea57f46b4986a8a28aeff50.tar.gz) = e2kS2gGlbuyljBP4u7B7YSCvjwRyIxZ0fcgTKo7GWso=
|
||||
SHA256 (asarium-libRocket-ecd648a43aff8a9f3daf064d75ca5725237d5b38.tar.gz) = JcjDM2xciQqxzt/90Z17tubwjVy+HASUyiAs+5h/Tfc=
|
||||
SHA256 (scp-fs2open-fs2open.github.com-release_24_2_0.tar.gz) = ezdWFWx/qsmsMBO8jAdBXBIyuzQHU8pFeGAjGsyEP3c=
|
||||
SHA256 (asarium-libRocket-ae8a8d98ae4801e6539ceeda377bb03028ce3334.tar.gz) = /7x0raj7ng/eV7ZMtp7VpIuu9XERp5xu4mjH80aUDvk=
|
||||
SHA256 (scp-fs2open-fs2open.github.com-release_25_0_0.tar.gz) = viobVYVvz2ij0I5QFBop0mUgwhtgiXQ6AOKnM9qwUXo=
|
||||
SIZE (asarium-cmake-modules-7cef9577d6fc35057ea57f46b4986a8a28aeff50.tar.gz) = 267464
|
||||
SIZE (asarium-libRocket-ecd648a43aff8a9f3daf064d75ca5725237d5b38.tar.gz) = 2417905
|
||||
SIZE (scp-fs2open-fs2open.github.com-release_24_2_0.tar.gz) = 10958574
|
||||
SIZE (asarium-libRocket-ae8a8d98ae4801e6539ceeda377bb03028ce3334.tar.gz) = 2417926
|
||||
SIZE (scp-fs2open-fs2open.github.com-release_25_0_0.tar.gz) = 11459432
|
||||
|
||||
@@ -8,4 +8,4 @@ then
|
||||
print 'could not find directory ~/.local/share/fs2open'
|
||||
exit 1
|
||||
fi
|
||||
exec ${TRUEPREFIX}/share/fs2open/fs2open $*
|
||||
exec ${TRUEPREFIX}/share/fs2open/fs2open $@
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
add include and lib directories to find system SDL2
|
||||
try to avoid get_target_property error
|
||||
|
||||
Index: CMakeLists.txt
|
||||
--- CMakeLists.txt.orig
|
||||
+++ CMakeLists.txt
|
||||
@@ -2,6 +2,9 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.4)
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
+include_directories( "${LOCALBASE}/include" "${LOCALBASE}/include/SDL2" )
|
||||
+link_directories( "${LOCALBASE}/lib" )
|
||||
+
|
||||
# Make sure the source and binary directory are not the sample
|
||||
if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
message(FATAL_ERROR "Binary and source directory can not be the same! Choose another build directory.")
|
||||
@@ -14,6 +17,7 @@ include(cmake/embed_file.cmake)
|
||||
set_policy(CMP0051 NEW)
|
||||
set_policy(CMP0053 NEW)
|
||||
set_policy(CMP0054 NEW)
|
||||
+set_policy(CMP0026 NEW) # to avoid get_target_property error
|
||||
|
||||
SET(FSO_PROJECT_DESCRIPTION "Open source project based on the original FreeSpace 2 source code.")
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
correct capitalization for libSDL2
|
||||
skip OpenXR
|
||||
|
||||
Index: code/CMakeLists.txt
|
||||
--- code/CMakeLists.txt.orig
|
||||
+++ code/CMakeLists.txt
|
||||
@@ -35,7 +35,7 @@ TARGET_LINK_LIBRARIES(code PUBLIC ${PNG_LIBS})
|
||||
@@ -39,7 +39,7 @@ TARGET_LINK_LIBRARIES(code PUBLIC ${PNG_LIBS})
|
||||
TARGET_LINK_LIBRARIES(code PUBLIC ${JPEG_LIBS})
|
||||
TARGET_LINK_LIBRARIES(code PUBLIC lz4)
|
||||
|
||||
@@ -13,19 +12,3 @@ Index: code/CMakeLists.txt
|
||||
|
||||
if (FSO_BUILD_WITH_FFMPEG)
|
||||
TARGET_LINK_LIBRARIES(code PUBLIC ffmpeg)
|
||||
@@ -79,7 +79,7 @@ target_link_libraries(code PUBLIC hidapi::hidapi)
|
||||
|
||||
target_link_libraries(code PUBLIC imgui)
|
||||
|
||||
-IF(NOT APPLE)
|
||||
+IF(NOT APPLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
||||
target_link_libraries(code PUBLIC OpenXR::openxr_loader)
|
||||
target_include_directories(code PUBLIC OpenXR::Headers)
|
||||
ENDIF()
|
||||
@@ -139,4 +139,4 @@ set_target_properties(code PROPERTIES XCODE_ATTRIBUTE_
|
||||
set_target_properties(code PROPERTIES XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN[variant=Debug] "NO")
|
||||
|
||||
# Prevent GCC warnings in third-party BitOp... see GitHub #4366
|
||||
-suppress_file_warnings(scripting/lua/bitop/bit.c)
|
||||
\ No newline at end of file
|
||||
+suppress_file_warnings(scripting/lua/bitop/bit.c)
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
https://github.com/scp-fs2open/fs2open.github.com/pull/6948/commits/af833f059cc0cfc925792e019f6c2b754c6d53c1
|
||||
|
||||
Index: code/cutscene/ffmpeg/internal.cpp
|
||||
--- code/cutscene/ffmpeg/internal.cpp.orig
|
||||
+++ code/cutscene/ffmpeg/internal.cpp
|
||||
@@ -12,9 +12,10 @@ DecoderStatus::~DecoderStatus() {
|
||||
videoCodec = nullptr;
|
||||
|
||||
if (videoCodecCtx != nullptr) {
|
||||
- avcodec_close(videoCodecCtx);
|
||||
#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(57, 24, 255)
|
||||
avcodec_free_context(&videoCodecCtx);
|
||||
+#else
|
||||
+ avcodec_close(videoCodecCtx);
|
||||
#endif
|
||||
videoCodecCtx = nullptr;
|
||||
}
|
||||
@@ -24,9 +25,10 @@ DecoderStatus::~DecoderStatus() {
|
||||
audioCodec = nullptr;
|
||||
|
||||
if (audioCodecCtx != nullptr) {
|
||||
- avcodec_close(audioCodecCtx);
|
||||
#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(57, 24, 255)
|
||||
avcodec_free_context(&audioCodecCtx);
|
||||
+#else
|
||||
+ avcodec_close(audioCodecCtx);
|
||||
#endif
|
||||
audioCodecCtx = nullptr;
|
||||
}
|
||||
@@ -36,9 +38,10 @@ DecoderStatus::~DecoderStatus() {
|
||||
subtitleCodec = nullptr;
|
||||
|
||||
if (subtitleCodecCtx != nullptr) {
|
||||
- avcodec_close(subtitleCodecCtx);
|
||||
#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(57, 24, 255)
|
||||
avcodec_free_context(&subtitleCodecCtx);
|
||||
+#else
|
||||
+ avcodec_close(subtitleCodecCtx);
|
||||
#endif
|
||||
subtitleCodecCtx = nullptr;
|
||||
}
|
||||
@@ -10,7 +10,7 @@ Index: code/graphics/opengl/gropengl.cpp
|
||||
#include<glad/glad_glx.h>
|
||||
//Required because X defines none and always, which is used later
|
||||
#undef None
|
||||
@@ -1268,7 +1268,7 @@ bool gr_opengl_init(std::unique_ptr<os::GraphicsOperat
|
||||
@@ -1306,7 +1306,7 @@ bool gr_opengl_init(std::unique_ptr<os::GraphicsOperat
|
||||
Error(LOCATION, "Failed to load OpenGL!");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
Index: code/graphics/opengl/gropenglopenxr.cpp
|
||||
--- code/graphics/opengl/gropenglopenxr.cpp.orig
|
||||
+++ code/graphics/opengl/gropenglopenxr.cpp
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "graphics/opengl/ShaderProgram.h"
|
||||
#include "osapi/osapi.h"
|
||||
|
||||
-#if defined __APPLE_CC__
|
||||
+#if defined __APPLE_CC__ || defined __OpenBSD__
|
||||
|
||||
//Not supported
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
#include <SDL_syswm.h>
|
||||
|
||||
-#ifndef __APPLE_CC__
|
||||
+#if !defined __APPLE_CC__ && !defined __OpenBSD__
|
||||
|
||||
//SETUP FUNCTIONS OGL
|
||||
SCP_vector<const char*> gr_opengl_openxr_get_extensions() {
|
||||
@@ -473,4 +473,4 @@ bool gr_opengl_openxr_acquire_swapchain_buffers() { re
|
||||
|
||||
bool gr_opengl_openxr_flip() { return false; }
|
||||
|
||||
-#endif
|
||||
\ No newline at end of file
|
||||
+#endif
|
||||
@@ -1,19 +0,0 @@
|
||||
Index: code/graphics/openxr.cpp
|
||||
--- code/graphics/openxr.cpp.orig
|
||||
+++ code/graphics/openxr.cpp
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
std::unique_ptr<star[]> Stars_XRBuffer;
|
||||
|
||||
-#ifndef __APPLE_CC__
|
||||
+#if !defined(__APPLE_CC__) && !defined(__OpenBSD__)
|
||||
|
||||
#define XR_MAKE_VERSION_SHORT(major, minor, patch) \
|
||||
((((major) & 0x3ffU) << 20) | (((minor) & 0x3ffU) << 10) | ((patch) & 0x3ffU))
|
||||
@@ -545,4 +545,4 @@ bool openxr_requested() { return false; }
|
||||
|
||||
OpenXRTrackingInfo openxr_start_stereo_frame() { return OpenXRTrackingInfo{}; }
|
||||
|
||||
-#endif
|
||||
\ No newline at end of file
|
||||
+#endif
|
||||
@@ -1,19 +0,0 @@
|
||||
Index: code/graphics/openxr_internal.h
|
||||
--- code/graphics/openxr_internal.h.orig
|
||||
+++ code/graphics/openxr_internal.h
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <type_traits>
|
||||
#include <tl/optional.hpp>
|
||||
|
||||
-#ifndef __APPLE_CC__
|
||||
+#if !defined(__APPLE_CC__) && !defined(__OpenBSD__)
|
||||
|
||||
#include <openxr/openxr.h>
|
||||
#include <openxr/openxr_platform.h>
|
||||
@@ -51,4 +51,4 @@ tl::optional<typename std::result_of<openxr_fnc(arg_t.
|
||||
return func(std::forward<arg_t>(args)...);
|
||||
}
|
||||
|
||||
-#endif
|
||||
\ No newline at end of file
|
||||
+#endif
|
||||
@@ -5,7 +5,7 @@ this is a backport of a part of commit
|
||||
Index: code/osapi/dialogs.cpp
|
||||
--- code/osapi/dialogs.cpp.orig
|
||||
+++ code/osapi/dialogs.cpp
|
||||
@@ -336,7 +336,7 @@ namespace os
|
||||
@@ -326,7 +326,7 @@ namespace os
|
||||
if (SDL_ShowMessageBox(&boxData, &buttonId) < 0)
|
||||
{
|
||||
// Call failed
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
https://github.com/scp-fs2open/fs2open.github.com/pull/6948/commits/af833f059cc0cfc925792e019f6c2b754c6d53c1
|
||||
|
||||
Index: code/sound/ffmpeg/FFmpegWaveFile.cpp
|
||||
--- code/sound/ffmpeg/FFmpegWaveFile.cpp.orig
|
||||
+++ code/sound/ffmpeg/FFmpegWaveFile.cpp
|
||||
@@ -151,9 +151,10 @@ FFmpegWaveFile::~FFmpegWaveFile()
|
||||
av_frame_free(&m_decodeFrame);
|
||||
|
||||
if (m_audioCodecCtx) {
|
||||
- avcodec_close(m_audioCodecCtx);
|
||||
#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(57, 24, 255)
|
||||
avcodec_free_context(&m_audioCodecCtx);
|
||||
+#else
|
||||
+ avcodec_close(m_audioCodecCtx);
|
||||
#endif
|
||||
m_audioCodecCtx = nullptr;
|
||||
}
|
||||
@@ -3,7 +3,7 @@ change target binary name (remove platform name)
|
||||
Index: freespace2/CMakeLists.txt
|
||||
--- freespace2/CMakeLists.txt.orig
|
||||
+++ freespace2/CMakeLists.txt
|
||||
@@ -23,7 +23,7 @@ ADD_EXECUTABLE(Freespace2 ${EXE_GUI_TYPE} ${FREESPACE_
|
||||
@@ -25,7 +25,7 @@ target_compile_features(Freespace2 PUBLIC cxx_std_17)
|
||||
|
||||
include(resources.cmake)
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
Index: lib/CMakeLists.txt
|
||||
--- lib/CMakeLists.txt.orig
|
||||
+++ lib/CMakeLists.txt
|
||||
@@ -61,6 +61,6 @@ add_subdirectory(hidapi)
|
||||
|
||||
ADD_SUBDIRECTORY(imgui)
|
||||
|
||||
-if(NOT APPLE)
|
||||
+if(NOT APPLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
||||
add_subdirectory(openxr)
|
||||
-endif()
|
||||
\ No newline at end of file
|
||||
+endif()
|
||||
@@ -1,20 +1,12 @@
|
||||
Index: lib/antlr4-cpp-runtime/CMakeLists.txt
|
||||
--- lib/antlr4-cpp-runtime/CMakeLists.txt.orig
|
||||
+++ lib/antlr4-cpp-runtime/CMakeLists.txt
|
||||
@@ -28,16 +28,8 @@ project(LIBANTLR4)
|
||||
if(CMAKE_VERSION VERSION_EQUAL "3.0.0" OR
|
||||
CMAKE_VERSION VERSION_GREATER "3.0.0")
|
||||
CMAKE_POLICY(SET CMP0026 NEW)
|
||||
- CMAKE_POLICY(SET CMP0054 OLD)
|
||||
- CMAKE_POLICY(SET CMP0045 OLD)
|
||||
- CMAKE_POLICY(SET CMP0042 OLD)
|
||||
endif()
|
||||
|
||||
-if(CMAKE_VERSION VERSION_EQUAL "3.3.0" OR
|
||||
- CMAKE_VERSION VERSION_GREATER "3.3.0")
|
||||
- CMAKE_POLICY(SET CMP0059 OLD)
|
||||
- CMAKE_POLICY(SET CMP0054 OLD)
|
||||
-endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
#find_package(PkgConfig REQUIRED)
|
||||
@@ -95,7 +95,7 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND ANDR
|
||||
# and without -stdlib=libc++ cxxflags
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -stdlib=libc++")
|
||||
-elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND ( CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") )
|
||||
+elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND ( CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD") )
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE CLANG_VERSION)
|
||||
if(NOT (CLANG_VERSION VERSION_GREATER 4.2.1 OR CLANG_VERSION VERSION_EQUAL 4.2.1))
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
Index: lib/libpcp/src/net/gateway.c
|
||||
--- lib/libpcp/src/net/gateway.c.orig
|
||||
+++ 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(__OpenBSD__)
|
||||
#define USE_SYSCTL_NET_ROUTE
|
||||
#elif defined(BSD) || defined(__FreeBSD_kernel__)
|
||||
#define USE_SYSCTL_NET_ROUTE
|
||||
@@ -1,16 +0,0 @@
|
||||
add missing define, as found in code/windows_stub/config.h and
|
||||
lib/libpcp/src/windows/pcp_win_defines.h (identical)
|
||||
|
||||
Index: lib/libpcp/src/net/sock_ntop.c
|
||||
--- lib/libpcp/src/net/sock_ntop.c.orig
|
||||
+++ lib/libpcp/src/net/sock_ntop.c
|
||||
@@ -23,6 +23,9 @@
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
+/* Doesn't get picked up from Windows header files, therefore added here: */
|
||||
+#define AI_V4MAPPED 0x00000800
|
||||
+
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#else
|
||||
@@ -0,0 +1,12 @@
|
||||
Index: lib/libpcpnatpmp/src/net/gateway.c
|
||||
--- lib/libpcpnatpmp/src/net/gateway.c.orig
|
||||
+++ 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__)
|
||||
#include <net/if_dl.h> //struct sockaddr_dl
|
||||
|
||||
#include <sys/sysctl.h>
|
||||
@@ -0,0 +1,21 @@
|
||||
Index: lib/libpcpnatpmp/src/net/sock_ntop.c
|
||||
--- lib/libpcpnatpmp/src/net/sock_ntop.c.orig
|
||||
+++ lib/libpcpnatpmp/src/net/sock_ntop.c
|
||||
@@ -168,7 +168,7 @@ int sock_pton(const char *cp, struct sockaddr *sa) {
|
||||
memset(&hints, 0, sizeof hints);
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_DGRAM;
|
||||
- hints.ai_flags = AI_V4MAPPED;
|
||||
+ hints.ai_flags = AI_ADDRCONFIG;
|
||||
|
||||
if ((rv = getaddrinfo(host_name, port, &hints, &servinfo)) != 0) {
|
||||
fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(rv));
|
||||
@@ -298,7 +298,7 @@ int sock_pton_with_prefix(const char *cp, struct socka
|
||||
memset(&hints, 0, sizeof hints);
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_DGRAM;
|
||||
- hints.ai_flags = AI_V4MAPPED;
|
||||
+ hints.ai_flags = AI_ADDRCONFIG;
|
||||
|
||||
if ((rv = getaddrinfo(host_name, port, &hints, &servinfo)) != 0) {
|
||||
fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(rv));
|
||||
@@ -1,5 +1,9 @@
|
||||
bin/fs2open
|
||||
share/doc/pkg-readmes/${PKGSTEM}
|
||||
share/fs2open/
|
||||
share/fs2open/Antlr4_LICENSE.txt
|
||||
@bin share/fs2open/fs2open
|
||||
share/fs2open/share/
|
||||
share/fs2open/share/doc/
|
||||
share/fs2open/share/doc/libantlr4/
|
||||
share/fs2open/share/doc/libantlr4/README.md
|
||||
share/fs2open/share/doc/libantlr4/VERSION
|
||||
|
||||
Reference in New Issue
Block a user