pkgsrc-WIP-changes archive

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

fs2open-git: import fs2open (git snapshot) as fs2open-git



Module Name:	pkgsrc-wip
Committed By:	Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By:	yhardy
Date:		Wed Dec 18 09:02:18 2019 +0200
Changeset:	ecc7f3fdd74ba7fde940137d1e971f8f0f6635ab

Modified Files:
	Makefile
Added Files:
	fs2open-git/DESCR
	fs2open-git/LICENSE
	fs2open-git/Makefile
	fs2open-git/PLIST
	fs2open-git/distinfo
	fs2open-git/patches/patch-cmake_platform-unix.cmake
	fs2open-git/patches/patch-cmake_platforms.cmake
	fs2open-git/patches/patch-cmake_toolchain-clang.cmake
	fs2open-git/patches/patch-cmake_toolchain-gcc.cmake
	fs2open-git/patches/patch-code_libs_renderdoc_renderdoc__app.h
	fs2open-git/patches/patch-code_network_multi__portfwd.cpp
	fs2open-git/patches/patch-code_osapi_dialogs.cpp
	fs2open-git/patches/patch-freespace2_CMakeLists.txt
	fs2open-git/patches/patch-lib_libpcp_src_net_gateway.c
	fs2open-git/patches/patch-lib_libpcp_src_net_sock__ntop.c

Log Message:
fs2open-git: import fs2open (git snapshot) as fs2open-git

The Source Code Project was started roughly five years ago, when Volition
released the source code to the game known as "Freespace 2". This virtually
unknown game consistently won awards for being a great action space sim, but
never really caught on when it was released. The Source Code Project has worked,
and continues to work, on improving the graphics and gameplay of this
ten-year-old game.

This package installs the executable only. The original game CD, or
data files for the game are required to play the game.

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

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

diffstat:
 Makefile                                           |  1 +
 fs2open-git/DESCR                                  |  9 +++++
 fs2open-git/LICENSE                                | 14 +++++++
 fs2open-git/Makefile                               | 38 +++++++++++++++++++
 fs2open-git/PLIST                                  |  2 +
 fs2open-git/distinfo                               | 12 ++++++
 .../patches/patch-cmake_platform-unix.cmake        | 22 +++++++++++
 fs2open-git/patches/patch-cmake_platforms.cmake    | 17 +++++++++
 .../patches/patch-cmake_toolchain-clang.cmake      | 15 ++++++++
 .../patches/patch-cmake_toolchain-gcc.cmake        | 15 ++++++++
 .../patch-code_libs_renderdoc_renderdoc__app.h     | 19 ++++++++++
 .../patches/patch-code_network_multi__portfwd.cpp  | 16 ++++++++
 fs2open-git/patches/patch-code_osapi_dialogs.cpp   | 44 ++++++++++++++++++++++
 .../patches/patch-freespace2_CMakeLists.txt        | 15 ++++++++
 .../patches/patch-lib_libpcp_src_net_gateway.c     | 15 ++++++++
 .../patches/patch-lib_libpcp_src_net_sock__ntop.c  | 16 ++++++++
 16 files changed, 270 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 6b7c049e5e..cb3e3ce8e6 100644
--- a/Makefile
+++ b/Makefile
@@ -890,6 +890,7 @@ SUBDIR+=	frobtads
 SUBDIR+=	fs-uae-dev
 SUBDIR+=	fs-uae-launcher
 SUBDIR+=	fs2open
+SUBDIR+=	fs2open-git
 SUBDIR+=	fsharp
 SUBDIR+=	fslsfonts
 SUBDIR+=	fsom
