Friday, September 04, 2020

Re: games/fs2open: update to 19.0.0

On Fri Sep 04, 2020 at 03:57:49PM -0600, Thomas Frohwein wrote:
> Hi,
>
> This is an update for fs2open to 19.0.0 which was released in January.
> I'm planning to get this update in before ports tree locks. As it's a
> non-trivial one, some additional eyes and input would be appreciated.

Just a quick gameplay test:

- fullscreen ok
- sound ok
- keyboard and mouse gameplay ok

$ dmesg|grep intel
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 530" rev 0x06
drm0 at inteldrm0
inteldrm0: msi, SKYLAKE, gen 9
inteldrm0: 2560x1440, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation), using wskbd0

Form the runtime perspective ok

Rafael

>
> Notes:
> - Changelog: https://github.com/scp-fs2open/fs2open.github.com/releases/tag/release_19_0_0
> - disables bundles SDL2 which is running behind (2.0.10 vs 2.0.12)
> - tested on both radeon (earlier draft) and intel Coffeelake. I noticed
> that with radeon (Radeon HD 6870), I was unable to get the first
> mission in nebula to load. It's called Mystery of the Trinity (Act 1,
> Mission 5) and analysis of the coredump implicates
> code/graphics/opengl/gropenglshader.cpp:790. No such issue with
> intel. Likely an issue with shader support on Radeon.
> - had to rename a variable _L -> _LuaState to avoid clash with a macro
> in ctype.h
> - Expanded the README because fullscreen tends to have issues with
> scaling correctly. This issue was already present in prior versions.
> - all other changes are generally trivial
>
> oks? comments?
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/games/fs2open/Makefile,v
> retrieving revision 1.8
> diff -u -p -r1.8 Makefile
> --- Makefile 20 Aug 2020 17:32:37 -0000 1.8
> +++ Makefile 4 Sep 2020 21:42:54 -0000
> @@ -1,11 +1,10 @@
> -# $OpenBSD: Makefile,v 1.8 2020/08/20 17:32:37 thfr Exp $
> +# $OpenBSD: Makefile,v 1.7 2019/07/14 02:16:51 naddy Exp $
>
> COMMENT = open source game engine based on FreeSpace 2
>
> -V = 3.8.0
> +V = 19.0.0
> DISTNAME = fs2_open_${V:S/./_/g}-source-Unix
> PKGNAME = fs2open-${V}
> -REVISION = 3
>
> CATEGORIES = games
>
> @@ -19,14 +18,11 @@ PERMIT_DISTFILES = no license at all
>
> WANTLIB += ${COMPILER_LIBCXX} c m z
> WANTLIB += SDL2 ${MODLUA_WANTLIB} openal
> -WANTLIB += avcodec avformat avutil jpeg swresample swscale
> +WANTLIB += avcodec avformat avutil freetype jpeg swresample swscale
> WANTLIB += jansson png
>
> MASTER_SITES = https://github.com/scp-fs2open/fs2open.github.com/releases/download/release_${V:S/./_/g}/
>
> -# Remove on next update
> -DISTFILES = ${DISTNAME}_1{${DISTNAME}}${EXTRACT_SUFX}
> -
> # c++11
> COMPILER = base-clang ports-gcc
> MODULES = devel/cmake \
> @@ -40,12 +36,20 @@ LIB_DEPENDS = audio/openal \
> CONFIGURE_ARGS = -DCMAKE_INSTALL_PREFIX=${LOCALBASE}/share/fs2open \
> -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen:Bool=Yes
>
> +# currently not building; would be ${WRKBUILD}/bin/unittests
> NO_TEST = Yes
>
> WRKDIST = ${WRKDIR}/fs2open.github.com
>
> +# remove bundled SDL
> +post-extract:
> + rm -rf ${WRKSRC}/lib/libsdl
> +
> pre-patch:
> @cd ${WRKSRC} && perl -i -pe 's/\r$$//' code/utils/boost/syncboundedqueue.h
> +
> +do-gen:
> + ${SUBST_CMD} ${WRKSRC}/CMakeLists.txt
>
> post-install:
> ${SUBST_CMD} -c -m 755 ${FILESDIR}/fs2open ${PREFIX}/bin/fs2open
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/games/fs2open/distinfo,v
> retrieving revision 1.3
> diff -u -p -r1.3 distinfo
> --- distinfo 2 Mar 2018 06:59:06 -0000 1.3
> +++ distinfo 4 Sep 2020 21:42:54 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (fs2_open_3_8_0-source-Unix_1.tar.gz) = 0m/4tma9rh6fQquvL0mNs2EJPyKJ2nhVXx9vu6dWIic=
> -SIZE (fs2_open_3_8_0-source-Unix_1.tar.gz) = 9040907
> +SHA256 (fs2_open_19_0_0-source-Unix.tar.gz) = lRzBrQo8iZ3VNRXrGpfDxxndhL3b3QHdkXeIT5klYo4=
> +SIZE (fs2_open_19_0_0-source-Unix.tar.gz) = 12195030
> Index: patches/patch-CMakeLists_txt
> ===================================================================
> RCS file: /cvs/ports/games/fs2open/patches/patch-CMakeLists_txt,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 patch-CMakeLists_txt
> --- patches/patch-CMakeLists_txt 16 Feb 2018 11:39:51 -0000 1.1.1.1
> +++ patches/patch-CMakeLists_txt 4 Sep 2020 21:42:54 -0000
> @@ -1,13 +1,23 @@
> $OpenBSD: patch-CMakeLists_txt,v 1.1.1.1 2018/02/16 11:39:51 kirby Exp $
>
> +add include and lib directories to find system SDL2
> try to avoid get_target_property error
> -remove cotire submodule dependency
>
> Index: CMakeLists.txt
> --- CMakeLists.txt.orig
> +++ CMakeLists.txt
> -@@ -13,6 +13,7 @@ include(cmake/util.cmake)
> - set_policy(CMP0051 OLD)
> +@@ -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.")
> +@@ -13,6 +16,7 @@ include(cmake/util.cmake)
> + set_policy(CMP0051 NEW)
> set_policy(CMP0053 NEW)
> set_policy(CMP0054 NEW)
> +set_policy(CMP0026 OLD) # to avoid get_target_property error
> Index: patches/patch-cmake_platformChecks_cmake
> ===================================================================
> RCS file: /cvs/ports/games/fs2open/patches/patch-cmake_platformChecks_cmake,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-cmake_platformChecks_cmake
> --- patches/patch-cmake_platformChecks_cmake 29 May 2018 07:32:31 -0000 1.1
> +++ patches/patch-cmake_platformChecks_cmake 4 Sep 2020 21:42:54 -0000
> @@ -1,4 +1,4 @@
> -$OpenBSD: patch-cmake_platformChecks_cmake,v 1.1 2018/05/29 07:32:31 kirby Exp $
> +$OpenBSD$
>
> Index: cmake/platformChecks.cmake
> --- cmake/platformChecks.cmake.orig
> @@ -7,8 +7,8 @@ Index: cmake/platformChecks.cmake
> include(CheckCXXSymbolExists)
> include(CheckTypeSize)
>
> --CHECK_INCLUDE_FILE("execinfo.h" HAVE_EXECINFO_H)
> -+#CHECK_INCLUDE_FILE("execinfo.h" HAVE_EXECINFO_H)
> - CHECK_INCLUDE_FILE_CXX("cxxabi.h" HAVE_CXXAPI_H)
> +-CHECK_INCLUDE_FILE("execinfo.h" SCP_HAVE_EXECINFO_H)
> ++#CHECK_INCLUDE_FILE("execinfo.h" SCP_HAVE_EXECINFO_H)
> + CHECK_INCLUDE_FILE_CXX("cxxabi.h" SCP_HAVE_CXXAPI_H)
>
> CHECK_TYPE_SIZE("max_align_t" MAX_ALIGN_T)
> Index: patches/patch-cmake_toolchain-clang_cmake
> ===================================================================
> RCS file: /cvs/ports/games/fs2open/patches/patch-cmake_toolchain-clang_cmake,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 patch-cmake_toolchain-clang_cmake
> --- patches/patch-cmake_toolchain-clang_cmake 16 Feb 2018 11:39:51 -0000 1.1.1.1
> +++ patches/patch-cmake_toolchain-clang_cmake 4 Sep 2020 21:42:54 -0000
> @@ -1,16 +1,19 @@
> -$OpenBSD: patch-cmake_toolchain-clang_cmake,v 1.1.1.1 2018/02/16 11:39:51 kirby Exp $
> +$OpenBSD$
>
> -remove hardcoded -O2
> +remove hardcoded -O{0,2} flags
>
> Index: cmake/toolchain-clang.cmake
> --- cmake/toolchain-clang.cmake.orig
> +++ cmake/toolchain-clang.cmake
> -@@ -80,7 +80,7 @@ if(SUPPORTS_SHIFT_NEGATIVE_VALUE)
> +@@ -82,9 +82,9 @@ if(SUPPORTS_SHIFT_NEGATIVE_VALUE)
> set(COMPILER_FLAGS "${COMPILER_FLAGS} -Wno-shift-negative-value")
> endif()
>
> --set(COMPILER_FLAGS_RELEASE "-O2 -Wno-unused-variable")
> -+set(COMPILER_FLAGS_RELEASE "-Wno-unused-variable")
> +-set(COMPILER_FLAGS_RELEASE "-O2 -Wno-unused-variable -Wno-unused-parameter")
> ++set(COMPILER_FLAGS_RELEASE "-Wno-unused-variable -Wno-unused-parameter")
>
> - set(COMPILER_FLAGS_DEBUG "-O0 -g -Wshadow")
> +-set(COMPILER_FLAGS_DEBUG "-O0 -g -Wshadow")
> ++set(COMPILER_FLAGS_DEBUG "-g -Wshadow")
>
> + # Always use the base flags and add our compiler flags at the bacl
> + set(CMAKE_CXX_FLAGS "${CXX_BASE_FLAGS} ${COMPILER_FLAGS}")
> Index: patches/patch-cmake_toolchain-gcc_cmake
> ===================================================================
> RCS file: /cvs/ports/games/fs2open/patches/patch-cmake_toolchain-gcc_cmake,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 patch-cmake_toolchain-gcc_cmake
> --- patches/patch-cmake_toolchain-gcc_cmake 16 Feb 2018 11:39:51 -0000 1.1.1.1
> +++ patches/patch-cmake_toolchain-gcc_cmake 4 Sep 2020 21:42:54 -0000
> @@ -1,16 +1,19 @@
> -$OpenBSD: patch-cmake_toolchain-gcc_cmake,v 1.1.1.1 2018/02/16 11:39:51 kirby Exp $
> +$OpenBSD$
>
> -remove hardcoded -O2
> +remove hardcoded -O{0,2} flags
>
> Index: cmake/toolchain-gcc.cmake
> --- cmake/toolchain-gcc.cmake.orig
> +++ cmake/toolchain-gcc.cmake
> -@@ -87,7 +87,7 @@ set(COMPILER_FLAGS "${COMPILER_FLAGS} -Wno-deprecated
> +@@ -94,9 +94,9 @@ if(SUPPORTS_STRINGOP_TRUNCATION)
> + set(COMPILER_FLAGS "${COMPILER_FLAGS} -Wno-stringop-overflow")
> + endif()
>
> - set(COMPILER_FLAGS "${COMPILER_FLAGS} -Wno-unused-parameter")
> +-set(COMPILER_FLAGS_RELEASE "-O2 -Wno-unused-variable -Wno-unused-but-set-variable -Wno-array-bounds -Wno-empty-body -Wno-clobbered -Wno-unused-parameter")
> ++set(COMPILER_FLAGS_RELEASE "-Wno-unused-variable -Wno-unused-but-set-variable -Wno-array-bounds -Wno-empty-body -Wno-clobbered -Wno-unused-parameter")
>
> --set(COMPILER_FLAGS_RELEASE "-O2 -Wno-unused-variable -Wno-unused-but-set-variable -Wno-array-bounds -Wno-empty-body -Wno-clobbered")
> -+set(COMPILER_FLAGS_RELEASE "-Wno-unused-variable -Wno-unused-but-set-variable -Wno-array-bounds -Wno-empty-body -Wno-clobbered")
> -
> - set(COMPILER_FLAGS_DEBUG "-O0 -g -Wshadow")
> +-set(COMPILER_FLAGS_DEBUG "-O0 -g -Wshadow")
> ++set(COMPILER_FLAGS_DEBUG "-g -Wshadow")
>
> + # Always use the base flags and add our compiler flags at the bacl
> + set(CMAKE_CXX_FLAGS "${CXX_BASE_FLAGS} ${COMPILER_FLAGS}")
> Index: patches/patch-code_CMakeLists_txt
> ===================================================================
> RCS file: patches/patch-code_CMakeLists_txt
> diff -N patches/patch-code_CMakeLists_txt
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-code_CMakeLists_txt 4 Sep 2020 21:42:54 -0000
> @@ -0,0 +1,16 @@
> +$OpenBSD$
> +
> +correct capitalization for libSDL2
> +
> +Index: code/CMakeLists.txt
> +--- code/CMakeLists.txt.orig
> ++++ code/CMakeLists.txt
> +@@ -26,7 +26,7 @@ TARGET_LINK_LIBRARIES(code PUBLIC ${LUA_LIBS})
> + TARGET_LINK_LIBRARIES(code PUBLIC ${PNG_LIBS})
> + TARGET_LINK_LIBRARIES(code PUBLIC ${JPEG_LIBS})
> +
> +-TARGET_LINK_LIBRARIES(code PUBLIC sdl2)
> ++TARGET_LINK_LIBRARIES(code PUBLIC SDL2)
> +
> + TARGET_LINK_LIBRARIES(code PUBLIC ffmpeg)
> +
> Index: patches/patch-code_libs_renderdoc_renderdoc_app_h
> ===================================================================
> RCS file: patches/patch-code_libs_renderdoc_renderdoc_app_h
> diff -N patches/patch-code_libs_renderdoc_renderdoc_app_h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-code_libs_renderdoc_renderdoc_app_h 4 Sep 2020 21:42:54 -0000
> @@ -0,0 +1,16 @@
> +$OpenBSD$
> +
> +add to ifdef
> +
> +Index: code/libs/renderdoc/renderdoc_app.h
> +--- code/libs/renderdoc/renderdoc_app.h.orig
> ++++ code/libs/renderdoc/renderdoc_app.h
> +@@ -35,7 +35,7 @@
> +
> + #if defined(WIN32)
> + #define RENDERDOC_CC __cdecl
> +-#elif defined(__linux__)
> ++#elif defined(__linux__) || defined(__OpenBSD__)
> + #define RENDERDOC_CC
> + #elif defined(__APPLE__)
> + #define RENDERDOC_CC
> Index: patches/patch-code_libs_renderdoc_renderdoc_cpp
> ===================================================================
> RCS file: patches/patch-code_libs_renderdoc_renderdoc_cpp
> diff -N patches/patch-code_libs_renderdoc_renderdoc_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-code_libs_renderdoc_renderdoc_cpp 4 Sep 2020 21:42:54 -0000
> @@ -0,0 +1,16 @@
> +$OpenBSD$
> +
> +we don't have RTLD_NOLOAD
> +
> +Index: code/libs/renderdoc/renderdoc.cpp
> +--- code/libs/renderdoc/renderdoc.cpp.orig
> ++++ code/libs/renderdoc/renderdoc.cpp
> +@@ -14,7 +14,7 @@ RENDERDOC_API_1_1_1* api = nullptr;
> +
> + pRENDERDOC_GetAPI load_getAPI() {
> + #ifdef SCP_UNIX
> +- auto handle = dlopen("librenderdoc.so", RTLD_NOLOAD);
> ++ auto handle = dlopen("librenderdoc.so", RTLD_LAZY);
> + auto symbol = dlsym(handle, "RENDERDOC_GetAPI");
> +
> + if (handle != nullptr) {
> Index: patches/patch-code_network_gtrack_cpp
> ===================================================================
> RCS file: patches/patch-code_network_gtrack_cpp
> diff -N patches/patch-code_network_gtrack_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-code_network_gtrack_cpp 4 Sep 2020 21:42:54 -0000
> @@ -0,0 +1,17 @@
> +$OpenBSD$
> +
> +include sys/socket.h, needed for AF_INET
> +
> +Index: code/network/gtrack.cpp
> +--- code/network/gtrack.cpp.orig
> ++++ code/network/gtrack.cpp
> +@@ -25,6 +25,9 @@
> + #include "network/ptrack.h"
> + #include "network/multi_fstracker.h"
> +
> ++#ifdef __OpenBSD__
> ++#include <sys/socket.h>
> ++

No comments:

Post a Comment