gnome-settings-daemon-3.24.0-optional.patch 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. From 22f6a45b665e604f874e82a817d45bb976d8c5ae Mon Sep 17 00:00:00 2001
  2. From: Timo Tambet <ttambet@gmail.com>
  3. Date: Sat, 25 Feb 2017 14:48:19 +0200
  4. Subject: [PATCH 1/1] [PATCH] Make colord and wacom support optional
  5. ---
  6. configure.ac | 56 +++++++++++++++++++++++++++++++----------------
  7. plugins/Makefile.am | 9 ++++++--
  8. plugins/dummy/Makefile.am | 5 ++++-
  9. 3 files changed, 48 insertions(+), 22 deletions(-)
  10. diff --git a/configure.ac b/configure.ac
  11. index 0d169c8f..792195aa 100644
  12. --- a/configure.ac
  13. +++ b/configure.ac
  14. @@ -158,13 +158,23 @@ PKG_CHECK_MODULES(CLIPBOARD,
  15. gtk+-x11-3.0
  16. x11)
  17. -PKG_CHECK_MODULES(COLOR,
  18. - colord >= 1.0.2
  19. - gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
  20. - libcanberra-gtk3
  21. - libgeoclue-2.0 >= $GEOCLUE_REQUIRED_VERSION
  22. - lcms2 >= $LCMS_REQUIRED_VERSION
  23. - libnotify)
  24. +AC_ARG_ENABLE([color],
  25. + AS_HELP_STRING([--disable-color],
  26. + [turn off color plugin]),
  27. + [],
  28. + [enable_color=yes])
  29. +
  30. +AS_IF([test "$enable_color" = "yes"],
  31. + [PKG_CHECK_MODULES(COLOR,
  32. + colord >= 1.0.2
  33. + gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
  34. + libcanberra-gtk3
  35. + libgeoclue-2.0 >= $GEOCLUE_REQUIRED_VERSION
  36. + lcms2 >= $LCMS_REQUIRED_VERSION
  37. + libnotify)
  38. + AC_DEFINE(HAVE_COLOR, 1, [Define if color plugin is enabled])
  39. + ])
  40. +AM_CONDITIONAL(BUILD_COLOR, test "x$enable_color" = "xyes")
  41. PKG_CHECK_MODULES(DATETIME,
  42. libnotify >= $LIBNOTIFY_REQUIRED_VERSION
  43. @@ -268,23 +278,31 @@ case $host_os in
  44. if test "$host_cpu" = s390 -o "$host_cpu" = s390x; then
  45. have_wacom=no
  46. else
  47. - if test x$enable_gudev != xno; then
  48. - LIBWACOM_PKG="libwacom >= $LIBWACOM_REQUIRED_VERSION"
  49. - PKG_CHECK_MODULES(LIBWACOM, [libwacom >= $LIBWACOM_REQUIRED_VERSION])
  50. - PKG_CHECK_MODULES(WACOM, [gtk+-3.0 pango >= $PANGO_REQUIRED_VERSION])
  51. - PKG_CHECK_MODULES(WACOM_OLED, [gudev-1.0])
  52. - else
  53. + have_wacom=no
  54. + AS_IF([test "$enable_gudev" != "no"],
  55. + [AC_ARG_ENABLE([wacom],
  56. + AS_HELP_STRING([--disable-wacom],
  57. + [turn off wacom plugin]),
  58. + [],
  59. + [enable_wacom=no]) dnl Default value
  60. + AS_IF([test "$enable_wacom" = "xyes"],
  61. + [
  62. + PKG_CHECK_MODULES(LIBWACOM, [libwacom >= $LIBWACOM_REQUIRED_VERSION])
  63. + PKG_CHECK_MODULES(WACOM, [gtk+-3.0, pango >= $PANGO_REQUIRED_VERSION])
  64. + PKG_CHECK_MODULES(WACOM_OLED, [gudev-1.0])
  65. + have_wacom=yes
  66. + AC_DEFINE_UNQUOTED(HAVE_WACOM, 1, [Define to 1 if wacom support is available])
  67. + ])
  68. + ], [
  69. AC_MSG_ERROR([GUdev is necessary to compile Wacom support])
  70. - fi
  71. - AC_DEFINE_UNQUOTED(HAVE_WACOM, 1, [Define to 1 if wacom support is available])
  72. - have_wacom=yes
  73. + ])
  74. fi
  75. ;;
  76. *)
  77. - have_wacom=no
  78. - ;;
  79. + have_wacom=no
  80. + ;;
  81. esac
  82. -AM_CONDITIONAL(HAVE_WACOM, test x$have_wacom = xyes)
  83. +AM_CONDITIONAL(BUILD_WACOM, test x$have_wacom = xyes)
  84. dnl ---------------------------------------------------------------------------
  85. dnl - common
  86. diff --git a/plugins/Makefile.am b/plugins/Makefile.am
  87. index 9324b406..ee78d6d0 100644
  88. --- a/plugins/Makefile.am
  89. +++ b/plugins/Makefile.am
  90. @@ -4,7 +4,6 @@ enabled_plugins = \
  91. a11y-keyboard \
  92. a11y-settings \
  93. clipboard \
  94. - color \
  95. datetime \
  96. dummy \
  97. power \
  98. @@ -22,13 +21,19 @@ enabled_plugins = \
  99. disabled_plugins = $(NULL)
  100. +if BUILD_COLOR
  101. +enabled_plugins += color
  102. +else
  103. +disabled_plugins += color
  104. +endif
  105. +
  106. if SMARTCARD_SUPPORT
  107. enabled_plugins += smartcard
  108. else
  109. disabled_plugins += smartcard
  110. endif
  111. -if HAVE_WACOM
  112. +if BUILD_WACOM
  113. enabled_plugins += wacom
  114. else
  115. disabled_plugins += wacom
  116. diff --git a/plugins/dummy/Makefile.am b/plugins/dummy/Makefile.am
  117. index cb5856cf..06ac595a 100644
  118. --- a/plugins/dummy/Makefile.am
  119. +++ b/plugins/dummy/Makefile.am
  120. @@ -22,10 +22,13 @@ gsd_dummy_LDADD = $(DUMMY_LIBS) $(top_builddir)/gnome-settings-daemon/libgsd.la
  121. desktopdir = $(sysconfdir)/xdg/autostart
  122. desktop_DATA =
  123. +if !BUILD_COLOR
  124. +desktop_DATA += org.gnome.SettingsDaemon.Color.desktop
  125. +endif
  126. if !SMARTCARD_SUPPORT
  127. desktop_DATA += org.gnome.SettingsDaemon.Smartcard.desktop
  128. endif
  129. -if !HAVE_WACOM
  130. +if !BUILD_WACOM
  131. desktop_DATA += org.gnome.SettingsDaemon.Wacom.desktop
  132. endif
  133. if !BUILD_PRINT_NOTIFICATIONS
  134. --
  135. 2.11.1