commit:     fd0e9f39d706c33ca08a1463ff806ef547253d07
Author:     Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
AuthorDate: Sun Jan 17 19:57:09 2021 +0000
Commit:     Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Sun Jan 17 19:57:09 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=fd0e9f39

net-misc/rdesktop: new package

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>

 net-misc/rdesktop/Manifest                         |  2 +
 .../files/rdesktop-1.6.0-sound_configure.patch     | 15 +++++
 .../rdesktop/files/rdesktop-1.8.3-no_strip.patch   | 12 ++++
 .../files/rdesktop-1.8.3-xrandr_configure.patch    | 17 +++++
 .../rdesktop/files/rdesktop-1.8.4-libressl.patch   | 16 +++++
 .../files/rdesktop-1.8.5-use_standard_gssapi.patch | 56 ++++++++++++++++
 .../files/rdesktop-1.8.6-sec_decrypt.patch         | 59 ++++++++++++++++
 .../rdesktop-1.9.0-rdssl_rkey_get_exp_mod.patch    | 26 ++++++++
 net-misc/rdesktop/metadata.xml                     | 19 ++++++
 net-misc/rdesktop/rdesktop-1.8.6-r1.ebuild         | 72 ++++++++++++++++++++
 net-misc/rdesktop/rdesktop-1.8.6.ebuild            | 71 ++++++++++++++++++++
 net-misc/rdesktop/rdesktop-1.9.0-r1.ebuild         | 78 ++++++++++++++++++++++
 net-misc/rdesktop/rdesktop-1.9.0.ebuild            | 77 +++++++++++++++++++++
 13 files changed, 520 insertions(+)

diff --git a/net-misc/rdesktop/Manifest b/net-misc/rdesktop/Manifest
new file mode 100644
index 0000000..fd6f235
--- /dev/null
+++ b/net-misc/rdesktop/Manifest
@@ -0,0 +1,2 @@
+DIST rdesktop-1.8.6.tar.gz 321061 BLAKE2B 
bd61ecfbdca3f05b2a8d7f84c10296af3845870f5bd2522ecd768ce27cdbf790787ba9af2f53c85bcd674926488b77a610e48cafbb891fced9a458f86a2ee9e1
 SHA512 
a7d624dad27e531cf38d73bd879e66aaf72e527d082a4adb59e259e4e5b9a779ee6938db74601fbb2be7e7b015c806109fe8dfc99d78cbd06f0ba4d8f89b28ee
+DIST rdesktop-1.9.0.tar.gz 368980 BLAKE2B 
c3545e1c0f8ff04adeb8f36e24684a0719a4d4bb0176491a1826b3c5c2976a96d96d773280ca5b27b936aa5f79957e7faec77be996048115d8f8c0a3f0cc0d6d
 SHA512 
e101147b496ae70118c2756bf120007d4748aad9d9917d9ebc0878ffaf35764500861c548ef0528722777555c78e1d3d146b6f3691daa2b8657b0d3a541094f5

diff --git a/net-misc/rdesktop/files/rdesktop-1.6.0-sound_configure.patch 
b/net-misc/rdesktop/files/rdesktop-1.6.0-sound_configure.patch
new file mode 100644
index 0000000..b2f492b
--- /dev/null
+++ b/net-misc/rdesktop/files/rdesktop-1.6.0-sound_configure.patch
@@ -0,0 +1,15 @@
+--- rdesktop.orig/configure.ac 2009-06-30 10:35:14.000000000 +0200
++++ rdesktop/configure.ac              2009-06-30 11:35:10.000000000 +0200
+@@ -228,7 +228,11 @@
+ if test -n "$PKG_CONFIG"; then
+     PKG_CHECK_MODULES(LIBAO, ao, [HAVE_LIBAO=1], [HAVE_LIBAO=0])
+     PKG_CHECK_MODULES(ALSA, alsa, [HAVE_ALSA=1], [HAVE_ALSA=0])
+-    PKG_CHECK_MODULES(LIBSAMPLERATE, samplerate, [HAVE_LIBSAMPLERATE=1], 
[HAVE_LIBSAMPLERATE=0])
++    AC_ARG_WITH(libsamplerate,
++        [  --without-libsamplerate disable libsamplerate support])
++    if test "x$with_libsamplerate" != "xno"; then
++        PKG_CHECK_MODULES(LIBSAMPLERATE, samplerate, [HAVE_LIBSAMPLERATE=1], 
[HAVE_LIBSAMPLERATE=0])
++    fi
+     if test x"$HAVE_LIBSAMPLERATE" = "x1"; then
+         AC_DEFINE(HAVE_LIBSAMPLERATE)
+         if test x"$static_libsamplerate" = "xyes"; then

