summaryrefslogtreecommitdiff
blob: 15c9d531a8af34d89b98a8399597bbf2f0cc6c48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Maintainer: Martin Schlemmer <azarah@gento.org> 
# $Header: /var/cvsroot/gentoo-x86/app-misc/xscreensaver/xscreensaver-4.01-r1.ebuild,v 1.1 2002/03/03 21:59:27 agenkin Exp $

DESCRIPTION="a modular screensaver for X11"
HOMEPAGE="http://www.jwz.org/xscreensaver/"

S="${WORKDIR}/${P}"
SRC_URI="http://www.jwz.org/xscreensaver/${P}.tar.gz"

DEPEND="virtual/x11 sys-devel/bc
	gtk? ( >=x11-libs/gtk+-1.2.10-r4 )
	motif? ( >=x11-libs/openmotif-2.1.30 )
	opengl? ( virtual/opengl >=media-libs/gle-3.0.1 )
	gnome? ( >=gnome-base/control-center-1.4.0.1-r1 )
	pam? ( >=sys-libs/pam-0.75 )
	kde? ( kde-base/kde-env )"

RDEPEND="virtual/x11
	gtk? ( >=x11-libs/gtk+-1.2.10-r4 )
	motif? ( >=x11-libs/openmotif-2.1.30 )
	opengl? ( virtual/opengl >=media-libs/gle-3.0.1 )
	gnome? ( >=gnome-base/control-center-1.4.0.1-r1 )
	pam? ( >=sys-libs/pam-0.75 )
	kde? ( kde-base/kde-env )"

src_compile() {
	local myconf=""
	if [ "`use gnome`" ]
	then
		myconf="${myconf} --with-gnome"
	else
		myconf="${myconf} --without-gnome"
	fi
	if [ "`use gtk`" ]
	then
		myconf="${myconf} --with-gtk"
	else
		myconf="${myconf} --without-gtk"
	fi
	if [ "`use motif`" ]
	then
		myconf="${myconf} --with-motif"
	else
		myconf="${myconf} --without-motif"
	fi
	if [ "`use pam`" ]
	then
		myconf="${myconf} --with-pam"
	else
		myconf="${myconf} --without-pam"
	fi
	if [ "`use opengl`" ]
	then
		myconf="${myconf} --with-gl --with-gle"
	else
		myconf="${myconf} --without-gl --without-gle"
	fi

	./configure --prefix=/usr \
		--mandir=/usr/share/man \
		--host="${CHOST}" \
		--enable-hackdir=/usr/lib/xscreensaver \
		--with-mit-ext \
		--with-dpms-ext \
		--with-xinerama-ext \
		--with-xf86vmode-ext \
		--with-xf86gamma-ext \
		--with-proc-interrupts \
		--with-xpm \
		--with-xshm-ext \
		--with-xdbe-ext \
		--enable-locking \
		${myconf} || die
		
	emake || die
}

src_install () {
	if [ "$KDEDIR" ]
	then
		dodir "$KDEDIR/bin"
	fi
	make install_prefix="${D}" install || die

	# Fix double Control Center entry
	rm -f "${D}/usr/share/control-center/capplets/screensaver.desktop"

        insinto /etc/pam.d
        doins "${FILESDIR}/pam.d/xscreensaver"
	
#	if [ "`use gnome`" ]
#	then
#		#dodir /usr/bin
#		# not need i think, shout if it breaks control-center support
#		#      mv ${D}/usr/bin/screensaver-properties-capplet ${D}/usr/bin
#	fi
}