aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2018-09-03 17:43:50 +0000
committerJan Beich <jbeich@FreeBSD.org>2018-09-03 17:43:50 +0000
commitfc090a966facfe899b046b73ce2e7f9eb784e9f8 (patch)
tree2757df8a0a866236352a0a37087b86c6ba971ac8 /graphics
parenta94a04921ad79ad50fcb942d555f570667a2477c (diff)
downloadports-fc090a966facfe899b046b73ce2e7f9eb784e9f8.tar.gz
ports-fc090a966facfe899b046b73ce2e7f9eb784e9f8.zip
Notes
Diffstat (limited to 'graphics')
-rw-r--r--graphics/Makefile1
-rw-r--r--graphics/vulkan-loader/Makefile47
-rw-r--r--graphics/vulkan-loader/distinfo3
-rw-r--r--graphics/vulkan-loader/files/patch-CMakeLists.txt36
-rw-r--r--graphics/vulkan-loader/files/patch-loader_CMakeLists.txt20
-rw-r--r--graphics/vulkan-loader/files/patch-loader_loader.c20
-rw-r--r--graphics/vulkan-loader/files/patch-loader_vk__loader__platform.h11
-rw-r--r--graphics/vulkan-loader/pkg-descr6
-rw-r--r--graphics/vulkan-loader/pkg-plist4
9 files changed, 148 insertions, 0 deletions
diff --git a/graphics/Makefile b/graphics/Makefile
index d091cfa29846..59eb404a200e 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -1124,6 +1124,7 @@
SUBDIR += visprint
SUBDIR += volpack
SUBDIR += vp
+ SUBDIR += vulkan-loader
SUBDIR += waffle
SUBDIR += waifu2x-converter-cpp
SUBDIR += wayland
diff --git a/graphics/vulkan-loader/Makefile b/graphics/vulkan-loader/Makefile
new file mode 100644
index 000000000000..4b225df77a61
--- /dev/null
+++ b/graphics/vulkan-loader/Makefile
@@ -0,0 +1,47 @@
+# $FreeBSD$
+
+PORTNAME= vulkan-loader
+DISTVERSIONPREFIX=sdk-
+DISTVERSION= 1.1.82.0
+CATEGORIES= graphics devel
+
+MAINTAINER= greg@unrelenting.technology
+COMMENT= Driver loader for the Vulkan graphics API
+
+LICENSE= APACHE20
+
+BUILD_DEPENDS= ${LOCALBASE}/include/vulkan/vulkan.h:devel/vulkan-headers
+
+USES= cmake:outsource compiler:c++11-lib pkgconfig python:3.4+,build
+USE_LDCONFIG= yes
+
+USE_GITHUB= yes
+GH_ACCOUNT= KhronosGroup
+GH_PROJECT= Vulkan-Loader
+
+CMAKE_ON= CMAKE_SKIP_RPATH
+CMAKE_OFF= BUILD_TESTS BUILD_WSI_MIR_SUPPORT
+
+OPTIONS_DEFINE= XLIB XCB WAYLAND
+OPTIONS_DEFAULT=XLIB XCB
+
+XLIB_DESC= Build Xlib WSI (Window System Integration) support
+XCB_DESC= Build XCB WSI (Window System Integration) support
+WAYLAND_DESC= Build Wayland WSI (Window System Integration) support
+
+XLIB_CMAKE_BOOL= BUILD_WSI_XLIB_SUPPORT
+XLIB_LIB_DEPENDS= libX11.so:x11/libX11 \
+ libXrandr.so:x11/libXrandr
+XCB_CMAKE_BOOL= BUILD_WSI_XCB_SUPPORT
+XCB_LIB_DEPENDS= libX11-xcb.so:x11/libX11 \
+ libxcb.so:x11/libxcb
+WAYLAND_CMAKE_BOOL= BUILD_WSI_WAYLAND_SUPPORT
+WAYLAND_LIB_DEPENDS= libwayland-egl.so:graphics/mesa-libs
+
+post-patch:
+# Non-x86 targets use C code, so don't abort without GNU as (e.g., on aarch64)
+.if !exists(/usr/bin/as) && ${MACHINE_ARCH} != i386 && ${MACHINE_ARCH} != amd64
+ @${REINPLACE_CMD} 's/-ATT//' ${WRKSRC}/loader/CMakeLists.txt
+.endif
+
+.include <bsd.port.mk>
diff --git a/graphics/vulkan-loader/distinfo b/graphics/vulkan-loader/distinfo
new file mode 100644
index 000000000000..3c169857e743
--- /dev/null
+++ b/graphics/vulkan-loader/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1533664679
+SHA256 (KhronosGroup-Vulkan-Loader-sdk-1.1.82.0_GH0.tar.gz) = 86cd3e93d99cbfbb8550e7f2137cacfdaf9aa6611b814e054b2156b4b4775b0c
+SIZE (KhronosGroup-Vulkan-Loader-sdk-1.1.82.0_GH0.tar.gz) = 1341774
diff --git a/graphics/vulkan-loader/files/patch-CMakeLists.txt b/graphics/vulkan-loader/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..ef328049a55c
--- /dev/null
+++ b/graphics/vulkan-loader/files/patch-CMakeLists.txt
@@ -0,0 +1,36 @@
+--- CMakeLists.txt.orig 2018-08-03 22:10:42 UTC
++++ CMakeLists.txt
+@@ -57,9 +57,9 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+ # "Helper" targets that don't have interesting source code should set their FOLDER property to this
+ set(LOADER_HELPER_FOLDER "Helper Targets")
+
+-if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
++if(UNIX AND NOT APPLE)
+ set(
+- FALLBACK_CONFIG_DIRS "/etc/xdg"
++ FALLBACK_CONFIG_DIRS "${CMAKE_INSTALL_PREFIX}/etc/xdg:/etc/xdg"
+ CACHE
+ STRING
+ "Search path to use when XDG_CONFIG_DIRS is unset or empty or the current process is SUID/SGID. Default is freedesktop compliant."
+@@ -72,7 +72,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_
+ )
+ endif()
+
+-if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
++if(UNIX AND NOT APPLE)
+ include(FindPkgConfig)
+ option(BUILD_WSI_XCB_SUPPORT "Build XCB WSI support" ON)
+ option(BUILD_WSI_XLIB_SUPPORT "Build Xlib WSI support" ON)
+@@ -81,10 +81,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL "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)
diff --git a/graphics/vulkan-loader/files/patch-loader_CMakeLists.txt b/graphics/vulkan-loader/files/patch-loader_CMakeLists.txt
new file mode 100644
index 000000000000..6dc7df83c230
--- /dev/null
+++ b/graphics/vulkan-loader/files/patch-loader_CMakeLists.txt
@@ -0,0 +1,20 @@
+--- loader/CMakeLists.txt.orig 2018-08-03 22:10:42 UTC
++++ loader/CMakeLists.txt
+@@ -40,7 +40,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ endif()
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
+ add_definitions(-DVK_USE_PLATFORM_ANDROID_KHR)
+-elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
++elseif(UNIX AND NOT APPLE)
+ if(BUILD_WSI_XCB_SUPPORT)
+ add_definitions(-DVK_USE_PLATFORM_XCB_KHR)
+ endif()
+@@ -223,7 +223,7 @@ else()
+ add_dependencies(vulkan generate_helper_files loader_gen_files loader_asm_gen_files)
+ target_compile_definitions(vulkan PUBLIC -DLOADER_DYNAMIC_LIB)
+ set_target_properties(vulkan PROPERTIES SOVERSION "1" VERSION "${VulkanHeaders_VERSION_MAJOR}.${VulkanHeaders_VERSION_MINOR}.${VulkanHeaders_VERSION_PATCH}")
+- target_link_libraries(vulkan -ldl -lpthread -lm)
++ target_link_libraries(vulkan ${CMAKE_DL_LIBS} -lpthread -lm)
+
+ if(APPLE)
+ find_library(COREFOUNDATION_LIBRARY NAMES CoreFoundation)
diff --git a/graphics/vulkan-loader/files/patch-loader_loader.c b/graphics/vulkan-loader/files/patch-loader_loader.c
new file mode 100644
index 000000000000..5083a1971274
--- /dev/null
+++ b/graphics/vulkan-loader/files/patch-loader_loader.c
@@ -0,0 +1,20 @@
+--- loader/loader.c.orig 2018-08-03 22:10:42 UTC
++++ loader/loader.c
+@@ -215,7 +215,7 @@ void *loader_device_heap_realloc(const struct loader_d
+ }
+
+ // Environment variables
+-#if defined(__linux__) || defined(__APPLE__)
++#if defined(__unix__)
+
+ static inline char *loader_getenv(const char *name, const struct loader_instance *inst) {
+ // No allocation of memory necessary for Linux, but we should at least touch
+@@ -225,7 +225,7 @@ static inline char *loader_getenv(const char *name, co
+ }
+
+ static inline char *loader_secure_getenv(const char *name, const struct loader_instance *inst) {
+-#if defined(__APPLE__)
++#if !defined(__linux__)
+ // Apple does not appear to have a secure getenv implementation.
+ // The main difference between secure getenv and getenv is that secure getenv
+ // returns NULL if the process is being run with elevated privileges by a normal user.
diff --git a/graphics/vulkan-loader/files/patch-loader_vk__loader__platform.h b/graphics/vulkan-loader/files/patch-loader_vk__loader__platform.h
new file mode 100644
index 000000000000..2ff87a33e32a
--- /dev/null
+++ b/graphics/vulkan-loader/files/patch-loader_vk__loader__platform.h
@@ -0,0 +1,11 @@
+--- loader/vk_loader_platform.h.orig 2018-08-03 22:10:42 UTC
++++ loader/vk_loader_platform.h
+@@ -31,7 +31,7 @@
+ #include "vulkan/vk_platform.h"
+ #include "vulkan/vk_sdk_platform.h"
+
+-#if defined(__linux__) || defined(__APPLE__)
++#if defined(__unix__)
+ /* Linux-specific common code: */
+
+ // Headers:
diff --git a/graphics/vulkan-loader/pkg-descr b/graphics/vulkan-loader/pkg-descr
new file mode 100644
index 000000000000..76c001ca27e3
--- /dev/null
+++ b/graphics/vulkan-loader/pkg-descr
@@ -0,0 +1,6 @@
+Vulkan is a low-level cross-platform 3D graphics and compute API.
+
+This port provides the Khronos official ICD (Installable Client Driver) loader,
+which is necessary for loading Vulkan drivers in a running application.
+
+WWW: https://github.com/KhronosGroup/Vulkan-Loader
diff --git a/graphics/vulkan-loader/pkg-plist b/graphics/vulkan-loader/pkg-plist
new file mode 100644
index 000000000000..d52e84595793
--- /dev/null
+++ b/graphics/vulkan-loader/pkg-plist
@@ -0,0 +1,4 @@
+lib/libvulkan.so
+lib/libvulkan.so.1
+lib/libvulkan.so.1.1.82
+libdata/pkgconfig/vulkan.pc