From 9a780fc8d7d5502d94cd357c61f054496917c4cc Mon Sep 17 00:00:00 2001 From: Jimmy Olgeni Date: Tue, 12 Dec 2006 12:33:37 +0000 Subject: [PATCH] Add proper gdm detection using code from x11/xfce4. The port installation would fail if you did not have the etc/dm/Sessions directory. Noticed by: rafan --- x11-fm/rox-session/Makefile | 13 +++++++++++++ x11-fm/rox-session/pkg-plist | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/x11-fm/rox-session/Makefile b/x11-fm/rox-session/Makefile index b1d84dcb4114..dab57c48da82 100644 --- a/x11-fm/rox-session/Makefile +++ b/x11-fm/rox-session/Makefile @@ -23,6 +23,17 @@ SUB_FILES= rox-session rox.desktop .include +.if exists(${LOCALBASE}/sbin/gdm) +WITH_GDM= yes +.endif + +.if defined(WITH_GDM) +RUN_DEPENDS+= ${LOCALBASE}/sbin/gdm:${PORTSDIR}/x11/gdm +PLIST_SUB+= GDM="" +.else +PLIST_SUB+= GDM="@comment " +.endif + post-patch: @${FIND} ${WRKSRC} -name *.orig | ${XARGS} ${RM} @@ -35,6 +46,8 @@ do-install: @${CP} -r ${WRKSRC}/ROX-Session ${PREFIX}/apps/ @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/apps/ROX-Session @${INSTALL_SCRIPT} ${WRKDIR}/rox-session ${PREFIX}/sbin +.if defined(WITH_GDM) @${INSTALL_DATA} ${WRKDIR}/rox.desktop ${PREFIX}/etc/dm/Sessions +.endif .include diff --git a/x11-fm/rox-session/pkg-plist b/x11-fm/rox-session/pkg-plist index bfd70413bc2e..ab49338b2389 100644 --- a/x11-fm/rox-session/pkg-plist +++ b/x11-fm/rox-session/pkg-plist @@ -106,7 +106,7 @@ apps/ROX-Session/xsettings.pyo apps/ROX-Session/xxmlrpc.py apps/ROX-Session/xxmlrpc.pyc apps/ROX-Session/xxmlrpc.pyo -etc/dm/Sessions/rox.desktop +%%GDM%%etc/dm/Sessions/rox.desktop sbin/rox-session @dirrm apps/ROX-Session/tests @dirrm apps/ROX-Session/images