Libepoxy add patch (#24646)

* libepoxy: Add patch to fix use of uninitialized dispatch table

Fixes #24571

* libepoxy: Remove unused patch
This commit is contained in:
lb90 2025-06-28 10:52:00 +02:00 committed by GitHub
parent d37c920049
commit b980eade76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 76 additions and 14 deletions

View File

@ -0,0 +1,70 @@
From ee931cf79f5d0d138d5547a3d771cc8f49881483 Mon Sep 17 00:00:00 2001
From: Luca Bacci <luca.bacci982@gmail.com>
Date: Wed, 25 Jun 2025 15:41:18 +0200
Subject: [PATCH] Ensure dispatch table initialization
Fixes https://github.com/msys2/MINGW-packages/issues/24571
---
src/dispatch_wgl.c | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/src/dispatch_wgl.c b/src/dispatch_wgl.c
index 7baf130..a65ee01 100644
--- a/src/dispatch_wgl.c
+++ b/src/dispatch_wgl.c
@@ -144,11 +144,9 @@ DllMain(HINSTANCE dll, DWORD reason, LPVOID reserved)
WRAPPER_VISIBILITY (BOOL)
WRAPPER(epoxy_wglMakeCurrent)(HDC hdc, HGLRC hglrc)
{
- BOOL ret = epoxy_wglMakeCurrent_unwrapped(hdc, hglrc);
-
epoxy_handle_external_wglMakeCurrent();
- return ret;
+ return epoxy_wglMakeCurrent_unwrapped(hdc, hglrc);
}
@@ -157,12 +155,9 @@ WRAPPER(epoxy_wglMakeContextCurrentARB)(HDC hDrawDC,
HDC hReadDC,
HGLRC hglrc)
{
- BOOL ret = epoxy_wglMakeContextCurrentARB_unwrapped(hDrawDC, hReadDC,
- hglrc);
-
epoxy_handle_external_wglMakeCurrent();
- return ret;
+ return epoxy_wglMakeContextCurrentARB_unwrapped(hDrawDC, hReadDC, hglrc);
}
@@ -171,23 +166,18 @@ WRAPPER(epoxy_wglMakeContextCurrentEXT)(HDC hDrawDC,
HDC hReadDC,
HGLRC hglrc)
{
- BOOL ret = epoxy_wglMakeContextCurrentEXT_unwrapped(hDrawDC, hReadDC,
- hglrc);
-
epoxy_handle_external_wglMakeCurrent();
- return ret;
+ return epoxy_wglMakeContextCurrentEXT_unwrapped(hDrawDC, hReadDC, hglrc);
}
WRAPPER_VISIBILITY (BOOL)
WRAPPER(epoxy_wglMakeAssociatedContextCurrentAMD)(HGLRC hglrc)
{
- BOOL ret = epoxy_wglMakeAssociatedContextCurrentAMD_unwrapped(hglrc);
-
epoxy_handle_external_wglMakeCurrent();
- return ret;
+ return epoxy_wglMakeAssociatedContextCurrentAMD_unwrapped(hglrc);
}
PFNWGLMAKECURRENTPROC epoxy_wglMakeCurrent = epoxy_wglMakeCurrent_wrapped;
--
2.49.0.windows.1

View File

@ -1,11 +0,0 @@
--- libepoxy-1.5.10/include/epoxy/common.h.orig 2025-06-16 22:22:26.475976900 +0300
+++ libepoxy-1.5.10/include/epoxy/common.h 2025-06-16 22:22:41.998741600 +0300
@@ -38,7 +38,7 @@
#endif
#ifndef EPOXY_PUBLIC
-# if defined(_MSC_VER)
+# if defined(_WIN32)
# define EPOXY_PUBLIC __declspec(dllimport) extern
# else
# define EPOXY_PUBLIC extern

View File

@ -4,7 +4,7 @@ _realname=libepoxy
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.5.10
pkgrel=6
pkgrel=7
pkgdesc="A library for handling OpenGL function pointer management for you (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
@ -20,17 +20,20 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
source=("https://github.com/anholt/libepoxy/archive/${pkgver}/${_realname}-${pkgver}.tar.gz"
"001-egl-missing-prototype.patch"
"https://github.com/anholt/libepoxy/pull/285.patch"
"https://github.com/anholt/libepoxy/pull/294.patch")
"https://github.com/anholt/libepoxy/pull/294.patch"
"0001-Ensure-dispatch-table-initialization.patch")
sha256sums=('a7ced37f4102b745ac86d6a70a9da399cc139ff168ba6b8002b4d8d43c900c15'
'5fb6b63e93cb92052f25c0ac230f3b4d89054a28e02dc37a42eb9f866cd0cbc1'
'e86994609738190e9fb84ea96184639a1282ee4eee5a5ae0272d9a2d83a802ce'
'3ef53c2126e3a27bc090f40bbc423ae70e08edbc6291a74f22a0bebcd00da8a8')
'3ef53c2126e3a27bc090f40bbc423ae70e08edbc6291a74f22a0bebcd00da8a8'
'd035fc71735ce8364cb2e8c4783c9e0396bc84bff29221de48f152bd36e60b9f')
prepare() {
cd ${_realname}-${pkgver}
patch -p1 -i ${srcdir}/001-egl-missing-prototype.patch
patch -p1 -i ${srcdir}/285.patch
patch -p1 -i ${srcdir}/294.patch
patch -p1 -i ${srcdir}/0001-Ensure-dispatch-table-initialization.patch
}
build() {