# $Id: Portfile,v 1.9 2006/07/23 17:48:48 rhwood Exp $
PortSystem 1.0
name		gdm
version		2.14.9
revision	2
description	The Gnome Display Manager is a re-implementation of the well known xdm program.
long_description	The Gnome Display Manager is a re-implementation of the well \
			known xdm program. It displays a X11-based graphical login screen. \
			\
			This port includes a StartupItem installed into /Library/StartupItems \
			that can be used to run gdm automatically by inserting \
			\"DISPLAYSERVER=-X11-\" into /etc/hostconfig.
maintainers	darwinports@opendarwin.org
categories	gnome
platforms	darwin 
homepage	http://www.gnome.org/
master_sites	gnome:sources/gdm/2.14/
checksums	md5 7e46bc3b0a5b08e79f1f2f1b869caf40
depends_lib	bin:gnome-session:gnome-session
use_bzip2 	yes

configure.args	--mandir=${prefix}/share/man --disable-scrollkeeper
configure.env   CPPFLAGS="-I${prefix}/include -L${prefix}/lib" \
		LDFLAGS="-lresolv -L${prefix}/lib"

startupitem.create	yes
startupitem.init	XDG_DATA_DIRS=${prefix}/share
startupitem.start	${prefix}/bin/gdm
startupitem.stop	${prefix}/sbin/gdm-stop
startupitem.restart	${prefix}/sbin/gdm-restart

pre-configure {
	reinplace	"s|security/pam|pam/pam|g" ${worksrcpath}/configure
	reinplace	"s|security/pam|pam/pam|g" ${worksrcpath}/daemon/verify-pam.c
	reinplace	"s|security/pam|pam/pam|g" ${worksrcpath}/gui/gdmlogin.c
	reinplace	"s|security/pam|pam/pam|g" ${worksrcpath}/utils/gdmaskpass.c
	reinplace	"s|security/pam|pam/pam|g" ${worksrcpath}/gui/greeter/greeter.c
}

post-configure {
	reinplace	"s|security/pam|pam/pam|g" ${worksrcpath}/config/Makefile
}

post-activate {
	system "scrollkeeper-update"
}
