dev-util/spirv-cross - 1.4.363.0 (tatsh-overlay)

Search

Install

Install this version:

emerge -a =dev-util/spirv-cross-1.4.363.0

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =dev-util/spirv-cross-1.4.363.0

Or alternatively:

emerge --autounmask-write -a =dev-util/spirv-cross-1.4.363.0

Package Information

Description:
Tool and library for parsing SPIR-V and converting it to other shader languages
Homepage:
https://github.com/KhronosGroup/SPIRV-Cross
License:
Apache-2.0

Ebuild Details

Version EAPI Keywords Slot
1.4.363.0 8 ~amd64 0
View Raw Ebuild
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{12..15} )

inherit cmake python-any-r1

MY_PN=SPIRV-Cross

DESCRIPTION="Tool and library for parsing SPIR-V and converting it to other shader languages"
HOMEPAGE="https://github.com/KhronosGroup/SPIRV-Cross"
SRC_URI="https://github.com/KhronosGroup/${MY_PN}/archive/refs/tags/vulkan-sdk-${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${MY_PN}-vulkan-sdk-${PV}"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
RESTRICT="!test? ( test )"

# The reference outputs are produced with the glslang and SPIRV-Tools of the
# same Vulkan SDK release.
BDEPEND="test? (
	${PYTHON_DEPS}
	~dev-util/glslang-${PV}
	~dev-util/spirv-tools-${PV}
)"

pkg_setup() {
	use test && python-any-r1_pkg_setup
}

src_configure() {
	local mycmakeargs=(
		-DSPIRV_CROSS_ENABLE_TESTS="$(usex test)"
		-DSPIRV_CROSS_SHARED=ON
		-DSPIRV_CROSS_WERROR=OFF
	)
	# Upstream looks for the tools only in its own checkout under external/.
	use test && mycmakeargs+=(
		-Dspirv-cross-glslang="${BROOT}/usr/bin/glslangValidator"
		-Dspirv-cross-spirv-as="${BROOT}/usr/bin/spirv-as"
		-Dspirv-cross-spirv-opt="${BROOT}/usr/bin/spirv-opt"
		-Dspirv-cross-spirv-val="${BROOT}/usr/bin/spirv-val"
	)
	cmake_src_configure
}

src_test() {
	# These compare output with references made with glslang and SPIRV-Tools
	# from 153 commits before the vulkan-sdk-${PV} tags, and a few shaders now
	# compile differently.
	local myctestargs=( -E '^spirv-cross-test(-metal|-hlsl)?(-opt|-no-opt)?$' )
	cmake_src_test
}

USE Flags

Manage flags for this package: euse -i <flag> -p dev-util/spirv-cross | euse -E <flag> -p dev-util/spirv-cross | euse -D <flag> -p dev-util/spirv-cross

Global/Standard Flags

Inherited Eclasses

Dependencies

BDEPEND

test? (
	
	~dev-util/glslang-1.4.363.0
	~dev-util/spirv-tools-1.4.363.0
)

Manifest for 1.4.363.0

Type File Size Source URLs
DIST spirv-cross-1.4.363.0.tar.gz 2032974 bytes https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/vulkan-sdk-1.4.363.0.tar.gz