diff options
-rw-r--r-- | net-misc/rdesktop/Manifest | 1 | ||||
-rw-r--r-- | net-misc/rdesktop/files/rdesktop-1.6.0-sound_configure.patch | 15 | ||||
-rw-r--r-- | net-misc/rdesktop/files/rdesktop-1.8.3-no_strip.patch | 12 | ||||
-rw-r--r-- | net-misc/rdesktop/files/rdesktop-1.8.3-xrandr_configure.patch | 17 | ||||
-rw-r--r-- | net-misc/rdesktop/files/rdesktop-1.8.4-libressl.patch | 16 | ||||
-rw-r--r-- | net-misc/rdesktop/files/rdesktop-1.8.5-use_standard_gssapi.patch | 56 | ||||
-rw-r--r-- | net-misc/rdesktop/files/rdesktop-1.8.6-sec_decrypt.patch | 59 | ||||
-rw-r--r-- | net-misc/rdesktop/metadata.xml | 19 | ||||
-rw-r--r-- | net-misc/rdesktop/rdesktop-1.8.6-r1.ebuild | 72 | ||||
-rw-r--r-- | net-misc/rdesktop/rdesktop-1.8.6.ebuild | 71 |
10 files changed, 338 insertions, 0 deletions
diff --git a/net-misc/rdesktop/Manifest b/net-misc/rdesktop/Manifest new file mode 100644 index 0000000..e521b8c --- /dev/null +++ b/net-misc/rdesktop/Manifest @@ -0,0 +1 @@ +DIST rdesktop-1.8.6.tar.gz 321061 BLAKE2B bd61ecfbdca3f05b2a8d7f84c10296af3845870f5bd2522ecd768ce27cdbf790787ba9af2f53c85bcd674926488b77a610e48cafbb891fced9a458f86a2ee9e1 SHA512 a7d624dad27e531cf38d73bd879e66aaf72e527d082a4adb59e259e4e5b9a779ee6938db74601fbb2be7e7b015c806109fe8dfc99d78cbd06f0ba4d8f89b28ee 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.beth@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/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>voyageur@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} +} |