diff --git a/net-misc/rdesktop/files/rdesktop-1.8.3-no_strip.patch 
b/net-misc/rdesktop/files/rdesktop-1.8.3-no_strip.patch
new file mode 100644
index 0000000..018ceee
--- /dev/null
+++ b/net-misc/rdesktop/files/rdesktop-1.8.3-no_strip.patch
@@ -0,0 +1,12 @@
+diff -Naur rdesktop-1.8.3.orig/Makefile.in rdesktop-1.8.3/Makefile.in
+--- rdesktop-1.8.3.orig/Makefile.in    2013-01-21 13:28:14.000000000 +0100
++++ rdesktop-1.8.3/Makefile.in 2018-08-20 18:05:38.401218002 +0200
+@@ -60,7 +60,7 @@
+ installbin: rdesktop
+       mkdir -p $(DESTDIR)$(bindir)
+       $(INSTALL) rdesktop $(DESTDIR)$(bindir)
+-      $(STRIP) $(DESTDIR)$(bindir)/rdesktop
++      
+       chmod 755 $(DESTDIR)$(bindir)/rdesktop
+ 
+ .PHONY: installman

diff --git a/net-misc/rdesktop/files/rdesktop-1.8.3-xrandr_configure.patch 
b/net-misc/rdesktop/files/rdesktop-1.8.3-xrandr_configure.patch
new file mode 100644
index 0000000..fea0b97
--- /dev/null
+++ b/net-misc/rdesktop/files/rdesktop-1.8.3-xrandr_configure.patch
@@ -0,0 +1,17 @@
+--- rdesktop.orig/configure.ac 2015-09-14 11:27:54.974472081 +0200
++++ rdesktop/configure.ac              2015-09-14 11:34:37.729155044 +0200
+@@ -151,9 +151,12 @@
+ AC_SUBST(CREDSSPOBJ)
+ 
+ # xrandr
+-if test -n "$PKG_CONFIG"; then
+-    PKG_CHECK_MODULES(XRANDR, xrandr, [HAVE_XRANDR=1], [HAVE_XRANDR=0])
++AC_ARG_WITH([xrandr], AS_HELP_STRING([--without-xrandr], [Build without 
Xrandr library (default: true)]))
++AS_IF([test "x$with_xrandr" != "xno"], [
++    if test -n "$PKG_CONFIG"; then
++        PKG_CHECK_MODULES(XRANDR, xrandr, [HAVE_XRANDR=1], [HAVE_XRANDR=0])
+ fi
++])
+ if test x"$HAVE_XRANDR" = "x1"; then
+     CFLAGS="$CFLAGS $XRANDR_CFLAGS"
+     LIBS="$LIBS $XRANDR_LIBS"

