diff options
author | Nick Sarnie <sarnex@gentoo.org> | 2023-08-29 20:28:23 -0400 |
---|---|---|
committer | Nick Sarnie <sarnex@gentoo.org> | 2023-08-29 20:32:35 -0400 |
commit | 09851479d9e2ce0f750b8e7271a474f85d378de2 (patch) | |
tree | 50904998be346838e889fd91f075d0f063aff331 /media-libs/shaderc | |
parent | dev-util/vulkan-tools: add 1.3.261 (diff) | |
download | gentoo-09851479d9e2ce0f750b8e7271a474f85d378de2.tar.gz gentoo-09851479d9e2ce0f750b8e7271a474f85d378de2.tar.bz2 gentoo-09851479d9e2ce0f750b8e7271a474f85d378de2.zip |
media-libs/shaderc: add 2023.6
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.6.ebuild | 79 |
2 files changed, 80 insertions, 0 deletions
diff --git a/media-libs/shaderc/Manifest b/media-libs/shaderc/Manifest index ed894f852b64..dd559b130abb 100644 --- a/media-libs/shaderc/Manifest +++ b/media-libs/shaderc/Manifest @@ -1 +1,2 @@ DIST shaderc-2023.4.tar.gz 225728 BLAKE2B b033f9d5e8afdf53afb5c3299a2b0496558b25d4fb1b04eab0ab1610377c391084fcb952bf2836bf88078e902e78bd579d46ae8f07aaed42569edbbc21b0d5c9 SHA512 18b7c31eec9408fc038211d4424d5d82414f427a580ec6f412e9e8d6a7e060e4c39d2c223bfbbf4bd167a1575a7bb900591ff834b3356f4024772e0b96993e91 +DIST shaderc-2023.6.tar.gz 226361 BLAKE2B 023ce15caaff6ff9474f361c6c5442fd8c58bbb079774fd3c8525824e70e63c1b8fff37490601b599f4ed44f4bfaec3ca746b7a734782fc2af8d78c4f1f1de53 SHA512 6580384ac27c4f2225529873ba46ca61240bdf63f4f5b89875e9bd20a774fed49328094379b7f469c3b97b6a3744cb649998c0d6d5a391023317a64a91754bb1 diff --git a/media-libs/shaderc/shaderc-2023.6.ebuild b/media-libs/shaderc/shaderc-2023.6.ebuild new file mode 100644 index 000000000000..e056906121b3 --- /dev/null +++ b/media-libs/shaderc/shaderc-2023.6.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2023 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 ~ppc64 ~riscv ~x86" +IUSE="doc" + +RDEPEND=" + >=dev-util/glslang-1.3.261:=[${MULTILIB_USEDEP}] + >=dev-util/spirv-tools-1.3.261[${MULTILIB_USEDEP}] +" +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + >=dev-util/spirv-headers-1.3.261" + +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 +} |