app-editors/kakoune: drop old 0_pre20160620
[gentoo.git] / net-misc / rdesktop / rdesktop-1.8.3.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit autotools eutils
7
8 MY_PV=${PV/_/-}
9
10 DESCRIPTION="A Remote Desktop Protocol Client"
11 HOMEPAGE="http://rdesktop.sourceforge.net/"
12 SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
13
14 LICENSE="GPL-3"
15 SLOT="0"
16 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
17 IUSE="alsa ao debug ipv6 kerberos libsamplerate oss pcsc-lite"
18
19 S=${WORKDIR}/${PN}-${MY_PV}
20
21 RDEPEND=">=dev-libs/openssl-0.9.6b
22         x11-libs/libX11
23         x11-libs/libXext
24         x11-libs/libXau
25         x11-libs/libXdmcp
26         alsa? ( media-libs/alsa-lib )
27         ao? ( >=media-libs/libao-0.8.6 )
28         kerberos? ( net-libs/libgssglue )
29         libsamplerate? ( media-libs/libsamplerate )
30         pcsc-lite? ( >=sys-apps/pcsc-lite-1.6.6 )"
31 DEPEND="${RDEPEND}
32         virtual/pkgconfig
33         x11-libs/libXt"
34
35 src_prepare() {
36         # Prevent automatic stripping
37         local strip="$(echo '$(STRIP) $(DESTDIR)$(bindir)/rdesktop')"
38         sed -i -e "s:${strip}::" Makefile.in \
39                 || die "sed failed in Makefile.in"
40
41         # Automagic dependency on libsamplerate
42         epatch "${FILESDIR}"/${PN}-1.6.0-sound_configure.patch
43         # bug #280923
44         epatch "${FILESDIR}"/${PN}-1.7.0-libao_crash.patch
45
46         epatch_user
47
48         eautoreconf
49 }
50
51 src_configure() {
52         if use ao; then
53                 sound_conf=$(use_with ao sound libao)
54         else if use alsa; then
55                         sound_conf=$(use_with alsa sound alsa)
56                 else
57                         sound_conf=$(use_with oss sound oss)
58                 fi
59         fi
60
61         econf \
62                 --with-openssl="${EPREFIX}"/usr \
63                 $(use_with debug) \
64                 $(use_with ipv6) \
65                 $(use_with libsamplerate) \
66                 $(use_enable kerberos credssp) \
67                 $(use_enable pcsc-lite smartcard) \
68                 ${sound_conf}
69 }
70
71 src_install() {
72         emake DESTDIR="${D}" install
73         dodoc doc/HACKING doc/TODO doc/keymapping.txt
74 }