diff options
author | Nick Sarnie <sarnex@gentoo.org> | 2021-11-07 10:53:44 -0500 |
---|---|---|
committer | Nick Sarnie <sarnex@gentoo.org> | 2021-11-07 10:57:20 -0500 |
commit | ae537a654dadc0b7a77d60fa085cd3a12c8cf72d (patch) | |
tree | 3386633e27e9f7b6583414aecb45403d5e1b4cb2 /media-libs/vulkan-loader | |
parent | dev-util/vulkan-tools: Fix eclass (diff) | |
download | gentoo-ae537a654dadc0b7a77d60fa085cd3a12c8cf72d.tar.gz gentoo-ae537a654dadc0b7a77d60fa085cd3a12c8cf72d.tar.bz2 gentoo-ae537a654dadc0b7a77d60fa085cd3a12c8cf72d.zip |
media-libs/vulkan-loader: Fix eclass
Bug: https://bugs.gentoo.org/822249
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
Diffstat (limited to 'media-libs/vulkan-loader')
-rw-r--r-- | media-libs/vulkan-loader/vulkan-loader-1.2.189-r1.ebuild | 67 | ||||
-rw-r--r-- | media-libs/vulkan-loader/vulkan-loader-9999.ebuild | 13 |
2 files changed, 72 insertions, 8 deletions
diff --git a/media-libs/vulkan-loader/vulkan-loader-1.2.189-r1.ebuild b/media-libs/vulkan-loader/vulkan-loader-1.2.189-r1.ebuild new file mode 100644 index 000000000000..035beeeddcc0 --- /dev/null +++ b/media-libs/vulkan-loader/vulkan-loader-1.2.189-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_PN=Vulkan-Loader +CMAKE_ECLASS="cmake" +inherit flag-o-matic cmake-multilib toolchain-funcs + +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="https://github.com/KhronosGroup/${MY_PN}.git" + EGIT_SUBMODULES=() + inherit git-r3 +else + SRC_URI="https://github.com/KhronosGroup/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" + S="${WORKDIR}"/${MY_PN}-${PV} +fi + +DESCRIPTION="Vulkan Installable Client Driver (ICD) Loader" +HOMEPAGE="https://github.com/KhronosGroup/Vulkan-Loader" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="layers wayland X" + +BDEPEND=">=dev-util/cmake-3.10.2" +DEPEND=" + ~dev-util/vulkan-headers-${PV} + wayland? ( dev-libs/wayland:=[${MULTILIB_USEDEP}] ) + X? ( + x11-libs/libX11:=[${MULTILIB_USEDEP}] + x11-libs/libXrandr:=[${MULTILIB_USEDEP}] + ) +" +PDEPEND="layers? ( media-libs/vulkan-layers:=[${MULTILIB_USEDEP}] )" + +multilib_src_configure() { + # Integrated clang assembler doesn't work with x86 - Bug #698164 + if tc-is-clang && [[ ${ABI} == x86 ]]; then + append-cflags -fno-integrated-as + fi + + local mycmakeargs=( + -DCMAKE_C_FLAGS="${CFLAGS} -DNDEBUG" + -DCMAKE_CXX_FLAGS="${CXXFLAGS} -DNDEBUG" + -DCMAKE_SKIP_RPATH=ON + -DBUILD_TESTS=OFF + -DBUILD_LOADER=ON + -DBUILD_WSI_WAYLAND_SUPPORT=$(usex wayland) + -DBUILD_WSI_XCB_SUPPORT=$(usex X) + -DBUILD_WSI_XLIB_SUPPORT=$(usex X) + -DVULKAN_HEADERS_INSTALL_DIR="${ESYSROOT}/usr" + ) + cmake_src_configure +} + +multilib_src_install() { + keepdir /etc/vulkan/icd.d + + cmake_src_install +} + +pkg_postinst() { + einfo "USE=demos has been dropped as per upstream packaging" + einfo "vulkaninfo is now available in the dev-util/vulkan-tools package" +} diff --git a/media-libs/vulkan-loader/vulkan-loader-9999.ebuild b/media-libs/vulkan-loader/vulkan-loader-9999.ebuild index 45bfc80ea55b..035beeeddcc0 100644 --- a/media-libs/vulkan-loader/vulkan-loader-9999.ebuild +++ b/media-libs/vulkan-loader/vulkan-loader-9999.ebuild @@ -4,8 +4,7 @@ EAPI=7 MY_PN=Vulkan-Loader -CMAKE_ECLASS="cmake-utils" -CMAKE_MAKEFILE_GENERATOR="emake" +CMAKE_ECLASS="cmake" inherit flag-o-matic cmake-multilib toolchain-funcs if [[ ${PV} == *9999* ]]; then @@ -36,10 +35,6 @@ DEPEND=" " PDEPEND="layers? ( media-libs/vulkan-layers:=[${MULTILIB_USEDEP}] )" -src_prepare() { - cmake-utils_src_prepare -} - multilib_src_configure() { # Integrated clang assembler doesn't work with x86 - Bug #698164 if tc-is-clang && [[ ${ABI} == x86 ]]; then @@ -47,6 +42,8 @@ multilib_src_configure() { fi local mycmakeargs=( + -DCMAKE_C_FLAGS="${CFLAGS} -DNDEBUG" + -DCMAKE_CXX_FLAGS="${CXXFLAGS} -DNDEBUG" -DCMAKE_SKIP_RPATH=ON -DBUILD_TESTS=OFF -DBUILD_LOADER=ON @@ -55,13 +52,13 @@ multilib_src_configure() { -DBUILD_WSI_XLIB_SUPPORT=$(usex X) -DVULKAN_HEADERS_INSTALL_DIR="${ESYSROOT}/usr" ) - cmake-utils_src_configure + cmake_src_configure } multilib_src_install() { keepdir /etc/vulkan/icd.d - cmake-utils_src_install + cmake_src_install } pkg_postinst() { |