summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2024-05-16 10:32:43 -0400
committerMatt Turner <mattst88@gentoo.org>2024-05-16 10:53:44 -0400
commiteb409a36817f0fd6d24b3266bfe7fea27270ecd2 (patch)
tree2e9fc610400489dd36cc8cba15486efa2d817eb1 /media-libs
parentmedia-libs/vulkan-layers: Version bump to 1.3.283.0 (diff)
downloadgentoo-eb409a36817f0fd6d24b3266bfe7fea27270ecd2.tar.gz
gentoo-eb409a36817f0fd6d24b3266bfe7fea27270ecd2.tar.bz2
gentoo-eb409a36817f0fd6d24b3266bfe7fea27270ecd2.zip
media-libs/shaderc: Version bump to 2024.1
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/shaderc/Manifest1
-rw-r--r--media-libs/shaderc/shaderc-2024.1.ebuild79
2 files changed, 80 insertions, 0 deletions
diff --git a/media-libs/shaderc/Manifest b/media-libs/shaderc/Manifest
index 708f56c186f4..02b7fc47d60c 100644
--- a/media-libs/shaderc/Manifest
+++ b/media-libs/shaderc/Manifest
@@ -1,2 +1,3 @@
DIST shaderc-2023.8.tar.gz 227238 BLAKE2B 334bda3bdff510ac97f97fa710e18ca9a2c807d1e71973aaf4493112dca3adb69c7a83c0590c65db3e6dffab82f500058162d3190e5822a01ea2d611db771857 SHA512 2a5e59a2bb6c4b5462758d824747fee0edaf177dc64f30fe698fd2d2cc21cddab1a19ec2b2d63bd3d2e209330a13519f399395398379370b15daa39e6ee6b2bf
DIST shaderc-2024.0.tar.gz 227125 BLAKE2B f11f2acad796f41015d4738b964526f119e944b1cfa2103ab3452adcf5790a04adbd10f9d55423b3ce567e87f64eb241067c786c4a7b76bb884aa70c100d0eb8 SHA512 ca80b22a80bf1a222e6deecbe63f99c6eed980c6c31b4f7981b6c8dc5637b7271c861543566e01aaf945df40da095b63a69f2e22f061a41faad2ecca5dc187ae
+DIST shaderc-2024.1.tar.gz 227211 BLAKE2B a4c9790cb117e4cf2d528ed294ef0599dc3c17ac367a4f658254ff9e161f82b3338a2d70a033fabcdb7a2925c2f4668ee89cfff0d4b88cd2b22fcfb3f2786ea9 SHA512 017d8625c66da7eb5b431f595b27a4ddf146aaa12ef56777cb8c3f7f0f15eb01c3286e5905c5268de55d07cc19d5ffae4d4c08987d105b0a6be74616a467b736
diff --git a/media-libs/shaderc/shaderc-2024.1.ebuild b/media-libs/shaderc/shaderc-2024.1.ebuild
new file mode 100644
index 000000000000..7bc994a4ae41
--- /dev/null
+++ b/media-libs/shaderc/shaderc-2024.1.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_{10..13} )
+inherit cmake-multilib 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.283.0:=[${MULTILIB_USEDEP}]
+ ~dev-util/spirv-tools-1.3.283.0[${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ ~dev-util/spirv-headers-1.3.283.0"
+
+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
+}