Gentoo Archives: gentoo-commits

From: Nick Sarnie <sarnex@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/shaderc/
Date: Sat, 29 Oct 2022 20:31:31
Message-Id: 1667075469.ecd84eaa07a7c3e9685de9aeeed3fa39bc35abd5.sarnex@gentoo
1 commit: ecd84eaa07a7c3e9685de9aeeed3fa39bc35abd5
2 Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 29 20:27:09 2022 +0000
4 Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 29 20:31:09 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecd84eaa
7
8 media-libs/shaderc: Disable tests
9
10 They don't work anyway
11
12 Closes: https://bugs.gentoo.org/878711
13
14 Signed-off-by: Nick Sarnie <Sarnex <AT> gentoo.org>
15
16 media-libs/shaderc/shaderc-2022.2-r1.ebuild | 79 +++++++++++++++++++++++++++++
17 1 file changed, 79 insertions(+)
18
19 diff --git a/media-libs/shaderc/shaderc-2022.2-r1.ebuild b/media-libs/shaderc/shaderc-2022.2-r1.ebuild
20 new file mode 100644
21 index 000000000000..42aa3aa3e57d
22 --- /dev/null
23 +++ b/media-libs/shaderc/shaderc-2022.2-r1.ebuild
24 @@ -0,0 +1,79 @@
25 +# Copyright 1999-2022 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=8
29 +
30 +PYTHON_COMPAT=( python3_{8..10} )
31 +inherit cmake-multilib python-any-r1
32 +
33 +DESCRIPTION="Collection of tools, libraries and tests for shader compilation"
34 +HOMEPAGE="https://github.com/google/shaderc"
35 +EGIT_COMMIT="${PV}"
36 +SRC_URI="https://github.com/google/${PN}/archive/v${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
37 +S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
38 +
39 +LICENSE="Apache-2.0"
40 +SLOT="0"
41 +KEYWORDS="amd64 ppc64 x86"
42 +IUSE="doc"
43 +
44 +RDEPEND="
45 + >=dev-util/glslang-1.3.224[${MULTILIB_USEDEP}]
46 + >=dev-util/spirv-tools-1.3.224[${MULTILIB_USEDEP}]
47 +"
48 +DEPEND="${RDEPEND}
49 + ${PYTHON_DEPS}
50 + >=dev-util/spirv-headers-1.3.224"
51 +
52 +BDEPEND="doc? ( dev-ruby/asciidoctor )"
53 +
54 +PATCHES=(
55 + "${FILESDIR}"/${PN}-2020.4-fix-build.patch
56 +)
57 +
58 +# https://github.com/google/shaderc/issues/470
59 +RESTRICT=test
60 +
61 +src_prepare() {
62 + cmake_comment_add_subdirectory examples
63 +
64 + # Unbundle glslang, spirv-headers, spirv-tools
65 + cmake_comment_add_subdirectory third_party
66 + sed -i \
67 + -e "s|\$<TARGET_FILE:spirv-dis>|${EPREFIX}/usr/bin/spirv-dis|" \
68 + glslc/test/CMakeLists.txt || die
69 +
70 + # Disable git versioning
71 + sed -i -e '/build-version/d' glslc/CMakeLists.txt || die
72 +
73 + # Manually create build-version.inc as we disabled git versioning
74 + cat <<- EOF > glslc/src/build-version.inc || die
75 + "${P}\n"
76 + "$(best_version dev-util/spirv-tools)\n"
77 + "$(best_version dev-util/glslang)\n"
78 + EOF
79 +
80 + cmake_src_prepare
81 +}
82 +
83 +multilib_src_configure() {
84 + local mycmakeargs=(
85 + -DSHADERC_SKIP_TESTS="true"
86 + -DSHADERC_ENABLE_WERROR_COMPILE="false"
87 + )
88 + cmake_src_configure
89 +}
90 +
91 +multilib_src_compile() {
92 + if multilib_is_native_abi && use doc; then
93 + cmake_src_compile glslc_doc_README
94 + fi
95 + cmake_src_compile
96 +}
97 +
98 +multilib_src_install() {
99 + if multilib_is_native_abi; then
100 + use doc && local HTML_DOCS=( "${BUILD_DIR}/glslc/README.html" )
101 + fi
102 + cmake_src_install
103 +}