diff --git a/graphics/vulkan-loader/Makefile b/graphics/vulkan-loader/Makefile index b36e6feb4240..921ab1305f8c 100644 --- a/graphics/vulkan-loader/Makefile +++ b/graphics/vulkan-loader/Makefile @@ -1,51 +1,54 @@ PORTNAME= vulkan-loader DISTVERSIONPREFIX= v DISTVERSION= 1.3.211 CATEGORIES= graphics devel +PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ +PATCHFILES+= e7f0c7535447.patch:-p1 # https://github.com/KhronosGroup/Vulkan-Loader/pull/910 + MAINTAINER= jbeich@FreeBSD.org COMMENT= Driver loader for the Vulkan graphics API LICENSE= APACHE20 BUILD_DEPENDS= vulkan-headers>0:graphics/vulkan-headers USES= alias cmake compiler:c++11-lib pkgconfig python:3.4+,build USE_GITHUB= yes USE_LDCONFIG= yes GH_ACCOUNT= KhronosGroup GH_PROJECT= Vulkan-Loader CMAKE_ON= CMAKE_SKIP_RPATH CMAKE_OFF= BUILD_TESTS OPTIONS_DEFINE= WAYLAND XCB XLIB OPTIONS_DEFAULT=WAYLAND XCB XLIB WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland WAYLAND_CMAKE_BOOL= BUILD_WSI_WAYLAND_SUPPORT XCB_DESC= ${X11_DESC} via libxcb XCB_USES= xorg XCB_USE= XORG=xcb XCB_CMAKE_BOOL= BUILD_WSI_XCB_SUPPORT XLIB_DESC= ${X11_DESC} via libX11 XLIB_USES= xorg XLIB_USE= XORG=x11,xrandr XLIB_CMAKE_BOOL= BUILD_WSI_XLIB_SUPPORT post-patch: # Extract (snapshot) version from the port # Respect PREFIX when XDG_CONFIG_DIRS and XDG_DATA_DIRS are unset @${REINPLACE_CMD} -e '/find_.*Git/d' \ -e '/BRANCH/s/--unknown--/main/' \ -e '/TAG/s/--unknown--/${DISTVERSIONFULL}/' \ -e '/FALLBACK/s,/etc,${PREFIX}&,' \ -e 's,/usr/local,${PREFIX},' \ ${WRKSRC}/CMakeLists.txt # https://github.com/llvm/llvm-project/issues/46692 @if [ "${CHOSEN_COMPILER_TYPE}-${ARCH}-${_OSRELEASE:C/.*-//}" = "clang-i386-CURRENT" ]; then \ ${ECHO} "disabled" >${WRKSRC}/loader/asm_test_x86.S; \ fi .include diff --git a/graphics/vulkan-loader/distinfo b/graphics/vulkan-loader/distinfo index 3843d659bc0e..9071a6724af6 100644 --- a/graphics/vulkan-loader/distinfo +++ b/graphics/vulkan-loader/distinfo @@ -1,3 +1,5 @@ TIMESTAMP = 1649179647 SHA256 (KhronosGroup-Vulkan-Loader-v1.3.211_GH0.tar.gz) = 1d889f093a85700f38be5d0047694c4d8c59f99e277fbe2dc781969c8f9537be SIZE (KhronosGroup-Vulkan-Loader-v1.3.211_GH0.tar.gz) = 1582562 +SHA256 (e7f0c7535447.patch) = 73c00c6693023886c541b89d44ba028d9f32b9f9395737a2c94afaf58b0414e2 +SIZE (e7f0c7535447.patch) = 1467 diff --git a/graphics/vulkan-loader/files/patch-i386 b/graphics/vulkan-loader/files/patch-i386 deleted file mode 100644 index 2b0b64e759ff..000000000000 --- a/graphics/vulkan-loader/files/patch-i386 +++ /dev/null @@ -1,40 +0,0 @@ -Partially revert https://github.com/KhronosGroup/Vulkan-Loader/commit/aeec557162da -to fix https://github.com/KhronosGroup/Vulkan-Loader/issues/909 - ---- loader/unknown_ext_chain_gas_x86.S.orig 2022-04-05 17:27:27 UTC -+++ loader/unknown_ext_chain_gas_x86.S -@@ -99,14 +99,14 @@ terminError\num: - mov [esp + 4], ecx # Copy the unwrapped VkPhysicalDevice into the first arg - jmp [eax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * \num))] # Jump to the next function in the chain - terminError\num: -- mov eax, dword ptr [eax + INSTANCE_OFFSET_ICD_TERM] # Load the loader_instance into eax -- push dword ptr [eax + (FUNCTION_OFFSET_INSTANCE + (CHAR_PTR_SIZE * \num))] # Push the func name (fifth arg) -- push offset termin_error_string # Push the error string (fourth arg) -- push 0 # Push zero (third arg) -- push VULKAN_LOADER_ERROR_BIT # Push the error logging bit (second arg) -- push eax # Push the loader_instance (first arg) -- call loader_log # Log the error message before we crash -- add esp, 20 # Clean up the args -+ mov eax, [eax + INSTANCE_OFFSET_ICD_TERM] # Load the loader_instance into eax -+ push [eax + (FUNCTION_OFFSET_INSTANCE + (CHAR_PTR_SIZE * \num))] # Push the func name (fifth arg) -+ push offset termin_error_string@GOT # Push the error string (fourth arg) -+ push 0 # Push zero (third arg) -+ push VULKAN_LOADER_ERROR_BIT # Push the error logging bit (second arg) -+ push eax # Push the loader_instance (first arg) -+ call loader_log # Log the error message before we crash -+ add esp, 20 # Clean up the args - mov eax, 0 - jmp eax # Crash intentionally by jumping to address zero - .endm -@@ -115,9 +115,8 @@ vkdev_ext\num: - .global vkdev_ext\num - vkdev_ext\num: - _CET_ENDBR -- mov eax, dword ptr [esp + 4] # Dereference the handle to get the dispatch table -- mov eax, dword ptr [eax] # Dereference the chain_device to get the loader_dispatch -- jmp dword ptr [eax + (EXT_OFFSET_DEVICE_DISPATCH + (PTR_SIZE * \num))] # Jump to the appropriate call chain -+ mov eax, [esp + 4] # Dereference the handle to get the dispatch table -+ jmp [eax + (EXT_OFFSET_DEVICE_DISPATCH + (PTR_SIZE * \num))] # Jump to the appropriate call chain - .endm - - .endif