From owner-svn-ports-all@FreeBSD.ORG Sun Aug 5 00:31:46 2012 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC045106564A; Sun, 5 Aug 2012 00:31:46 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CE478FC08; Sun, 5 Aug 2012 00:31:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q750VkX9015453; Sun, 5 Aug 2012 00:31:46 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q750Vk2a015450; Sun, 5 Aug 2012 00:31:46 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201208050031.q750Vk2a015450@svn.freebsd.org> From: Doug Barton Date: Sun, 5 Aug 2012 00:31:46 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r302040 - in head/x11/slim: . files X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Aug 2012 00:31:46 -0000 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"