summaryrefslogtreecommitdiff
path: root/dev-util/SPIRV-Tools/SPIRV-Tools-scm.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/SPIRV-Tools/SPIRV-Tools-scm.ebuild')
-rw-r--r--dev-util/SPIRV-Tools/SPIRV-Tools-scm.ebuild46
1 files changed, 46 insertions, 0 deletions
diff --git a/dev-util/SPIRV-Tools/SPIRV-Tools-scm.ebuild b/dev-util/SPIRV-Tools/SPIRV-Tools-scm.ebuild
new file mode 100644
index 0000000..6be89f3
--- /dev/null
+++ b/dev-util/SPIRV-Tools/SPIRV-Tools-scm.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+PYTHON_COMPAT=( python3_{4,5,6} )
+
+inherit python-any-r1 cmake-multilib
+
+DESCRIPTION="GLSL reference compiler."
+HOMEPAGE="https://github.com/KhronosGroup/SPIRV-Tools"
+
+SRC_URI=""
+EGIT_REPO_URI="https://github.com/KhronosGroup/SPIRV-Tools"
+inherit git-r3
+KEYWORDS=
+
+LICENSE="spirv-tools"
+SLOT="0/${PV}"
+IUSE=""
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${DEPEND}"
+
+
+
+src_unpack() {
+ git-r3_src_unpack
+ git-r3_fetch "https://github.com/KhronosGroup/SPIRV-Headers.git" \
+ "refs/heads/master"
+ git-r3_checkout "https://github.com/KhronosGroup/SPIRV-Headers.git" \
+ ${S}/external/spirv-headers
+}
+
+src_prepare() {
+ default
+
+ # Stolen from vulkan-loader
+ python ${FILESDIR}/external_revision_generator.py \
+ ${S} SPIRV_TOOLS_COMMIT_ID include/spirv-tools/spirv_tools_commit_id.h || die failed to generate commit_id header
+
+ # Hack to install generated id header
+ sed -i \
+ -e '/linker\.hpp/a \${CMAKE_CURRENT_SOURCE_DIR}\/include\/spirv-tools\/spirv_tools_commit_id\.h' \
+ CMakeLists.txt || die sed failed
+}