Enable console-kit support.

While here, clean up this port and fix the default dm directory.

ok jasper@ robert@
This commit is contained in:
ajacoutot 2010-07-07 16:37:05 +00:00
parent 0574bc2000
commit b5c3d5442d
3 changed files with 54 additions and 35 deletions

View File

@ -1,9 +1,10 @@
# $OpenBSD: Makefile,v 1.74 2010/06/12 14:57:50 steven Exp $
# $OpenBSD: Makefile,v 1.75 2010/07/07 16:37:05 ajacoutot Exp $
COMMENT= GNOME display manager
GNOME_PROJECT= gdm
GNOME_VERSION= 2.20.11
PKGNAME= ${DISTNAME}p0
HOMEPAGE= http://projects.gnome.org/gdm/
@ -17,10 +18,10 @@ WANTLIB += X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes
WANTLIB += Xi Xinerama Xrandr Xrender art_lgpl_2 atk-1.0 bz2 c
WANTLIB += cairo croco-0.6 dmx expat fontconfig freetype gailutil
WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glade-2.0 glib-2.0
WANTLIB += glitz gmodule-2.0 gobject-2.0 gsf-1 gtk-x11-2.0 m pango-1.0
WANTLIB += pangocairo-1.0 pangoft2-1.0 pcre pixman-1 png pthread
WANTLIB += pthread-stubs util wrap xcb xml2 z
WANTLIB += gthread-2.0 xcb-render xcb-render-util
WANTLIB += glitz gmodule-2.0 gobject-2.0 gsf-1 gthread-2.0 gtk-x11-2.0
WANTLIB += m pango-1.0 pangocairo-1.0 pangoft2-1.0 pcre pixman-1
WANTLIB += png pthread pthread-stubs util wrap xcb xcb-render
WANTLIB += xcb-render-util xml2 z
BUILD_DEPENDS= ::x11/gnome/zenity
RUN_DEPENDS= :sox-*:audio/sox \
@ -39,15 +40,25 @@ MODGNOME_HELP_FILES= Yes
CONFIGURE_STYLE= gnu old
CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
--with-xevie=no \
--sysconfdir="${SYSCONFDIR}/X11" \
--localstatedir=/var \
--mandir=${PREFIX}/man \
--enable-secureremote=yes \
--enable-console-helper=no \
--disable-scrollkeeper \
--with-console-kit=no \
--with-libaudit=no
--sysconfdir=${SYSCONFDIR} \
--without-xevie \
--without-libaudit \
--with-sysconfsubdir=X11/gdm \
--with-dmconfdir=${LOCALBASE}/share/xsessions \
--with-pid-file=/var/run/gdm.pid \
--with-tcp-wrappers \
--with-xdmcp \
--enable-secureremote \
--disable-console-helper
# XXX --enable-authentication-scheme=bsdauth
# gdm 2.20.X releases only work with old ConsoleKit versions so instead
# we patch Xsession to start ck-launch-session with the session.
RUN_DEPENDS+= ::sysutils/consolekit
CONFIGURE_ARGS+= --without-console-kit
# -pthread is needed to resolve some undefined symbols
# (pthread_mutex_trylock in libgthread for gdmflexiserver, gdmXnest...)
@ -55,10 +66,9 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib -pthread"
# XXX IPv6-only FLAVOR?
CONFIGURE_ARGS+= --enable-ipv6=no
CONFIGURE_ARGS+= --disable-ipv6
FAKE_FLAGS= sysconfdir=${PREFIX}/share/examples \
dmconfdir=${PREFIX}/share/examples/dm
FAKE_FLAGS= gdmconfdir=${PREFIX}/share/examples/gdm
pre-configure:
${SUBST_CMD} \

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-config_Xsession_in,v 1.10 2009/03/19 08:26:42 ajacoutot Exp $
--- config/Xsession.in.orig Thu Mar 19 05:59:27 2009
+++ config/Xsession.in Thu Mar 19 09:01:36 2009
$OpenBSD: patch-config_Xsession_in,v 1.11 2010/07/07 16:37:05 ajacoutot Exp $
--- config/Xsession.in.orig Thu Jun 3 03:06:25 2010
+++ config/Xsession.in Mon Jul 5 19:53:14 2010
@@ -23,6 +23,8 @@
# based on:
# $XConsortium: Xsession /main/10 1995/12/18 18:21:28 gildea $
@ -20,27 +20,38 @@ $OpenBSD: patch-config_Xsession_in,v 1.10 2009/03/19 08:26:42 ajacoutot Exp $
else
if [ -n "$zenity" ] ; then
disptext=`gettextfunc "System has no Xclients file, so starting a failsafe xterm session. Windows will have focus only if the mouse pointer is above them. To get out of this mode type 'exit' in the window."`
@@ -213,12 +218,17 @@ if [ "x$command" = "xdefault" ] ; then
@@ -213,12 +218,34 @@ if [ "x$command" = "xdefault" ] ; then
fi
fi
-# add ssh-agent if found
-sshagent="`gdmwhich ssh-agent`"
-if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then
- command="$sshagent -- $command"
-elif [ -z "$sshagent" ] ; then
- echo "$0: ssh-agent not found!"
+# add ssh-agent if found and:
+# Only add ssh-agent if:
+# * gnome-session is not used (in which case gnome-keyring handles
+# ssh-agent functionality)
+# * OpenBSD default Xsession isn't used (as it already starts ssh-agent)
+if [ "x$command" != "xgnome-session" ] && [ "x$command" != "x/etc/X11/xdm/Xsession" ] ; then
+ sshagent="`gdmwhich ssh-agent`"
+ if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then
+ command="$sshagent -- $command"
+ elif [ -z "$sshagent" ] ; then
+ echo "$0: ssh-agent not found!"
+ fi
+
# add ssh-agent if found
sshagent="`gdmwhich ssh-agent`"
if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then
command="$sshagent -- $command"
elif [ -z "$sshagent" ] ; then
echo "$0: ssh-agent not found!"
+fi
+
+fi
+
+# GDM 2.20.X is too old to support new versions of ConsoleKit natively
+cklaunch="`gdmwhich ck-launch-session`"
+if [ -n "$cklaunch" ] && [ -x "$cklaunch" ] ; then
+ command="$cklaunch $command"
+fi
+
+# add seahorse-agent if found
+seahorseagent="`gdmwhich seahorse-agent`"
+if [ -n "$seahorseagent" ] && [ -x "$seahorseagent" ] && [ -z "$GPG_AGENT_INFO" ] ; then
+ command="dbus-launch --exit-with-session $seahorseagent --execute $command"
+elif [ -z "$seahorseagent" ] ; then
+ echo "$0: seahorse-agent not found!"
fi
echo "$0: Setup done, will execute: $command"

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.27 2009/12/21 18:03:18 ajacoutot Exp $
@comment $OpenBSD: PLIST,v 1.28 2010/07/07 16:37:05 ajacoutot Exp $
%%SHARED%%
@bin bin/gdm-dmx-reconnect-proxy
bin/gdmXnest
@ -25,8 +25,6 @@ sbin/gdm-restart
sbin/gdm-safe-restart
sbin/gdm-stop
@bin sbin/gdmsetup
share/examples/dm/
@sample ${SYSCONFDIR}/X11/dm/
share/examples/gdm/
@sample ${SYSCONFDIR}/X11/gdm/
share/examples/gdm/Init/