From ef7ce9052520d52bb98f35aa67761cbbba1e6e14 Mon Sep 17 00:00:00 2001 From: q66 Date: Tue, 2 Mar 2021 13:38:59 +0100 Subject: [PATCH] 0ad: fix on ppc64le, musl --- srcpkgs/0ad/patches/ppc64.patch | 48 +++++++++++++++++++++++++++++++++ srcpkgs/0ad/template | 8 +++++- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/srcpkgs/0ad/patches/ppc64.patch b/srcpkgs/0ad/patches/ppc64.patch index 87bc3a4800d..f95a2ecba77 100644 --- a/srcpkgs/0ad/patches/ppc64.patch +++ b/srcpkgs/0ad/patches/ppc64.patch @@ -1,3 +1,23 @@ +--- build/premake/premake5.lua ++++ build/premake/premake5.lua +@@ -85,6 +85,8 @@ else + arch = "arm" + elseif string.find(machine, "aarch64") == 1 then + arch = "aarch64" ++ elseif string.find(machine, "ppc64") == 1 or string.find(machine, "powerpc64") == 1 then ++ arch = "ppc64" + elseif string.find(machine, "e2k") == 1 then + arch = "e2k" + else +@@ -863,6 +865,8 @@ function setup_all_libs () + table.insert(source_dirs, "lib/sysdep/arch/arm"); + elseif arch == "aarch64" then + table.insert(source_dirs, "lib/sysdep/arch/aarch64"); ++ elseif arch == "ppc64" then ++ table.insert(source_dirs, "lib/sysdep/arch/ppc64"); + elseif arch == "e2k" then + table.insert(source_dirs, "lib/sysdep/arch/e2k"); + end --- /dev/null +++ source/lib/sysdep/arch/ppc64/ppc64.cpp @@ -0,0 +1,50 @@ @@ -91,3 +111,31 @@ # error "architecture not correctly detected (either none or multiple ARCH_* defined)" #endif +--- libraries/source/nvtt/src/src/nvmath/SimdVector_VE.h ++++ libraries/source/nvtt/src/src/nvmath/SimdVector_VE.h +@@ -27,10 +27,7 @@ + #ifndef NV_SIMD_VECTOR_VE_H + #define NV_SIMD_VECTOR_VE_H + +-#ifndef __APPLE_ALTIVEC__ + #include +-#undef bool +-#endif + + namespace nv { + +diff --git a/source/nvtt/src/src/nvtt/squish/simd_ve.h b/source/nvtt/src/src/nvtt/squish/simd_ve.h +index 5a11858..e256c54 100644 +--- libraries/source/nvtt/src/src/nvtt/squish/simd_ve.h ++++ libraries/source/nvtt/src/src/nvtt/squish/simd_ve.h +@@ -27,10 +27,7 @@ + #ifndef SQUISH_SIMD_VE_H + #define SQUISH_SIMD_VE_H + +-#ifndef __APPLE_ALTIVEC__ + #include +-#undef bool +-#endif + + namespace nvsquish { + diff --git a/srcpkgs/0ad/template b/srcpkgs/0ad/template index 19609b7dda8..44abd93317b 100644 --- a/srcpkgs/0ad/template +++ b/srcpkgs/0ad/template @@ -24,7 +24,6 @@ export WX_CONFIG="wx-config-gtk3" if [ "$XBPS_TARGET_LIBC" = musl ]; then makedepends+=" libexecinfo-devel" - broken="https://build.voidlinux.org/builders/x86_64-musl_builder/builds/34866/steps/shell_3/logs/stdio" fi @@ -32,6 +31,13 @@ do_extract() { bsdtar xJf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}-${version}-alpha-unix-build.tar.xz -C ${wrksrc} } +post_patch() { + if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + echo "TARGET_LINK_LIBRARIES(nvcore execinfo)" >> \ + libraries/source/nvtt/src/src/nvcore/CMakeLists.txt + fi +} + do_configure() { cd ${wrksrc}/build/workspaces ./clean-workspaces.sh