media-libs/libsdl2: Fix build with >=gui-libs/libdecor-0.2.0

This applies https://github.com/libsdl-org/SDL/commit/4ce935b9106a0311436e41c5f28f00db30a93de1
to libsdl2-2.28.

Closes: https://bugs.gentoo.org/936443
Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/37657
Closes: https://bugs.gentoo.org/936020
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
This commit is contained in:
Sv. Lockal
2024-08-01 02:59:55 -04:00
committed by Eli Schwartz
parent 943614ccef
commit 4da31bd05c
2 changed files with 20 additions and 0 deletions
@@ -0,0 +1,19 @@
Fix static build with libdecor 0.2.0
Backports https://github.com/libsdl-org/SDL/commit/4ce935b9106a0311436e41c5f28f00db30a93de1 to libsdl2-2.28
Bug: https://bugs.gentoo.org/936443
--- a/src/video/wayland/SDL_waylandsym.h
+++ b/src/video/wayland/SDL_waylandsym.h
@@ -221,10 +221,10 @@ SDL_WAYLAND_SYM(int, libdecor_dispatch, (struct libdecor *, int))
#if defined(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR) || defined(SDL_HAVE_LIBDECOR_VER_0_2_0)
/* Only found in libdecor 0.1.1 or higher, so failure to load them is not fatal. */
-SDL_WAYLAND_SYM_OPT(void, libdecor_frame_get_min_content_size, (struct libdecor_frame *,\
+SDL_WAYLAND_SYM_OPT(void, libdecor_frame_get_min_content_size, (const struct libdecor_frame *,\
int *,\
int *))
-SDL_WAYLAND_SYM_OPT(void, libdecor_frame_get_max_content_size, (struct libdecor_frame *,\
+SDL_WAYLAND_SYM_OPT(void, libdecor_frame_get_max_content_size, (const struct libdecor_frame *,\
int *,\
int *))
#endif
@@ -105,6 +105,7 @@ MULTILIB_WRAPPED_HEADERS=(
PATCHES=(
"${FILESDIR}"/${PN}-2.0.16-static-libs.patch
"${FILESDIR}"/${PN}-2.28.5-fix-libdecor-0.2.patch
)
src_prepare() {