update FNA suite to 22.08

Link mojoshader statically in fna3d and lose mojoshader dependendencies
in the process. This is the way upstream recommends it and uses it on
other platforms.

FAudio upstream has gotten rid of the built-in GSTREAMER use.

Tested with a large library of FNA and XNA games. Fallout from the
changes is minimal and doesn't affect any of the major or more popular
games.

On the positive side, the crashes that I reported in [1] are gone with
this update.

Changenotes in [2], [3], and [4].

[1] https://marc.info/?l=openbsd-bugs&m=165136879315845&w=2
[2] https://github.com/FNA-XNA/FNA/releases
[3] https://github.com/FNA-XNA/FAudio/releases
[4] https://github.com/FNA-XNA/FNA3D/releases
This commit is contained in:
thfr 2022-09-03 01:45:41 +00:00
parent c3e29f3e4e
commit 7b775a4fe2
8 changed files with 37 additions and 73 deletions

View File

@ -1,10 +1,10 @@
# versions are in sync with FNA versions
V = 22.01
V = 22.08
COMMENT = XAudio reimplementation for open platforms
DISTNAME = fna-${V:S/.//g}
PKGNAME = faudio-${V}
SHARED_LIBS = FAudio 3.0 # 21.08
SHARED_LIBS = FAudio 4.0 # 22.08
CATEGORIES = audio
HOMEPAGE = https://github.com/FNA-XNA/FAudio
@ -13,8 +13,7 @@ MAINTAINER = Thomas Frohwein <thfr@openbsd.org>
# zlib
PERMIT_PACKAGE = Yes
WANTLIB += SDL2 glib-2.0 gobject-2.0 gstapp-1.0 gstaudio-1.0 gstbase-1.0
WANTLIB += gstreamer-1.0 gsttag-1.0 intl
WANTLIB += SDL2
MASTER_SITES = https://github.com/FNA-XNA/FNA/releases/download/${V}/
EXTRACT_SUFX = .zip
@ -23,14 +22,11 @@ COMPILER = base-clang ports-gcc
MODULES = devel/cmake
LIB_DEPENDS = devel/sdl2 \
multimedia/gstreamer1/core \
multimedia/gstreamer1/plugins-base
LIB_DEPENDS = devel/sdl2
USE_GMAKE = Yes
CONFIGURE_ARGS += -DBUILD_TESTS=ON \
-DGSTREAMER=ON
CONFIGURE_ARGS += -DBUILD_TESTS=ON
WRKDIST = ${WRKDIR}/FNA/lib/FAudio

View File

@ -1,2 +1,2 @@
SHA256 (fna-2201.zip) = U8aUH5ZU6fLLtS4S5/yNPk4trPdqdnLv361CVKJnpdc=
SIZE (fna-2201.zip) = 3852887
SHA256 (fna-2208.zip) = IiYZDwoPavX+sp8VNAps+Zhi65u1Fc+Qcsljfzkr5k8=
SIZE (fna-2208.zip) = 3851289

View File

@ -1,4 +1,4 @@
V = 22.01
V = 22.08
COMMENT = XNA4 reimplementation for open platforms
DISTNAME = fna-${V:S/.//g}
PKGNAME = fna-${V}
@ -27,8 +27,7 @@ EXTRACT_SUFX = .zip
MODULES = lang/mono
RUN_DEPENDS = audio/faudio \
devel/sdl2-image \
graphics/fna3d \
graphics/mojoshader
graphics/fna3d
WRKDIST = ${WRKDIR}/FNA
NO_TEST = Yes
ALL_TARGET = release

View File

@ -1,6 +1,6 @@
SHA256 (fna-22.01/521c8532f03b3608a141b36d7c1343e816b46cb1.tar.gz) = Cj2HaaOFBDsXtb/LPiedFdKzTb59XU9nMU7fuR9C6gc=
SHA256 (fna-22.01/ebff244074bb3c28aeeb8cf7b383b5a029d7e28d.tar.gz) = 34qgjqOOFTODn6zSKEs6Gt9jbdaJi9MR/7rw12tlXIA=
SHA256 (fna-22.01/fna-2201.zip) = U8aUH5ZU6fLLtS4S5/yNPk4trPdqdnLv361CVKJnpdc=
SIZE (fna-22.01/521c8532f03b3608a141b36d7c1343e816b46cb1.tar.gz) = 5607
SIZE (fna-22.01/ebff244074bb3c28aeeb8cf7b383b5a029d7e28d.tar.gz) = 19825
SIZE (fna-22.01/fna-2201.zip) = 3852887
SHA256 (fna-22.08/521c8532f03b3608a141b36d7c1343e816b46cb1.tar.gz) = Cj2HaaOFBDsXtb/LPiedFdKzTb59XU9nMU7fuR9C6gc=
SHA256 (fna-22.08/ebff244074bb3c28aeeb8cf7b383b5a029d7e28d.tar.gz) = 34qgjqOOFTODn6zSKEs6Gt9jbdaJi9MR/7rw12tlXIA=
SHA256 (fna-22.08/fna-2208.zip) = IiYZDwoPavX+sp8VNAps+Zhi65u1Fc+Qcsljfzkr5k8=
SIZE (fna-22.08/521c8532f03b3608a141b36d7c1343e816b46cb1.tar.gz) = 5607
SIZE (fna-22.08/ebff244074bb3c28aeeb8cf7b383b5a029d7e28d.tar.gz) = 19825
SIZE (fna-22.08/fna-2208.zip) = 3851289

View File

@ -1,5 +1,5 @@
# versions are in sync with FNA versions
V = 22.01
V = 22.08
COMMENT = 3D graphics library for FNA
DISTNAME = fna-${V:S/.//g}
PKGNAME = fna3d-${V}
@ -13,7 +13,7 @@ MAINTAINER = Thomas Frohwein <thfr@openbsd.org>
# zlib
PERMIT_PACKAGE = Yes
WANTLIB += SDL2 mojoshader
WANTLIB += SDL2
MASTER_SITES = https://github.com/FNA-XNA/FNA/releases/download/${V}/
EXTRACT_SUFX = .zip
@ -24,8 +24,7 @@ COMPILER_LANGS = c
MODULES = devel/cmake
LIB_DEPENDS = devel/sdl2 \
graphics/mojoshader
LIB_DEPENDS = devel/sdl2
USE_GMAKE = Yes

View File

@ -1,2 +1,2 @@
SHA256 (fna-2201.zip) = U8aUH5ZU6fLLtS4S5/yNPk4trPdqdnLv361CVKJnpdc=
SIZE (fna-2201.zip) = 3852887
SHA256 (fna-2208.zip) = IiYZDwoPavX+sp8VNAps+Zhi65u1Fc+Qcsljfzkr5k8=
SIZE (fna-2208.zip) = 3851289

View File

@ -1,56 +1,12 @@
set correct library version
disable bundled mojoshader in favor of the one from ports
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -100,18 +100,6 @@ add_library(FNA3D
src/FNA3D_PipelineCache.c
src/FNA3D_Tracing.c
)
-add_library(mojoshader STATIC
- MojoShader/mojoshader.c
- MojoShader/mojoshader_effects.c
- MojoShader/mojoshader_common.c
- MojoShader/mojoshader_d3d11.c
- MojoShader/mojoshader_opengl.c
- MojoShader/mojoshader_vulkan.c
- MojoShader/profiles/mojoshader_profile_common.c
- MojoShader/profiles/mojoshader_profile_glsl.c
- MojoShader/profiles/mojoshader_profile_hlsl.c
- MojoShader/profiles/mojoshader_profile_spirv.c
-)
if(TRACING_SUPPORT)
add_executable(fna3d_replay replay/replay.c)
target_link_libraries(fna3d_replay FNA3D)
@@ -124,20 +112,15 @@ endif()
if(NOT MSVC)
set_property(TARGET FNA3D PROPERTY COMPILE_FLAGS "-std=gnu99 -Wall -Wno-strict-aliasing -pedantic")
endif()
-if(BUILD_SHARED_LIBS)
- set_property(TARGET mojoshader PROPERTY POSITION_INDEPENDENT_CODE ON)
-endif()
# FNA3D folders as includes, for other targets to consume
target_include_directories(FNA3D PUBLIC
@@ -133,6 +133,8 @@ target_include_directories(FNA3D PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Vulkan-Headers/include>
+ ${LOCALBASE}/include
+ ${X11BASE}/include
)
-target_include_directories(mojoshader PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/MojoShader>
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Vulkan-Headers/include>
-)
# MinGW builds should statically link libgcc
if(MINGW)
@@ -173,7 +156,6 @@ else()
else()
message(STATUS "no TARGET SDL2::SDL2, or SDL2, using variables")
target_include_directories(FNA3D PUBLIC "$<BUILD_INTERFACE:${SDL2_INCLUDE_DIRS}>")
- target_include_directories(mojoshader PUBLIC "$<BUILD_INTERFACE:${SDL2_INCLUDE_DIRS}>")
target_link_libraries(FNA3D PUBLIC ${SDL2_LIBRARIES})
endif()
endif()
if(BUILD_DXVK_NATIVE)
add_definitions(-DFNA3D_DXVK_NATIVE)

View File

@ -0,0 +1,14 @@
Index: MojoShader/mojoshader_internal.h
--- MojoShader/mojoshader_internal.h.orig
+++ MojoShader/mojoshader_internal.h
@@ -16,7 +16,9 @@
/* FIXME: These includes are needed for alloca :( */
#include <stdlib.h>
-#ifndef __APPLE__
+#ifdef __OpenBSD__
+#include <sys/malloc.h>
+#elif !defined(__APPLE__)
#include <malloc.h>
#endif