summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2024-04-02 22:58:24 -0400
committerMatt Turner <mattst88@gentoo.org>2024-04-02 22:59:30 -0400
commit07e51e3461fbaf3a94acb0c66dad1a03a0a8d4fe (patch)
treec1f11420718808f61237429c028338ad51b92183 /media-libs/shaderc
parentmedia-sound/reaper-bin: use upstream commit for lazy binding (diff)
downloadgentoo-07e51e3461fbaf3a94acb0c66dad1a03a0a8d4fe.tar.gz
gentoo-07e51e3461fbaf3a94acb0c66dad1a03a0a8d4fe.tar.bz2
gentoo-07e51e3461fbaf3a94acb0c66dad1a03a0a8d4fe.zip
media-libs/shaderc: Version bump to 2024.0
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'media-libs/shaderc')
-rw-r--r--media-libs/shaderc/Manifest1
-rw-r--r--media-libs/shaderc/shaderc-2024.0.ebuild79
2 files changed, 80 insertions, 0 deletions
diff --git a/media-libs/shaderc/Manifest b/media-libs/shaderc/Manifest
index 0c7039e29fcc..708f56c186f4 100644
--- a/media-libs/shaderc/Manifest
+++ b/media-libs/shaderc/Manifest
@@ -1 +1,2 @@
DIST shaderc-2023.8.tar.gz 227238 BLAKE2B 334bda3bdff510ac97f97fa710e18ca9a2c807d1e71973aaf4493112dca3adb69c7a83c0590c65db3e6dffab82f500058162d3190e5822a01ea2d611db771857 SHA512 2a5e59a2bb6c4b5462758d824747fee0edaf177dc64f30fe698fd2d2cc21cddab1a19ec2b2d63bd3d2e209330a13519f399395398379370b15daa39e6ee6b2bf
+DIST shaderc-2024.0.tar.gz 227125 BLAKE2B f11f2acad796f41015d4738b964526f119e944b1cfa2103ab3452adcf5790a04adbd10f9d55423b3ce567e87f64eb241067c786c4a7b76bb884aa70c100d0eb8 SHA512 ca80b22a80bf1a222e6deecbe63f99c6eed980c6c31b4f7981b6c8dc5637b7271c861543566e01aaf945df40da095b63a69f2e22f061a41faad2ecca5dc187ae
diff --git a/media-libs/shaderc/shaderc-2024.0.ebuild b/media-libs/shaderc/shaderc-2024.0.ebuild
new file mode 100644
index 000000000000..bd38b2831f82
--- /dev/null
+++ b/media-libs/shaderc/shaderc-2024.0.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..12} )
+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.280.0:=[${MULTILIB_USEDEP}]
+ ~dev-util/spirv-tools-1.3.280.0[${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ ~dev-util/spirv-headers-1.3.280.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
+}