Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Aug 2012 00:31:46 +0000 (UTC)
From:      Doug Barton <dougb@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r302040 - in head/x11/slim: . files
Message-ID:  <201208050031.q750Vk2a015450@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dougb
Date: Sun Aug  5 00:31:46 2012
New Revision: 302040
URL: http://svn.freebsd.org/changeset/ports/302040

Log:
  At the request of maintainer in private e-mail, remove the now-spurious
  dependency on glut (confirmed).
  
  While I'm here, move the rc.d script slim.sh.in -> slim.in

Added:
  head/x11/slim/files/slim.in
     - copied unchanged from r302038, head/x11/slim/files/slim.sh.in
Deleted:
  head/x11/slim/files/slim.sh.in
Modified:
  head/x11/slim/Makefile

Modified: head/x11/slim/Makefile
==============================================================================
--- head/x11/slim/Makefile	Sun Aug  5 00:03:33 2012	(r302039)
+++ head/x11/slim/Makefile	Sun Aug  5 00:31:46 2012	(r302040)
@@ -6,7 +6,7 @@
 
 PORTNAME=	slim
 PORTVERSION=	1.3.4
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	x11
 MASTER_SITES=	http://slim.berlios.de/releases/
 
@@ -23,9 +23,8 @@ LIB_DEPENDS=	jpeg.11:${PORTSDIR}/graphic
 
 USE_CMAKE=	yes
 USE_XORG=	x11 xft xmu xorg-server xrender
-USE_GL=		glut
 USE_PKGCONFIG=	build
-USE_RC_SUBR=	slim.sh
+USE_RC_SUBR=	slim
 SUB_FILES=	pkg-message
 
 CMAKE_ARGS=	-DUSE_CONSOLEKIT=yes

Copied: head/x11/slim/files/slim.in (from r302038, head/x11/slim/files/slim.sh.in)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/slim/files/slim.in	Sun Aug  5 00:31:46 2012	(r302040, copy of r302038, head/x11/slim/files/slim.sh.in)
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: slim
+# REQUIRE: LOGIN dbus hald
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable slim:
+# slim_enable (bool):      Set to "NO" by default.
+#                          Set it to "YES" to enable slim
+#
+# Alternatively, edit /etc/ttys and change the line below
+#   ttyv8   "/usr/X11R6/bin/xdm -nodaemon"  xterm   off secure
+# to this:
+#   ttyv8   "%%PREFIX%%/bin/slim"   xterm   on secure
+
+. /etc/rc.subr
+
+name="slim"
+rcvar=slim_enable
+
+start_precmd=${name}_rmfile
+stop_precmd=${name}_prestop
+stop_postcmd=${name}_rmfile
+
+load_rc_config $name
+
+: ${slim_enable="NO"}
+
+command=%%PREFIX%%/bin/slim
+command_args="-d"
+
+find_pidfile()
+{
+	if type get_pidfile_from_conf >/dev/null 2>&1 &&
+	    get_pidfile_from_conf lockfile %%PREFIX%%/etc/${name}.conf; then
+		pidfile="$_pidfile_from_conf"
+	else
+		pidfile="/var/run/${name}.pid"
+	fi
+}
+
+slim_rmfile ()
+{
+	local file
+
+	[ -z "$pidfile" ] && find_pidfile
+
+	for file in $pidfile /var/run/slim.auth; do
+		[ -e "$file" ] && unlink $file
+	done
+	
+	# Needed if neither file exists
+	return 0
+}
+
+slim_prestop ()
+{
+	local xpid
+
+	find_pidfile
+
+	xpid=`ps -axww | grep '/bin/[X] .* -auth /var/run/slim.auth'`
+	xpid="${xpid## }"
+	[ -n "$xpid" ] && kill ${xpid%% *}
+}
+
+run_rc_command "$1"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208050031.q750Vk2a015450>