File webkit2gtk3-epoxy140.patch of Package webkit2gtk3.38159

diff -urpN webkitgtk-2.47.90.orig/Source/cmake/OptionsGTK.cmake webkitgtk-2.47.90/Source/cmake/OptionsGTK.cmake
--- webkitgtk-2.47.90.orig/Source/cmake/OptionsGTK.cmake	2025-03-11 12:05:08.429322196 -0500
+++ webkitgtk-2.47.90/Source/cmake/OptionsGTK.cmake	2025-03-11 12:08:01.717343563 -0500
@@ -14,7 +14,7 @@ find_package(Libtasn1 REQUIRED)
 find_package(HarfBuzz 2.7.4 REQUIRED COMPONENTS ICU)
 find_package(ICU 70.1 REQUIRED COMPONENTS data i18n uc)
 find_package(JPEG REQUIRED)
-find_package(Epoxy 1.5.4 REQUIRED)
+find_package(Epoxy 1.4.0 REQUIRED)
 find_package(LibXml2 2.9.13 REQUIRED)
 find_package(PNG REQUIRED)
 find_package(SQLite3 REQUIRED)
diff -urpN webkitgtk-2.47.90.orig/Source/WebCore/platform/graphics/egl/GLContext.cpp webkitgtk-2.47.90/Source/WebCore/platform/graphics/egl/GLContext.cpp
--- webkitgtk-2.47.90.orig/Source/WebCore/platform/graphics/egl/GLContext.cpp	2025-02-25 02:25:41.447393000 -0600
+++ webkitgtk-2.47.90/Source/WebCore/platform/graphics/egl/GLContext.cpp	2025-03-11 12:05:24.327366978 -0500
@@ -26,11 +26,15 @@
 #include <wtf/text/StringToIntegerConversion.h>
 
 #if USE(LIBEPOXY)
-#include <epoxy/egl.h>
-#include <epoxy/gl.h>
+#include <EpoxyEGL.h>
 #else
 #include <EGL/egl.h>
 #include <EGL/eglext.h>
+#endif
+
+#if USE(LIBEPOXY)
+#include <epoxy/gl.h>
+#else
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
 #endif
diff -urpN webkitgtk-2.47.90.orig/Source/WebCore/platform/graphics/egl/GLContextLibWPE.cpp webkitgtk-2.47.90/Source/WebCore/platform/graphics/egl/GLContextLibWPE.cpp
--- webkitgtk-2.47.90.orig/Source/WebCore/platform/graphics/egl/GLContextLibWPE.cpp	2025-02-25 02:25:41.447393000 -0600
+++ webkitgtk-2.47.90/Source/WebCore/platform/graphics/egl/GLContextLibWPE.cpp	2025-03-11 12:05:24.327954208 -0500
@@ -26,7 +26,7 @@
 // FIXME: For now default to the GBM EGL platform, but this should really be
 // somehow deducible from the build configuration.
 #define __GBM__ 1
-#include <epoxy/egl.h>
+#include <EpoxyEGL.h>
 #else
 #if PLATFORM(WAYLAND)
 // These includes need to be in this order because wayland-egl.h defines WL_EGL_PLATFORM
diff -urpN webkitgtk-2.47.90.orig/Source/WebCore/platform/graphics/epoxy/EpoxyEGL.h webkitgtk-2.47.90/Source/WebCore/platform/graphics/epoxy/EpoxyEGL.h
--- webkitgtk-2.47.90.orig/Source/WebCore/platform/graphics/epoxy/EpoxyEGL.h	1969-12-31 18:00:00.000000000 -0600
+++ webkitgtk-2.47.90/Source/WebCore/platform/graphics/epoxy/EpoxyEGL.h	2025-03-11 12:05:24.328624796 -0500
@@ -0,0 +1,38 @@
+
+/*
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <epoxy/egl.h>
+
+// Provide the EGL_CAST macro in case the eglplatform.h header doesn't define it already.
+#ifndef EGL_CAST
+#if defined(__cplusplus)
+#define EGL_CAST(type, value) (static_cast<type>(value))
+#else
+#define EGL_CAST(type, value) ((type) (value))
+#endif
+#endif
diff -urpN webkitgtk-2.47.90.orig/Source/WebCore/platform/graphics/PlatformDisplay.cpp webkitgtk-2.47.90/Source/WebCore/platform/graphics/PlatformDisplay.cpp
--- webkitgtk-2.47.90.orig/Source/WebCore/platform/graphics/PlatformDisplay.cpp	2025-02-25 02:25:41.407391800 -0600
+++ webkitgtk-2.47.90/Source/WebCore/platform/graphics/PlatformDisplay.cpp	2025-03-11 12:05:24.328976351 -0500
@@ -38,7 +38,7 @@
 #endif
 
 #if USE(LIBEPOXY)
-#include <epoxy/egl.h>
+#include <EpoxyEGL.h>
 #else
 #include <EGL/egl.h>
 #include <EGL/eglext.h>
diff -urpN webkitgtk-2.47.90.orig/Source/WebCore/platform/xr/openxr/OpenXRUtils.h webkitgtk-2.47.90/Source/WebCore/platform/xr/openxr/OpenXRUtils.h
--- webkitgtk-2.47.90.orig/Source/WebCore/platform/xr/openxr/OpenXRUtils.h	2025-02-25 02:25:41.571395900 -0600
+++ webkitgtk-2.47.90/Source/WebCore/platform/xr/openxr/OpenXRUtils.h	2025-03-11 12:05:45.875789145 -0500
@@ -24,7 +24,7 @@
 // EGL symbols required by openxr_platform.h
 #if USE(LIBEPOXY)
 #define __GBM__ 1
-#include <epoxy/egl.h>
+#include <EpoxyEGL.h>
 #else
 #include <EGL/egl.h>
 #endif
openSUSE Build Service is sponsored by