All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] consolekit: allow explicit enable/disable of polkit
@ 2014-08-13 13:48 Yasir Khan
  0 siblings, 0 replies; only message in thread
From: Yasir Khan @ 2014-08-13 13:48 UTC (permalink / raw)
  To: openembedded-core

From: Yasir-Khan <yasir_khan@mentor.com>

Adds the configure option to enable/disable policykit.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Yasir-Khan <yasir_khan@mentor.com>
---
 .../consolekit/add-polkit-configure-argument.patch |   33 ++++++++++++++++++++
 .../recipes-support/consolekit/consolekit_0.4.6.bb |    7 +++--
 2 files changed, 37 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch

diff --git a/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch b/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch
new file mode 100644
index 0000000..ad879d4
--- /dev/null
+++ b/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Pending
+
+--- ConsoleKit-0.4.6.orig/configure.ac
++++ ConsoleKit-0.4.6/configure.ac
+@@ -56,10 +56,24 @@ PKG_CHECK_MODULES(CONSOLE_KIT,
+   gthread-2.0 >= $GLIB_REQUIRED_VERSION
+ )
+
+-PKG_CHECK_MODULES(POLKIT,
+-  polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
+-  have_polkit=yes,
+-  have_polkit=no)
++AC_ARG_WITH([polkit],
++  [AS_HELP_STRING([--with-polkit],
++    [support PolicyKit @<:@default=check@:>@])],
++  [],
++  [with_polkit=check])
++
++AS_IF([test "x$with_polkit" != xno],
++  [PKG_CHECK_MODULES(POLKIT,
++     polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
++     have_polkit=yes,
++     [if test "x$with_polkit" != xcheck; then
++       AC_MSG_FAILURE(
++         [--with-polkit was given, but test for polkit failed])
++      else
++        have_polkit=no
++      fi
++     ])])
++
+ if test "x$have_polkit" = "xyes" ; then
+        AC_DEFINE(HAVE_POLKIT, [], [Define if we have polkit])
+ fi
diff --git a/meta/recipes-support/consolekit/consolekit_0.4.6.bb b/meta/recipes-support/consolekit/consolekit_0.4.6.bb
index 9851616..643850f 100644
--- a/meta/recipes-support/consolekit/consolekit_0.4.6.bb
+++ b/meta/recipes-support/consolekit/consolekit_0.4.6.bb
@@ -12,7 +12,9 @@ RDEPENDS_${PN} += "base-files"
 inherit autotools pkgconfig
 
 SRC_URI = "http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-${PV}.tar.xz \
-           file://sepbuildfix.patch"
+           file://sepbuildfix.patch \
+           file://add-polkit-configure-argument.patch \
+"
 
 SRC_URI[md5sum] = "611792b4d616253a5bdec9175f8b7678"
 SRC_URI[sha256sum] = "b41d17e06f80059589fbeefe96ad07bcc564c49e65516da1caf975146475565c"
@@ -23,8 +25,7 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}
                    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
 
 PACKAGECONFIG[pam] = "--enable-pam-module --with-pam-module-dir=${base_libdir}/security,--disable-pam-module,libpam"
-# No option to turn it on or off, so rely on the build dependency for now.
-PACKAGECONFIG[policykit] = ",,polkit"
+PACKAGECONFIG[policykit] = "--with-polkit,--without-polkit,polkit"
 PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--with-systemdsystemunitdir="
 
 FILES_${PN} += "${localstatedir}/log/ConsoleKit ${exec_prefix}/lib/ConsoleKit \
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-13 13:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-13 13:48 [PATCH 1/2] consolekit: allow explicit enable/disable of polkit Yasir Khan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.