diff mbox series

[FFmpeg-devel,v2] configure: add check for sdl2 >= 2.23.0

Message ID 20220511052257.174499-1-ccom@randomderp.com
State New
Headers show
Series [FFmpeg-devel,v2] configure: add check for sdl2 >= 2.23.0 | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Christopher Degawa May 11, 2022, 5:22 a.m. UTC
sdl2 recently changed their versioning, moving the patch level to minor level
https://github.com/libsdl-org/SDL/commit/cd7c2f1de7d9e418bb554047d714dd7cacc020ff

trac: https://trac.ffmpeg.org/ticket/9768

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
---
 configure | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Hendrik Leppkes May 11, 2022, 5:58 a.m. UTC | #1
On Wed, May 11, 2022 at 7:23 AM Christopher Degawa <ccom@randomderp.com> wrote:
>
> sdl2 recently changed their versioning, moving the patch level to minor level
> https://github.com/libsdl-org/SDL/commit/cd7c2f1de7d9e418bb554047d714dd7cacc020ff
>
> trac: https://trac.ffmpeg.org/ticket/9768
>
> Signed-off-by: Christopher Degawa <ccom@randomderp.com>
> ---
>  configure | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/configure b/configure
> index 4d2f4d9112..0fdab7391e 100755
> --- a/configure
> +++ b/configure
> @@ -6743,6 +6743,13 @@ 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
> +    # sdl2 changed their versioning scheme to match GLib and flatpack moving the patch to
> +    # minor instead in
> +    # https://github.com/libsdl-org/SDL/commit/cd7c2f1de7d9e418bb554047d714dd7cacc020ff
> +    # which obviously breaks the previous check, so go ahead and check for the new version
> +    if disabled sdl2; then
> +        test_pkg_config sdl2 "sdl2 >= 2.23.0 sdl2 < 3.0.0" SDL_events.h SDL_PollEvent
> +    fi
>      if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
>          sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
>          sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
> --

There never was an "incompatible" 2.1.0 right? So can't you just
update the previous check to be >= 2.01 < 3.0 instead of introducing a
second one?

- Hendrik
diff mbox series

Patch

diff --git a/configure b/configure
index 4d2f4d9112..0fdab7391e 100755
--- a/configure
+++ b/configure
@@ -6743,6 +6743,13 @@  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
+    # sdl2 changed their versioning scheme to match GLib and flatpack moving the patch to
+    # minor instead in
+    # https://github.com/libsdl-org/SDL/commit/cd7c2f1de7d9e418bb554047d714dd7cacc020ff
+    # which obviously breaks the previous check, so go ahead and check for the new version
+    if disabled sdl2; then
+        test_pkg_config sdl2 "sdl2 >= 2.23.0 sdl2 < 3.0.0" SDL_events.h SDL_PollEvent
+    fi
     if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
         sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
         sdl2_extralibs=$("${SDL2_CONFIG}" --libs)