From 1ad4a02e1bda7694692def97e241d03e85be8728 Mon Sep 17 00:00:00 2001 From: Mihail Ivanchev Date: Fri, 24 May 2024 17:36:46 +0200 Subject: [PATCH] New package: raze-1.10.2 --- srcpkgs/raze/patches/fix-build.patch | 15 ++++++++++++++ srcpkgs/raze/patches/lzma_threads.patch | 9 +++++++++ srcpkgs/raze/patches/nullptr.patch | 13 ++++++++++++ srcpkgs/raze/template | 27 +++++++++++++++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 srcpkgs/raze/patches/fix-build.patch create mode 100644 srcpkgs/raze/patches/lzma_threads.patch create mode 100644 srcpkgs/raze/patches/nullptr.patch create mode 100644 srcpkgs/raze/template diff --git a/srcpkgs/raze/patches/fix-build.patch b/srcpkgs/raze/patches/fix-build.patch new file mode 100644 index 00000000000000..3436593fe8d2ad --- /dev/null +++ b/srcpkgs/raze/patches/fix-build.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5565bfdda..ba04a3a7a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -326,7 +326,9 @@ else() + include ( FindPkgConfig ) + pkg_check_modules( MUSL_FTS musl-fts ) + if ( MUSL_FTS_FOUND ) +- set ( ALL_C_FLAGS "${ALL_C_FLAGS} ${MUSL_FTS_LDFLAGS}" ) ++ foreach(flags IN LISTS MUSL_FTS_LDFLAGS) ++ set ( ALL_C_FLAGS "${ALL_C_FLAGS} ${flags}" ) ++ endforeach() + else ( MUSL_FTS_FOUND ) + message (ERROR "fts_* functions not found in the system" ) + endif ( MUSL_FTS_FOUND ) diff --git a/srcpkgs/raze/patches/lzma_threads.patch b/srcpkgs/raze/patches/lzma_threads.patch new file mode 100644 index 00000000000000..4fce01fbf1ec30 --- /dev/null +++ b/srcpkgs/raze/patches/lzma_threads.patch @@ -0,0 +1,9 @@ +diff --git a/libraries/lzma/CMakeLists.txt b/libraries/lzma/CMakeLists.txt +index e1c668b29..130836a6a 100644 +--- a/libraries/lzma/CMakeLists.txt ++++ b/libraries/lzma/CMakeLists.txt +@@ -48,4 +48,3 @@ add_library( lzma STATIC + C/XzEnc.c + C/XzIn.c + ) +-target_link_libraries( lzma Threads::Threads ) diff --git a/srcpkgs/raze/patches/nullptr.patch b/srcpkgs/raze/patches/nullptr.patch new file mode 100644 index 00000000000000..40012f87f56de8 --- /dev/null +++ b/srcpkgs/raze/patches/nullptr.patch @@ -0,0 +1,13 @@ +diff --git a/source/common/platform/posix/sdl/sdlglvideo.cpp b/source/common/platform/posix/sdl/sdlglvideo.cpp +index 92bdb15a7..4ed3a896d 100644 +--- a/source/common/platform/posix/sdl/sdlglvideo.cpp ++++ b/source/common/platform/posix/sdl/sdlglvideo.cpp +@@ -400,7 +400,7 @@ DFrameBuffer *SDLVideo::CreateFrameBuffer () + builder.RequireExtension(names[i]); + auto instance = builder.Create(); + +- VkSurfaceKHR surfacehandle = nullptr; ++ VkSurfaceKHR surfacehandle = VK_NULL_HANDLE; + if (!I_CreateVulkanSurface(instance->Instance, &surfacehandle)) + VulkanError("I_CreateVulkanSurface failed"); + diff --git a/srcpkgs/raze/template b/srcpkgs/raze/template new file mode 100644 index 00000000000000..153a8411ffbba9 --- /dev/null +++ b/srcpkgs/raze/template @@ -0,0 +1,27 @@ +# Template file for 'raze' +pkgname=raze +version=1.10.2 +revision=1 +archs="x86_64* aarch64*" +build_style=cmake +configure_args="-DINSTALL_PK3_PATH=share/raze -DDYN_GTK=OFF -DDYN_OPENAL=OFF" +hostmakedepends="pkg-config" +makedepends="SDL2-devel gtk+3-devel ZMusic-devel libopenal-devel libvpx-devel" +short_desc="Build engine port backed by GZDoom tech" +maintainer="Mihail Ivanchev " +license="GPL-2.0-only, custom:BUILD" +homepage="https://raze.zdoom.org/" +distfiles="https://github.com/ZDoom/Raze/archive/refs/tags/${version}.tar.gz" +checksum=80f9b258271e316aca52751be8035eafc34fe2c6fa0e3a199206a5fe77be3406 +nocross="gzdoom and raze cross-builds required tools from a native build" +repository=nonfree +restricted=yes + +if [ "$XBPS_TARGET_LIBC" = musl ]; then + CFLAGS="-DZ7_AFFINITY_DISABLE" + makedepends+=" musl-fts-devel libexecinfo-devel" +fi + +post_install() { + vlicense package/common/buildlic.txt +}