fs2open: update to fs2_open-19.0.0

Release announcement:

With this release we decided to drop the "3.Major_revision.Minor_revision"
versioning scheme in favor of a year based scheme since the Major
and Minor versions did not have much meaning anymore. Instead the
scheme will now be "..0". The last 0 is still there because some
of our systems expect that. It will be gone at some point.

Change log: (chronologically ordered)

 * Various OpenGL optimizations for better graphics performance:
   - Animations now use texture arrays
   - Model uniforms get sent to the GPU using uniform buffers for less overhead
   - Various other, minor changes/li]
 * After just 17 years, full Unicode text support! You can finally
   use non-ASCII characters without having to worry about special
   fonts and special characters. This is an opt-in mod flag.
 * Added various translation features for making it easier to only
   distribute one version of a mod which includes all languages.
 * OpenAL Soft is included by default in binary distributions of FSO now.
 * Added system for dynamically adding new SEXPs. With this a Lua
   script can expose functionality to the mission which can be used
   exactly the same as a standard SEXP with all the usual editing
   features in FRED.
 * Replaced Blinn-Phong BRDF with GGX BRDF
 * Added support for displaying decals on the surface of an object.
 * Refactored bitmap slot handling and removed the fixed upper
   limit on the number of bitmaps. No more bmpman corruption!
 * Exposed the movie player to the scripting API for advanced display features
 * Integrated support for the Discord Rich Presence API
 * Added new, markup based user interface system using libRocket.
 * Converted pilot files from custom binary format to JSON
This commit is contained in:
Yorick Hardy 2020-01-29 22:17:28 +02:00
parent c5c5a13b39
commit a3e59b4ff4
14 changed files with 224 additions and 62 deletions

View File

@ -1,41 +1,37 @@
# $NetBSD: Makefile,v 1.9 2015/08/18 20:48:41 yhardy Exp $
#
DISTNAME= fs2_open_${PKGVERSION_NOREV:S/./_/g}_src
PKGNAME= fs2_open-3.7.4
DISTNAME= fs2_open_19_0_0-source-Unix
PKGNAME= fs2_open-19.0.0
CATEGORIES= games
MASTER_SITES= http://swc.fs2downloads.com/builds/
EXTRACT_SUFX= .tgz
MASTER_SITES= ${MASTER_SITE_GITHUB:=scp-fs2open/fs2open.github.com/releases/download/release_19_0_0/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://scp.indiegames.us/
COMMENT= Freespace 2 source code project
WRKSRC= ${WRKDIR}/fs2_open_${PKGVERSION_NOREV:S/./_/g}
WRKSRC= ${WRKDIR}/fs2open.github.com
GNU_CONFIGURE= yes
USE_CMAKE= yes
USE_LANGUAGES= c c++
USE_TOOLS+= aclocal autoconf automake pkg-config
USE_LIBTOOL= yes
USE_TOOLS+= pkg-config
CONFIGURE_DIRS= build
CMAKE_ARG_PATH= ..
CMAKE_ARGS+= -DBINARY_DESTINATION=bin
INSTALLATION_DIRS= bin
LUA_VERSIONS_ACCEPTED= 51
pre-configure:
set -e; cd ${WRKSRC}; \
aclocal; libtoolize; automake -a --foreign -i; autoconf
${MKDIR} ${WRKSRC}/build
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/code/fs2_open_${PKGVERSION_NOREV} ${DESTDIR}${PREFIX}/bin/fs2_open
.include "../../audio/libvorbis/buildlink3.mk"
.include "../../audio/openal-soft/buildlink3.mk"
.include "../../devel/SDL/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"
.include "../../devel/SDL2/buildlink3.mk"
.include "../../devel/libexecinfo/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../lang/lua/buildlink3.mk"
.include "../../multimedia/libtheora/buildlink3.mk"
.include "../../multimedia/libogg/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"
.include "../../multimedia/ffmpeg4/buildlink3.mk"
.include "../../textproc/jansson/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View File

@ -1,8 +1,16 @@
$NetBSD: distinfo,v 1.6 2015/08/18 20:48:41 yhardy Exp $
SHA1 (fs2_open_3_7_4_src.tgz) = d854d7bae403dc794019d8b39d7f64d114acc75d
RMD160 (fs2_open_3_7_4_src.tgz) = 7ccae88fc0176bd835f0a1931472f65c643eb2df
SHA512 (fs2_open_3_7_4_src.tgz) = d3624b1d2b5d0cb44932e1470095c953e2191bfa7f683e6d0a02f3b2e279f5a7380dd169fcd4420abcd5ebc2a8e1d1e3097ccf090916660fb84b05a6c8e6184a
Size (fs2_open_3_7_4_src.tgz) = 9033640 bytes
SHA1 (patch-aa) = 4991706153d66f1073022f8b55e4b7daa7d50450
SHA1 (patch-ab) = 4918aa3c488d11fa1132b1659bb7931ddf61669e
SHA1 (fs2_open_19_0_0-source-Unix.tar.gz) = 4ab780c25fc3e813d7fb319259ff7c214e271152
RMD160 (fs2_open_19_0_0-source-Unix.tar.gz) = 465e5dc4f917f0fa4e0be04c1b9e3a39264b8b5e
SHA512 (fs2_open_19_0_0-source-Unix.tar.gz) = c0d6824037064a6efa733c2361cccfaed8da5fa31eb5683ac4996239e2a4fe4c31d85cf7e9708ee9e5ebaf9ac1e5ef8a178380866e864d359f3ab82c26c5789d
Size (fs2_open_19_0_0-source-Unix.tar.gz) = 12195030 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) = 957a15184012f3924f265ca467bcf5875d15ff96
SHA1 (patch-code_libs_renderdoc_renderdoc__app.h) = 8c7179a15fc5015bd8f27267fda237f3e9c7b15e
SHA1 (patch-code_network_multi__portfwd.cpp) = 4f08bfa9b1376a9c7c054067ff993dac157280c2
SHA1 (patch-code_osapi_dialogs.cpp) = 10eb8c64f633c6b4db62bee7bc56e07631e22f08
SHA1 (patch-freespace2_CMakeLists.txt) = 78cfadc9c91c90636c60bba164be387bf39b9a11
SHA1 (patch-lib_libpcp_src_net_gateway.c) = 47cf7aff4231c5b1914609bde7025d8f9def8d67
SHA1 (patch-lib_libpcp_src_net_sock__ntop.c) = 8d1dc4326c714010f6632ab7d229874e4357a982

