summaryrefslogtreecommitdiff
path: root/staging
diff options
context:
space:
mode:
Diffstat (limited to 'staging')
-rw-r--r--staging/python-iwscan/PKGBUILD26
-rw-r--r--staging/python-notify/PKGBUILD43
-rw-r--r--staging/python-notify/libnotify07.patch36
-rw-r--r--staging/python-notify/notify-python-0.1.1-fix-GTK-symbols.patch25
-rw-r--r--staging/python-pysqlite/PKGBUILD38
-rw-r--r--staging/python-pysqlite/setup.cfg5
-rw-r--r--staging/python-wpactrl/PKGBUILD26
-rw-r--r--staging/slim/PKGBUILD63
-rw-r--r--staging/slim/fix-glibc-segfault-1.3.4.patch13
-rw-r--r--staging/slim/libpng-1.4+-support.patch14
-rw-r--r--staging/slim/logrotate9
-rw-r--r--staging/slim/pam.d10
-rwxr-xr-xstaging/slim/rc.d36
-rw-r--r--staging/slim/session-name.patch21
-rw-r--r--staging/slim/slim.service9
-rw-r--r--staging/slim/tty-slowness.patch30
-rw-r--r--staging/sonata/PKGBUILD30
-rw-r--r--staging/sonata/info.py.patch15
-rw-r--r--staging/xfce4-session/PKGBUILD22
-rw-r--r--staging/xfce4-session/xfce4-session-4.10.0-add-systemd-support.patch388
20 files changed, 852 insertions, 7 deletions
diff --git a/staging/python-iwscan/PKGBUILD b/staging/python-iwscan/PKGBUILD
new file mode 100644
index 000000000..3abb6747e
--- /dev/null
+++ b/staging/python-iwscan/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 168715 2012-10-14 20:19:42Z eric $
+# Maintainer: Daniel Isenmann <daniel@archlinux.org>
+
+pkgbase=python-iwscan
+pkgname=python2-iwscan
+pkgver=20090609
+pkgrel=4
+pkgdesc="A Python interface to iwlist, using the iwlib library"
+arch=('i686' 'x86_64')
+url="http://projects.otaku42.de/browser/python-iwscan"
+license=('LGPL')
+depends=('python2' 'wireless_tools')
+conflicts=('python-iwscan<=20090609-3')
+replaces=('python-iwscan<=20090609-3')
+source=(ftp://ftp.archlinux.org/other/${pkgbase}/${pkgbase}-20090609.tar.gz)
+md5sums=('30fbe8ad3b07e67c1c35db2de16077d8')
+
+build() {
+ cd "${srcdir}/${pkgbase}"
+ python2 setup.py build
+}
+
+package_python2-iwscan() {
+ cd "${srcdir}/${pkgbase}"
+ python2 setup.py install --root="${pkgdir}"
+}
diff --git a/staging/python-notify/PKGBUILD b/staging/python-notify/PKGBUILD
new file mode 100644
index 000000000..6cf46c8dc
--- /dev/null
+++ b/staging/python-notify/PKGBUILD
@@ -0,0 +1,43 @@
+# $Id: PKGBUILD 168721 2012-10-14 20:45:08Z eric $
+# Maintainer: Angel Velasquez <angvp@archlinux.org>
+
+pkgbase=python-notify
+pkgname=python2-notify
+pkgver=0.1.1
+pkgrel=12
+pkgdesc="Python bindings for libnotify"
+arch=('i686' 'x86_64')
+url="http://www.galago-project.org/"
+license=('GPL')
+depends=('pygtk>=2.22.0' 'libnotify>=0.7.1')
+makedepends=('python2')
+conflicts=('python-notify<=0.1.1-11')
+replaces=('python-notify<=0.1.1-11')
+options=(!libtool)
+source=(http://www.galago-project.org/files/releases/source/notify-python/notify-python-${pkgver}.tar.gz
+ libnotify07.patch
+ notify-python-0.1.1-fix-GTK-symbols.patch)
+md5sums=('8f0ef0939cc8edd2efd896ce5ba80cf4'
+ 'b40c4542575d5aef559908fe60a21634'
+ 'c6922028da5951e69a6a0167bdb4461c')
+
+build() {
+ cd "${srcdir}/notify-python-${pkgver}"
+
+ patch -Np1 -i "${srcdir}/libnotify07.patch"
+ patch -Np1 -i "${srcdir}/notify-python-0.1.1-fix-GTK-symbols.patch"
+
+ ./configure --prefix=/usr
+
+ # WARNING - we touch src/pynotify.override in build because upstream did not rebuild pynotify.c
+ # from the input definitions, this forces pynotify.c to be regenerated, at some point this can be removed
+ touch src/pynotify.override
+
+ make clean
+ make
+}
+
+package_python2-notify() {
+ cd "${srcdir}/notify-python-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/python-notify/libnotify07.patch b/staging/python-notify/libnotify07.patch
new file mode 100644
index 000000000..289573d50
--- /dev/null
+++ b/staging/python-notify/libnotify07.patch
@@ -0,0 +1,36 @@
+diff -up notify-python-0.1.1/src/pynotify.defs.notify070 notify-python-0.1.1/src/pynotify.defs
+--- notify-python-0.1.1/src/pynotify.defs.notify070 2010-11-02 17:11:14.928179237 -0400
++++ notify-python-0.1.1/src/pynotify.defs 2010-11-02 17:11:51.153180231 -0400
+@@ -38,7 +38,6 @@
+ '("const-gchar*" "summary")
+ '("const-gchar*" "message" (null-ok) (default "NULL"))
+ '("const-gchar*" "icon" (null-ok) (default "NULL"))
+- '("GtkWidget*" "attach" (null-ok) (default "NULL"))
+ )
+ )
+
+@@ -53,24 +52,6 @@
+ )
+ )
+
+-(define-method attach_to_widget
+- (of-object "NotifyNotification")
+- (c-name "notify_notification_attach_to_widget")
+- (return-type "none")
+- (parameters
+- '("GtkWidget*" "attach")
+- )
+-)
+-
+-(define-method attach_to_status_icon
+- (of-object "NotifyNotification")
+- (c-name "notify_notification_attach_to_status_icon")
+- (return-type "none")
+- (parameters
+- '("GtkStatusIcon*" "attach")
+- )
+-)
+-
+ (define-method show
+ (of-object "NotifyNotification")
+ (c-name "notify_notification_show")
diff --git a/staging/python-notify/notify-python-0.1.1-fix-GTK-symbols.patch b/staging/python-notify/notify-python-0.1.1-fix-GTK-symbols.patch
new file mode 100644
index 000000000..f985c0136
--- /dev/null
+++ b/staging/python-notify/notify-python-0.1.1-fix-GTK-symbols.patch
@@ -0,0 +1,25 @@
+diff -up notify-python-0.1.1/src/__init__.py.BAD notify-python-0.1.1/src/__init__.py
+--- notify-python-0.1.1/src/__init__.py.BAD 2010-08-31 09:04:45.353844005 -0400
++++ notify-python-0.1.1/src/__init__.py 2010-08-31 09:04:49.281844300 -0400
+@@ -1 +1,21 @@
++"""
++Fedora's libnotify.so is not linked against GTK2 or GTK3. The idea
++was to support being linked against different parallel-installable
++GTK stacks.
++
++Unfortunately, python needs to jump through some special hoops in order
++to share symbols with extension modules, specifically, pygtk, which does
++link against GTK2.
++
++Without using sys.setdlopenflags(sys.getdlopenflags() | ctypes.RTLD_GLOBAL),
++the result is:
++libnotify-WARNING **: Missing symbol 'gdk_screen_make_display_name'
++
++Thanks to David Malcolm for figuring out the workaround.
++"""
++import ctypes
++import sys
++sys.setdlopenflags(sys.getdlopenflags() | ctypes.RTLD_GLOBAL)
++import gtk
++
+ from _pynotify import *
diff --git a/staging/python-pysqlite/PKGBUILD b/staging/python-pysqlite/PKGBUILD
new file mode 100644
index 000000000..f5985ebca
--- /dev/null
+++ b/staging/python-pysqlite/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 168723 2012-10-14 21:14:34Z eric $
+# Maintainer: Angel Velasquez <angvp@archlinux.org>
+# Contributor: Aaron Griffin <aaron@archlinux.org>
+# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgbase=python-pysqlite
+pkgname=python2-pysqlite
+pkgver=2.6.3
+pkgrel=3
+pkgdesc="A Python DB-API 2.0 interface for the SQLite embedded relational database engine"
+license=('custom')
+arch=('i686' 'x86_64')
+url="http://code.google.com/p/pysqlite/"
+depends=('python2' 'sqlite')
+conflicts=('python-pysqlite<=2.6.3-2')
+replaces=('python-pysqlite<=2.6.3-2')
+source=(http://pysqlite.googlecode.com/files/pysqlite-${pkgver}.tar.gz \
+ setup.cfg)
+md5sums=('711afa1062a1d2c4a67acdf02a33d86e'
+ '86dd356c65afd14a22f2f8f64a26441e')
+
+check() {
+ cd "${srcdir}"/pysqlite-${pkgver}/build/lib.*/
+ python2 -c "from pysqlite2 import test; test.test()"
+}
+
+build() {
+ cd "${srcdir}/pysqlite-${pkgver}"
+ cp "${srcdir}/setup.cfg" .
+ python2 setup.py build
+}
+
+package_python2-pysqlite() {
+ cd "${srcdir}/pysqlite-${pkgver}"
+ python2 setup.py install --root="${pkgdir}"
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ rm -r "${pkgdir}/usr/pysqlite2-doc"
+}
diff --git a/staging/python-pysqlite/setup.cfg b/staging/python-pysqlite/setup.cfg
new file mode 100644
index 000000000..ba6c77075
--- /dev/null
+++ b/staging/python-pysqlite/setup.cfg
@@ -0,0 +1,5 @@
+[build_ext]
+define=
+include_dirs=/usr/include
+library_dirs=/usr/lib
+libraries=sqlite3
diff --git a/staging/python-wpactrl/PKGBUILD b/staging/python-wpactrl/PKGBUILD
new file mode 100644
index 000000000..692b3e8c3
--- /dev/null
+++ b/staging/python-wpactrl/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 168717 2012-10-14 20:27:32Z eric $
+# Maintainer: Daniel Isenmann <daniel@archlinux.org>
+
+pkgbase=python-wpactrl
+pkgname=python2-wpactrl
+pkgver=20090609
+pkgrel=4
+pkgdesc="A Python extension for wpa_supplicant/hostapd control interface access"
+arch=('i686' 'x86_64')
+url="http://projects.otaku42.de/wiki/PythonWpaCtrl"
+license=('GPL2')
+depends=('python2')
+conflicts=('python-wpactrl<=20090609-3')
+replaces=('python-wpactrl<=20090609-3')
+source=(ftp://ftp.archlinux.org/other/${pkgbase}/python-wpactrl-20090609.tar.gz)
+md5sums=('8d45739aa9bfa1110a4570bb5ceda768')
+
+build() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ python2 setup.py build
+}
+
+package_python2-wpactrl() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ python2 setup.py install --root="${pkgdir}"
+}
diff --git a/staging/slim/PKGBUILD b/staging/slim/PKGBUILD
new file mode 100644
index 000000000..a4580b756
--- /dev/null
+++ b/staging/slim/PKGBUILD
@@ -0,0 +1,63 @@
+# $Id: PKGBUILD 168702 2012-10-14 15:17:29Z tomegun $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: Thayer Williams <thayer@archlinux.org>
+# Contributor: Alexander Fehr <pizzapunk gmail com>
+# Contributor: Hugo Ideler <hugoideler@dse.nl>
+
+pkgname=slim
+pkgver=1.3.4
+pkgrel=4
+pkgdesc='Desktop-independent graphical login manager for X11'
+arch=('i686' 'x86_64')
+url='http://slim.berlios.de/'
+license=('GPL2')
+depends=('pam' 'libxmu' 'libpng' 'libjpeg' 'libxft')
+makedepends=('cmake' 'freeglut')
+backup=('etc/slim.conf' 'etc/logrotate.d/slim' 'etc/pam.d/slim')
+source=("http://download.berlios.de/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'rc.d'
+ 'pam.d'
+ 'logrotate'
+ 'slim.service'
+ 'session-name.patch'
+ 'libpng-1.4+-support.patch'
+ 'fix-glibc-segfault-1.3.4.patch')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 -i ../session-name.patch # FS#26693: fix default session name
+ patch -Np1 -i ../libpng-1.4+-support.patch # taken from gentoo to build
+ patch -Np0 -i ../fix-glibc-segfault-1.3.4.patch # FS#30864
+ cd ${srcdir}
+ mkdir build
+ cd build
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DUSE_PAM=yes -DUSE_CONSOLEKIT=no
+ make
+}
+
+package() {
+ cd ${srcdir}/build/
+ make DESTDIR="${pkgdir}" install
+
+ install -D -m755 ../rc.d "${pkgdir}"/etc/rc.d/slim
+ install -D -m644 ../pam.d "${pkgdir}"/etc/pam.d/slim
+ install -D -m644 ../logrotate "${pkgdir}"/etc/logrotate.d/slim
+
+ # Provide sane defaults
+ sed -i 's|#xserver_arguments.*|xserver_arguments -nolisten tcp vt07|' "${pkgdir}"/etc/slim.conf
+ sed -i 's|/var/run/slim.lock|/var/lock/slim.lock|' "${pkgdir}"/etc/slim.conf
+ # install systemd files
+ install -D -m644 ${srcdir}/slim.service ${pkgdir}/usr/lib/systemd/system/slim.service
+}
+md5sums=('51543533e492b41007811f7d880720fa'
+ 'd8ea9c4dee2811524b67f4f666311a1f'
+ '37ef35079139544d04b8316c7f66f754'
+ '43da096480bf72c3ccec8ad8400f34f0'
+ 'a5d6bde9e63899df7d2081e1585bbe54'
+ 'ebcb6829028615686de7b64ceeaaf8ed'
+ '6d19bd7a91592ed2bb902b22b9594565'
+ '9efc4e0d82d354f0c578be7723870769')
diff --git a/staging/slim/fix-glibc-segfault-1.3.4.patch b/staging/slim/fix-glibc-segfault-1.3.4.patch
new file mode 100644
index 000000000..b035f8a78
--- /dev/null
+++ b/staging/slim/fix-glibc-segfault-1.3.4.patch
@@ -0,0 +1,13 @@
+Index: app.cpp
+===================================================================
+--- app.cpp (revision 223)
++++ app.cpp (working copy)
+@@ -593,7 +593,7 @@
+
+ n++;
+
+- child_env = static_cast<char**>(malloc(sizeof(char*)*n));
++ child_env = static_cast<char**>(malloc(sizeof(char*)*(n+1)));
+ memcpy(child_env, old_env, sizeof(char*)*n);
+ child_env[n - 1] = StrConcat("XDG_SESSION_COOKIE=", ck.get_xdg_session_cookie());
+ child_env[n] = NULL;
diff --git a/staging/slim/libpng-1.4+-support.patch b/staging/slim/libpng-1.4+-support.patch
new file mode 100644
index 000000000..57b39272b
--- /dev/null
+++ b/staging/slim/libpng-1.4+-support.patch
@@ -0,0 +1,14 @@
+--- a/image.cpp 2012-06-26 04:20:14.000000000 -0400
++++ b/image.cpp 2012-06-27 11:41:34.000000000 -0400
+@@ -781,7 +781,11 @@
+ (png_infopp) NULL);
+ }
+
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++ if (setjmp(png_jmpbuf((png_ptr)))) {
++#else
+ if (setjmp(png_ptr->jmpbuf)) {
++#endif
+ goto png_destroy;
+ }
+
diff --git a/staging/slim/logrotate b/staging/slim/logrotate
new file mode 100644
index 000000000..26ec3b0f4
--- /dev/null
+++ b/staging/slim/logrotate
@@ -0,0 +1,9 @@
+/var/log/slim.log {
+ compress
+ rotate 1
+ size 1024k
+ notifempty
+ missingok
+ copytruncate
+ noolddir
+}
diff --git a/staging/slim/pam.d b/staging/slim/pam.d
new file mode 100644
index 000000000..59db5a8c5
--- /dev/null
+++ b/staging/slim/pam.d
@@ -0,0 +1,10 @@
+#%PAM-1.0
+auth requisite pam_nologin.so
+auth required pam_env.so
+auth required pam_unix.so
+account required pam_unix.so
+password required pam_unix.so
+session required pam_limits.so
+session required pam_unix.so
+session optional pam_loginuid.so
+-session optional pam_systemd.so
diff --git a/staging/slim/rc.d b/staging/slim/rc.d
new file mode 100755
index 000000000..b0be7ffc5
--- /dev/null
+++ b/staging/slim/rc.d
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/bin/slim`
+case "$1" in
+ start)
+ stat_busy "Starting Simple Login Manager"
+ [ -z "$PID" ] && /usr/bin/slim -d &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon slim
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Simple Login Manager"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon slim
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/staging/slim/session-name.patch b/staging/slim/session-name.patch
new file mode 100644
index 000000000..8211c4f72
--- /dev/null
+++ b/staging/slim/session-name.patch
@@ -0,0 +1,21 @@
+diff -Naur slim-1.3.2.old/panel.cpp slim-1.3.2.new/panel.cpp
+--- slim-1.3.2.old/panel.cpp 2010-10-24 06:01:15.117000019 +0000
++++ slim-1.3.2.new/panel.cpp 2010-10-24 17:26:30.987999967 +0000
+@@ -23,7 +23,7 @@
+ Root = root;
+ cfg = config;
+
+- session = "";
++ session = cfg->nextSession(session);
+
+ // Init GC
+ XGCValues gcv;
+@@ -188,7 +188,7 @@
+ }
+
+ void Panel::ClearPanel() {
+- session = "";
++ session = cfg->nextSession(session);
+ Reset();
+ XClearWindow(Dpy, Root);
+ XClearWindow(Dpy, Win);
diff --git a/staging/slim/slim.service b/staging/slim/slim.service
new file mode 100644
index 000000000..b894085a0
--- /dev/null
+++ b/staging/slim/slim.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=SLiM Simple Login Manager
+After=systemd-user-sessions.service
+
+[Service]
+ExecStart=/usr/bin/slim -nodaemon
+
+[Install]
+Alias=display-manager.service
diff --git a/staging/slim/tty-slowness.patch b/staging/slim/tty-slowness.patch
new file mode 100644
index 000000000..c590fbed8
--- /dev/null
+++ b/staging/slim/tty-slowness.patch
@@ -0,0 +1,30 @@
+diff -aur slim-1.3.2.a/app.cpp slim-1.3.2.b/app.cpp
+--- slim-1.3.2.a/app.cpp 2010-08-21 15:10:13.702755711 +0200
++++ slim-1.3.2.b/app.cpp 2010-08-21 15:10:48.579631179 +0200
+@@ -280,21 +280,22 @@
+ signal(SIGALRM, AlarmSignal);
+
+ #ifndef XNEST_DEBUG
+- OpenLog();
+-
+ if (!force_nodaemon && cfg->getOption("daemon") == "yes") {
+ daemonmode = true;
+ }
+
+ // Daemonize
+ if (daemonmode) {
+- if (daemon(0, 1) == -1) {
++ if (daemon(0, 0) == -1) {
+ cerr << APPNAME << ": " << strerror(errno) << endl;
+ exit(ERR_EXIT);
+ }
+- UpdatePid();
+ }
+
++ OpenLog();
++
++ if (daemonmode) UpdatePid();
++
+ CreateServerAuth();
+ StartServer();
+ alarm(2);
diff --git a/staging/sonata/PKGBUILD b/staging/sonata/PKGBUILD
new file mode 100644
index 000000000..d2a3d8d71
--- /dev/null
+++ b/staging/sonata/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 168713 2012-10-14 19:47:10Z eric $
+# Maintainer: Angel Velasquez <angvp@archlinux.org>
+# Contributor: William Rea <sillywilly@gmail.com>
+
+pkgname=sonata
+pkgver=1.6.2.1
+pkgrel=8
+pkgdesc="Elegant GTK+ music client for MPD"
+arch=('i686' 'x86_64')
+url="http://sonata.berlios.de/"
+license=('GPL3')
+depends=('pygtk' 'python2-mpd')
+optdepends=('gnome-python-extras: Enhanced system tray support'
+ 'tagpy: Metadata editing support'
+ 'python2-dbus: Various extra functionality (e.g. multimedia keys support)')
+source=(http://download.berlios.de/${pkgname}/${pkgname}-$pkgver.tar.gz
+ info.py.patch)
+md5sums=('0b912325e7175abad3bf6c0edc071e05'
+ '595fcf7615035829b264afecb5a1beeb')
+
+build() {
+ cd "$srcdir/${pkgname}-$pkgver"
+ patch -Np0 -i "$srcdir/info.py.patch"
+ sed -i 's|/usr/bin/env python|/usr/bin/env python2|' sonata/breadcrumbs.py
+}
+
+package() {
+ cd "$srcdir/${pkgname}-$pkgver"
+ python2 setup.py install --prefix=/usr --optimize 1 --root="$pkgdir"
+}
diff --git a/staging/sonata/info.py.patch b/staging/sonata/info.py.patch
new file mode 100644
index 000000000..e95cc3a08
--- /dev/null
+++ b/staging/sonata/info.py.patch
@@ -0,0 +1,15 @@
+--- sonata/info.py 2011-07-05 22:32:08.452556016 -0500
++++ sonata/info.py 2011-07-05 22:45:50.849311466 -0500
+@@ -393,9 +393,9 @@
+ if content.startswith("#REDIRECT [["):
+ addr = "http://lyricwiki.org/index.php?title=%s&action=edit" % urllib.quote(content.split("[[")[1].split("]]")[0])
+ content = urllib.urlopen(addr).read()
+- lyrics = content.split("&lt;lyrics&gt;")[1].split("&lt;/lyrics&gt;")[0]
+- if lyrics.strip() != "&lt;!-- PUT LYRICS HERE (and delete this entire line) --&gt;":
+- lyrics = misc.unescape_html(lyrics)
++ content = misc.unescape_html(content)
++ lyrics = content.split("<lyrics>")[1].split("</lyrics>")[0].strip()
++ if lyrics.strip() != "<!-- PUT LYRICS HERE (and delete this entire line) -->":
+ lyrics = misc.wiki_to_html(lyrics)
+ lyrics = lyrics.decode("utf-8")
+ # Save lyrics to file:
diff --git a/staging/xfce4-session/PKGBUILD b/staging/xfce4-session/PKGBUILD
index 11ff3e201..c3fccce41 100644
--- a/staging/xfce4-session/PKGBUILD
+++ b/staging/xfce4-session/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 168641 2012-10-13 17:34:14Z foutrelis $
+# $Id: PKGBUILD 168729 2012-10-14 23:01:20Z foutrelis $
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: tobias <tobias funnychar archlinux.org>
pkgname=xfce4-session
pkgver=4.10.0
-pkgrel=4
+pkgrel=5
pkgdesc="A session manager for Xfce"
arch=('i686' 'x86_64')
url="http://www.xfce.org/"
@@ -12,7 +12,7 @@ license=('GPL2')
groups=('xfce4')
depends=('libxfce4ui' 'libwnck' 'libsm' 'xorg-iceauth' 'upower' 'xorg-xinit'
'hicolor-icon-theme')
-makedepends=('intltool')
+makedepends=('intltool' 'xfce4-dev-tools')
optdepends=('gnome-keyring: for keyring support when GNOME compatibility is enabled'
'xscreensaver: for locking screen with xflock4'
'gnome-screensaver: for locking screen with xflock4'
@@ -20,18 +20,26 @@ optdepends=('gnome-keyring: for keyring support when GNOME compatibility is enab
replaces=('xfce-utils')
options=('!libtool')
install=$pkgname.install
-source=(http://archive.xfce.org/src/xfce/$pkgname/4.10/$pkgname-$pkgver.tar.bz2)
-sha256sums=('bb8aa9a74c3d382840596fb4875144d66c7f3f47c8e9ee81d31e3428a72c46ce')
+source=(http://archive.xfce.org/src/xfce/$pkgname/4.10/$pkgname-$pkgver.tar.bz2
+ xfce4-session-4.10.0-add-systemd-support.patch)
+sha256sums=('bb8aa9a74c3d382840596fb4875144d66c7f3f47c8e9ee81d31e3428a72c46ce'
+ 'ffae61c48a4bd0cb51d422cb93f2de9567abaf29085370c455ef349b6a10234b')
build() {
cd "$srcdir/$pkgname-$pkgver"
- ./configure --prefix=/usr \
+ # https://bugzilla.xfce.org/show_bug.cgi?id=8729
+ patch -Np1 -i "$srcdir/xfce4-session-4.10.0-add-systemd-support.patch"
+
+ xdt-autogen
+
+ ./configure \
+ --prefix=/usr \
--sysconfdir=/etc \
--libexecdir=/usr/lib/xfce4 \
--localstatedir=/var \
--disable-static \
- --enable-libgnome-keyring \
+ --disable-legacy-sm \
--disable-debug
make
}
diff --git a/staging/xfce4-session/xfce4-session-4.10.0-add-systemd-support.patch b/staging/xfce4-session/xfce4-session-4.10.0-add-systemd-support.patch
new file mode 100644
index 000000000..7ab637b26
--- /dev/null
+++ b/staging/xfce4-session/xfce4-session-4.10.0-add-systemd-support.patch
@@ -0,0 +1,388 @@
+diff --git a/xfce4-session/xfsm-systemd.c b/xfce4-session/xfsm-systemd.c
+index 4076586..90e7873 100644
+--- /dev/null
++++ b/xfce4-session/xfsm-systemd.c
+@@ -0,0 +1,123 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
++ *
++ * Copyright (C) 2012 Christian Hesse
++ *
++ * Licensed under the GNU General Public License Version 2
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++ */
++
++#include <config.h>
++
++#include <gio/gio.h>
++#include <polkit/polkit.h>
++
++#include "xfsm-systemd.h"
++
++#define SYSTEMD_DBUS_NAME "org.freedesktop.login1"
++#define SYSTEMD_DBUS_PATH "/org/freedesktop/login1"
++#define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager"
++#define SYSTEMD_REBOOT_ACTION "org.freedesktop.login1.reboot"
++#define SYSTEMD_SHUTDOWN_ACTION "org.freedesktop.login1.power-off"
++
++struct _SystemdProxy {
++ PolkitAuthority *authority;
++ PolkitSubject *subject;
++};
++
++SystemdProxy *
++systemd_proxy_new (void)
++{
++ SystemdProxy *proxy;
++
++ proxy = g_new0 (SystemdProxy, 1);
++
++ proxy->authority = polkit_authority_get_sync (NULL, NULL);
++ proxy->subject = polkit_unix_process_new (getpid());
++
++ return proxy;
++}
++
++void
++systemd_proxy_free (SystemdProxy *proxy)
++{
++ g_object_unref (proxy->authority);
++ g_object_unref (proxy->subject);
++
++ g_free (proxy);
++}
++
++gboolean systemd_proxy_can_method (SystemdProxy *proxy, gboolean *can_method, const gchar *method, GError **error)
++{
++ PolkitAuthorizationResult *res;
++ GError *local_error = NULL;
++
++ *can_method = FALSE;
++ res = polkit_authority_check_authorization_sync (proxy->authority,
++ proxy->subject,
++ method,
++ NULL,
++ POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE,
++ NULL,
++ &local_error);
++ if (res == NULL) {
++ g_propagate_error (error, local_error);
++ return FALSE;
++ }
++
++ *can_method = polkit_authorization_result_get_is_authorized (res) ||
++ polkit_authorization_result_get_is_challenge (res);
++
++ g_object_unref (res);
++
++ return TRUE;
++}
++
++gboolean systemd_proxy_can_restart (SystemdProxy *proxy, gboolean *can_restart, GError **error)
++{
++ return systemd_proxy_can_method(proxy, can_restart, SYSTEMD_REBOOT_ACTION, error);
++}
++
++gboolean systemd_proxy_can_shutdown (SystemdProxy *proxy, gboolean *can_shutdown, GError **error)
++{
++ return systemd_proxy_can_method(proxy, can_shutdown, SYSTEMD_SHUTDOWN_ACTION, error);
++}
++
++gboolean systemd_proxy_method (SystemdProxy *proxy, const gchar *method, GError **error)
++{
++ GDBusConnection *bus;
++
++ bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
++ g_dbus_connection_call_sync (bus,
++ SYSTEMD_DBUS_NAME,
++ SYSTEMD_DBUS_PATH,
++ SYSTEMD_DBUS_INTERFACE,
++ method,
++ g_variant_new ("(b)", TRUE),
++ NULL, 0, G_MAXINT, NULL, NULL);
++ g_object_unref (bus);
++
++ return TRUE;
++}
++
++gboolean systemd_proxy_restart (SystemdProxy *proxy, GError **error)
++{
++ return systemd_proxy_method(proxy, "Reboot", error);
++}
++
++gboolean systemd_proxy_shutdown (SystemdProxy *proxy, GError **error)
++{
++ return systemd_proxy_method(proxy, "PowerOff", error);
++}
+diff --git a/xfce4-session/xfsm-systemd.h b/xfce4-session/xfsm-systemd.h
+index 3fa8317..2c4d868 100644
+--- /dev/null
++++ b/xfce4-session/xfsm-systemd.h
+@@ -0,0 +1,42 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
++ *
++ * Copyright (C) 2012 Christian Hesse
++ *
++ * Licensed under the GNU General Public License Version 2
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++ */
++
++#ifndef __SYSTEMD_PROXY_H__
++#define __SYSTEMD_PROXY_H__
++
++#include <glib.h>
++
++G_BEGIN_DECLS
++
++typedef struct _SystemdProxy SystemdProxy;
++
++SystemdProxy *systemd_proxy_new (void);
++void systemd_proxy_free (SystemdProxy *proxy);
++gboolean systemd_proxy_can_method (SystemdProxy *proxy, gboolean *can_method, const char *method, GError **error);
++gboolean systemd_proxy_can_restart (SystemdProxy *proxy, gboolean *can_restart, GError **error);
++gboolean systemd_proxy_can_shutdown (SystemdProxy *proxy, gboolean *can_shutdown, GError **error);
++gboolean systemd_proxy_method (SystemdProxy *proxy, const char *method, GError **error);
++gboolean systemd_proxy_restart (SystemdProxy *proxy, GError **error);
++gboolean systemd_proxy_shutdown (SystemdProxy *proxy, GError **error);
++
++G_END_DECLS
++
++#endif /* __SYSTEMD_PROXY_H__ */
+
+commit 518a28c23f110617aad36e64c02cdab6a36adf37
+Author: Christian Hesse <eworm@leda.eworm.de>
+Date: Fri Jul 27 14:21:14 2012 +0200
+
+ ...
+
+diff --git a/configure.in.in b/configure.in.in
+index 9aa4f8f..aa0b8bb 100644
+--- a/configure.in
++++ b/configure.in
+@@ -96,6 +96,33 @@ XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.1.0])
+ XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84])
+ XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.9.0])
+
++dnl systemd integration
++AC_ARG_ENABLE([systemd],
++ AS_HELP_STRING([--enable-systemd], [Use systemd]),
++ [with_systemd=$enableval],
++ [with_systemd=auto])
++PKG_CHECK_MODULES(SYSTEMD,
++ [libsystemd-login polkit-gobject-1],
++ [have_systemd=yes], [have_systemd=no])
++AC_MSG_CHECKING([whether to use systemd])
++if test x$with_systemd = xauto ; then
++ if test x$have_systemd = xno ; then
++ with_systemd=no
++ else
++ with_systemd=yes
++ fi
++fi
++AC_MSG_RESULT($with_systemd)
++if test x$with_systemd = xyes; then
++ if test x$have_systemd = xno; then
++ AC_MSG_ERROR([Systemd support explicitly required, but systemd not found])
++ fi
++ AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is used for session tracking])
++fi
++AC_SUBST(SYSTEMD_CFLAGS)
++AC_SUBST(SYSTEMD_LIBS)
++AM_CONDITIONAL(WITH_SYSTEMD, [test "$with_systemd" = "yes"], [Using systemd])
++
+ dnl Check for debugging support
+ XDT_FEATURE_DEBUG([xfsm_debug_default])
+
+
+commit f1279eba9452f027a2037be77388767437161d51
+Author: Christian Hesse <eworm@leda.eworm.de>
+Date: Fri Jul 27 14:18:16 2012 +0200
+
+ ...
+
+diff --git a/xfce4-session/xfsm-shutdown.c b/xfce4-session/xfsm-shutdown.c
+index 1429abd..077cdf3 100644
+--- a/xfce4-session/xfsm-shutdown.c
++++ b/xfce4-session/xfsm-shutdown.c
+@@ -96,7 +96,11 @@ struct _XfsmShutdown
+ {
+ GObject __parent__;
+
++#ifdef HAVE_SYSTEMD
++ SystemdProxy *systemd_proxy;
++#else
+ XfsmConsolekit *consolekit;
++#endif
+ XfsmUPower *upower;
+
+ /* kiosk settings */
+@@ -134,7 +138,11 @@ xfsm_shutdown_init (XfsmShutdown *shutdown)
+ {
+ XfceKiosk *kiosk;
+
++#ifdef HAVE_SYSTEMD
++ shutdown->systemd_proxy = systemd_proxy_new ();
++#else
+ shutdown->consolekit = xfsm_consolekit_get ();
++#endif
+ shutdown->upower = xfsm_upower_get ();
+ shutdown->helper_state = SUDO_NOT_INITIAZED;
+ shutdown->helper_require_password = FALSE;
+@@ -153,7 +161,11 @@ xfsm_shutdown_finalize (GObject *object)
+ {
+ XfsmShutdown *shutdown = XFSM_SHUTDOWN (object);
+
++#ifdef HAVE_SYSTEMD
++ systemd_proxy_free (shutdown->systemd_proxy);
++#else
+ g_object_unref (G_OBJECT (shutdown->consolekit));
++#endif
+ g_object_unref (G_OBJECT (shutdown->upower));
+
+ /* close down helper */
+@@ -644,7 +656,11 @@ xfsm_shutdown_try_restart (XfsmShutdown *shutdown,
+ if (shutdown->helper_state == SUDO_AVAILABLE)
+ return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_RESTART, error);
+ else
++#ifdef HAVE_SYSTEMD
++ return systemd_proxy_restart (shutdown->systemd_proxy, error);
++#else
+ return xfsm_consolekit_try_restart (shutdown->consolekit, error);
++#endif
+ }
+
+
+@@ -661,7 +677,11 @@ xfsm_shutdown_try_shutdown (XfsmShutdown *shutdown,
+ if (shutdown->helper_state == SUDO_AVAILABLE)
+ return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_SHUTDOWN, error);
+ else
++#ifdef HAVE_SYSTEMD
++ return systemd_proxy_shutdown (shutdown->systemd_proxy, error);
++#else
+ return xfsm_consolekit_try_shutdown (shutdown->consolekit, error);
++#endif
+ }
+
+
+@@ -701,7 +721,11 @@ xfsm_shutdown_can_restart (XfsmShutdown *shutdown,
+ return TRUE;
+ }
+
++#ifdef HAVE_SYSTEMD
++ if (systemd_proxy_can_restart (shutdown->systemd_proxy, can_restart, error))
++#else
+ if (xfsm_consolekit_can_restart (shutdown->consolekit, can_restart, error))
++#endif
+ return TRUE;
+
+ if (xfsm_shutdown_sudo_init (shutdown, error))
+@@ -728,7 +752,11 @@ xfsm_shutdown_can_shutdown (XfsmShutdown *shutdown,
+ return TRUE;
+ }
+
++#ifdef HAVE_SYSTEMD
++ if (systemd_proxy_can_shutdown (shutdown->systemd_proxy, can_shutdown, error))
++#else
+ if (xfsm_consolekit_can_shutdown (shutdown->consolekit, can_shutdown, error))
++#endif
+ return TRUE;
+
+ if (xfsm_shutdown_sudo_init (shutdown, error))
+
+commit 5aea3fb853683246a537a67423cf5b32076b8dfb
+Author: Christian Hesse <eworm@leda.eworm.de>
+Date: Fri Jul 27 14:03:27 2012 +0200
+
+ ...
+
+diff --git a/xfce4-session/Makefile.am b/xfce4-session/Makefile.am
+index c015154..7e3b311 100644
+--- a/xfce4-session/Makefile.am
++++ b/xfce4-session/Makefile.am
+@@ -38,8 +38,6 @@ xfce4_session_SOURCES = \
+ xfsm-compat-gnome.h \
+ xfsm-compat-kde.c \
+ xfsm-compat-kde.h \
+- xfsm-consolekit.c \
+- xfsm-consolekit.h \
+ xfsm-dns.c \
+ xfsm-dns.h \
+ xfsm-error.c \
+@@ -65,6 +63,16 @@ xfce4_session_SOURCES = \
+ xfsm-upower.c \
+ xfsm-upower.h
+
++if WITH_SYSTEMD
++xfce4_session_SOURCES += \
++ xfsm-systemd.c \
++ xfsm-systemd.h
++else
++xfce4_session_SOURCES += \
++ xfsm-consolekit.c \
++ xfsm-consolekit.h
++endif
++
+ xfce4_session_CFLAGS = \
+ $(LIBSM_CFLAGS) \
+ $(LIBX11_CFLAGS) \
+@@ -72,6 +80,7 @@ xfce4_session_CFLAGS = \
+ $(DBUS_CFLAGS) \
+ $(DBUS_GLIB_CFLAGS) \
+ $(LIBWNCK_CFLAGS) \
++ $(SYSTEMD_CFLAGS) \
+ $(XFCONF_CFLAGS) \
+ $(GMODULE_CFLAGS) \
+ $(PLATFORM_CFLAGS)
+@@ -91,6 +100,7 @@ xfce4_session_LDADD = \
+ $(DBUS_LIBS) \
+ $(DBUS_GLIB_LIBS) \
+ $(LIBWNCK_LIBS) \
++ $(SYSTEMD_LIBS) \
+ $(XFCONF_LIBS) \
+ -lm
+
+diff --git a/xfce4-session/xfsm-shutdown.c b/xfce4-session/xfsm-shutdown.c
+index d8757a8..1429abd 100644
+--- a/xfce4-session/xfsm-shutdown.c
++++ b/xfce4-session/xfsm-shutdown.c
+@@ -66,10 +66,13 @@
+ #include <xfce4-session/xfsm-fadeout.h>
+ #include <xfce4-session/xfsm-global.h>
+ #include <xfce4-session/xfsm-legacy.h>
+-#include <xfce4-session/xfsm-consolekit.h>
+ #include <xfce4-session/xfsm-upower.h>
+
+-
++#ifdef HAVE_SYSTEMD
++#include <xfce4-session/xfsm-systemd.h>
++#else
++#include <xfce4-session/xfsm-consolekit.h>
++#endif
+
+ static void xfsm_shutdown_finalize (GObject *object);
+ static void xfsm_shutdown_sudo_free (XfsmShutdown *shutdown);