diff options
author | Nick Sarnie <sarnex@gentoo.org> | 2018-05-26 18:42:25 -0400 |
---|---|---|
committer | Nick Sarnie <sarnex@gentoo.org> | 2018-05-26 18:58:30 -0400 |
commit | 3c713645a0c679996bd74717f99ff9f08ef129b1 (patch) | |
tree | 780f8f6327f5a8d2b1c160be983930131a127b3b /media-libs | |
parent | media-libs/vulkan-layers: Initial version (diff) | |
download | gentoo-3c713645a0c679996bd74717f99ff9f08ef129b1.tar.gz gentoo-3c713645a0c679996bd74717f99ff9f08ef129b1.tar.bz2 gentoo-3c713645a0c679996bd74717f99ff9f08ef129b1.zip |
media-libs/vulkan-tools: Initial version
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/vulkan-tools/Manifest | 1 | ||||
-rw-r--r-- | media-libs/vulkan-tools/files/vulkan-tools-Use-usr-for-vulkan-headers.patch | 35 | ||||
-rw-r--r-- | media-libs/vulkan-tools/metadata.xml | 16 | ||||
-rw-r--r-- | media-libs/vulkan-tools/vulkan-tools-0_p20180526.ebuild | 49 | ||||
-rw-r--r-- | media-libs/vulkan-tools/vulkan-tools-9999.ebuild | 49 |
5 files changed, 150 insertions, 0 deletions
diff --git a/media-libs/vulkan-tools/Manifest b/media-libs/vulkan-tools/Manifest new file mode 100644 index 000000000000..c0732f87ba35 --- /dev/null +++ b/media-libs/vulkan-tools/Manifest @@ -0,0 +1 @@ +DIST vulkan-tools-0_p20180526.tar.gz 437094 BLAKE2B 95e738567ee041730ce94aaf02e543cbb3d1e838af2de41cd0bd56069703f5b8250ca4e45c2bd3d9c4314b388b7aa6379b4778c52c01f3de43789d3b84a8fe8d SHA512 b9319f1baaa8e9ae42579608dabaeee3c0503192e3469d82cbad2a550f9fa78b3a19b37426e0391d2ce308a44e63b6a2deff32917995edc07c5cd65f87465222 diff --git a/media-libs/vulkan-tools/files/vulkan-tools-Use-usr-for-vulkan-headers.patch b/media-libs/vulkan-tools/files/vulkan-tools-Use-usr-for-vulkan-headers.patch new file mode 100644 index 000000000000..b9797e19ad2f --- /dev/null +++ b/media-libs/vulkan-tools/files/vulkan-tools-Use-usr-for-vulkan-headers.patch @@ -0,0 +1,35 @@ +From 9498942c820525dc531f643696b7938d3f5fa482 Mon Sep 17 00:00:00 2001 +From: Nick Sarnie <sarnex@gentoo.org> +Date: Tue, 22 May 2018 19:55:59 -0400 +Subject: [PATCH] Use usr for vulkan headers + +Signed-off-by: Nick Sarnie <sarnex@gentoo.org> +--- + CMakeLists.txt | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fa9a3d3b..2998edfa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -29,13 +29,15 @@ endif() + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + set(TOOLS_TARGET_FOLDER lvl_cmake_targets) + ++set(HEADERS_DIR "/usr") ++ + # Output warning if vulkan headers submodule contents are not present +-if (NOT EXISTS "${PROJECT_SOURCE_DIR}/Vulkan-Headers/include/vulkan/vulkan_core.h") ++if (NOT EXISTS "${HEADERS_DIR}/include/vulkan/vulkan_core.h") + message(FATAL_ERROR "Please run 'git submodule update --init' before running cmake") + endif() + + # Header file for CMake settings +-include_directories("${PROJECT_SOURCE_DIR}/Vulkan-Headers/include") ++include_directories("${HEADERS_DIR}/include") + + if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") + set(COMMON_COMPILE_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers") +-- +2.17.0 + diff --git a/media-libs/vulkan-tools/metadata.xml b/media-libs/vulkan-tools/metadata.xml new file mode 100644 index 000000000000..a670686d9eb6 --- /dev/null +++ b/media-libs/vulkan-tools/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>x11@gentoo.org</email> + <name>X11</name> + </maintainer> + <maintainer type="person"> + <email>sarnex@gentoo.org</email> + <name>Nick Sarnie</name> + </maintainer> + <upstream> + <remote-id type="github">KhronosGroup/Vulkan-Tools</remote-id> + </upstream> +</pkgmetadata> + diff --git a/media-libs/vulkan-tools/vulkan-tools-0_p20180526.ebuild b/media-libs/vulkan-tools/vulkan-tools-0_p20180526.ebuild new file mode 100644 index 000000000000..2e4086150cdc --- /dev/null +++ b/media-libs/vulkan-tools/vulkan-tools-0_p20180526.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python3_{4,5,6} ) + +if [[ "${PV}" == "9999" ]]; then + EGIT_REPO_URI="https://github.com/KhronosGroup/Vulkan-Tools.git" + EGIT_SUBMODULES=() + inherit git-r3 +else + EGIT_COMMIT="5e1623ca6860f3e393b1dabbdd19ba216871fa61" + KEYWORDS="~amd64" + SRC_URI="https://github.com/KhronosGroup/Vulkan-Tools/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/Vulkan-Tools-${EGIT_COMMIT}" +fi + +inherit python-any-r1 cmake-multilib + +DESCRIPTION="Official Vulkan Tools and Utilities for Windows, Linux, Android, and MacOS" +HOMEPAGE="https://github.com/KhronosGroup/Vulkan-Tools" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="X wayland" + +RDEPEND="" +DEPEND="${PYTHON_DEPS} + dev-util/glslang:=[${MULTILIB_USEDEP}] + dev-util/vulkan-headers + wayland? ( dev-libs/wayland:=[${MULTILIB_USEDEP}] ) + X? ( + x11-libs/libX11:=[${MULTILIB_USEDEP}] + x11-libs/libXrandr:=[${MULTILIB_USEDEP}] + )" + +PATCHES=( "${FILESDIR}/${PN}-Use-usr-for-vulkan-headers.patch" ) + +multilib_src_configure() { + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=True + -DBUILD_WSI_MIR_SUPPORT=False + -DBUILD_WSI_WAYLAND_SUPPORT=$(usex wayland) + -DBUILD_WSI_XCB_SUPPORT=$(usex X) + -DBUILD_WSI_XLIB_SUPPORT=$(usex X) + -DGLSLANG_INSTALL_DIR="/usr" + ) + cmake-utils_src_configure +} diff --git a/media-libs/vulkan-tools/vulkan-tools-9999.ebuild b/media-libs/vulkan-tools/vulkan-tools-9999.ebuild new file mode 100644 index 000000000000..d009fa4f314a --- /dev/null +++ b/media-libs/vulkan-tools/vulkan-tools-9999.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python3_{4,5,6} ) + +if [[ "${PV}" == "9999" ]]; then + EGIT_REPO_URI="https://github.com/KhronosGroup/Vulkan-Tools.git" + EGIT_SUBMODULES=() + inherit git-r3 +else + EGIT_COMMIT="51dfb7b8a19820d6716190dd7e45cd6e861e1f1a" + KEYWORDS="~amd64" + SRC_URI="https://github.com/KhronosGroup/Vulkan-Tools/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/Vulkan-Tools-${EGIT_COMMIT}" +fi + +inherit python-any-r1 cmake-multilib + +DESCRIPTION="Official Vulkan Tools and Utilities for Windows, Linux, Android, and MacOS" +HOMEPAGE="https://github.com/KhronosGroup/Vulkan-Tools" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="X wayland" + +RDEPEND="" +DEPEND="${PYTHON_DEPS} + dev-util/glslang:=[${MULTILIB_USEDEP}] + dev-util/vulkan-headers + wayland? ( dev-libs/wayland:=[${MULTILIB_USEDEP}] ) + X? ( + x11-libs/libX11:=[${MULTILIB_USEDEP}] + x11-libs/libXrandr:=[${MULTILIB_USEDEP}] + )" + +PATCHES=( "${FILESDIR}/${PN}-Use-usr-for-vulkan-headers.patch" ) + +multilib_src_configure() { + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=True + -DBUILD_WSI_MIR_SUPPORT=False + -DBUILD_WSI_WAYLAND_SUPPORT=$(usex wayland) + -DBUILD_WSI_XCB_SUPPORT=$(usex X) + -DBUILD_WSI_XLIB_SUPPORT=$(usex X) + -DGLSLANG_INSTALL_DIR="/usr" + ) + cmake-utils_src_configure +} |