diff options
author | Nick Sarnie <sarnex@gentoo.org> | 2019-11-22 18:28:30 -0500 |
---|---|---|
committer | Nick Sarnie <sarnex@gentoo.org> | 2019-11-22 18:28:30 -0500 |
commit | fbe5d5039cf1529128309f3e5963b0cd53d25742 (patch) | |
tree | f19e5f52f32b8af4bc264b32babd754e7bcb8f4b /dev-util | |
parent | dev-util/glslang: Respect CMAKE_INSTALL_LIBDIR (diff) | |
download | gentoo-fbe5d5039cf1529128309f3e5963b0cd53d25742.tar.gz gentoo-fbe5d5039cf1529128309f3e5963b0cd53d25742.tar.bz2 gentoo-fbe5d5039cf1529128309f3e5963b0cd53d25742.zip |
dev-util/spirv-tools: Respect CMAKE_INSTALL_LIBDIR
Backported from: 85f3e93d13f32d45bd7f9999aa51baddf2452aae
Fixes: https://bugs.gentoo.org/show_bug.cgi?id=699418
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
Diffstat (limited to 'dev-util')
2 files changed, 68 insertions, 0 deletions
diff --git a/dev-util/spirv-tools/files/spirv-tools-2019.10_pre20191027-Respect-CMAKE_INSTALL_LIBDIR-in-installed-CMake-files.patch b/dev-util/spirv-tools/files/spirv-tools-2019.10_pre20191027-Respect-CMAKE_INSTALL_LIBDIR-in-installed-CMake-files.patch new file mode 100644 index 000000000000..c7dda4594c2b --- /dev/null +++ b/dev-util/spirv-tools/files/spirv-tools-2019.10_pre20191027-Respect-CMAKE_INSTALL_LIBDIR-in-installed-CMake-files.patch @@ -0,0 +1,23 @@ +From 4c9f81249f0808af316f39c8f0e8b67e46ec0967 Mon Sep 17 00:00:00 2001 +From: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> +Date: Mon, 18 Nov 2019 11:07:48 -0800 +Subject: [PATCH] Respect CMAKE_INSTALL_LIBDIR in installed CMake files + +Fixes #3017 +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 19108f3a0..aecaf8d68 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -215,7 +215,7 @@ if(ENABLE_SPIRV_TOOLS_INSTALL) + endmacro() + else() + macro(spvtools_config_package_dir TARGET PATH) +- set(${PATH} lib/cmake/${TARGET}) ++ set(${PATH} ${CMAKE_INSTALL_LIBDIR}/cmake/${TARGET}) + endmacro() + endif() + diff --git a/dev-util/spirv-tools/spirv-tools-2019.10_pre20191027-r1.ebuild b/dev-util/spirv-tools/spirv-tools-2019.10_pre20191027-r1.ebuild new file mode 100644 index 000000000000..6949158877af --- /dev/null +++ b/dev-util/spirv-tools/spirv-tools-2019.10_pre20191027-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{5,6,7} ) + +inherit cmake-multilib cmake-utils python-any-r1 + +DESCRIPTION="Provides an API and commands for processing SPIR-V modules" +HOMEPAGE="https://github.com/KhronosGroup/SPIRV-Tools" +EGIT_COMMIT="ec12de9131244a076c34ddca2e8d7451288be7e1" +SRC_URI="https://github.com/KhronosGroup/SPIRV-Tools/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +# Tests fail upon finding symbols that do not match a regular expression +# in the generated library. Easily hit with non-standard compiler flags +RESTRICT="test" + +COMMON_DEPEND=">=dev-util/spirv-headers-1.5.1" +DEPEND="${COMMON_DEPEND}" +RDEPEND="" +BDEPEND="${PYTHON_DEPS} + ${COMMON_DEPEND}" + +PATCHES=( "${FILESDIR}/${P}-Respect-CMAKE_INSTALL_LIBDIR-in-installed-CMake-files.patch" ) + +S="${WORKDIR}/SPIRV-Tools-${EGIT_COMMIT}" + +multilib_src_configure() { + local mycmakeargs=( + "-DSPIRV-Headers_SOURCE_DIR=/usr/" + "-DSPIRV_WERROR=OFF" + ) + + cmake-utils_src_configure +} + +multilib_src_install() { + cmake-utils_src_install + echo "${EGIT_COMMIT}" > "${PN}-commit.h" || die + insinto /usr/include/"${PN}" + doins "${PN}-commit.h" +} |