physx5-zluda

LOW
maintainer Grakul 1 votes scanned 2026-10-25 21:43:05.033624
View on AUR
Why flagged

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

Triggered rules

Low Few votes, recently uploaded zero_votes_recent

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

PKGBUILD

1# Maintainer: Eugene Flanagin <eflanagin@pm.me>
2# NVIDIA PhysX SDK 5 with GPU (CUDA) kernels, built PTX-only so they run on AMD GPUs through ZLUDA.
3# The CUDA toolkit pieces (nvcc, cudart, crt, cccl, libnvvm) are NVIDIA redistributables extracted
4# into $srcdir only -- nothing NVIDIA is installed system-wide except the redistributable libcudart.so.13
5# that ends up inside /opt/physx5/lib. See README.md.
6
7pkgname=physx5-zluda
8_commit=6dc53585d7db07346f53d0598a5fd3bfdce47d8d
9pkgver=5.11.0
10pkgrel=3
11pkgdesc="NVIDIA PhysX SDK 5 (GPU rigid bodies, articulations, deformables) running on AMD GPUs via ZLUDA - PTX-only build in /opt/physx5"
12arch=(x86_64)
13url="https://github.com/NVIDIA-Omniverse/PhysX"
14# PhysX SDK (physx/ subtree, SPDX headers + physx/LICENSE.md): Apache-2.0. The repository root's
15# LICENSE.md is BSD-3-Clause but covers older releases / the other subprojects, none of which are built.
16# libcudart.so.13 is redistributed under the NVIDIA CUDA Toolkit EULA. The shim, self-test,
17# wrapper and menu entries written for this package are MIT (LICENSE).
18license=(Apache-2.0 LicenseRef-NVIDIA-CUDA-EULA MIT)
19depends=(zluda gcc-libs glibc freeglut glu libxmu libx11 libxi)
20makedepends=(cmake ninja gcc14 python patchelf rapidjson)
21optdepends=('konsole: terminal used by the menu entries')
22options=(!lto !debug)
23_cuda=13.4.92
24_redist=https://developer.download.nvidia.com/compute/cuda/redist
25source=(PhysX-$_commit.tar.gz::$url/archive/$_commit.tar.gz
26 $_redist/cuda_nvcc/linux-x86_64/cuda_nvcc-linux-x86_64-$_cuda-archive.tar.xz
27 $_redist/cuda_cudart/linux-x86_64/cuda_cudart-linux-x86_64-$_cuda-archive.tar.xz
28 $_redist/cuda_crt/linux-x86_64/cuda_crt-linux-x86_64-$_cuda-archive.tar.xz
29 $_redist/cccl/linux-x86_64/cccl-linux-x86_64-13.3.4.3.1-archive.tar.xz
30 $_redist/libnvvm/linux-x86_64/libnvvm-linux-x86_64-$_cuda-archive.tar.xz
31 physx5-zluda.patch
32 zluda-physx-shim.c
33 physx5-gputest.cpp
34 physx5-zluda-run
35 physx5-zluda.desktop
36 physx5-gputest.desktop
37 README.md
38 CREDITS.md
39 LICENSE)
40noextract=(cuda_nvcc-linux-x86_64-$_cuda-archive.tar.xz
41 cuda_cudart-linux-x86_64-$_cuda-archive.tar.xz
42 cuda_crt-linux-x86_64-$_cuda-archive.tar.xz
43 cccl-linux-x86_64-13.3.4.3.1-archive.tar.xz
44 libnvvm-linux-x86_64-$_cuda-archive.tar.xz)
45sha256sums=('486860085ee6c09da14c045d600edf0f3da662b67d632af69c57a2004b281a90'
46 '60998f40cc9df5826b2a846e2dcc328133fbc5ef539398ce0a21cf5dcac7193d'
47 '0ac5dbc538d04e9983bc493b410cce4b459e1ee9f5f6654b6464ef7b3e14a8b5'
48 'c969e61ded12dbf0cf20ace72867f1622ec0e8ea1e1d305e27761012025f7aaa'
49 '6b7516074f42f80dd3feb9c11318c8e1c5ab56cdd9f18fff4c5ace2e7e0a8209'
50 '0e619cf3d5b27f7c812665599ca9761fc296e56129b24a85d822a5d8a1a3bd75'
51 '238a0a35cf069e7044d2f50de4497aab1eee90729a2db0a984e1423c6c53bfee'
52 '8952da704276f17efa409ac1337ebc376b195304a80edcf61915187f00242a94'
53 '10291d535d7efc8e45c08767808e86941ec6d9f55c3ae8fb7757ddd87c1742d9'
54 '92068973f982620a7f5a451a6e6974670b405fbafbf1c3c4e50d5a2279d8a865'
55 '14bb89981d22632b268f51ea87ca4cd046ac85dd3908c30c438343546d852d54'
56 'b420844eca245146e351567bcbdced32bbcfebc7b0bb34e8089e9d41ef48417b'
57 '5f5afd05c6391b3e75abbd5bf1181f329a03a5524fcdf3617aeb70119f338385'
58 '4ed0619d61da558f6ceb942cc95c7cc10afbac0cfea0dedad04670e37f7504f0'
59 '0a1a50f6c334f7218512f11138aa9ecc62c6908dfe71b8b4edff03e1d04b3889')
60
61_prefix=/opt/physx5
62# $srcdir is only defined inside the functions
63_setpaths() { _physx="$srcdir/PhysX-$_commit/physx"; _cudadir="$srcdir/cuda"; }
64
65prepare() {
66 _setpaths
67 # private CUDA toolkit prefix (never installed)
68 rm -rf "$_cudadir"; mkdir -p "$_cudadir"
69 local t
70 for t in cuda_nvcc cuda_cudart cuda_crt libnvvm; do
71 bsdtar -xf "$srcdir/$t-linux-x86_64-$_cuda-archive.tar.xz" -C "$_cudadir" --strip-components=1
72 done
73 bsdtar -xf "$srcdir/cccl-linux-x86_64-13.3.4.3.1-archive.tar.xz" -C "$_cudadir" --strip-components=1
74 ln -sfn lib "$_cudadir/lib64" # nvcc looks for lib64/
75 "$_cudadir/bin/nvcc" --version | tail -1
76
77 cd "$_physx"
78 patch -Np1 -i "$srcdir/physx5-zluda.patch"
79}
80
81build() {
82 _setpaths
83 cd "$_physx"
84 # PhysX sets its own warning/optimisation flags (-Wall -Werror -Wno-format ...); makepkg's
85 # -Werror=format-security then errors out ("-Wformat-security ignored without -Wformat"), so the
86 # distro C/C++ flags are dropped for the SDK itself. -flto is disabled in options because
87 # nvcc-produced host objects do not mix with GCC LTO bytecode.
88 local _pkgCFLAGS="$CFLAGS"
89 export CFLAGS="" CXXFLAGS="" CPPFLAGS=""
90 rm -rf "$srcdir/build"
91 cmake -S . -B "$srcdir/build" -G Ninja --no-warn-unused-cli \
92 -DCMAKE_BUILD_TYPE=release \
93 -DTARGET_BUILD_PLATFORM=linux -DPX_OUTPUT_ARCH=x86 \
94 -DPHYSX_ROOT_DIR="$_physx" -DPX_OUTPUT_LIB_DIR="$_physx" -DPX_OUTPUT_BIN_DIR="$_physx" \
95 -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 \
96 -DCMAKE_CUDA_COMPILER="$_cudadir/bin/nvcc" -DCMAKE_CUDA_HOST_COMPILER=g++-14 \
97 -DCUDAToolkit_ROOT="$_cudadir" -DCMAKE_CUDA_ARCHITECTURES=75-virtual \
98 -DPX_GENERATE_GPU_PROJECTS=ON -DPX_GENERATE_GPU_REDUCED_ARCHITECTURES=ON \
99 -DPX_GENERATE_STATIC_LIBRARIES=OFF -DPX_GENERATE_GPU_STATIC_LIBRARIES=OFF \
100 -DPX_BUILDSNIPPETS=ON -DPX_BUILDPVDRUNTIME=OFF -DPX_CUDA_DEVICE_DEBUG=OFF \
101 -DPX_SCALAR_MATH=OFF -DPX_FLOAT_POINT_PRECISE_MATH=OFF \
102 -DCMAKE_INSTALL_PREFIX="$_prefix"
103 # cudafe++/ptxas are memory hungry: cap the job count
104 ninja -C "$srcdir/build" -j"$(( $(nproc) < 10 ? $(nproc) : 10 ))"
105
106 # ZLUDA shim and functional test
107 local bin="$_physx/bin/linux.x86_64/release"
108 gcc ${_pkgCFLAGS} -O2 -Wall -shared -fPIC -o "$srcdir/libzluda-physx-shim.so" "$srcdir/zluda-physx-shim.c" -ldl
109 g++-14 -std=c++14 -O2 -o "$srcdir/physx5-gputest" "$srcdir/physx5-gputest.cpp" -I"$_physx/include" \
110 -Wl,-rpath,"$_prefix/lib" \
111 "$bin/libPhysXExtensions_static_64.a" "$bin/libPhysXPvdSDK_static_64.a" \
112 "$bin/libPhysX_64.so" "$bin/libPhysXCommon_64.so" "$bin/libPhysXFoundation_64.so" -lpthread -ldl
113}
114
115package() {
116 _setpaths
117 DESTDIR="$pkgdir" ninja -C "$srcdir/build" install
118
119 # The exported CMake package points at the private build-time CUDA toolkit (find_dependency(CUDAToolkit),
120 # CUDA::cudart and the toolkit's libcuda stub inside $srcdir). Users have no CUDA toolkit (and must not
121 # install one next to ZLUDA), so point it at the packaged libcudart instead; libPhysXGpu_64.so is dlopen'ed
122 # at run time and gets libcuda.so.1 from ZLUDA.
123 local _cm="$pkgdir$_prefix/lib/cmake/PhysX"
124 sed -i 's/^\(\s*\)find_dependency(CUDAToolkit REQUIRED)/\1# find_dependency(CUDAToolkit REQUIRED) -- not needed: libcudart.so.13 is in lib\//' "$_cm/PhysXConfig.cmake"
125 sed -i "s#;CUDA::cudart;[^\"]*stubs/libcuda\.so\"#;\${_IMPORT_PREFIX}/lib/libcudart.so.13\"#" "$_cm/PhysXTargets.cmake"
126 if grep -rqF -e "$srcdir" -e 'CUDA::' "$_cm" || grep -rq '^\s*find_dependency(CUDAToolkit' "$_cm"; then
127 echo "CMake package still references the build-time CUDA toolkit" >&2; return 1
128 fi
129
130 local bin="$_physx/bin/linux.x86_64/release"
131 install -dm755 "$pkgdir$_prefix/bin" "$pkgdir$_prefix/lib" "$pkgdir$_prefix/share/doc" "$pkgdir/usr/bin" \
132 "$pkgdir/usr/share/applications" "$pkgdir/usr/share/licenses/$pkgname"
133 # snippets (demo programs) and the self-test
134 install -m755 "$bin"/Snippet*_64 "$pkgdir$_prefix/bin/"
135 # the build tree bakes its own output dir into RUNPATH; point the snippets at the installed libs instead
136 local f; for f in "$pkgdir$_prefix"/bin/Snippet*_64; do patchelf --set-rpath '$ORIGIN/../lib' "$f"; done
137 install -m755 "$srcdir/physx5-gputest" "$pkgdir$_prefix/bin/"
138 # ZLUDA shim + the one redistributable CUDA runtime library PhysXGpu links against
139 install -m755 "$srcdir/libzluda-physx-shim.so" "$pkgdir$_prefix/lib/"
140 cp -a "$_cudadir"/lib/libcudart.so.13* "$pkgdir$_prefix/lib/"
141 # wrapper, menu entries, docs
142 install -m755 "$srcdir/physx5-zluda-run" "$pkgdir/usr/bin/physx5-zluda-run"
143 install -m644 "$srcdir/physx5-zluda.desktop" "$srcdir/physx5-gputest.desktop" "$pkgdir/usr/share/applications/"
144 install -m644 "$srcdir/README.md" "$srcdir/zluda-physx-shim.c" "$srcdir/physx5-gputest.cpp" "$pkgdir$_prefix/share/doc/"
145 install -m644 "$_physx/README.md" "$pkgdir$_prefix/share/doc/README.PhysX.md"
146 install -m644 "$_physx/CHANGELOG.md" "$pkgdir$_prefix/share/doc/"
147 install -m644 "$_physx/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.PhysX.md"
148 install -m644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
149 install -m644 "$srcdir/CREDITS.md" "$pkgdir$_prefix/share/doc/"
150 # the toolkit dir's LICENSE is whichever redist tarball was extracted last (CCCL); ship the EULA that
151 # covers the redistributed libcudart.so.13, taken from the cuda_cudart tarball itself
152 bsdtar -xOf "$srcdir/cuda_cudart-linux-x86_64-$_cuda-archive.tar.xz" "cuda_cudart-linux-x86_64-$_cuda-archive/LICENSE" \
153 > "$pkgdir/usr/share/licenses/$pkgname/LICENSE.CUDA-EULA"
154 chmod 644 "$pkgdir/usr/share/licenses/$pkgname/LICENSE.CUDA-EULA"
155}
156

