Source: vulkan
Version: 1.1.73+dfsg-1
Severity: important
Tags: ftbfs, patch
User: debian-h...@lists.debian.org, debian-k...@lists.debian.org
Usertags: hurd-i386, kfreebsd-any
Hello,
Currently vulkan is not available on GNU/Hurd and GNU/kFreeBSD due to
lack of porting to these architectures. Attached is a patch,
debian_control.diff, to make the libwayland-dev dependency linux-only
and add hurd, kfreebsd to the Architecture field of the packages.
The remaining patches:
CMakeLists.txt.diff
demos_CMakeLists.txt.diff
demos_smoke_CMakeLists.txt.diff
external_glslang_External_spirv-tools_CMakeLists.txt.diff
icd_CMakeLists.txt.diff
layers_CMakeLists.txt.diff
loader_CMakeLists.txt.diff
loader_loader.c.diff
loader_vk_loader_platform.h.diff
tests_CMakeLists.txt.diff
are mainly patches for various CMakeLists.txt files. The last patch is
not tested yet since the package build does not run tests.
Vulkan has been built successfully with the attached patches on hurd-
i386 and kfreebsd-amd64 boxes.
This package is important to have available due to the build dependency
chain of wine-development:
wine-development -> libvkd3d-dev -> libvulkan-dev
Thanks!--- a/debian/control 2018-08-22 07:52:50.0 +0200
+++ b/debian/control 2018-08-22 08:03:31.0 +0200
@@ -4,7 +4,7 @@
Uploaders: Timo Aaltonen
Build-Depends: debhelper (>= 9),
cmake,
- libwayland-dev,
+ libwayland-dev [linux-any],
libx11-dev,
libxcb1-dev,
libxrandr-dev,
@@ -20,7 +20,7 @@
Vcs-Browser: https://salsa.debian.org/xorg-team/vulkan/vulkan.git
Package: libvulkan1
-Architecture: linux-any
+Architecture: linux-any kfreebsd-any hurd-any
Depends: ${shlibs:Depends}, ${misc:Depends}
Breaks: vulkan-loader,
libvulkan-dev (<< 1.1.70+dfsg1-2),
@@ -37,7 +37,7 @@
Package: libvulkan-dev
Section: libdevel
-Architecture: linux-any
+Architecture: linux-any kfreebsd-any hurd-any
Depends:
libvulkan1 (= ${binary:Version}),
${misc:Depends},
@@ -53,7 +53,7 @@
This package includes files needed for development.
Package: vulkan-utils
-Architecture: linux-any
+Architecture: linux-any kfreebsd-any hurd-any
Section: graphics
Depends: ${shlibs:Depends}, ${misc:Depends},
libvulkan1,
Index: vulkan-1.1.73+dfsg/demos/CMakeLists.txt
===
--- vulkan-1.1.73+dfsg.orig/demos/CMakeLists.txt
+++ vulkan-1.1.73+dfsg/demos/CMakeLists.txt
@@ -73,7 +73,71 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux
include_directories ("${PROJECT_SOURCE_DIR}/icd/common")
link_libraries(${API_LOWERCASE} m)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-add_definitions(-DVK_USE_PLATFORM_MACOS_MVK)
+add_definitions(-DVK_USE_PLATFORM_XCB_KHR)
+elseif(CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD")
+if (NOT DEMOS_WSI_SELECTION)
+set(DEMOS_WSI_SELECTION "XCB")
+endif()
+
+if (DEMOS_WSI_SELECTION STREQUAL "XCB")
+if (NOT BUILD_WSI_XCB_SUPPORT)
+message( FATAL_ERROR "Selected XCB for demos build but not building Xcb support" )
+endif()
+set(DEMO_INCLUDE_DIRS
+${XCB_INCLUDE_DIRS}
+${DEMO_INCLUDE_DIRS}
+)
+link_libraries(${XCB_LIBRARIES})
+add_definitions(-DVK_USE_PLATFORM_XCB_KHR)
+elseif(DEMOS_WSI_SELECTION STREQUAL "XLIB")
+if (NOT BUILD_WSI_XLIB_SUPPORT)
+message( FATAL_ERROR "Selected XLIB for demos build but not building Xlib support" )
+endif()
+set(DEMO_INCLUDE_DIRS
+${X11_INCLUDE_DIR}
+${DEMO_INCLUDE_DIRS}
+)
+link_libraries(${X11_LIBRARIES})
+add_definitions(-DVK_USE_PLATFORM_XLIB_KHR)
+elseif(DEMOS_WSI_SELECTION STREQUAL "DISPLAY")
+add_definitions(-DVK_USE_PLATFORM_DISPLAY_KHR)
+else()
+message( FATAL_ERROR "Unrecognized value for DEMOS_WSI_SELECTION: ${DEMOS_WSI_SELECTION}" )
+ endif()
+include_directories ("${PROJECT_SOURCE_DIR}/icd/common")
+link_libraries(${API_LOWERCASE} m)
+elseif(CMAKE_SYSTEM_NAME STREQUAL "GNU")
+if (NOT DEMOS_WSI_SELECTION)
+set(DEMOS_WSI_SELECTION "XCB")
+endif()
+
+if (DEMOS_WSI_SELECTION STREQUAL "XCB")
+if (NOT BUILD_WSI_XCB_SUPPORT)
+message( FATAL_ERROR "Selected XCB for demos build but not building Xcb support" )
+endif()
+set(DEMO_INCLUDE_DIRS
+${XCB_INCLUDE_DIRS}
+${DEMO_INCLUDE_DIRS}
+)
+link_libraries(${XCB_LIBRARIES})
+add_definitions(-DVK_USE_PLATFORM_XCB_KHR)
+elseif(DEMOS_WSI_SELECTION STREQUAL "XLIB")
+if (NOT BUILD_WSI_XLIB_SUPPORT)
+message( FATAL_ERROR "Selected XLIB for demos build but not building Xlib support" )
+endif()
+set(DEMO_INCLUDE_DIRS
+${X11_INCLUDE_DIR}
+${DEMO_INCLUDE_DIRS}
+)
+link_libraries(${X11_LIBRARIES})
+add_definitions(-DVK_USE_PLATFORM_XLIB_KHR)
+elseif(DEMOS_WSI_SELECTION STREQUAL "DISPLAY")
+add_definiti