Index: head/devel/vulkan-tools/Makefile =================================================================== --- head/devel/vulkan-tools/Makefile (revision 535234) +++ head/devel/vulkan-tools/Makefile (revision 535235) @@ -1,29 +1,61 @@ # $FreeBSD$ PORTNAME= vulkan-tools DISTVERSIONPREFIX= sdk- DISTVERSION= 1.1.108.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel graphics MAINTAINER= greg@unrelenting.technology COMMENT= Tools and demos for the Vulkan graphics API LICENSE= APACHE20 BUILD_DEPENDS= ${LOCALBASE}/include/vulkan/vulkan.h:devel/vulkan-headers \ glslangValidator:devel/glslang LIB_DEPENDS= libvulkan.so:graphics/vulkan-loader -USES= cmake compiler:c++11-lib pkgconfig python:3.4+,build xorg -USE_XORG= x11 xcb xrandr sm ice xext +USES= cmake compiler:c++11-lib pkgconfig python:3.4+,build USE_GITHUB= yes GH_ACCOUNT= KhronosGroup GH_PROJECT= Vulkan-Tools -CMAKE_OFF= BUILD_TESTS BUILD_ICD \ - BUILD_WSI_WAYLAND_SUPPORT +CMAKE_OFF= BUILD_TESTS BUILD_ICD CMAKE_ARGS= -DGLSLANG_INSTALL_DIR=${LOCALBASE} + +OPTIONS_DEFINE= WAYLAND XCB XLIB +OPTIONS_DEFAULT= WAYLAND XCB XLIB + +WAYLAND_DESC= Build Wayland WSI (Window System Integration) support +XCB_DESC= Build XCB WSI (Window System Integration) support +XLIB_DESC= Build Xlib WSI (Window System Integration) support + +WAYLAND_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto +WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland +WAYLAND_CMAKE_BOOL= BUILD_WSI_WAYLAND_SUPPORT +WAYLAND_CMAKE_ON= -DCUBE_WSI_SELECTION:STRING="WAYLAND" + +XLIB_CMAKE_BOOL= BUILD_WSI_XLIB_SUPPORT +XLIB_LIB_DEPENDS= libX11.so:x11/libX11 \ + libXext.so:x11/libXext \ + libICE.so:x11/libICE \ + libSM.so:x11/libSM + +XCB_CMAKE_BOOL= BUILD_WSI_XCB_SUPPORT +XCB_LIB_DEPENDS= libxcb.so:x11/libxcb + +.include + +.if ${PORT_OPTIONS:MXCB} +CMAKE_ARGS+= -DCUBE_WSI_SELECTION:STRING="XCB" +.elif ${PORT_OPTIONS:MXLIB} +CMAKE_ARGS+= -DCUBE_WSI_SELECTION:STRING="XLIB" +.elif ${PORT_OPTIONS:MWAYLAND} +CMAKE_ARGS+= -DCUBE_WSI_SELECTION:STRING="WAYLAND" +.else +CMAKE_ARGS+= -DCUBE_WSI_SELECTION:STRING="DISPLAY" +BROKEN= fails to build +.endif .include Index: head/devel/vulkan-tools/files/patch-cube_CMakeLists.txt =================================================================== --- head/devel/vulkan-tools/files/patch-cube_CMakeLists.txt (revision 535234) +++ head/devel/vulkan-tools/files/patch-cube_CMakeLists.txt (revision 535235) @@ -1,15 +1,23 @@ --- cube/CMakeLists.txt.orig 2019-06-10 22:07:04 UTC +++ cube/CMakeLists.txt @@ -50,10 +50,12 @@ if(UNIX AND NOT APPLE) # i.e. Linux if(BUILD_WSI_XCB_SUPPORT) find_package(XCB REQUIRED) + include_directories(SYSTEM ${XCB_INCLUDE_DIR}) endif() if(BUILD_WSI_XLIB_SUPPORT) find_package(X11 REQUIRED) + include_directories(SYSTEM ${X11_Xlib_INCLUDE_PATH}) endif() if(BUILD_WSI_WAYLAND_SUPPORT) +@@ -174,6 +176,7 @@ elseif(NOT WIN32) + cube.vert.inc + cube.frag.inc) + target_link_libraries(vkcube Vulkan::Vulkan) ++ include(CheckLibraryExists) + CHECK_LIBRARY_EXISTS("rt" clock_gettime "" NEED_RT) + if (NEED_RT) + target_link_libraries(vkcube rt)