File webkit2gtk3-epoxy140.patch of Package webkit2gtk3.36120
diff -urpN webkitgtk-2.45.92.orig/Source/cmake/OptionsGTK.cmake webkitgtk-2.45.92/Source/cmake/OptionsGTK.cmake --- webkitgtk-2.45.92.orig/Source/cmake/OptionsGTK.cmake 2024-09-12 14:08:19.731636354 -0500 +++ webkitgtk-2.45.92/Source/cmake/OptionsGTK.cmake 2024-09-12 14:08:32.775148574 -0500 @@ -13,7 +13,7 @@ find_package(Libtasn1 REQUIRED) find_package(HarfBuzz 1.4.2 REQUIRED COMPONENTS ICU) find_package(ICU 61.2 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.8.0 REQUIRED) find_package(PNG REQUIRED) find_package(SQLite3 REQUIRED) diff -urpN webkitgtk-2.45.92.orig/Source/WebCore/platform/graphics/egl/GLContext.cpp webkitgtk-2.45.92/Source/WebCore/platform/graphics/egl/GLContext.cpp --- webkitgtk-2.45.92.orig/Source/WebCore/platform/graphics/egl/GLContext.cpp 2024-08-26 00:35:50.266169800 -0500 +++ webkitgtk-2.45.92/Source/WebCore/platform/graphics/egl/GLContext.cpp 2024-09-12 14:08:32.775148574 -0500 @@ -25,11 +25,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.45.92.orig/Source/WebCore/platform/graphics/egl/GLContextLibWPE.cpp webkitgtk-2.45.92/Source/WebCore/platform/graphics/egl/GLContextLibWPE.cpp --- webkitgtk-2.45.92.orig/Source/WebCore/platform/graphics/egl/GLContextLibWPE.cpp 2024-08-19 01:28:39.391271800 -0500 +++ webkitgtk-2.45.92/Source/WebCore/platform/graphics/egl/GLContextLibWPE.cpp 2024-09-12 14:08:32.775148574 -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.45.92.orig/Source/WebCore/platform/graphics/epoxy/EpoxyEGL.h webkitgtk-2.45.92/Source/WebCore/platform/graphics/epoxy/EpoxyEGL.h --- webkitgtk-2.45.92.orig/Source/WebCore/platform/graphics/epoxy/EpoxyEGL.h 1969-12-31 18:00:00.000000000 -0600 +++ webkitgtk-2.45.92/Source/WebCore/platform/graphics/epoxy/EpoxyEGL.h 2024-09-12 14:08:32.775148574 -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.45.92.orig/Source/WebCore/platform/graphics/PlatformDisplay.cpp webkitgtk-2.45.92/Source/WebCore/platform/graphics/PlatformDisplay.cpp --- webkitgtk-2.45.92.orig/Source/WebCore/platform/graphics/PlatformDisplay.cpp 2024-08-22 06:14:10.757784000 -0500 +++ webkitgtk-2.45.92/Source/WebCore/platform/graphics/PlatformDisplay.cpp 2024-09-12 14:08:32.775148574 -0500 @@ -37,7 +37,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.45.92.orig/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp webkitgtk-2.45.92/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp --- webkitgtk-2.45.92.orig/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp 2024-08-19 01:28:39.423271000 -0500 +++ webkitgtk-2.45.92/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp 2024-09-12 14:08:32.775148574 -0500 @@ -37,7 +37,7 @@ #include <unistd.h> #if USE(LIBEPOXY) -#include <epoxy/egl.h> +#include <EpoxyEGL.h> #else #include <EGL/egl.h> #include <EGL/eglext.h> diff -urpN webkitgtk-2.45.92.orig/Source/WebCore/platform/xr/openxr/OpenXRUtils.h webkitgtk-2.45.92/Source/WebCore/platform/xr/openxr/OpenXRUtils.h --- webkitgtk-2.45.92.orig/Source/WebCore/platform/xr/openxr/OpenXRUtils.h 2024-08-19 01:28:39.507268400 -0500 +++ webkitgtk-2.45.92/Source/WebCore/platform/xr/openxr/OpenXRUtils.h 2024-09-12 14:08:32.775148574 -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