summaryrefslogtreecommitdiff
blob: 4de822a0d662ae7b479adaff022c62317d3ed86b (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
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/net-misc/rdesktop/rdesktop-1.1.0.19.9.0.ebuild,v 1.5 2003/08/03 04:01:58 vapier Exp $

PATCH_PV="19-9-0"
PATCH_PV_SED=".${PATCH_PV//-/.}"
MY_P=${P/$PATCH_PV_SED}
S=${WORKDIR}/${MY_P}
DESCRIPTION="A Remote Desktop Protocol Client"
HOMEPAGE="http://rdesktop.sourceforge.net/"
SRC_URI="mirror://sourceforge/rdesktop/${MY_P}.tar.gz
	http://bibl4.oru.se/projects/rdesktop/rdesktop-unified-patch${PATCH_PV}.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 ~ppc ~sparc"
IUSE="ssl debug"

DEPEND="virtual/x11
	ssl? ( >=dev-libs/openssl-0.9.6b )"

src_unpack() {
	unpack ${MY_P}.tar.gz
	cd ${S}
	epatch ${DISTDIR}/rdesktop-unified-patch${PATCH_PV}.bz2
}

src_compile() {
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		`use_with ssl openssl` \
	        `use_with debug` \
		|| die

	use ssl && echo "CFLAGS += -I/usr/include/openssl" >> Makeconf

	# Hold on tight folks, this ain't purdy
	if [ ! -z "${CXXFLAGS}" ]; then
		sed -e 's:-O2::g' Makefile > Makefile.tmp
		mv Makefile.tmp Makefile
		echo "CFLAGS += ${CXXFLAGS}" >> Makeconf
	fi

	make localendian.h || die
	emake || die "compile problem"
}

src_install() {
	dobin rdesktop
	doman rdesktop.1
	dodoc COPYING CHANGES readme.txt rdp-srvr-readme.txt
}