From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 85575159C9B for ; Tue, 6 Aug 2024 16:10:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A4805E2C2B; Tue, 6 Aug 2024 16:10:18 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8F94FE2C2B for ; Tue, 6 Aug 2024 16:10:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C8E4C335D72 for ; Tue, 6 Aug 2024 16:10:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 02ECF1B9A for ; Tue, 6 Aug 2024 16:10:16 +0000 (UTC) From: "Nick Sarnie" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Nick Sarnie" Message-ID: <1722960601.083e17e3b4331bfbc801ec8c7d5dcda8e487f7fb.sarnex@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/shaderc/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/shaderc/shaderc-2024.1-r1.ebuild X-VCS-Directories: media-libs/shaderc/ X-VCS-Committer: sarnex X-VCS-Committer-Name: Nick Sarnie X-VCS-Revision: 083e17e3b4331bfbc801ec8c7d5dcda8e487f7fb X-VCS-Branch: master Date: Tue, 6 Aug 2024 16:10:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6321b18d-f4ed-4b43-bb27-8ea2588632f8 X-Archives-Hash: 29d75cd54ed31da7f0952761e435cc29 commit: 083e17e3b4331bfbc801ec8c7d5dcda8e487f7fb Author: Nick Sarnie gentoo org> AuthorDate: Tue Aug 6 16:08:58 2024 +0000 Commit: Nick Sarnie gentoo org> CommitDate: Tue Aug 6 16:10:01 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=083e17e3 media-libs/shaderc: Fix deps Closes: https://bugs.gentoo.org/937450 Signed-off-by: Nick Sarnie gentoo.org> media-libs/shaderc/shaderc-2024.1-r1.ebuild | 79 +++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/media-libs/shaderc/shaderc-2024.1-r1.ebuild b/media-libs/shaderc/shaderc-2024.1-r1.ebuild new file mode 100644 index 000000000000..7ffb74097d53 --- /dev/null +++ b/media-libs/shaderc/shaderc-2024.1-r1.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|\$|${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 +}