git: 906df1b6f258 - main - multimedia/ffmpeg: fix build with SDL option enabled

From: Stefan Eßer <se_at_FreeBSD.org>
Date: Mon, 19 Sep 2022 07:43:16 UTC
The branch main has been updated by se:

URL: https://cgit.FreeBSD.org/ports/commit/?id=906df1b6f2587c491a86391cea3f1870b0e16977

commit 906df1b6f2587c491a86391cea3f1870b0e16977
Author:     Martin Neubauer <m.ne@gmx.net>
AuthorDate: 2022-09-19 07:38:15 +0000
Commit:     Stefan Eßer <se@FreeBSD.org>
CommitDate: 2022-09-19 07:42:43 +0000

    multimedia/ffmpeg: fix build with SDL option enabled
    
    Since this is a patch that has already applied to the ffmpeg upstream,
    we should either apply this patch or upgrade to an fixed upstream
    version, see:
    
    https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e5163b1d3438
    
    This issue has existed for some time and despite the port being
    upgraded in between, therefore I'll commit the patch under the
    "just fix it" exception granted by portmgr, it can be removed by
    the maintainers when ffmpeg is upgraded to a fixed version.
    
    PR:             266299
    Reported by:    m.ne@gmx.net (Martin Neubauer)
    Approved by:    portmgr (implicit)
---
 multimedia/ffmpeg/files/patch-configure | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/multimedia/ffmpeg/files/patch-configure b/multimedia/ffmpeg/files/patch-configure
index c801515bbac4..ce54ab1bd8f2 100644
--- a/multimedia/ffmpeg/files/patch-configure
+++ b/multimedia/ffmpeg/files/patch-configure
@@ -15,3 +15,12 @@
  cpu="generic"
  intrinsics="none"
  
+@@ -6736,7 +6736,7 @@ fi
+ 
+ if enabled sdl2; then
+     SDL2_CONFIG="${cross_prefix}sdl2-config"
+-    test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 2.1.0" SDL_events.h SDL_PollEvent
++    test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 3.0.0" SDL_events.h SDL_PollEvent
+     if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
+         sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
+         sdl2_extralibs=$("${SDL2_CONFIG}" --libs)