View File

@ -1,23 +0,0 @@
$NetBSD: patch-aa,v 1.4 2013/09/08 20:21:09 yhardy Exp $
--- configure.ac.orig 2013-09-01 03:48:53.000000000 +0200
+++ configure.ac 2013-09-08 21:33:47.000000000 +0200
@@ -164,6 +164,18 @@
LDFLAGS="$LDFLAGS -L/usr/local/lib"
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
;;
+ *-*-dragonfly*)
+ # dragonfly bsd
+ echo "Using Unix defines (for $host_os)"
+ fs2_os_bsd="yes"
+ D_CFLAGS="$D_CFLAGS -DLUA_USE_LINUX"
+ ;;
+ *-*-netbsd*)
+ # netbsd
+ echo "Using Unix defines (for $host_os)"
+ fs2_os_bsd="yes"
+ D_CFLAGS="$D_CFLAGS -DLUA_USE_LINUX"
+ ;;
*)
# Unknown
echo "fs2_open does not support $host_cpu-$host_os"

View File

@ -1,13 +0,0 @@
$NetBSD: patch-ab,v 1.3 2010/11/17 08:03:41 yhardy Exp $
--- ./code/windows_stub/config.h.orig 2009-06-20 10:08:20.000000000 +0200
+++ ./code/windows_stub/config.h 2010-11-16 11:45:58.000000000 +0200
@@ -204,7 +204,7 @@
typedef SDL_mutex* CRITICAL_SECTION;
// timer stuff
-typedef timeval TIMEVAL;
+typedef struct timeval TIMEVAL;
bool QueryPerformanceCounter(LARGE_INTEGER *pcount);
// file related items

View File

