Skip to contentSkip to conversation

gtk/sdl: use newer versions by default, deprecate the old ones.

PATCH In review Gerd Hoffmann 2 participants 6 messages Jun 6, 2017

lore
Share & tools
lore
#0 lore raw

cover gtk/sdl: use newer versions by default, deprecate the old ones.

Hi,

High time to use new versions (gtk3 and SDL2) by default. This patch series switches over qemu to prefer the newer versions and adds a deprecation warning for the old versions.

Note that qemu uses the new versions automatically for quite a while already in case the older isn't installed.

cheers,
Gerd

Gerd Hoffmann (4):
gtk: prefer gtk3 over gtk2
sdl: prefer sdl2 over sdl1
gtk: add deprecation warning for gtk2
sdl: add deprecation warning for sdl1

 configure | 36 ++++++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 12 deletions(-)
Signature · 1 line
2.9.3
#1 lore raw

PATCH 1/4 gtk: prefer gtk3 over gtk2

In case the configure script finds both gtk2 and gtk3 installed it still prefers gtk2 over gtk3. Prefer gtk3 instead.

---
 configure | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
configure +7 -7
index 13e040d28c..b75b9c57c0 100755
@@ -2325,14 +2325,14 @@ fi
 # GTK probe
 
 if test "$gtkabi" = ""; then
-    # The GTK ABI was not specified explicitly, so try whether 2.0 is available.
-    # Use 3.0 as a fallback if that is available.
-    if $pkg_config --exists "gtk+-2.0 >= 2.18.0"; then
-        gtkabi=2.0
-    elif $pkg_config --exists "gtk+-3.0 >= 3.0.0"; then
+    # The GTK ABI was not specified explicitly, so try whether 3.0 is available.
+    # Use 2.0 as a fallback if that is available.
+    if $pkg_config --exists "gtk+-3.0 >= 3.0.0"; then
         gtkabi=3.0
+    elif $pkg_config --exists "gtk+-2.0 >= 2.18.0"; then
+        gtkabi=2.0
     else
-        gtkabi=2.0
+        gtkabi=3.0
     fi
 fi
 
@@ -2355,7 +2355,7 @@ if test "$gtk" != "no"; then
         libs_softmmu="$gtk_libs $libs_softmmu"
         gtk="yes"
     elif test "$gtk" = "yes"; then
-        feature_not_found "gtk" "Install gtk2 or gtk3 devel"
+        feature_not_found "gtk" "Install gtk3-devel"
     else
         gtk="no"
     fi
Signature · 1 line
2.9.3
#2 lore raw

PATCH 2/4 sdl: prefer sdl2 over sdl1

In reply to Gerd Hoffmann

In case the configure script finds both SDL 1.2 and SDL 2.x installed it still prefers SDL 1.2. Prefer SDL 2.x instead.

---
 configure | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
configure +5 -5
index b75b9c57c0..44c773a5cd 100755
@@ -2622,12 +2622,12 @@ fi
 # sdl-config even without cross prefix, and favour pkg-config over sdl-config.
 
 if test "$sdlabi" = ""; then
-    if $pkg_config --exists "sdl"; then
-        sdlabi=1.2
-    elif $pkg_config --exists "sdl2"; then
+    if $pkg_config --exists "sdl2"; then
         sdlabi=2.0
+    elif $pkg_config --exists "sdl"; then
+        sdlabi=1.2
     else
-        sdlabi=1.2
+        sdlabi=2.0
     fi
 fi
 
@@ -2654,7 +2654,7 @@ elif has ${sdl_config}; then
   sdlversion=$($sdlconfig --version)
 else
   if test "$sdl" = "yes" ; then
-    feature_not_found "sdl" "Install SDL devel"
+    feature_not_found "sdl" "Install SDL2-devel"
   fi
   sdl=no
 fi
Signature · 1 line
2.9.3
#3 lore raw

PATCH 3/4 gtk: add deprecation warning for gtk2

In reply to Gerd Hoffmann
---
 configure | 6 ++++++
 1 file changed, 6 insertions(+)
configure +6 -0
index 44c773a5cd..41c213b378 100755
@@ -5245,6 +5245,12 @@ if test "$supported_os" = "no"; then
     echo "us upstream at [email protected]."
 fi
 
+if test "$gtkabi" = "2.0"; then
+    echo
+    echo "WARNING: Support for gtk2 will be dropped in future releases."
+    echo "WARNING: Please consider using gtk3 instead."
+fi
+
 config_host_mak="config-host.mak"
 
 echo "# Automatically generated by configure - do not modify" >config-all-disas.mak
Signature · 1 line
2.9.3
#4 lore raw

PATCH 4/4 sdl: add deprecation warning for sdl1

In reply to Gerd Hoffmann
---
 configure | 6 ++++++
 1 file changed, 6 insertions(+)
configure +6 -0
index 41c213b378..5af180c57d 100755
@@ -5251,6 +5251,12 @@ if test "$gtkabi" = "2.0"; then
     echo "WARNING: Please consider using gtk3 instead."
 fi
 
+if test "$sdlabi" = "1.2"; then
+    echo
+    echo "WARNING: Support for SDL 1.2.x will be dropped in future releases."
+    echo "WARNING: Please consider using SDL 2.x instead."
+fi
+
 config_host_mak="config-host.mak"
 
 echo "# Automatically generated by configure - do not modify" >config-all-disas.mak
Signature · 1 line
2.9.3
Reviewed-by on the v1 series
#5 lore raw
In reply to Gerd Hoffmann
Quoted 9 lines · Gerd Hoffmann

Hi,

High time to use new versions (gtk3 and SDL2) by default. This patch series switches over qemu to prefer the newer versions and adds a deprecation warning for the old versions.

Note that qemu uses the new versions automatically for quite a while already in case the older isn't installed.

Quoted 9 lines

cheers,
Gerd

Gerd Hoffmann (4):
gtk: prefer gtk3 over gtk2
sdl: prefer sdl2 over sdl1
gtk: add deprecation warning for gtk2
sdl: add deprecation warning for sdl1

That's a relieve :)

Quoted 8 lines
  configure | 36 ++++++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 12 deletions(-)

--
2.9.3

--

Marc-André Lureau