git: 4b9eecf1acbc - main - science/qt6-quick3dphysics: fix build on powerpc64*

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Wed, 22 Nov 2023 14:11:24 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4b9eecf1acbcfa407f5c8bb6f52f480a9985625f

commit 4b9eecf1acbcfa407f5c8bb6f52f480a9985625f
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-11-22 12:03:12 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-11-22 14:11:21 +0000

    science/qt6-quick3dphysics: fix build on powerpc64*
    
    Correctly detect 64-bits:
    /wrkdirs/usr/ports/science/qt6-quick3dphysics/work/qtquick3dphysics-everywhere-src-6.5.3/src/3rdparty/PhysX/source/common/src/CmPtrTable.h:137:1: error: 'PxCompileTimeAssert_Dummy' declared as an array with a negative size
    PX_COMPILE_TIME_ASSERT(sizeof(Cm::PtrTable)==8);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /wrkdirs/usr/ports/science/qt6-quick3dphysics/work/qtquick3dphysics-everywhere-src-6.5.3/src/3rdparty/PhysX/pxshared/include/foundation/PxPreprocessor.h:463:76: note: expanded from macro 'PX_COMPILE_TIME_ASSERT'
                                                                               ^~~~~~~~~~~~~~
    1 error generated.
---
 ...y_PhysX_pxshared_include_foundation_PxPreprocessor.h | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/science/qt6-quick3dphysics/files/patch-src_3rdparty_PhysX_pxshared_include_foundation_PxPreprocessor.h b/science/qt6-quick3dphysics/files/patch-src_3rdparty_PhysX_pxshared_include_foundation_PxPreprocessor.h
index 4f2e2c01d0f2..3c640b14d7e1 100644
--- a/science/qt6-quick3dphysics/files/patch-src_3rdparty_PhysX_pxshared_include_foundation_PxPreprocessor.h
+++ b/science/qt6-quick3dphysics/files/patch-src_3rdparty_PhysX_pxshared_include_foundation_PxPreprocessor.h
@@ -11,13 +11,22 @@ Index: src/3rdparty/PhysX/pxshared/include/foundation/PxPreprocessor.h
  #elif defined(TARGET_OS_IOS) && TARGET_OS_IOS && defined(__APPLE__) && (defined(__arm__) || defined(__arm64__))
  #define PX_IOS 1
  #elif defined(__APPLE__)
-@@ -187,6 +190,9 @@ define anything not defined on this platform to 0
- #endif
+@@ -188,6 +191,9 @@ define anything not defined on this platform to 0
  #ifndef PX_LINUX
  #define PX_LINUX 0
-+#endif
+ #endif
 +#ifndef PX_FREEBSD
 +#define PX_FREEBSD 0
- #endif
++#endif
  #ifndef PX_IOS
  #define PX_IOS 0
+ #endif
+@@ -278,7 +284,7 @@ family shortcuts
+ // architecture
+ #define PX_INTEL_FAMILY (PX_X64 || PX_X86)
+ #define PX_ARM_FAMILY (PX_ARM || PX_A64)
+-#define PX_P64_FAMILY (PX_X64 || PX_A64 || PX_WASM_64) // shortcut for 64-bit architectures
++#define PX_P64_FAMILY (PX_X64 || PX_A64 || PX_WASM_64 || __powerpc64__) // shortcut for 64-bit architectures
+ 
+ /**
+ C++ standard library defines