[crux-commits] ports/compat-32 (3.6): vulkan-loader-32: fix version

crux at crux.nu crux at crux.nu
Sat Apr 17 07:35:42 UTC 2021


commit eedde7cec607b249c702c8ca7d1d476fa1f03995
Author: Danny Rawlins <contact at romster.me>
Date:   Sat Apr 17 17:34:19 2021 +1000

    vulkan-loader-32: fix version

diff --git a/vulkan-loader-32/.footprint b/vulkan-loader-32/.footprint
index f2a7806..9f6e1b2 100644
--- a/vulkan-loader-32/.footprint
+++ b/vulkan-loader-32/.footprint
@@ -1,7 +1,7 @@
 drwxr-xr-x	root/root	usr/
 drwxr-xr-x	root/root	usr/lib32/
 lrwxrwxrwx	root/root	usr/lib32/libvulkan.so -> libvulkan.so.1
-lrwxrwxrwx	root/root	usr/lib32/libvulkan.so.1 -> libvulkan.so.1.2.174
--rwxr-xr-x	root/root	usr/lib32/libvulkan.so.1.2.174
+lrwxrwxrwx	root/root	usr/lib32/libvulkan.so.1 -> libvulkan.so.1.2.175
+-rwxr-xr-x	root/root	usr/lib32/libvulkan.so.1.2.175
 drwxr-xr-x	root/root	usr/lib32/pkgconfig/
 -rw-r--r--	root/root	usr/lib32/pkgconfig/vulkan.pc
diff --git a/vulkan-loader-32/.signature b/vulkan-loader-32/.signature
index 1e04f4d..87269b0 100644
--- a/vulkan-loader-32/.signature
+++ b/vulkan-loader-32/.signature
@@ -1,5 +1,6 @@
 untrusted comment: verify with /etc/ports/compat-32.pub
-RWSwxGo/zH7eXSIKMrIpIDppUKP1kXd8/OfQjcRbzMlvCYzzDgAAbEXMsWaLnaZ6gmTFlemAiUwJpYFxXOMo9h0+XHc/dOEmbgQ=
-SHA256 (Pkgfile) = 17db94232270485e8051dbecf6fc67b2294e8f3fa1491bfdcf8e2c5ba98f6d43
-SHA256 (.footprint) = eb01b03ceb45ae88dca529da9f1a10d6db1fb2fbac80a851f650ea6c005c3ae6
+RWSwxGo/zH7eXVSOZo6z6uVet5V7E9bCBG00MoY8XNEN4MPCEhSmL+MEVLV/F7xRz0/BacqZZfkVw215Z/ie8UTxDp112+Kc5g4=
+SHA256 (Pkgfile) = 8583b9ce0dedd2d6e93082845e9a024fbed0a05c32073631fd6da278e3e8fa65
+SHA256 (.footprint) = 03f535c4fe5a677303a8cb2a32b0fb53b78e92f2f2e7780bcfbd764c14c10acf
 SHA256 (Vulkan-Loader-1.2.174.tar.gz) = c39a660da13450cb5e2d1dc571749d0e9a4f831998b20a7ad9fc7f2c99e1bb0b
+SHA256 (verfix.patch) = 19c25bfcaf063bc1601ee4613328925b1724ca37c158ac96e50149e4b88a1c0a
diff --git a/vulkan-loader-32/Pkgfile b/vulkan-loader-32/Pkgfile
index eb456db..86da223 100644
--- a/vulkan-loader-32/Pkgfile
+++ b/vulkan-loader-32/Pkgfile
@@ -6,8 +6,9 @@
 
 name=vulkan-loader-32
 version=1.2.174
-release=1
-source=(https://github.com/KhronosGroup/Vulkan-Loader/archive/v$version/Vulkan-Loader-$version.tar.gz)
+release=2
+source=(https://github.com/KhronosGroup/Vulkan-Loader/archive/v$version/Vulkan-Loader-$version.tar.gz
+	verfix.patch)
 
 build() {
 	prt-get isinst ninja && PKGMK_VULKAN_LOADER+=' -G Ninja'
@@ -15,6 +16,9 @@ build() {
 
 	export ASFLAGS='--32'
 
+	# Fix version in .pc file
+	patch -d Vulkan-Loader-$version -p1 -i $SRC/verfix.patch
+
 	cmake -S Vulkan-Loader-$version -B build $PKGMK_VULKAN_LOADER \
 		-D CMAKE_INSTALL_PREFIX=/usr \
 		-D CMAKE_INSTALL_LIBDIR=lib32 \
diff --git a/vulkan-loader-32/verfix.patch b/vulkan-loader-32/verfix.patch
new file mode 100644
index 0000000..d731e3e
--- /dev/null
+++ b/vulkan-loader-32/verfix.patch
@@ -0,0 +1,28 @@
+diff -u -r Vulkan-Loader-1.2.174/cmake/FindVulkanHeaders.cmake Vulkan-Loader-1.2.174-verfix/cmake/FindVulkanHeaders.cmake
+--- Vulkan-Loader-1.2.174/cmake/FindVulkanHeaders.cmake	2021-03-29 20:05:47.000000000 +0000
++++ Vulkan-Loader-1.2.174-verfix/cmake/FindVulkanHeaders.cmake	2021-04-16 14:08:29.582548243 +0000
+@@ -114,19 +114,19 @@
+ file(STRINGS
+         ${VulkanHeaders_main_header}
+         VulkanHeaders_lines
+-        REGEX "^#define (VK_API_VERSION.*VK_MAKE_VERSION|VK_HEADER_VERSION)")
++        REGEX "^#define (VK_API_VERSION.*VK_MAKE_API_VERSION|VK_HEADER_VERSION)")
+ 
+ foreach(VulkanHeaders_line ${VulkanHeaders_lines})
+ 
+     # First, handle the case where we have a major/minor version
+     #   Format is:
+-    #        #define VK_API_VERSION_X_Y VK_MAKE_VERSION(X, Y, 0)
++    #        #define VK_API_VERSION_X_Y VK_MAKE_API_VERSION(0, X, Y, 0)
+     #   We grab the major version (X) and minor version (Y) out of the parentheses
+-    string(REGEX MATCH "VK_MAKE_VERSION\\(.*\\)" VulkanHeaders_out ${VulkanHeaders_line})
++    string(REGEX MATCH "VK_MAKE_API_VERSION\\(.*\\)" VulkanHeaders_out ${VulkanHeaders_line})
+     string(REGEX MATCHALL "[0-9]+" VulkanHeaders_MAJOR_MINOR "${VulkanHeaders_out}")
+     if (VulkanHeaders_MAJOR_MINOR)
+-        list (GET VulkanHeaders_MAJOR_MINOR 0 VulkanHeaders_cur_major)
+-        list (GET VulkanHeaders_MAJOR_MINOR 1 VulkanHeaders_cur_minor)
++        list (GET VulkanHeaders_MAJOR_MINOR 1 VulkanHeaders_cur_major)
++        list (GET VulkanHeaders_MAJOR_MINOR 2 VulkanHeaders_cur_minor)
+         if (${VulkanHeaders_cur_major} GREATER ${VulkanHeaders_VERSION_MAJOR})
+             set(VulkanHeaders_VERSION_MAJOR ${VulkanHeaders_cur_major})
+             set(VulkanHeaders_VERSION_MINOR ${VulkanHeaders_cur_minor})


More information about the crux-commits mailing list