Skip to contentSkip to conversation

meson.build: tweak sdl-image error message

PATCH Applied Sergei Trofimovich 4 participants 4 messages Sep 8, 2020 – Sep 9, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson.build: tweak sdl-image error message

Before the change missing SDL was reported as:

    ../meson.build:253:4: ERROR: Expected 1 arguments, got 2.

After the error as:

../meson.build:258:4: ERROR: Problem encountered: sdl-image required, but SDL was not found

CC Paolo Bonzini <[email protected]>
CC "Marc-André Lureau" <[email protected]>
CC "Philippe Mathieu-Daudé" <[email protected]>
CC Rafael Kitover <[email protected]>
---
 meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meson.build +2 -2
index 04e070bb3b..7fd2a903c5 100644
@@ -255,8 +255,8 @@ if sdl.found()
                          method: 'pkg-config', static: enable_static)
 else
   if get_option('sdl_image').enabled()
-    error('sdl-image required, but SDL was @0@',
-          get_option('sdl').disabled() ? 'disabled' : 'not found')
+    error('sdl-image required, but SDL was @0@'.format(
+          get_option('sdl').disabled() ? 'disabled' : 'not found'))
   endif
   sdl_image = not_found
 endif
Signature · 1 line
2.28.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Sergei Trofimovich

Before the change missing SDL was reported as:

    ../meson.build:253:4: ERROR: Expected 1 arguments, got 2.

After the error as:

Quoted 7 lines

../meson.build:258:4: ERROR: Problem encountered: sdl-image required, but SDL was not found

CC Paolo Bonzini <[email protected]>
CC "Marc-André Lureau" <[email protected]>
CC "Philippe Mathieu-Daudé" <[email protected]>
CC Rafael Kitover <[email protected]>
Quoted 20 lines
---
 meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meson.build +2 -2
index 04e070bb3b..7fd2a903c5 100644
@@ -255,8 +255,8 @@ if sdl.found()
                          method: 'pkg-config', static: enable_static)
 else
   if get_option('sdl_image').enabled()
-    error('sdl-image required, but SDL was @0@',
-          get_option('sdl').disabled() ? 'disabled' : 'not found')
+    error('sdl-image required, but SDL was @0@'.format(
+          get_option('sdl').disabled() ? 'disabled' : 'not found'))
   endif
   sdl_image = not_found
 endif
#2 lore raw
In reply to Sergei Trofimovich

Il mar 8 set 2020, 09:50 Sergei Trofimovich <[email protected]> ha scritto:

Quoted 37 lines

Before the change missing SDL was reported as:

    ../meson.build:253:4: ERROR: Expected 1 arguments, got 2.

After the error as:

../meson.build:258:4: ERROR: Problem encountered: sdl-image required,
but SDL was not found

CC Paolo Bonzini <[email protected]>
CC "Marc-André Lureau" <[email protected]>
CC "Philippe Mathieu-Daudé" <[email protected]>
CC Rafael Kitover <[email protected]>
---
 meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meson.build +2 -3
index 04e070bb3b..7fd2a903c5 100644
@@ -255,8 +255,8 @@ if sdl.found()
                          method: 'pkg-config', static: enable_static)
 else
   if get_option('sdl_image').enabled()
-    error('sdl-image required, but SDL was @0@',
-          get_option('sdl').disabled() ? 'disabled' : 'not found')
+    error('sdl-image required, but SDL was @0@'.format(
+          get_option('sdl').disabled() ? 'disabled' : 'not found'))
   endif
   sdl_image = not_found
 endif
--

2.28.0

#3 lore raw

Le 08/09/2020 à 10:24, Paolo Bonzini a écrit :

Quoted 35 lines

Il mar 8 set 2020, 09:50 Sergei Trofimovich <[email protected] <mailto:[email protected]>> ha scritto:

Before the change missing SDL was reported as:

    ../meson.build:253:4: ERROR: Expected 1 arguments, got 2.

After the error as:

    ../meson.build:258:4: ERROR: Problem encountered: sdl-image required, but SDL was not found

CC: Paolo Bonzini <[email protected] <mailto:[email protected]>>
CC: "Marc-André Lureau" <[email protected] <mailto:[email protected]>>
CC: "Philippe Mathieu-Daudé" <[email protected] <mailto:[email protected]>>

<mailto:[email protected]>>
---
 meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index 04e070bb3b..7fd2a903c5 100644
--- a/meson.build
+++ b/meson.build
@@ -255,8 +255,8 @@ if sdl.found()
                          method: 'pkg-config', static: enable_static) else
   if get_option('sdl_image').enabled()
-    error('sdl-image required, but SDL was @0@',

Quoted 9 lines

-          get_option('sdl').disabled() ? 'disabled' : 'not found') +    error('sdl-image required, but SDL was @0@'.format( +          get_option('sdl').disabled() ? 'disabled' : 'not found')) endif
   sdl_image = not_found
 endif
--
2.28.0

Applied to my trivial-patches branch.

Thanks,
Laurent