pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Import graphics/vulkan-tools
Module Name: pkgsrc-wip
Committed By: kikadf <kikadf.01%gmail.com@localhost>
Pushed By: kikadf
Date: Wed May 13 23:09:15 2026 +0200
Changeset: 19b4b30d6c683e674ba4ee5173e26f1f2d5b65a0
Modified Files:
Makefile
Added Files:
vulkan-tools/DESCR
vulkan-tools/Makefile
vulkan-tools/PLIST
vulkan-tools/distinfo
vulkan-tools/patches/patch-cube_cube.c
vulkan-tools/patches/patch-cube_cube.cpp
Log Message:
Import graphics/vulkan-tools
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=19b4b30d6c683e674ba4ee5173e26f1f2d5b65a0
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
vulkan-tools/DESCR | 2 ++
vulkan-tools/Makefile | 22 +++++++++++++
vulkan-tools/PLIST | 4 +++
vulkan-tools/distinfo | 7 +++++
vulkan-tools/patches/patch-cube_cube.c | 53 ++++++++++++++++++++++++++++++++
vulkan-tools/patches/patch-cube_cube.cpp | 53 ++++++++++++++++++++++++++++++++
7 files changed, 142 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index 5547a396b2..5cd05a383b 100644
--- a/Makefile
+++ b/Makefile
@@ -5993,6 +5993,7 @@ SUBDIR+= vscode
SUBDIR+= vsearch
SUBDIR+= vulkan-headers
SUBDIR+= vulkan-loader
+SUBDIR+= vulkan-tools
SUBDIR+= w3c-httpd
SUBDIR+= wackamole
SUBDIR+= wadgadget
diff --git a/vulkan-tools/DESCR b/vulkan-tools/DESCR
new file mode 100644
index 0000000000..86f2423deb
--- /dev/null
+++ b/vulkan-tools/DESCR
@@ -0,0 +1,2 @@
+Vulkan-Tools provides Vulkan tools and utilities that can assist development by
+enabling developers to verify their application's correct use of the Vulkan API.
diff --git a/vulkan-tools/Makefile b/vulkan-tools/Makefile
new file mode 100644
index 0000000000..3702912bbb
--- /dev/null
+++ b/vulkan-tools/Makefile
@@ -0,0 +1,22 @@
+# $NetBSD: Makefile,v 1.3 2026/04/13 13:17:59 kikadf Exp $
+
+.include "../../graphics/vulkan-headers/Makefile.common"
+
+DISTNAME= vulkan-tools-${SDK_VERSION}
+CATEGORIES= graphics
+GITHUB_PROJECT= Vulkan-Tools
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/KhronosGroup/Vulkan-Tools/
+COMMENT= Vulkan information and demo utilities
+LICENSE= apache-2.0
+
+WRKSRC= ${WRKDIR}/${GITHUB_PROJECT}-${GITHUB_TAG}
+
+USE_TOOLS+= pkg-config
+
+.include "../../devel/cmake/build.mk"
+.include "../../devel/wayland/buildlink3.mk"
+.include "../../devel/wayland-protocols/buildlink3.mk"
+.include "../../graphics/vulkan-headers/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/vulkan-tools/PLIST b/vulkan-tools/PLIST
new file mode 100644
index 0000000000..94473e386f
--- /dev/null
+++ b/vulkan-tools/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1 2025/03/08 22:57:40 jakllsch Exp $
+bin/vkcube
+bin/vkcubepp
+bin/vulkaninfo
diff --git a/vulkan-tools/distinfo b/vulkan-tools/distinfo
new file mode 100644
index 0000000000..7dcdcaeb3e
--- /dev/null
+++ b/vulkan-tools/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.5 2026/04/13 13:17:59 kikadf Exp $
+
+BLAKE2s (vulkan-tools-1.4.341.0.tar.gz) = 339fe40aeee56dfeb4ad18c08be332c8114746df7fa79eee3adbe5a9805654a8
+SHA512 (vulkan-tools-1.4.341.0.tar.gz) = 0fad33d732e034489acea4745abfb21fb27619114bfdfa0923cc4baa7e22be65c1dfd10309bfdd9926fe943cd1c8d86521fbd7c326ce46a7c468e1428736db29
+Size (vulkan-tools-1.4.341.0.tar.gz) = 804878 bytes
+SHA1 (patch-cube_cube.c) = 662d641041852e2fc049abba57623ca52a88eb5b
+SHA1 (patch-cube_cube.cpp) = 8e960de47586bf0bc8e148b1c3b288d305c58831
diff --git a/vulkan-tools/patches/patch-cube_cube.c b/vulkan-tools/patches/patch-cube_cube.c
new file mode 100644
index 0000000000..84334563c2
--- /dev/null
+++ b/vulkan-tools/patches/patch-cube_cube.c
@@ -0,0 +1,53 @@
+$NetBSD: patch-cube_cube.c,v 1.1 2025/10/04 12:39:56 tnn Exp $
+
+Allow building on NetBSD.
+
+--- cube/cube.c.orig 2025-10-04 12:29:59.680457395 +0000
++++ cube/cube.c
+@@ -44,7 +44,9 @@
+ #include "xcb_loader.h"
+ #endif
+ #if defined(VK_USE_PLATFORM_WAYLAND_KHR)
++#if defined(__linux__)
+ #include <linux/input.h>
++#endif
+ #include "wayland_loader.h"
+ #endif
+
+@@ -3581,9 +3583,11 @@ static void pointer_handle_motion(void *
+ static void pointer_handle_button(void *data, struct wl_pointer *wl_pointer, uint32_t serial, uint32_t time, uint32_t button,
+ uint32_t state) {
+ struct demo *demo = data;
++#if defined(__linux__)
+ if (button == BTN_LEFT && state == WL_POINTER_BUTTON_STATE_PRESSED) {
+ xdg_toplevel_move(demo->xdg_toplevel, demo->seat, serial);
+ }
++#endif
+ }
+
+ static void pointer_handle_axis(void *data, struct wl_pointer *wl_pointer, uint32_t time, uint32_t axis, wl_fixed_t value) {}
+@@ -3603,6 +3607,7 @@ static void keyboard_handle_key(void *da
+ uint32_t state) {
+ if (state != WL_KEYBOARD_KEY_STATE_RELEASED) return;
+ struct demo *demo = data;
++#if defined(__linux__)
+ switch (key) {
+ case KEY_ESC: // Escape
+ demo->quit = true;
+@@ -3617,6 +3622,7 @@ static void keyboard_handle_key(void *da
+ demo->pause = !demo->pause;
+ break;
+ }
++#endif
+ }
+
+ static void keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard, uint32_t serial, uint32_t mods_depressed,
+@@ -5079,7 +5085,7 @@ void android_main(struct android_app *ap
+ }
+ }
+ }
+-#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__QNX__) || defined(__GNU__)
++#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__QNX__) || defined(__GNU__) || defined(__NetBSD__)
+ int main(int argc, char **argv) {
+ struct demo demo;
+
diff --git a/vulkan-tools/patches/patch-cube_cube.cpp b/vulkan-tools/patches/patch-cube_cube.cpp
new file mode 100644
index 0000000000..0906587035
--- /dev/null
+++ b/vulkan-tools/patches/patch-cube_cube.cpp
@@ -0,0 +1,53 @@
+$NetBSD: patch-cube_cube.cpp,v 1.2 2025/10/04 12:39:56 tnn Exp $
+
+Allow building on NetBSD.
+
+--- cube/cube.cpp.orig 2025-10-04 12:29:34.996749955 +0000
++++ cube/cube.cpp
+@@ -40,7 +40,9 @@
+ #include "xcb_loader.h"
+ #endif
+ #if defined(VK_USE_PLATFORM_WAYLAND_KHR)
++#if defined(__linux__)
+ #include <linux/input.h>
++#endif
+ #include "wayland_loader.h"
+ #endif
+ #if defined(VK_USE_PLATFORM_FUCHSIA)
+@@ -578,9 +580,11 @@ static void pointer_handle_motion(void *
+ static void pointer_handle_button(void *data, struct wl_pointer *wl_pointer, uint32_t serial, uint32_t time, uint32_t button,
+ uint32_t state) {
+ Demo &demo = *static_cast<Demo *>(data);
++#if defined(__linux__)
+ if (button == BTN_LEFT && state == WL_POINTER_BUTTON_STATE_PRESSED) {
+ xdg_toplevel_move(demo.window_toplevel, demo.seat, serial);
+ }
++#endif
+ }
+
+ static void pointer_handle_axis(void *data, struct wl_pointer *wl_pointer, uint32_t time, uint32_t axis, wl_fixed_t value) {}
+@@ -600,6 +604,7 @@ static void keyboard_handle_key(void *da
+ uint32_t state) {
+ if (state != WL_KEYBOARD_KEY_STATE_RELEASED) return;
+ Demo &demo = *static_cast<Demo *>(data);
++#if defined(__linux__)
+ switch (key) {
+ case KEY_ESC: // Escape
+ demo.quit = true;
+@@ -614,6 +619,7 @@ static void keyboard_handle_key(void *da
+ demo.pause = !demo.pause;
+ break;
+ }
++#endif
+ }
+
+ static void keyboard_handle_modifiers(void *data, wl_keyboard *keyboard, uint32_t serial, uint32_t mods_depressed,
+@@ -4133,7 +4139,7 @@ int WINAPI WinMain(HINSTANCE hInstance,
+ }
+
+ #elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__QNX__) || defined(__GNU__) || \
+- defined(__Fuchsia__)
++ defined(__Fuchsia__) || defined(__NetBSD__)
+
+ template <WsiPlatform WSI_PLATFORM>
+ void Demo::execute() {
Home |
Main Index |
Thread Index |
Old Index