[arch-commits] Commit in gnome-control-center/trunk (PKGBUILD systemd-fallback.patch)

Jan Steffens heftig at archlinux.org
Sat Mar 10 11:42:00 EST 2012


    Date: Saturday, March 10, 2012 @ 11:42:00
  Author: heftig
Revision: 152914

3.3.91

Added:
  gnome-control-center/trunk/systemd-fallback.patch
Modified:
  gnome-control-center/trunk/PKGBUILD

------------------------+
 PKGBUILD               |   28 +++++++---
 systemd-fallback.patch |  120 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 139 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-03-10 16:40:49 UTC (rev 152913)
+++ PKGBUILD	2012-03-10 16:42:00 UTC (rev 152914)
@@ -2,28 +2,38 @@
 # Maintainer: Jan de Groot <jgc at archlinux.org>
 
 pkgname=gnome-control-center
-pkgver=3.2.2
+pkgver=3.3.91
 pkgrel=1
 pkgdesc="The Control Center for GNOME"
 arch=('i686' 'x86_64')
-depends=('gtk3' 'gsettings-desktop-schemas' 'gnome-menus' 'gnome-desktop' 'gnome-settings-daemon' 'upower' 'libgtop' 'cups-pk-helper' 'accountsservice' 'sound-theme-freedesktop' 'gnome-online-accounts' 'network-manager-applet')
+depends=('gtk3' 'gsettings-desktop-schemas' 'gnome-menus' 'gnome-desktop' 'gnome-settings-daemon'
+         'upower' 'libgtop' 'cups-pk-helper' 'accountsservice' 'sound-theme-freedesktop'
+         'gnome-online-accounts' 'network-manager-applet' 'gnome-bluetooth' 'libsocialweb')
 optdepends=('mesa-demos: provides glxinfo for graphics information'
             'apg: adds password generation for user accounts'
-            'gnome-color-manager: for color management tasks')
-makedepends=('gnome-doc-utils' 'intltool')
+            'gnome-color-manager: for color management tasks'
+            'cheese: take account photos via webcam')
+makedepends=('gnome-doc-utils' 'intltool' 'gnome-common' 'cheese')
 url="http://www.gnome.org"
 groups=('gnome')
 install=gnome-control-center.install
 license=('GPL')
 options=('!libtool' '!emptydirs')
-source=(http://download.gnome.org/sources/${pkgname}/3.2/${pkgname}-${pkgver}.tar.xz)
-sha256sums=('e675f8cfde06775919eb0c9fa4ee8c61310702989eecac6083098beb5afd9369')
+source=(http://download.gnome.org/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz
+        systemd-fallback.patch)
+sha256sums=('6a08f50d6760ef62e567aa1240fca054cc33e8aac37a4fb318cfb4d7b611abfb'
+            '8c9647c3bd1a69d9ce4d3716c235463f1cd33527cd8a241a2e88829f14da0494')
 
 build() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
+  cd ${pkgname}-${pkgver}
+  
+  patch -Np1 -i ../systemd-fallback.patch
+  gnome-autogen.sh
+  
   ./configure --prefix=/usr --sysconfdir=/etc \
       --localstatedir=/var --disable-static \
-      --disable-scrollkeeper --disable-update-mimedb
+      --enable-systemd --with-libsocialweb \
+      --disable-update-mimedb
 
   #https://bugzilla.gnome.org/show_bug.cgi?id=656229
   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/      func_append compile_command " -Wl,-O1,--as-needed"\n      func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool
@@ -31,7 +41,7 @@
 }
 
 package() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
+  cd ${pkgname}-${pkgver}
 
   make DESTDIR="${pkgdir}" install
 }

