summaryrefslogtreecommitdiff
blob: ff45bb0b1594b78861726cd3d4173f4d6042fe2d (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
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/putty/putty-0.60_p20110905.ebuild,v 1.1 2011/05/10 19:22:14 jer Exp $

EAPI="2"

inherit autotools toolchain-funcs

MY_P="${P/_p*/}-2011-05-09"

DESCRIPTION="UNIX port of the famous Telnet and SSH client"
HOMEPAGE="http://www.chiark.greenend.org.uk/~sgtatham/putty/"
SRC_URI="http://tartarus.org/~simon/putty-snapshots/${MY_P}.tar.gz"
LICENSE="MIT"

SLOT="0"
KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
IUSE="doc ipv6 kerberos"

RDEPEND="
	!net-misc/pssh
	dev-libs/glib
	kerberos? ( virtual/krb5 )
	x11-libs/gdk-pixbuf
	x11-libs/gtk+:2
	x11-libs/libX11
	x11-libs/pango
"
DEPEND="${RDEPEND} dev-lang/perl"

S="${WORKDIR}/${MY_P}"

src_prepare() {
	cd "${S}"/unix || die "cd unix failed"
	sed \
		-i configure.ac \
		-e '/^AM_PATH_GTK(/d' \
		-e 's|-Wall -Werror||g' || die "sed failed"
	eautoreconf
}

src_configure() {
	cd "${S}"/unix || die "cd failed"
	econf \
		$(use_with kerberos gssapi) \
		|| die "econf failed"
}

src_compile() {
	cd "${S}"/unix || die "cd unix failed"
	emake \
		$(use ipv6 || echo COMPAT=-DNO_IPV6) \
		VER=-DSNAPSHOT=${PV} \
		|| die "emake failed"
}

src_install() {
	if use doc; then
		dodoc doc/puttydoc.txt || die "dodoc failed"
		dohtml doc/*.html || die "dohtml failed"
	fi

	cd "${S}"/unix
	emake DESTDIR="${D}" install || die "install failed"

	# install desktop file provided by Gustav Schaffter in #49577
	doicon "${FILESDIR}"/${PN}.xpm
	make_desktop_entry "putty" "PuTTY" putty "Network"
}