@ -0,0 +1,22 @@
$NetBSD$
Use the pkgsrcs settings for rpath, and set the binary
and library destinations for pkgsrc.
--- cmake/platform-unix.cmake.orig 2019-12-15 06:53:29.388252150 +0000
+++ cmake/platform-unix.cmake
@@ -6,8 +6,11 @@ MESSAGE(STATUS "Configuring UNIX specifi
target_compile_definitions(platform INTERFACE SCP_UNIX USE_OPENAL _REENTRANT)
# Set RPATH
-set(CMAKE_SKIP_BUILD_RPATH TRUE)
-set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
-set(CMAKE_INSTALL_RPATH "\$ORIGIN")
+#set(CMAKE_SKIP_BUILD_RPATH TRUE)
+#set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
+#set(CMAKE_INSTALL_RPATH "\$ORIGIN")
set(PLATFORM_UNIX TRUE CACHE INTERNAL "" FORCE)
+
+SET(BINARY_DESTINATION "bin")
+SET(LIBRAY_DESTINATION "lib")

View File

@ -0,0 +1,17 @@
$NetBSD$
Add support for NetBSD and OpenBSD.
--- cmake/platforms.cmake.orig 2019-11-03 18:11:21.000000000 +0000
+++ cmake/platforms.cmake
@@ -17,6 +17,10 @@ ELSEIF(UNIX)
IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
INCLUDE(platform-freebsd)
+ ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
+ INCLUDE(platform-freebsd)
+ ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
+ INCLUDE(platform-freebsd)
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
INCLUDE(platform-solaris)
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

View File

@ -0,0 +1,15 @@
$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
@@ -97,7 +97,7 @@ set(CMAKE_CXX_FLAGS_DEBUG ${COMPILER_FLA
set(CMAKE_C_FLAGS_DEBUG ${COMPILER_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")

View File

@ -0,0 +1,15 @@
$NetBSD$
Keep the linker flags (which include the rpath).
--- cmake/toolchain-gcc.cmake.orig 2019-11-03 18:11:21.000000000 +0000
+++ cmake/toolchain-gcc.cmake
@@ -108,7 +108,7 @@ set(CMAKE_C_FLAGS_RELEASE ${COMPILER_FLA
set(CMAKE_CXX_FLAGS_DEBUG ${COMPILER_FLAGS_DEBUG})
set(CMAKE_C_FLAGS_DEBUG ${COMPILER_FLAGS_DEBUG})
-set(CMAKE_EXE_LINKER_FLAGS "")
+#set(CMAKE_EXE_LINKER_FLAGS "")
IF (MINGW)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -static-libgcc -static-libstdc++ -Wl,--enable-auto-import")

View File

@ -0,0 +1,19 @@
$NetBSD$
Add support for NetBSD and OpenBSD.
--- code/libs/renderdoc/renderdoc_app.h.orig 2019-08-28 23:04:20.000000000 +0000
+++ code/libs/renderdoc/renderdoc_app.h
@@ -39,6 +39,12 @@
#define RENDERDOC_CC
#elif defined(__APPLE__)
#define RENDERDOC_CC
+#elif defined(__FreeBSD__)
+#define RENDERDOC_CC
+#elif defined(__NetBSD__)
+#define RENDERDOC_CC
+#elif defined(__OpenBSD__)
+#define RENDERDOC_CC
#else
#error "Unknown platform"
#endif

View File

@ -0,0 +1,16 @@
$NetBSD$
AI_V4MAPPED is not defined on all platforms, define to 0 if necessary.
--- code/network/multi_portfwd.cpp.orig 2019-12-15 06:53:29.495797393 +0000
+++ code/network/multi_portfwd.cpp
@@ -187,6 +187,9 @@ static bool PF_get_addr(const char *host
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM;
+#ifndef AI_V4MAPPED
+# define AI_V4MAPPED 0
+#endif
hints.ai_flags = AI_V4MAPPED;
if (host == nullptr) {

View File

@ -0,0 +1,44 @@
$NetBSD$
Provide fallback error messages to stderr.
--- code/osapi/dialogs.cpp.orig 2019-12-16 14:07:42.626176361 +0000
+++ code/osapi/dialogs.cpp
@@ -11,6 +11,7 @@
#include <string>
#include <algorithm>
+#include <iostream>
extern "C" {
#include <lauxlib.h>
@@ -251,6 +252,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
}
@@ -335,6 +339,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();
abort();
}
@@ -403,6 +410,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();
abort();
}

View File

@ -0,0 +1,15 @@
$NetBSD$
Don't use the architecture suffix.
--- freespace2/CMakeLists.txt.orig 2019-11-03 18:11:22.000000000 +0000
+++ freespace2/CMakeLists.txt
@@ -23,7 +23,7 @@ ADD_EXECUTABLE(Freespace2 ${EXE_GUI_TYPE
include(resources.cmake)
-SET_TARGET_PROPERTIES(Freespace2 PROPERTIES OUTPUT_NAME "fs2_open_${FSO_BINARY_SUFFIX}")
+SET_TARGET_PROPERTIES(Freespace2 PROPERTIES OUTPUT_NAME "fs2_open")
TARGET_LINK_LIBRARIES(Freespace2 code)
TARGET_LINK_LIBRARIES(Freespace2 platform)

View File

@ -0,0 +1,15 @@
$NetBSD$
Also support NetbSD and OpenBSD.
--- lib/libpcp/src/net/gateway.c.orig 2019-12-15 06:53:29.677263118 +0000
+++ lib/libpcp/src/net/gateway.c
@@ -62,7 +62,7 @@
#include "pcp_win_defines.h"
#endif
-#if defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/sysctl.h>
#include <net/if_dl.h> //struct sockaddr_dl
#define USE_SOCKET_ROUTE

View File

@ -0,0 +1,16 @@
$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) {