Changes since previous scan

--- PKGBUILD @ 2026-10-15 00:28
+++ PKGBUILD @ 2026-10-25 21:43
@@ -1,4 +1,4 @@
-# Maintainer: Eugene Flanagin (local build)
+# Maintainer: Eugene Flanagin <eflanagin@pm.me>
# NVIDIA PhysX SDK 5 with GPU (CUDA) kernels, built PTX-only so they run on AMD GPUs through ZLUDA.
# The CUDA toolkit pieces (nvcc, cudart, crt, cccl, libnvvm) are NVIDIA redistributables extracted
# into $srcdir only -- nothing NVIDIA is installed system-wide except the redistributable libcudart.so.13
@@ -7,13 +7,17 @@
pkgname=physx5-zluda
_commit=6dc53585d7db07346f53d0598a5fd3bfdce47d8d
pkgver=5.11.0
-pkgrel=1
+pkgrel=3
pkgdesc="NVIDIA PhysX SDK 5 (GPU rigid bodies, articulations, deformables) running on AMD GPUs via ZLUDA - PTX-only build in /opt/physx5"
arch=(x86_64)
url="https://github.com/NVIDIA-Omniverse/PhysX"
-license=(BSD-3-Clause LicenseRef-NVIDIA-CUDA-EULA)
+# PhysX SDK (physx/ subtree, SPDX headers + physx/LICENSE.md): Apache-2.0. The repository root's
+# LICENSE.md is BSD-3-Clause but covers older releases / the other subprojects, none of which are built.
+# libcudart.so.13 is redistributed under the NVIDIA CUDA Toolkit EULA. The shim, self-test,
+# wrapper and menu entries written for this package are MIT (LICENSE).
+license=(Apache-2.0 LicenseRef-NVIDIA-CUDA-EULA MIT)
depends=(zluda gcc-libs glibc freeglut glu libxmu libx11 libxi)
-makedepends=(cmake ninja gcc14 python patchelf)
+makedepends=(cmake ninja gcc14 python patchelf rapidjson)
optdepends=('konsole: terminal used by the menu entries')
options=(!lto !debug)
_cuda=13.4.92
@@ -30,7 +34,9 @@
physx5-zluda-run
physx5-zluda.desktop
physx5-gputest.desktop
- README.md)
+ README.md
+ CREDITS.md
+ LICENSE)
noextract=(cuda_nvcc-linux-x86_64-$_cuda-archive.tar.xz
cuda_cudart-linux-x86_64-$_cuda-archive.tar.xz
cuda_crt-linux-x86_64-$_cuda-archive.tar.xz
@@ -42,13 +48,15 @@
'c969e61ded12dbf0cf20ace72867f1622ec0e8ea1e1d305e27761012025f7aaa'
'6b7516074f42f80dd3feb9c11318c8e1c5ab56cdd9f18fff4c5ace2e7e0a8209'
'0e619cf3d5b27f7c812665599ca9761fc296e56129b24a85d822a5d8a1a3bd75'
- '015cd5c1f0d132a046d5c47c092c1e070f4ac8725d54d0abb24f770fd2dc6cf1'
- 'a311794ea551fe36fd5e9d96281861ecea053d8bf4df5968b32537091ba8649e'
- '67b443b983b8e9aed5a60109847d5f0bad6fc82b2b11cb3f65ec790086e8845f'
- '40577fd72e122ce9306ac15815cd3ecc8e116d709720aa35874a6d7689600bb6'
- '4a597287b45211b792729b6ebfda542ea7cf78f9ad695d8e0bae5fe3a6b78ebf'
- '1753cde33f01cb8bb3eb9027db95b4da10fd92a480135f6a1293da3931e02782'
- '50dd7494550502d6989d17ef4bbbf4c7e8d4041f5dc17d0e237aa37666f19aa8')
+ '238a0a35cf069e7044d2f50de4497aab1eee90729a2db0a984e1423c6c53bfee'
+ '8952da704276f17efa409ac1337ebc376b195304a80edcf61915187f00242a94'
+ '10291d535d7efc8e45c08767808e86941ec6d9f55c3ae8fb7757ddd87c1742d9'
+ '92068973f982620a7f5a451a6e6974670b405fbafbf1c3c4e50d5a2279d8a865'
+ '14bb89981d22632b268f51ea87ca4cd046ac85dd3908c30c438343546d852d54'
+ 'b420844eca245146e351567bcbdced32bbcfebc7b0bb34e8089e9d41ef48417b'
+ '5f5afd05c6391b3e75abbd5bf1181f329a03a5524fcdf3617aeb70119f338385'
+ '4ed0619d61da558f6ceb942cc95c7cc10afbac0cfea0dedad04670e37f7504f0'
+ '0a1a50f6c334f7218512f11138aa9ecc62c6908dfe71b8b4edff03e1d04b3889')
_prefix=/opt/physx5
# $srcdir is only defined inside the functions
@@ -108,6 +116,17 @@
_setpaths
DESTDIR="$pkgdir" ninja -C "$srcdir/build" install
+ # The exported CMake package points at the private build-time CUDA toolkit (find_dependency(CUDAToolkit),
+ # CUDA::cudart and the toolkit's libcuda stub inside $srcdir). Users have no CUDA toolkit (and must not
+ # install one next to ZLUDA), so point it at the packaged libcudart instead; libPhysXGpu_64.so is dlopen'ed
+ # at run time and gets libcuda.so.1 from ZLUDA.
+ local _cm="$pkgdir$_prefix/lib/cmake/PhysX"
+ sed -i 's/^\(\s*\)find_dependency(CUDAToolkit REQUIRED)/\1# find_dependency(CUDAToolkit REQUIRED) -- not needed: libcudart.so.13 is in lib\//' "$_cm/PhysXConfig.cmake"
+ sed -i "s#;CUDA::cudart;[^\"]*stubs/libcuda\.so\"#;\${_IMPORT_PREFIX}/lib/libcudart.so.13\"#" "$_cm/PhysXTargets.cmake"
+ if grep -rqF -e "$srcdir" -e 'CUDA::' "$_cm" || grep -rq '^\s*find_dependency(CUDAToolkit' "$_cm"; then
+ echo "CMake package still references the build-time CUDA toolkit" >&2; return 1
+ fi
+
local bin="$_physx/bin/linux.x86_64/release"
install -dm755 "$pkgdir$_prefix/bin" "$pkgdir$_prefix/lib" "$pkgdir$_prefix/share/doc" "$pkgdir/usr/bin" \
"$pkgdir/usr/share/applications" "$pkgdir/usr/share/licenses/$pkgname"
@@ -126,6 +145,12 @@
install -m644 "$_physx/README.md" "$pkgdir$_prefix/share/doc/README.PhysX.md"
install -m644 "$_physx/CHANGELOG.md" "$pkgdir$_prefix/share/doc/"
install -m644 "$_physx/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.PhysX.md"
- install -m644 "$_cudadir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.CUDA-EULA"
+ install -m644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -m644 "$srcdir/CREDITS.md" "$pkgdir$_prefix/share/doc/"
+ # the toolkit dir's LICENSE is whichever redist tarball was extracted last (CCCL); ship the EULA that
+ # covers the redistributed libcudart.so.13, taken from the cuda_cudart tarball itself
+ bsdtar -xOf "$srcdir/cuda_cudart-linux-x86_64-$_cuda-archive.tar.xz" "cuda_cudart-linux-x86_64-$_cuda-archive/LICENSE" \
+ > "$pkgdir/usr/share/licenses/$pkgname/LICENSE.CUDA-EULA"
+ chmod 644 "$pkgdir/usr/share/licenses/$pkgname/LICENSE.CUDA-EULA"
}

Scan history

Scanned at (UTC)SeverityRules
2026-10-25 21:43:05 Low 1
2026-10-15 00:28:05 Clean 2
2026-10-14 17:20:19 Low 1

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion