From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1408247-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 9882A158091
	for <garchives@archives.gentoo.org>; Tue, 14 Jun 2022 17:01:20 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id B3B5EE07F9;
	Tue, 14 Jun 2022 17:01:19 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(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 98E08E07F9
	for <gentoo-commits@lists.gentoo.org>; Tue, 14 Jun 2022 17:01:19 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(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 277EA340ECE
	for <gentoo-commits@lists.gentoo.org>; Tue, 14 Jun 2022 17:01:18 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 6E956105
	for <gentoo-commits@lists.gentoo.org>; Tue, 14 Jun 2022 17:01:16 +0000 (UTC)
From: "Stephan Hartmann" <sultan@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, "Stephan Hartmann" <sultan@gentoo.org>
Message-ID: <1655226070.3d0d39989e1625c57c742f282f6336f66cca0d33.sultan@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/chromium/, www-client/chromium/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: www-client/chromium/chromium-104.0.5110.0.ebuild www-client/chromium/files/chromium-104-swiftshader-no-wayland.patch
X-VCS-Directories: www-client/chromium/ www-client/chromium/files/
X-VCS-Committer: sultan
X-VCS-Committer-Name: Stephan Hartmann
X-VCS-Revision: 3d0d39989e1625c57c742f282f6336f66cca0d33
X-VCS-Branch: master
Date: Tue, 14 Jun 2022 17:01:16 +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: 1ad11ba4-4dde-4f04-8469-5cbf2f2cca46
X-Archives-Hash: 278fb89054e27542c8bfa8f2f2153f7b

commit:     3d0d39989e1625c57c742f282f6336f66cca0d33
Author:     Stephan Hartmann <sultan <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 14 17:00:47 2022 +0000
Commit:     Stephan Hartmann <sultan <AT> gentoo <DOT> org>
CommitDate: Tue Jun 14 17:01:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d0d3998

www-client/chromium: fix building with USE=-wayland

Closes: https://bugs.gentoo.org/851477
Signed-off-by: Stephan Hartmann <sultan <AT> gentoo.org>

 www-client/chromium/chromium-104.0.5110.0.ebuild   |  1 +
 .../chromium-104-swiftshader-no-wayland.patch      | 52 ++++++++++++++++++++++
 2 files changed, 53 insertions(+)

diff --git a/www-client/chromium/chromium-104.0.5110.0.ebuild b/www-client/chromium/chromium-104.0.5110.0.ebuild
index 965ce6985844..64b7e13cd82b 100644
--- a/www-client/chromium/chromium-104.0.5110.0.ebuild
+++ b/www-client/chromium/chromium-104.0.5110.0.ebuild
@@ -312,6 +312,7 @@ src_prepare() {
 		"${FILESDIR}/chromium-98-EnumTable-crash.patch"
 		"${FILESDIR}/chromium-98-gtk4-build.patch"
 		"${FILESDIR}/chromium-104-tflite-system-zlib.patch"
+		"${FILESDIR}/chromium-104-swiftshader-no-wayland.patch"
 		"${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch"
 		"${FILESDIR}/chromium-shim_headers.patch"
 		"${FILESDIR}/chromium-cross-compile.patch"

diff --git a/www-client/chromium/files/chromium-104-swiftshader-no-wayland.patch b/www-client/chromium/files/chromium-104-swiftshader-no-wayland.patch
new file mode 100644
index 000000000000..75f78f36bc3d
--- /dev/null
+++ b/www-client/chromium/files/chromium-104-swiftshader-no-wayland.patch
@@ -0,0 +1,52 @@
+--- a/third_party/swiftshader/src/Vulkan/BUILD.gn
++++ b/third_party/swiftshader/src/Vulkan/BUILD.gn
+@@ -16,14 +16,22 @@ import("//build_overrides/build.gni")
+ import("../swiftshader.gni")
+ import("vulkan.gni")
+ 
++if (is_linux) {
++  import("//build/config/ozone.gni")
++}
++
+ # Need a separate config to ensure the warnings are added to the end.
+ config("swiftshader_libvulkan_private_config") {
+   if (is_linux) {
+     defines = [
+       "VK_USE_PLATFORM_XCB_KHR",
+-      "VK_USE_PLATFORM_WAYLAND_KHR",
+       "VK_EXPORT=__attribute__((visibility(\"default\")))",
+     ]
++    if (ozone_platform_wayland) {
++      defines += [
++        "VK_USE_PLATFORM_WAYLAND_KHR",
++      ]
++    }
+   } else if (is_chromeos) {
+     defines = [
+       "VK_EXPORT=__attribute__((visibility(\"default\")))",
+--- a/third_party/swiftshader/src/WSI/BUILD.gn
++++ b/third_party/swiftshader/src/WSI/BUILD.gn
+@@ -42,15 +42,19 @@ swiftshader_source_set("WSI") {
+ 
+   if (is_linux) {
+     sources += [
+-      "WaylandSurfaceKHR.cpp",
+-      "WaylandSurfaceKHR.hpp",
+       "XcbSurfaceKHR.cpp",
+       "XcbSurfaceKHR.hpp",
+-      "libWaylandClient.cpp",
+-      "libWaylandClient.hpp",
+       "libXCB.cpp",
+       "libXCB.hpp",
+     ]
++    if (ozone_platform_wayland) {
++      sources += [
++        "WaylandSurfaceKHR.cpp",
++        "WaylandSurfaceKHR.hpp",
++        "libWaylandClient.cpp",
++        "libWaylandClient.hpp",
++      ]
++    }
+   }
+ 
+   if (is_win) {