diff --git a/net-misc/rdesktop/files/rdesktop-1.8.4-libressl.patch 
b/net-misc/rdesktop/files/rdesktop-1.8.4-libressl.patch
new file mode 100644
index 0000000..b56cbfc
--- /dev/null
+++ b/net-misc/rdesktop/files/rdesktop-1.8.4-libressl.patch
@@ -0,0 +1,16 @@
+diff --git a/ssl.c b/ssl.c
+index 07d7aa5..45df34f 100644
+--- a/ssl.c
++++ b/ssl.c
+@@ -225,7 +225,7 @@ rdssl_rkey_get_exp_mod(RDSSL_RKEY * rkey, uint8 * 
exponent, uint32 max_exp_len,
+       BIGNUM *e = NULL;
+       BIGNUM *n = NULL;
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L  || 
defined(LIBRESSL_VERSION_NUMBER))
+       e = rkey->e;
+       n = rkey->n;
+ #else
+-- 
+2.20.1
+

diff --git a/net-misc/rdesktop/files/rdesktop-1.8.5-use_standard_gssapi.patch 
b/net-misc/rdesktop/files/rdesktop-1.8.5-use_standard_gssapi.patch
new file mode 100644
index 0000000..a5e14c3
--- /dev/null
+++ b/net-misc/rdesktop/files/rdesktop-1.8.5-use_standard_gssapi.patch
@@ -0,0 +1,56 @@
+diff -Naur rdesktop-1.8.5.orig/configure.ac rdesktop-1.8.5/configure.ac
+--- rdesktop-1.8.5.orig/configure.ac   2019-05-08 11:24:50.000000000 +0200
++++ rdesktop-1.8.5/configure.ac        2019-05-14 18:33:49.479354354 +0200
+@@ -122,27 +122,20 @@
+ 
+ dnl CredSSP feature
+ AC_ARG_ENABLE([credssp], AS_HELP_STRING([--disable-credssp], [disable support 
for CredSSP]))
+-AC_ARG_ENABLE([static-gssglue], AS_HELP_STRING([--enable-static-gssglue]), 
+-            [static_gssglue=yes], [static_gssglue=no])
+ AS_IF([test "x$enable_credssp" != "xno"], [
+         if test -n "$PKG_CONFIG"; then
+-          PKG_CHECK_MODULES(GSSGLUE, libgssglue, [WITH_CREDSSP=1], 
[WITH_CREDSSP=0])
++          PKG_CHECK_MODULES(GSSAPI, krb5-gssapi, [WITH_CREDSSP=1], 
[WITH_CREDSSP=0])
+         fi
+ 
+         if test x"$WITH_CREDSSP" = "x1"; then
+             CREDSSPOBJ="cssp.o"
+-            CFLAGS="$CFLAGS $GSSGLUE_CFLAGS"
+-
+-            AS_IF([test "x$static_gssglue" != "xno"], [
+-                LIBS="$LIBS -Wl,-Bstatic -lgssglue -Wl,-Bdynamic"
+-            ], [
+-                LIBS="$LIBS -lgssglue"
+-            ])
++            CFLAGS="$CFLAGS $GSSAPI_CFLAGS"
++            LIBS="$LIBS $GSSAPI_LIBS"
+ 
+             AC_DEFINE(WITH_CREDSSP)
+         else
+               echo
+-              echo "CredSSP support requires libgssglue, install the 
dependency"
++              echo "CredSSP support requires GSSAPI, install the dependency"
+               echo "or disable the feature using --disable-credssp."
+               echo
+               exit 1
+diff -Naur rdesktop-1.8.5.orig/cssp.c rdesktop-1.8.5/cssp.c
+--- rdesktop-1.8.5.orig/cssp.c 2019-05-08 11:22:39.000000000 +0200
++++ rdesktop-1.8.5/cssp.c      2019-05-14 18:34:49.559368755 +0200
+@@ -140,7 +140,7 @@
+ }
+ 
+ static STREAM
+-cssp_gss_wrap(gss_ctx_id_t * ctx, STREAM in)
++cssp_gss_wrap(gss_ctx_id_t ctx, STREAM in)
+ {
+       int conf_state;
+       OM_uint32 major_status;
+@@ -181,7 +181,7 @@
+ }
+ 
+ static STREAM
+-cssp_gss_unwrap(gss_ctx_id_t * ctx, STREAM in)
++cssp_gss_unwrap(gss_ctx_id_t ctx, STREAM in)
+ {
+       OM_uint32 major_status;
+       OM_uint32 minor_status;

diff --git a/net-misc/rdesktop/files/rdesktop-1.8.6-sec_decrypt.patch 
b/net-misc/rdesktop/files/rdesktop-1.8.6-sec_decrypt.patch
new file mode 100644
index 0000000..dbb0d0e
--- /dev/null
+++ b/net-misc/rdesktop/files/rdesktop-1.8.6-sec_decrypt.patch
@@ -0,0 +1,59 @@
+From 7841030279c5300d5073b2348b58f3f41e136f82 Mon Sep 17 00:00:00 2001
+From: Markus Beth <markus.b...@web.de>
+Date: Tue, 11 Jun 2019 22:57:31 +0200
+Subject: [PATCH] sec_decrypt() the correct amount of data
+
+Save the correct amount of data to sec_decrypt() because after
+inout_uint8p() the macro s_remaining(s) will find nothing left.
+---
+ secure.c | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/secure.c b/secure.c
+index 8f65b3aa..9b301e1f 100644
+--- a/secure.c
++++ b/secure.c
+@@ -813,6 +813,7 @@ sec_recv(uint8 * rdpver)
+       STREAM s;
+       struct stream packet;
+       size_t data_offset;
++      size_t remaining;
+       unsigned char *data;
+ 
+       while ((s = mcs_recv(&channel, rdpver)) != NULL)
+@@ -832,8 +833,9 @@ sec_recv(uint8 * rdpver)
+ 
+                                       data_offset = s_tell(s);
+ 
+-                                      inout_uint8p(s, data, s_remaining(s));
+-                                      sec_decrypt(data, s_remaining(s));
++                                      remaining = s_remaining(s);
++                                      inout_uint8p(s, data, remaining);
++                                      sec_decrypt(data, remaining);
+ 
+                                       s_seek(s, data_offset);
+                               }
+@@ -860,8 +862,9 @@ sec_recv(uint8 * rdpver)
+ 
+                                       data_offset = s_tell(s);
+ 
+-                                      inout_uint8p(s, data, s_remaining(s));
+-                                      sec_decrypt(data, s_remaining(s));
++                                      remaining = s_remaining(s);
++                                      inout_uint8p(s, data, remaining);
++                                      sec_decrypt(data, remaining);
+                               }
+ 
+                               if (sec_flags & SEC_LICENCE_NEG)
+@@ -883,8 +886,9 @@ sec_recv(uint8 * rdpver)
+ 
+                                       data_offset = s_tell(s);
+ 
+-                                      inout_uint8p(s, data, s_remaining(s));
+-                                      sec_decrypt(data, s_remaining(s));
++                                      remaining = s_remaining(s);
++                                      inout_uint8p(s, data, remaining);
++                                      sec_decrypt(data, remaining);
+ 
+                                       /* Check for a redirect packet, starts 
with 00 04 */
+                                       if (data[0] == 0 && data[1] == 4)

