wxGTK-3.2.1-wayland-control.patch 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. From d886c4cada68ed5bfdca72de846182be63f2619e Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
  3. Date: Mon, 19 Dec 2022 11:30:58 +0100
  4. Subject: [PATCH] configure.in: Allow disabling Wayland support
  5. ---
  6. This patch is not forwarded upstream since, AFAIK, the autoconf+bakefile build
  7. system is currently in the process of being replaced.
  8. This patch enables us to explicitly disable GDK wayland platform detection via
  9. an enable flag. It doesn't implement failed detection logic since that
  10. shouldn't happen in the scenario Portage is in. This patch also runs includes
  11. patches for the configure script itself, because the configuration was
  12. generated by a seemingly patched Autoconf 2.69.
  13. configure | 53 +++++++++++++++++++++++++++++++++++++++++++---------
  14. configure.in | 37 ++++++++++++++++++++----------------
  15. 2 files changed, 65 insertions(+), 25 deletions(-)
  16. diff --git a/configure b/configure
  17. index 54eb7a7..b6d5e52 100755
  18. --- a/configure
  19. +++ b/configure
  20. @@ -1218,6 +1218,7 @@ enable_textfile
  21. enable_timer
  22. enable_variant
  23. enable_zipstream
  24. +enable_wayland
  25. enable_url
  26. enable_protocol
  27. enable_protocol_http
  28. @@ -2190,6 +2191,7 @@ Optional Features:
  29. --enable-timer use wxTimer class
  30. --enable-variant use wxVariant class
  31. --enable-zipstream use wxZip streams
  32. + --enable-wayland allow using Wayland EGL backend
  33. --enable-url use wxURL class
  34. --enable-protocol use wxProtocol class
  35. --enable-protocol-http HTTP support in wxProtocol
  36. @@ -8228,6 +8230,35 @@ fi
  37. eval "$wx_cv_use_zipstream"
  38. + enablestring=
  39. + defaultval=$wxUSE_ALL_FEATURES
  40. + if test -z "$defaultval"; then
  41. + if test x"$enablestring" = xdisable; then
  42. + defaultval=yes
  43. + else
  44. + defaultval=no
  45. + fi
  46. + fi
  47. +
  48. + # Check whether --enable-wayland was given.
  49. +if test "${enable_wayland+set}" = set; then :
  50. + enableval=$enable_wayland;
  51. + if test "$enableval" = yes; then
  52. + wx_cv_use_wayland='wxUSE_WAYLAND=yes'
  53. + else
  54. + wx_cv_use_wayland='wxUSE_WAYLAND=no'
  55. + fi
  56. +
  57. +else
  58. +
  59. + wx_cv_use_wayland='wxUSE_WAYLAND=${'DEFAULT_wxUSE_WAYLAND":-$defaultval}"
  60. +
  61. +fi
  62. +
  63. +
  64. + eval "$wx_cv_use_wayland"
  65. +
  66. +
  67. enablestring=
  68. defaultval=$wxUSE_ALL_FEATURES
  69. @@ -29335,26 +29366,27 @@ done
  70. TOOLKIT=GTK
  71. GUIDIST=GTK_DIST
  72. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK Wayland backend" >&5
  73. + if test x"$wxUSE_WAYLAND" = xyes; then
  74. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK Wayland backend" >&5
  75. $as_echo_n "checking for GDK Wayland backend... " >&6; }
  76. if ${wx_cv_gdk_wayland+:} false; then :
  77. $as_echo_n "(cached) " >&6
  78. else
  79. - save_CFLAGS=$CFLAGS
  80. - CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
  81. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  82. + save_CFLAGS=$CFLAGS
  83. + CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
  84. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  85. /* end confdefs.h. */
  86. - #include <gdk/gdk.h>
  87. + #include <gdk/gdk.h>
  88. int
  89. main ()
  90. {
  91. - #ifndef GDK_WINDOWING_WAYLAND
  92. - Not GDK Windowing Wayland
  93. - #endif
  94. + #ifndef GDK_WINDOWING_WAYLAND
  95. + Not GDK Windowing Wayland
  96. + #endif
  97. ;
  98. return 0;
  99. @@ -29367,11 +29399,14 @@ else
  100. fi
  101. rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  102. - CFLAGS=$save_CFLAGS
  103. + CFLAGS=$save_CFLAGS
  104. fi
  105. { $as_echo "$as_me:${as_lineno-$LINENO}: result: $wx_cv_gdk_wayland" >&5
  106. $as_echo "$wx_cv_gdk_wayland" >&6; }
  107. + else
  108. + wx_cv_gdk_wayland=no
  109. + fi
  110. if test "$wxUSE_GPE" = "yes"; then
  111. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpewidget library" >&5
  112. diff --git a/configure.in b/configure.in
  113. index c76c528..430cdff 100644
  114. --- a/configure.in
  115. +++ b/configure.in
  116. @@ -779,6 +779,7 @@ WX_ARG_FEATURE(textfile, [ --enable-textfile use wxTextFile class],
  117. WX_ARG_FEATURE(timer, [ --enable-timer use wxTimer class], wxUSE_TIMER)
  118. WX_ARG_FEATURE(variant, [ --enable-variant use wxVariant class], wxUSE_VARIANT)
  119. WX_ARG_FEATURE(zipstream, [ --enable-zipstream use wxZip streams], wxUSE_ZIPSTREAM)
  120. +WX_ARG_FEATURE(wayland, [ --enable-wayland allow using Wayland EGL backend], wxUSE_WAYLAND)
  121. dnl URL-related classes
  122. WX_ARG_FEATURE(url, [ --enable-url use wxURL class], wxUSE_URL)
  123. @@ -3292,22 +3293,26 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
  124. TOOLKIT=GTK
  125. GUIDIST=GTK_DIST
  126. - AC_CACHE_CHECK([for GDK Wayland backend], wx_cv_gdk_wayland, [
  127. - save_CFLAGS=$CFLAGS
  128. - CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
  129. - AC_TRY_COMPILE([
  130. - #include <gdk/gdk.h>
  131. - ],
  132. - [
  133. - #ifndef GDK_WINDOWING_WAYLAND
  134. - Not GDK Windowing Wayland
  135. - #endif
  136. - ],
  137. - wx_cv_gdk_wayland=yes,
  138. - wx_cv_gdk_wayland=no
  139. - )
  140. - CFLAGS=$save_CFLAGS
  141. - ])
  142. + if test x"$wxUSE_WAYLAND" = xyes; then
  143. + AC_CACHE_CHECK([for GDK Wayland backend], wx_cv_gdk_wayland, [
  144. + save_CFLAGS=$CFLAGS
  145. + CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
  146. + AC_TRY_COMPILE([
  147. + #include <gdk/gdk.h>
  148. + ],
  149. + [
  150. + #ifndef GDK_WINDOWING_WAYLAND
  151. + Not GDK Windowing Wayland
  152. + #endif
  153. + ],
  154. + wx_cv_gdk_wayland=yes,
  155. + wx_cv_gdk_wayland=no
  156. + )
  157. + CFLAGS=$save_CFLAGS
  158. + ])
  159. + else
  160. + wx_cv_gdk_wayland=no
  161. + fi
  162. dnl test for external libxpm if we're configured to use it
  163. if test "$wxUSE_GPE" = "yes"; then
  164. --
  165. 2.39.0