From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1454913-garchives=archives.gentoo.org@lists.gentoo.org>
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))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 7714A158021
	for <garchives@archives.gentoo.org>; Tue,  8 Nov 2022 23:57:28 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 7E414E09CE;
	Tue,  8 Nov 2022 23:57:27 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.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))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 67BC2E09CE
	for <gentoo-commits@lists.gentoo.org>; Tue,  8 Nov 2022 23:57:27 +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))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 7E284340EC9
	for <gentoo-commits@lists.gentoo.org>; Tue,  8 Nov 2022 23:57:26 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id CD3A670D
	for <gentoo-commits@lists.gentoo.org>; Tue,  8 Nov 2022 23:57:24 +0000 (UTC)
From: "Nick Sarnie" <sarnex@gentoo.org>
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" <sarnex@gentoo.org>
Message-ID: <1667951803.d24ca1e26b11e466ebf87e92e60b0953c4a7e74a.sarnex@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/shaderc/
X-VCS-Repository: repo/gentoo
X-VCS-Files: media-libs/shaderc/Manifest media-libs/shaderc/shaderc-2022.3.ebuild
X-VCS-Directories: media-libs/shaderc/
X-VCS-Committer: sarnex
X-VCS-Committer-Name: Nick Sarnie
X-VCS-Revision: d24ca1e26b11e466ebf87e92e60b0953c4a7e74a
X-VCS-Branch: master
Date: Tue,  8 Nov 2022 23:57:24 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: d1a7d1c1-767f-44b0-8833-543c33c7401d
X-Archives-Hash: 6bd3acf720763de473d28841e118864d

commit:     d24ca1e26b11e466ebf87e92e60b0953c4a7e74a
Author:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  6 00:49:15 2022 +0000
Commit:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Tue Nov  8 23:56:43 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d24ca1e2

media-libs/shaderc: add 2022.3

Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>

 media-libs/shaderc/Manifest              |  1 +
 media-libs/shaderc/shaderc-2022.3.ebuild | 79 ++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+)

diff --git a/media-libs/shaderc/Manifest b/media-libs/shaderc/Manifest
index 157bd0b00fcb..3b1d30e0ec48 100644
--- a/media-libs/shaderc/Manifest
+++ b/media-libs/shaderc/Manifest
@@ -1 +1,2 @@
 DIST shaderc-2022.2.tar.gz 223386 BLAKE2B feb18bef51bea72574d784d4992e5b8514b0d1d70fbd9194ad842a361740ed3d66c6c3d2cf6114a0ef77279845ab686d01ad5fcd91cbddcc289cee4e521aec6a SHA512 85962f17d07496ba4cef3ad62dc7fd1967ff628449ceb1fec77336211fddbd2554ea94e5558cfaf2cfe4dcfdf6f56744d905714be7dbb776ba2bcd67e4665039
+DIST shaderc-2022.3.tar.gz 223478 BLAKE2B 6b00677464a916618f0f204c650a89a3a74fcfd463a4e9476f16f8ff3f1079979da2e42f30dff93ddb1d509cb117c03e50508661f8de892157334ad0e477fd3c SHA512 a0ac3350defb89e39de79eba64a3648d24fd4d764be2df3193cabc1976d4a8f6bd8ebe296b02cc53788c8b74d66e8bcea3fe1266f7ad1c7e0e5a0d70ecb842ee

diff --git a/media-libs/shaderc/shaderc-2022.3.ebuild b/media-libs/shaderc/shaderc-2022.3.ebuild
new file mode 100644
index 000000000000..5098336ac7d9
--- /dev/null
+++ b/media-libs/shaderc/shaderc-2022.3.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+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 ~ppc64 ~x86"
+IUSE="doc"
+
+RDEPEND="
+	>=dev-util/glslang-1.3.231:=[${MULTILIB_USEDEP}]
+	>=dev-util/spirv-tools-1.3.231[${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}
+	${PYTHON_DEPS}
+	>=dev-util/spirv-headers-1.3.231"
+
+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
+}