diff --git a/fs2open-git/DESCR b/fs2open-git/DESCR
new file mode 100644
index 0000000000..92252b12ac
--- /dev/null
+++ b/fs2open-git/DESCR
@@ -0,0 +1,9 @@
+The Source Code Project was started roughly five years ago, when Volition
+released the source code to the game known as "Freespace 2". This virtually
+unknown game consistently won awards for being a great action space sim, but
+never really caught on when it was released. The Source Code Project has worked,
+and continues to work, on improving the graphics and gameplay of this
+ten-year-old game.
+
+This package installs the executable only. The original game CD, or
+data files for the game are required to play the game.
diff --git a/fs2open-git/LICENSE b/fs2open-git/LICENSE
new file mode 100644
index 0000000000..1edc28f9cf
--- /dev/null
+++ b/fs2open-git/LICENSE
@@ -0,0 +1,14 @@
+Volition Copyright (applies to original FreeSpace2 source code
+developed and released by Volition):
+
+"Copyright (C) Volition, Inc. 1999.  All rights reserved.
+
+All source code herein is the property of Volition, Inc. You may not
+sell or otherwise commercially exploit the source or things you
+created based on the source."
+
+
+Modifications by members of the FreeSpace Source Code Project are
+released under whatever terms the individual authors choose, but the
+above notice continues to apply to all fs2_open code.
+
diff --git a/fs2open-git/Makefile b/fs2open-git/Makefile
new file mode 100644
index 0000000000..ecb24582bd
--- /dev/null
+++ b/fs2open-git/Makefile
@@ -0,0 +1,38 @@
+# $NetBSD$
+#
+
+DISTNAME=	fs2_open-0.0
+CATEGORIES=	games
+MASTER_SITES=	${MASTER_SITE_GITHUB:=scp-fs2open/}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://scp.indiegames.us/
+COMMENT=	Freespace 2 source code project
+
+GIT_REPOSITORIES=	fs2open
+GIT_REPO.fs2open=	git://github.com/scp-fs2open/fs2open.github.com.git
+WRKSRC=			${WRKDIR}/fs2open
+
+USE_CMAKE=	yes
+USE_LANGUAGES=	c c++
+USE_TOOLS+=	pkg-config
+
+CONFIGURE_DIRS=	build
+CMAKE_ARG_PATH=	..
+
+LUA_VERSIONS_ACCEPTED=	51
+
+pre-configure:
+	${MKDIR} ${WRKSRC}/build
+
+.include "../../audio/openal-soft/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 "../../mk/jpeg.buildlink3.mk"
+.include "../../multimedia/ffmpeg4/buildlink3.mk"
+.include "../../textproc/jansson/buildlink3.mk"
+.include "../../wip/mk/git-package.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/fs2open-git/PLIST b/fs2open-git/PLIST
new file mode 100644
index 0000000000..560481f0fb
--- /dev/null
+++ b/fs2open-git/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD$
+bin/fs2_open
diff --git a/fs2open-git/distinfo b/fs2open-git/distinfo
new file mode 100644
index 0000000000..920b916247
--- /dev/null
+++ b/fs2open-git/distinfo
@@ -0,0 +1,12 @@
+$NetBSD$
+
+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
diff --git a/fs2open-git/patches/patch-cmake_platform-unix.cmake b/fs2open-git/patches/patch-cmake_platform-unix.cmake
new file mode 100644
index 0000000000..ec0eab092c
--- /dev/null
+++ b/fs2open-git/patches/patch-cmake_platform-unix.cmake
@@ -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")
diff --git a/fs2open-git/patches/patch-cmake_platforms.cmake b/fs2open-git/patches/patch-cmake_platforms.cmake
new file mode 100644
index 0000000000..4f9e83c2d4
--- /dev/null
+++ b/fs2open-git/patches/patch-cmake_platforms.cmake
@@ -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")
diff --git a/fs2open-git/patches/patch-cmake_toolchain-clang.cmake b/fs2open-git/patches/patch-cmake_toolchain-clang.cmake
new file mode 100644
index 0000000000..92b8c1a4ce
--- /dev/null
+++ b/fs2open-git/patches/patch-cmake_toolchain-clang.cmake
@@ -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")
diff --git a/fs2open-git/patches/patch-cmake_toolchain-gcc.cmake b/fs2open-git/patches/patch-cmake_toolchain-gcc.cmake
new file mode 100644
index 0000000000..f08d716ab6
--- /dev/null
+++ b/fs2open-git/patches/patch-cmake_toolchain-gcc.cmake
@@ -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")
diff --git a/fs2open-git/patches/patch-code_libs_renderdoc_renderdoc__app.h b/fs2open-git/patches/patch-code_libs_renderdoc_renderdoc__app.h
new file mode 100644
index 0000000000..17a9306866
--- /dev/null
+++ b/fs2open-git/patches/patch-code_libs_renderdoc_renderdoc__app.h
@@ -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
diff --git a/fs2open-git/patches/patch-code_network_multi__portfwd.cpp b/fs2open-git/patches/patch-code_network_multi__portfwd.cpp
new file mode 100644
index 0000000000..e09a79adcb
--- /dev/null
+++ b/fs2open-git/patches/patch-code_network_multi__portfwd.cpp
@@ -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) {
diff --git a/fs2open-git/patches/patch-code_osapi_dialogs.cpp b/fs2open-git/patches/patch-code_osapi_dialogs.cpp
new file mode 100644
index 0000000000..e004744d6a
--- /dev/null
+++ b/fs2open-git/patches/patch-code_osapi_dialogs.cpp
@@ -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();
+ 			}
+ 
diff --git a/fs2open-git/patches/patch-freespace2_CMakeLists.txt b/fs2open-git/patches/patch-freespace2_CMakeLists.txt
new file mode 100644
index 0000000000..66f14f7abe
--- /dev/null
+++ b/fs2open-git/patches/patch-freespace2_CMakeLists.txt
@@ -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)
diff --git a/fs2open-git/patches/patch-lib_libpcp_src_net_gateway.c b/fs2open-git/patches/patch-lib_libpcp_src_net_gateway.c
new file mode 100644
index 0000000000..5b8990bf5e
--- /dev/null
+++ b/fs2open-git/patches/patch-lib_libpcp_src_net_gateway.c
@@ -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
diff --git a/fs2open-git/patches/patch-lib_libpcp_src_net_sock__ntop.c b/fs2open-git/patches/patch-lib_libpcp_src_net_sock__ntop.c
new file mode 100644
index 0000000000..9f2c4c7458
--- /dev/null
+++ b/fs2open-git/patches/patch-lib_libpcp_src_net_sock__ntop.c
@@ -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) {


Home | Main Index | Thread Index | Old Index