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