diff --git 
a/net-misc/rdesktop/files/rdesktop-1.9.0-rdssl_rkey_get_exp_mod.patch 
b/net-misc/rdesktop/files/rdesktop-1.9.0-rdssl_rkey_get_exp_mod.patch
new file mode 100644
index 0000000..7ac0067
--- /dev/null
+++ b/net-misc/rdesktop/files/rdesktop-1.9.0-rdssl_rkey_get_exp_mod.patch
@@ -0,0 +1,26 @@
+From 53ba87dc174175e98332e22355ad8662c02880d6 Mon Sep 17 00:00:00 2001
+From: Markus Beth <markus.b...@zkrd.de>
+Date: Mon, 2 Dec 2019 11:22:13 +0100
+Subject: [PATCH] use correct modulus and exponent in rdssl_rkey_get_exp_mod
+
+---
+ ssl.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ssl.c b/ssl.c
+index 930c7f94..0681a890 100644
+--- a/ssl.c
++++ b/ssl.c
+@@ -307,10 +307,10 @@ rdssl_rkey_get_exp_mod(RDSSL_RKEY * rkey, uint8 * 
exponent, uint32 max_exp_len,
+ {
+       size_t outlen;
+ 
+-      outlen = (mpz_sizeinbase(modulus, 2) + 7) / 8;
++      outlen = (mpz_sizeinbase(rkey->n, 2) + 7) / 8;
+       if (outlen > max_mod_len)
+               return 1;
+-      outlen = (mpz_sizeinbase(exponent, 2) + 7) / 8;
++      outlen = (mpz_sizeinbase(rkey->e, 2) + 7) / 8;
+       if (outlen > max_exp_len)
+               return 1;
+ 

diff --git a/net-misc/rdesktop/metadata.xml b/net-misc/rdesktop/metadata.xml
new file mode 100644
index 0000000..8e11088
--- /dev/null
+++ b/net-misc/rdesktop/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>voyag...@gentoo.org</email>
+               <name>Bernard Cafarelli</name>
+       </maintainer>
+       <longdescription>
+               An open source client for Windows NT Terminal Server and 
Windows 2000/2003 Terminal Services, capable of natively speaking Remote 
Desktop Protocol (RDP) in order to present the user's NT desktop. Unlike Citrix 
ICA, no server extensions are required.
+       </longdescription>
+       <use>
+               <flag name="kerberos">Enable CredSPP support + Kerberos 
authentication</flag>
+               <flag name="pcsc-lite">Enable smartcard support with 
<pkg>sys-apps/pcsc-lite</pkg> driver</flag>
+               <flag name="xrandr">Enable XRandR window extension 
support</flag>
+       </use>
+       <upstream>
+               <remote-id type="sourceforge">rdesktop</remote-id>
+       </upstream>
+</pkgmetadata>

diff --git a/net-misc/rdesktop/rdesktop-1.8.6-r1.ebuild 
b/net-misc/rdesktop/rdesktop-1.8.6-r1.ebuild
new file mode 100644
index 0000000..492073a
--- /dev/null
+++ b/net-misc/rdesktop/rdesktop-1.8.6-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools eutils
+
+MY_PV=${PV/_/-}
+
+DESCRIPTION="A Remote Desktop Protocol Client"
+HOMEPAGE="http://www.rdesktop.org/";
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz";
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 
~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="alsa ao debug ipv6 kerberos libressl libsamplerate oss pcsc-lite xrandr"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+RDEPEND="
+       !libressl? ( dev-libs/openssl:0= )
+       libressl? ( dev-libs/libressl:= )
+       x11-libs/libX11
+       x11-libs/libXext
+       x11-libs/libXau
+       x11-libs/libXdmcp
+       alsa? ( media-libs/alsa-lib )
+       ao? ( >=media-libs/libao-0.8.6 )
+       kerberos? ( virtual/krb5 )
+       libsamplerate? ( media-libs/libsamplerate )
+       pcsc-lite? ( >=sys-apps/pcsc-lite-1.6.6 )
+       xrandr? ( x11-libs/libXrandr )"
+DEPEND="${RDEPEND}
+       x11-libs/libXt"
+BDEPEND=virtual/pkgconfig
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.6.0-sound_configure.patch
+       "${FILESDIR}"/${PN}-1.8.3-no_strip.patch
+       "${FILESDIR}"/${PN}-1.8.3-xrandr_configure.patch
+       "${FILESDIR}"/${PN}-1.8.4-libressl.patch
+       "${FILESDIR}"/${PN}-1.8.5-use_standard_gssapi.patch
+       "${FILESDIR}"/${P}-sec_decrypt.patch
+)
+
+DOCS=( doc/HACKING doc/TODO doc/keymapping.txt )
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       if use ao; then
+               sound_conf=$(use_with ao sound libao)
+       else if use alsa; then
+                       sound_conf=$(use_with alsa sound alsa)
+               else
+                       sound_conf=$(use_with oss sound oss)
+               fi
+       fi
+
+       econf \
+               --with-openssl="${EPREFIX}"/usr \
+               $(use_with debug) \
+               $(use_with ipv6) \
+               $(use_with libsamplerate) \
+               $(use_with xrandr) \
+               $(use_enable kerberos credssp) \
+               $(use_enable pcsc-lite smartcard) \
+               ${sound_conf}
+}