Added: systemd-fallback.patch
===================================================================
--- systemd-fallback.patch	                        (rev 0)
+++ systemd-fallback.patch	2012-03-10 16:42:00 UTC (rev 152914)
@@ -0,0 +1,120 @@
+diff -u -Nr gnome-control-center-3.3.91/configure.ac gnome-control-center-3.3.91-systemd-fallback/configure.ac
+--- gnome-control-center-3.3.91/configure.ac	2012-03-05 20:30:32.000000000 +0100
++++ gnome-control-center-3.3.91-systemd-fallback/configure.ac	2012-03-07 00:06:01.752988448 +0100
+@@ -56,7 +56,7 @@
+               [with_systemd=$enableval],
+               [with_systemd=no])
+ if test "$with_systemd" = "yes" ; then
+-  SYSTEMD=libsystemd-login
++  SYSTEMD="libsystemd-login libsystemd-daemon"
+   AC_DEFINE(HAVE_SYSTEMD, 1, [Define to 1 if systemd is available])
+ else
+   SYSTEMD=
+diff -u -Nr gnome-control-center-3.3.91/panels/user-accounts/um-user.c gnome-control-center-3.3.91-systemd-fallback/panels/user-accounts/um-user.c
+--- gnome-control-center-3.3.91/panels/user-accounts/um-user.c	2012-03-05 15:04:55.000000000 +0100
++++ gnome-control-center-3.3.91-systemd-fallback/panels/user-accounts/um-user.c	2012-03-07 00:13:13.002755560 +0100
+@@ -37,6 +37,11 @@
+ 
+ #include <gio/gunixoutputstream.h>
+ 
++#ifdef HAVE_SYSTEMD
++#  include <systemd/sd-login.h>
++#  include <systemd/sd-daemon.h>
++#endif
++
+ #include "um-user.h"
+ #include "um-account-type.h"
+ #include "um-utils.h"
+@@ -1003,57 +1008,50 @@
+         }
+ }
+ 
+-#ifdef HAVE_SYSTEMD
+-
+-#include <systemd/sd-login.h>
+-
+ gboolean
+ um_user_is_logged_in (UmUser *user)
+ {
+-  int n_sessions;
+-
+-  n_sessions = sd_uid_get_sessions (um_user_get_uid (user), 0, NULL) > 0;
+-
+-  return n_sessions > 0;
+-}
++#ifdef HAVE_SYSTEMD
++        if (sd_booted () > 0) {
++                int n_sessions;
+ 
+-#else
++                n_sessions = sd_uid_get_sessions (um_user_get_uid (user), 0, NULL) > 0;
+ 
+-gboolean
+-um_user_is_logged_in (UmUser *user)
+-{
+-        GVariant *result;
+-        GVariantIter *iter;
+-        gint n_sessions;
+-        GError *error = NULL;
++                return n_sessions > 0;
++        } else
++#endif
++        {
++                GVariant *result;
++                GVariantIter *iter;
++                gint n_sessions;
++                GError *error = NULL;
++
++                result = g_dbus_connection_call_sync (user->bus,
++                                                      "org.freedesktop.ConsoleKit",
++                                                      "/org/freedesktop/ConsoleKit/Manager",
++                                                      "org.freedesktop.ConsoleKit.Manager",
++                                                      "GetSessionsForUnixUser",
++                                                      g_variant_new ("(u)", um_user_get_uid (user)),
++                                                      G_VARIANT_TYPE ("(ao)"),
++                                                      G_DBUS_CALL_FLAGS_NONE,
++                                                      -1,
++                                                      NULL,
++                                                      &error);
++                if (!result) {
++                        g_warning ("GetSessionsForUnixUser failed: %s", error->message);
++                        g_error_free (error);
++                        return FALSE;
++                }
++          
++                g_variant_get (result, "(ao)", &iter);
++                n_sessions = g_variant_iter_n_children (iter);
++                g_variant_iter_free (iter);
++                g_variant_unref (result);
+ 
+-        result = g_dbus_connection_call_sync (user->bus,
+-                                              "org.freedesktop.ConsoleKit",
+-                                              "/org/freedesktop/ConsoleKit/Manager",
+-                                              "org.freedesktop.ConsoleKit.Manager",
+-                                              "GetSessionsForUnixUser",
+-                                              g_variant_new ("(u)", um_user_get_uid (user)),
+-                                              G_VARIANT_TYPE ("(ao)"),
+-                                              G_DBUS_CALL_FLAGS_NONE,
+-                                              -1,
+-                                              NULL,
+-                                              &error);
+-        if (!result) {
+-                g_warning ("GetSessionsForUnixUser failed: %s", error->message);
+-                g_error_free (error);
+-                return FALSE;
++                return n_sessions > 0;
+         }
+-  
+-        g_variant_get (result, "(ao)", &iter);
+-        n_sessions = g_variant_iter_n_children (iter);
+-        g_variant_iter_free (iter);
+-        g_variant_unref (result);
+-
+-        return n_sessions > 0;
+ }
+ 
+-#endif
+-
+ void
+ um_user_set_automatic_login (UmUser   *user,
+                              gboolean  enabled)



More information about the arch-commits mailing list