005_support_disabling_x11_extensions.patch 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. From: Cyril Brulebois <kibi@debian.org>
  2. Date: Fri, 6 Apr 2018 09:22:20 +0100
  3. Subject: Support disabling X11 extensions
  4. We want this in Debian as we build GTK with extensions enabled for the
  5. normal build, but disable them for the special build that will be used
  6. in the graphical installer, because it needs to be as small as possible.
  7. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=612918
  8. Applied-upstream: 2.99.1, commit:ec15c405cf6354e9267e7e6b7ce878c519bffe4c
  9. ---
  10. configure.ac | 23 +++++++++++++++++++----
  11. 1 file changed, 19 insertions(+), 4 deletions(-)
  12. diff --git a/configure.ac b/configure.ac
  13. index 44d3056..02db6e7 100644
  14. --- a/configure.ac
  15. +++ b/configure.ac
  16. @@ -240,6 +240,18 @@ AC_ARG_ENABLE(xinerama,
  17. [AC_HELP_STRING([--enable-xinerama],
  18. [support xinerama extension if available [default=yes]])],,
  19. [enable_xinerama="yes"])
  20. +AC_ARG_ENABLE(xrandr,
  21. + [AC_HELP_STRING([--enable-xrandr],
  22. + [support XRandR extension if available [default=yes]])])
  23. +AC_ARG_ENABLE(xfixes,
  24. + [AC_HELP_STRING([--enable-xfixes],
  25. + [support XFixes extension if available [default=yes]])])
  26. +AC_ARG_ENABLE(xcomposite,
  27. + [AC_HELP_STRING([--enable-xcomposite],
  28. + [support X Composite extension if available [default=yes]])])
  29. +AC_ARG_ENABLE(xdamage,
  30. + [AC_HELP_STRING([--enable-xdamage],
  31. + [support X Damage extension if available [default=yes]])])
  32. AC_ARG_ENABLE(rebuilds,
  33. [AC_HELP_STRING([--disable-rebuilds],
  34. [disable all source autogeneration rules])],,
  35. @@ -1189,7 +1201,8 @@ if test "x$gdktarget" = "xx11"; then
  36. AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree || test x$with_xinput = xyes)
  37. # Check for the RANDR extension
  38. - if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
  39. + if test x"$enable_xrandr" != xno && \
  40. + $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
  41. AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
  42. if $PKG_CONFIG --exists "xrandr >= 1.5.0" ; then
  43. @@ -1208,7 +1221,8 @@ if test "x$gdktarget" = "xx11"; then
  44. # Checks for XFixes extension
  45. - if $PKG_CONFIG --exists xfixes ; then
  46. + if test x"$enable_xfixes" != xno && \
  47. + $PKG_CONFIG --exists xfixes ; then
  48. AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
  49. X_PACKAGES="$X_PACKAGES xfixes"
  50. @@ -1217,7 +1231,8 @@ if test "x$gdktarget" = "xx11"; then
  51. # Checks for Xcomposite extension
  52. - if $PKG_CONFIG --exists xcomposite ; then
  53. + if test x"$enable_xcomposite" != xno && \
  54. + $PKG_CONFIG --exists xcomposite ; then
  55. AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
  56. X_PACKAGES="$X_PACKAGES xcomposite"
  57. @@ -1226,7 +1241,7 @@ if test "x$gdktarget" = "xx11"; then
  58. # Checks for Xdamage extension
  59. - if $PKG_CONFIG --exists xdamage ; then
  60. + if test x"$enable_xdamage" != xno && $PKG_CONFIG --exists xdamage ; then
  61. AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
  62. X_PACKAGES="$X_PACKAGES xdamage"