dev-util/vulkan-tools: 9999 cleanup, cmake.eclass, >=cmake-3.10.2
authorAndreas Sturmlechner <asturm@gentoo.org>
Wed, 11 Mar 2020 19:14:27 +0000 (20:14 +0100)
committerMatt Turner <mattst88@gentoo.org>
Sun, 15 Mar 2020 21:28:38 +0000 (14:28 -0700)
Drop superfluous COMMON_DEPEND, other ebuild style improvements, sorting
Use upstream tarball instead of error-prone EGIT_COMMIT
Pin dev-util/vulkan-{headers,loader} to >=${PV}, maintainability again

Bug: https://bugs.gentoo.org/712090
Package-Manager: Portage-2.3.93, Repoman-2.3.20
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Signed-off-by: Matt Turner <mattst88@gentoo.org>
dev-util/vulkan-tools/vulkan-tools-9999.ebuild

index 70535b3958e737bc06786f8f1aed947cd3d30e2c..57cd7f76737b948a93ad012fa4da7a302d4b9d0b 100644 (file)
@@ -2,44 +2,49 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
+
+MY_PN=Vulkan-Tools
+CMAKE_ECLASS="cmake"
 PYTHON_COMPAT=( python3_{6,7} )
+inherit cmake-multilib python-any-r1
 
-if [[ "${PV}" == "9999" ]]; then
-       EGIT_REPO_URI="https://github.com/KhronosGroup/Vulkan-Tools.git"
+if [[ ${PV} == *9999* ]]; then
+       EGIT_REPO_URI="https://github.com/KhronosGroup/${MY_PN}.git"
        EGIT_SUBMODULES=()
        inherit git-r3
 else
-       EGIT_COMMIT="119e7c3bbae122f6cc5d778d068fb91e0e85d6a9"
+       SRC_URI="https://github.com/KhronosGroup/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
        KEYWORDS="~amd64 ~ppc64"
-       SRC_URI="https://github.com/KhronosGroup/Vulkan-Tools/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
-       S="${WORKDIR}/Vulkan-Tools-${EGIT_COMMIT}"
+       S="${WORKDIR}"/${MY_PN}-${PV}
 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="+cube +vulkaninfo +X wayland"
-COMMON_DEPEND=">=media-libs/vulkan-loader-1.1.125:=[${MULTILIB_USEDEP},wayland?,X?]
-       wayland? ( dev-libs/wayland:=[${MULTILIB_USEDEP}] )
-       X? (
-               x11-libs/libX11:=[${MULTILIB_USEDEP}]
-               x11-libs/libXrandr:=[${MULTILIB_USEDEP}]
-       )"
-
-BDEPEND="${PYTHON_DEPS}
-       cube? ( dev-util/glslang:=[${MULTILIB_USEDEP}] )"
-DEPEND=">=dev-util/vulkan-headers-1.1.125
-       ${COMMON_DEPEND}"
-RDEPEND="${COMMON_DEPEND}"
+IUSE="+cube +vulkaninfo wayland +X"
 
 # Vulkaninfo does not support wayland
 REQUIRED_USE="|| ( X wayland )
                        vulkaninfo? ( X )"
 
+BDEPEND="${PYTHON_DEPS}
+       >=dev-util/cmake-3.10.2
+       cube? ( dev-util/glslang:=[${MULTILIB_USEDEP}] )
+"
+RDEPEND="
+       >=media-libs/vulkan-loader-${PV}:=[${MULTILIB_USEDEP},wayland?,X?]
+       wayland? ( dev-libs/wayland:=[${MULTILIB_USEDEP}] )
+       X? (
+               x11-libs/libX11:=[${MULTILIB_USEDEP}]
+               x11-libs/libXrandr:=[${MULTILIB_USEDEP}]
+       )
+"
+DEPEND="${RDEPEND}
+       >=dev-util/vulkan-headers-${PV}
+"
+
 pkg_setup() {
        MULTILIB_CHOST_TOOLS=()
 
@@ -59,14 +64,14 @@ pkg_setup() {
 
 multilib_src_configure() {
        local mycmakeargs=(
-               -DCMAKE_SKIP_RPATH=True
+               -DCMAKE_SKIP_RPATH=ON
                -DBUILD_CUBE=$(usex cube)
                -DBUILD_VULKANINFO=$(usex vulkaninfo)
                -DBUILD_WSI_WAYLAND_SUPPORT=$(usex wayland)
                -DBUILD_WSI_XCB_SUPPORT=$(usex X)
                -DBUILD_WSI_XLIB_SUPPORT=$(usex X)
-               -DGLSLANG_INSTALL_DIR="/usr"
-               -DVULKAN_HEADERS_INSTALL_DIR="/usr"
+               -DGLSLANG_INSTALL_DIR="${EPREFIX}/usr"
+               -DVULKAN_HEADERS_INSTALL_DIR="${EPREFIX}/usr"
        )
 
        # Upstream only supports one window system at a time
@@ -86,9 +91,9 @@ multilib_src_configure() {
                )
        fi
 
-       cmake-utils_src_configure
+       cmake_src_configure
 }
 
 multilib_src_install() {
-       cmake-utils_src_install
+       cmake_src_install
 }