diff --git a/net-misc/rdesktop/rdesktop-1.8.6.ebuild 
b/net-misc/rdesktop/rdesktop-1.8.6.ebuild
new file mode 100644
index 0000000..26cdc93
--- /dev/null
+++ b/net-misc/rdesktop/rdesktop-1.8.6.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools eutils
+
+MY_PV=${PV/_/-}
+
+DESCRIPTION="A Remote Desktop Protocol Client"
+HOMEPAGE="http://www.rdesktop.org/";
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz";
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux 
~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="alsa ao debug ipv6 kerberos libressl libsamplerate oss pcsc-lite xrandr"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+RDEPEND="
+       !libressl? ( dev-libs/openssl:0= )
+       libressl? ( dev-libs/libressl:= )
+       x11-libs/libX11
+       x11-libs/libXext
+       x11-libs/libXau
+       x11-libs/libXdmcp
+       alsa? ( media-libs/alsa-lib )
+       ao? ( >=media-libs/libao-0.8.6 )
+       kerberos? ( virtual/krb5 )
+       libsamplerate? ( media-libs/libsamplerate )
+       pcsc-lite? ( >=sys-apps/pcsc-lite-1.6.6 )
+       xrandr? ( x11-libs/libXrandr )"
+DEPEND="${RDEPEND}
+       x11-libs/libXt"
+BDEPEND=virtual/pkgconfig
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.6.0-sound_configure.patch
+       "${FILESDIR}"/${PN}-1.8.3-no_strip.patch
+       "${FILESDIR}"/${PN}-1.8.3-xrandr_configure.patch
+       "${FILESDIR}"/${PN}-1.8.4-libressl.patch
+       "${FILESDIR}"/${PN}-1.8.5-use_standard_gssapi.patch
+)
+
+DOCS=( doc/HACKING doc/TODO doc/keymapping.txt )
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       if use ao; then
+               sound_conf=$(use_with ao sound libao)
+       else if use alsa; then
+                       sound_conf=$(use_with alsa sound alsa)
+               else
+                       sound_conf=$(use_with oss sound oss)
+               fi
+       fi
+
+       econf \
+               --with-openssl="${EPREFIX}"/usr \
+               $(use_with debug) \
+               $(use_with ipv6) \
+               $(use_with libsamplerate) \
+               $(use_with xrandr) \
+               $(use_enable kerberos credssp) \
+               $(use_enable pcsc-lite smartcard) \
+               ${sound_conf}
+}

