dev-util/vulkan-headers: Update versioning scheme
authorPeter Levine <plevine457@gmail.com>
Mon, 21 Oct 2019 01:35:35 +0000 (21:35 -0400)
committerNick Sarnie <sarnex@gentoo.org>
Mon, 21 Oct 2019 22:48:19 +0000 (18:48 -0400)
Allow the live ebuild to be used as a template for all the others.
If SNAPSHOT_COMMIT is defined, it is used for a snapshot build.
Otherwise, PV is used for a standard release build.

Package-Manager: Portage-2.3.77, Repoman-2.3.17
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
dev-util/vulkan-headers/vulkan-headers-9999.ebuild

index 46c065902b60c9632740cfc59c6e571ce6a20c51..5c5a041b9c22f3ee7d07e22c943b2bbe9e02ea14 100644 (file)
@@ -9,10 +9,16 @@ if [[ "${PV}" == "9999" ]]; then
        EGIT_REPO_URI="https://github.com/KhronosGroup/Vulkan-Headers.git"
        inherit git-r3
 else
-       EGIT_COMMIT="b1577d5fbd5424c863710aa156aaafa77cae3de8"
+       if [[ -z ${SNAPSHOT_COMMIT} ]]; then
+               MY_PV=v${PV}
+               MY_P=Vulkan-Headers-${PV}
+       else
+               MY_PV=${SNAPSHOT_COMMIT}
+               MY_P=Vulkan-Headers-${SNAPSHOT_COMMIT}
+       fi
        KEYWORDS="~amd64 ~x86"
-       SRC_URI="https://github.com/KhronosGroup/Vulkan-Headers/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
-       S="${WORKDIR}/Vulkan-Headers-${EGIT_COMMIT}"
+       SRC_URI="https://github.com/KhronosGroup/Vulkan-Headers/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+       S="${WORKDIR}"/${MY_P}
 fi
 
 DESCRIPTION="Vulkan Header files and API registry"