summaryrefslogtreecommitdiff
blob: bf68864eca5f38de811610b39167c305ad44088d (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

DESCRIPTION="Tunnels TCP/IP connections in a variety of ways, including through HTTP and SOCKS5 proxy servers"
HOMEPAGE="http://joshbeam.com/software/prtunnel.php"
SRC_URI="http://joshbeam.com/files/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~x86"
IUSE="ipv6"
DEPEND="virtual/libc"
RDEPEND=${DEPEND}

src_unpack() {
	unpack ${A}
	cd "${S}"
	sed -i -e "s:CFLAGS=:CFLAGS+=:" Makefile
	sed -i -e "s:-o prtunnel:\$\(LDFLAGS\) -o prtunnel:" Makefile
	use ipv6 || {
		sed -i -e "s:CFLAGS+= -DIPV6:#CFLAGS+= -DIPV6:" Makefile
		sed -i -e "s|direct6\.o:.*||" Makefile
		sed -i -e "s|direct6.o ||" Makefile
	}
}

src_compile() {
	emake || die "emake failed"
}

src_install() {
	dobin prtunnel
	doman prtunnel.1
	dodoc README ChangeLog
}