Package Details: vkpeak 20250531-1

Git Clone URL: https://aur.archlinux.org/vkpeak.git (read-only, click to copy)
Package Base: vkpeak
Description: A tool which profiles Vulkan devices to find their peak capacities
Upstream URL: https://github.com/nihui/vkpeak
Licenses: MIT
Submitter: bjin
Maintainer: bjin
Last Packager: bjin
Votes: 1
Popularity: 0.000001
First Submitted: 2023-08-12 02:58 (UTC)
Last Updated: 2025-06-20 02:52 (UTC)

Latest Comments

HurricanePootis commented on 2025-06-19 17:15 (UTC)

diff --git a/PKGBUILD b/PKGBUILD
index 8a1d953..31ffa4b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,36 +1,46 @@
 pkgname=vkpeak
-pkgver=20240505
+pkgver=20250531
 pkgrel=1
 pkgdesc="A tool which profiles Vulkan devices to find their peak capacities"
 arch=('x86_64')
 url="https://github.com/nihui/vkpeak"
 license=('MIT')
 source=("${pkgname}::git+https://github.com/nihui/vkpeak.git#tag=${pkgver}"
-        "ncnn::git+https://github.com/Tencent/ncnn.git")
-depends=('vulkan-icd-loader')
-makedepends=('cmake' 'glslang' 'ninja' 'protobuf' 'vulkan-headers')
-sha256sums=('SKIP' 'SKIP')
+        "ncnn::git+https://github.com/Tencent/ncnn.git"
+   "git+https://github.com/nihui/glslang.git"
+   "git+https://github.com/pybind/pybind11.git")
+depends=('vulkan-icd-loader' 'gcc-libs' 'glibc')
+makedepends=('cmake' 'glslang' 'vulkan-headers' 'git')
+sha256sums=('44845ebda22a4ad1b45892fca0135a778e768f96da034e458cd72c6b77f6ca3a'
+            'SKIP'
+            'SKIP'
+            'SKIP')

 prepare() {
     cd "${srcdir}/${pkgname}"
     git submodule init
     git config submodule."ncnn".url "${srcdir}/ncnn"
-    git -c protocol.file.allow=always submodule update --init --recursive
+    git -c protocol.file.allow=always submodule update
+    cd "${srcdir}/${pkgname}/ncnn"
+    git submodule init
+    git config submodule.glslang.url "${srcdir}/glslang"
+    git config submodule.python/pybind11.url "${srcdir}/pybind11"
+    git -c protocol.file.allow=always submodule update
 }
 build(){
-    cd "${srcdir}/${pkgname}"
+    cd "${srcdir}"
+    cmake -B build -S ${pkgname} \
+    -DCMAKE_BUILD_TYPE=None \
+    -DCMAKE_C_FLAGS="$CFLAGS -DNDEBUG" \
+    -DCMAKE_CXX_FLAGS="$CXXFLAGS -DNDEBUG" \
+    -DCMAKE_INSTALL_PREFIX=/usr

-    rm -rf build
-    mkdir build
-
-    cd build
-    cmake ..
-    cmake --build . -j $(nproc)
+    cmake --build build
 }

 package() {
-    cd "${srcdir}/${pkgname}"
+    cd "${srcdir}"

-    install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/vkpeak/LICENSE
+    install -Dm644 ${pkgname}/LICENSE "$pkgdir"/usr/share/licenses/vkpeak/LICENSE
     install -Dm755 build/vkpeak "${pkgdir}/usr/bin/vkpeak"
 }

HurricanePootis commented on 2025-06-19 15:20 (UTC)

Hello, this package could do with the following changes:

  1. Have all git submodules in src/
  2. Properly handle git submodules in prepare()
  3. Follow the CMake Packaging Guidelines in build() and package(). This includes: building outside of the src directory, setting build type to none, and not using -j ${nproc} (more on that later).

Packages are not supposed to use anything related to nproc unless absolutely required whenever dealing with obscure build systems. However, users themselves are supposed to edit /etc/makepkg.conf and change the MAKEFLAGS to something like MAKEFKAGLS="-j12".

unit73e commented on 2025-06-14 17:18 (UTC)

@bjin I fixed it myself. Here's the commit: https://github.com/unit73e/vkpeak/commit/f14e537cc65a5f392ccddfb6563111b0a7036502

Feel free to cherry pick or copy.

unit73e commented on 2025-06-14 16:50 (UTC)

@bjin doesn't compile anymore because of a new version of CMake. Fixing this requires some patching, namely force minimum CMake to be 3.15 and cstdint has to be declared in some places because it's not implicit anymore.