diff --git a/net-misc/rdesktop/rdesktop-1.9.0-r1.ebuild 
b/net-misc/rdesktop/rdesktop-1.9.0-r1.ebuild
new file mode 100644
index 0000000..18dc6e0
--- /dev/null
+++ b/net-misc/rdesktop/rdesktop-1.9.0-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools eutils
+
+MY_PV=${PV/_/-}
+
+DESCRIPTION="A Remote Desktop Protocol Client"
+HOMEPAGE="http://www.rdesktop.org/";
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz";
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 
~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="alsa ao ipv6 kerberos oss pcsc-lite pulseaudio xrandr"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+RDEPEND="
+       dev-libs/nettle:0=
+       >=net-libs/gnutls-3.2.0:0=
+       x11-libs/libX11
+       x11-libs/libXcursor
+       x11-libs/libXext
+       x11-libs/libXau
+       x11-libs/libXdmcp
+       alsa? (
+               media-libs/alsa-lib
+               media-libs/libsamplerate
+       )
+       ao? (
+               >=media-libs/libao-0.8.6
+               media-libs/libsamplerate
+       )
+       kerberos? ( virtual/krb5 )
+       pcsc-lite? ( >=sys-apps/pcsc-lite-1.6.6 )
+       oss? ( media-libs/libsamplerate )
+       pulseaudio? (
+               media-libs/libsamplerate
+               media-sound/pulseaudio
+       )
+       xrandr? ( x11-libs/libXrandr )"
+DEPEND="${RDEPEND}
+       x11-libs/libXt"
+BDEPEND=virtual/pkgconfig
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.8.3-no_strip.patch
+       "${FILESDIR}"/${PN}-1.8.3-xrandr_configure.patch
+       "${FILESDIR}"/${P}-rdssl_rkey_get_exp_mod.patch
+)
+
+DOCS=( doc/ChangeLog doc/HACKING doc/TODO doc/keymapping.txt )
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       if use pulseaudio; then
+               sound_conf="--with-sound=pulse"
+       elif use ao; then
+               sound_conf="--with-sound=libao"
+       elif use alsa; then
+               sound_conf="--with-sound=alsa"
+       else
+               sound_conf=$(use_with oss sound oss)
+       fi
+
+       econf \
+               $(use_with ipv6) \
+               $(use_with xrandr) \
+               $(use_enable kerberos credssp) \
+               $(use_enable pcsc-lite smartcard) \
+               ${sound_conf}
+}

