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

EAPI=6
inherit systemd user

DESCRIPTION="This is the proxy-daemon used by www-apps/guacamole"

HOMEPAGE="http://guac-dev.org/"
SRC_URI="mirror://sourceforge/guacamole/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"

IUSE="rdesktop vnc ssh pulseaudio vorbis telnet ssl multilib"
REQUIRED_USE="multilib? ( ssl )"

RDEPEND="
	x11-libs/cairo
	media-libs/libpng:0=
	virtual/jpeg:0
	dev-libs/ossp-uuid
	rdesktop? ( >=net-misc/freerdp-1.1.0_beta1_p20150312:= )
	ssh? (
		x11-libs/pango
		net-libs/libssh2 )
	telnet?	(
		net-libs/libtelnet
		x11-libs/pango )
	vnc? (
		net-libs/libvncserver[threads]
		pulseaudio? ( media-sound/pulseaudio ) )
	ssl? ( dev-libs/openssl:0= )
	vorbis? ( media-libs/libvorbis )
"
DEPEND="${RDEPEND}"

PATCHES=(
	# From Fedora for compat with newer freerdp
	"${FILESDIR}"/${P}-glyph-order.patch
	"${FILESDIR}"/${P}-clipboard-id-update.patch
)

src_configure() {
	local myconf="--without-terminal --without-pango"

	if use ssh || use telnet; then
		myconf="--with-terminal --with-pango"
	fi

	econf ${myconf} \
		$(use_with ssh) \
		$(use_with rdesktop rdp) \
		$(use_with vnc) \
		$(use_with pulseaudio pulse) \
		$(use_with vorbis) \
		$(use_with telnet) \
		$(use_with ssl)
}

src_install() {
	default
	doinitd "${FILESDIR}/guacd"
	systemd_dounit "${FILESDIR}/guacd.service"
}

pkg_postinst() {
	enewgroup guacd
	enewuser guacd -1 -1 -1 guacd
}