diff options
author | Nick Sarnie <sarnex@gentoo.org> | 2024-01-17 19:22:15 -0500 |
---|---|---|
committer | Nick Sarnie <sarnex@gentoo.org> | 2024-01-17 19:32:54 -0500 |
commit | c3f5747f463d625a712962f896d601fdf26397c2 (patch) | |
tree | 89903f3919294dc5db28061597b89bc228929388 /media-libs/shaderc | |
parent | dev-util/vulkan-tools: add 1.3.275 (diff) | |
download | gentoo-c3f5747f463d625a712962f896d601fdf26397c2.tar.gz gentoo-c3f5747f463d625a712962f896d601fdf26397c2.tar.bz2 gentoo-c3f5747f463d625a712962f896d601fdf26397c2.zip |
media-libs/shaderc: add 2023.8
Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
Diffstat (limited to 'media-libs/shaderc')
-rw-r--r-- | media-libs/shaderc/Manifest | 1 | ||||
-rw-r--r-- | media-libs/shaderc/shaderc-2023.8.ebuild | 79 |
2 files changed, 80 insertions, 0 deletions
diff --git a/media-libs/shaderc/Manifest b/media-libs/shaderc/Manifest index 41dc28d517c1..02faa171fdb5 100644 --- a/media-libs/shaderc/Manifest +++ b/media-libs/shaderc/Manifest @@ -1,2 +1,3 @@ DIST shaderc-2023.6.tar.gz 226361 BLAKE2B 023ce15caaff6ff9474f361c6c5442fd8c58bbb079774fd3c8525824e70e63c1b8fff37490601b599f4ed44f4bfaec3ca746b7a734782fc2af8d78c4f1f1de53 SHA512 6580384ac27c4f2225529873ba46ca61240bdf63f4f5b89875e9bd20a774fed49328094379b7f469c3b97b6a3744cb649998c0d6d5a391023317a64a91754bb1 DIST shaderc-2023.7.tar.gz 227360 BLAKE2B de5ee8cc35bc76ba1301e80217587cbf55885999297755d78a72fe0940431351d4070cdd0793fe8f43208d40c9ec343bbe888da2b8ded471bd241be067b1addf SHA512 f3c1db574312e7e5ee22fb64f47f6609369754dd1648eb4e51c30b3c40aafd9994e54560e8334d01ac7d00011285a94d0543fa9ecd6977ec34c39a965fd72269 +DIST shaderc-2023.8.tar.gz 227238 BLAKE2B 334bda3bdff510ac97f97fa710e18ca9a2c807d1e71973aaf4493112dca3adb69c7a83c0590c65db3e6dffab82f500058162d3190e5822a01ea2d611db771857 SHA512 2a5e59a2bb6c4b5462758d824747fee0edaf177dc64f30fe698fd2d2cc21cddab1a19ec2b2d63bd3d2e209330a13519f399395398379370b15daa39e6ee6b2bf diff --git a/media-libs/shaderc/shaderc-2023.8.ebuild b/media-libs/shaderc/shaderc-2023.8.ebuild new file mode 100644 index 000000000000..7f50365de0f8 --- /dev/null +++ b/media-libs/shaderc/shaderc-2023.8.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..12} ) +inherit cmake-multilib multibuild python-any-r1 + +DESCRIPTION="Collection of tools, libraries and tests for shader compilation" +HOMEPAGE="https://github.com/google/shaderc" +EGIT_COMMIT="${PV}" +SRC_URI="https://github.com/google/${PN}/archive/v${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${EGIT_COMMIT}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~loong ~ppc64 ~riscv ~x86" +IUSE="doc" + +RDEPEND=" + ~dev-util/glslang-1.3.275:=[${MULTILIB_USEDEP}] + ~dev-util/spirv-tools-1.3.275[${MULTILIB_USEDEP}] +" +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + ~dev-util/spirv-headers-1.3.275" + +BDEPEND="doc? ( dev-ruby/asciidoctor )" + +PATCHES=( + "${FILESDIR}"/${PN}-2020.4-fix-build.patch +) + +# https://github.com/google/shaderc/issues/470 +RESTRICT=test + +src_prepare() { + cmake_comment_add_subdirectory examples + + # Unbundle glslang, spirv-headers, spirv-tools + cmake_comment_add_subdirectory third_party + sed -i \ + -e "s|\$<TARGET_FILE:spirv-dis>|${EPREFIX}/usr/bin/spirv-dis|" \ + glslc/test/CMakeLists.txt || die + + # Disable git versioning + sed -i -e '/build-version/d' glslc/CMakeLists.txt || die + + # Manually create build-version.inc as we disabled git versioning + cat <<- EOF > glslc/src/build-version.inc || die + "${P}\n" + "$(best_version dev-util/spirv-tools)\n" + "$(best_version dev-util/glslang)\n" + EOF + + cmake_src_prepare +} + +multilib_src_configure() { + local mycmakeargs=( + -DSHADERC_SKIP_TESTS="true" + -DSHADERC_ENABLE_WERROR_COMPILE="false" + ) + cmake_src_configure +} + +multilib_src_compile() { + if multilib_is_native_abi && use doc; then + cmake_src_compile glslc_doc_README + fi + cmake_src_compile +} + +multilib_src_install() { + if multilib_is_native_abi; then + use doc && local HTML_DOCS=( "${BUILD_DIR}/glslc/README.html" ) + fi + cmake_src_install +} |