diff --git a/net-misc/rdesktop/rdesktop-1.9.0.ebuild 
b/net-misc/rdesktop/rdesktop-1.9.0.ebuild
new file mode 100644
index 0000000..ed82fa9
--- /dev/null
+++ b/net-misc/rdesktop/rdesktop-1.9.0.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools eutils
+
+MY_PV=${PV/_/-}
+
+DESCRIPTION="A Remote Desktop Protocol Client"
+HOMEPAGE="http://www.rdesktop.org/";
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz";
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux 
~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="alsa ao ipv6 kerberos oss pcsc-lite pulseaudio xrandr"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+RDEPEND="
+       dev-libs/nettle:0=
+       >=net-libs/gnutls-3.2.0:0=
+       x11-libs/libX11
+       x11-libs/libXcursor
+       x11-libs/libXext
+       x11-libs/libXau
+       x11-libs/libXdmcp
+       alsa? (
+               media-libs/alsa-lib
+               media-libs/libsamplerate
+       )
+       ao? (
+               >=media-libs/libao-0.8.6
+               media-libs/libsamplerate
+       )
+       kerberos? ( virtual/krb5 )
+       pcsc-lite? ( >=sys-apps/pcsc-lite-1.6.6 )
+       oss? ( media-libs/libsamplerate )
+       pulseaudio? (
+               media-libs/libsamplerate
+               media-sound/pulseaudio
+       )
+       xrandr? ( x11-libs/libXrandr )"
+DEPEND="${RDEPEND}
+       x11-libs/libXt"
+BDEPEND=virtual/pkgconfig
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.8.3-no_strip.patch
+       "${FILESDIR}"/${PN}-1.8.3-xrandr_configure.patch
+)
+
+DOCS=( doc/ChangeLog doc/HACKING doc/TODO doc/keymapping.txt )
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       if use pulseaudio; then
+               sound_conf="--with-sound=pulse"
+       elif use ao; then
+               sound_conf="--with-sound=libao"
+       elif use alsa; then
+               sound_conf="--with-sound=alsa"
+       else
+               sound_conf=$(use_with oss sound oss)
+       fi
+
+       econf \
+               $(use_with ipv6) \
+               $(use_with xrandr) \
+               $(use_enable kerberos credssp) \
+               $(use_enable pcsc-lite smartcard) \
+               ${sound_conf}
+}

Reply via email to