summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Hartmann <sultan@gentoo.org>2022-06-14 19:00:47 +0200
committerStephan Hartmann <sultan@gentoo.org>2022-06-14 19:01:10 +0200
commit3d0d39989e1625c57c742f282f6336f66cca0d33 (patch)
tree8a635ab57854fa8614be5047926119a3b2c55d21 /www-client/chromium
parentdev-libs/libffi: Stabilize 3.4.2-r1 hppa, #813756 (diff)
downloadgentoo-3d0d39989e1625c57c742f282f6336f66cca0d33.tar.gz
gentoo-3d0d39989e1625c57c742f282f6336f66cca0d33.tar.bz2
gentoo-3d0d39989e1625c57c742f282f6336f66cca0d33.zip
www-client/chromium: fix building with USE=-wayland
Closes: https://bugs.gentoo.org/851477 Signed-off-by: Stephan Hartmann <sultan@gentoo.org>
Diffstat (limited to 'www-client/chromium')
-rw-r--r--www-client/chromium/chromium-104.0.5110.0.ebuild1
-rw-r--r--www-client/chromium/files/chromium-104-swiftshader-no-wayland.patch52
2 files changed, 53 insertions, 0 deletions
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) {