From bc6d358241857032dddc928073021ee6cbf16997 Mon Sep 17 00:00:00 2001 From: Pacho Ramos Date: Thu, 8 Dec 2016 11:47:38 +0100 Subject: net-misc/guacamole-server: Be compatible with newer freerdp and tiny deps a bit Package-Manager: portage-2.3.2 --- ...uacamole-server-0.9.9-clipboard-id-update.patch | 104 +++++++++++++++++++++ .../files/guacamole-server-0.9.9-glyph-order.patch | 24 +++++ .../guacamole-server-0.9.9-r1.ebuild | 72 ++++++++++++++ .../guacamole-server/guacamole-server-0.9.9.ebuild | 65 ------------- 4 files changed, 200 insertions(+), 65 deletions(-) create mode 100644 net-misc/guacamole-server/files/guacamole-server-0.9.9-clipboard-id-update.patch create mode 100644 net-misc/guacamole-server/files/guacamole-server-0.9.9-glyph-order.patch create mode 100644 net-misc/guacamole-server/guacamole-server-0.9.9-r1.ebuild delete mode 100644 net-misc/guacamole-server/guacamole-server-0.9.9.ebuild (limited to 'net-misc') diff --git a/net-misc/guacamole-server/files/guacamole-server-0.9.9-clipboard-id-update.patch b/net-misc/guacamole-server/files/guacamole-server-0.9.9-clipboard-id-update.patch new file mode 100644 index 000000000000..4191479f34d8 --- /dev/null +++ b/net-misc/guacamole-server/files/guacamole-server-0.9.9-clipboard-id-update.patch @@ -0,0 +1,104 @@ +--- guacamole-server-0.9.5/src/protocols/rdp/rdp_cliprdr.c.orig 2015-03-17 12:39:58.316549546 +0000 ++++ guacamole-server-0.9.5/src/protocols/rdp/rdp_cliprdr.c 2015-03-17 12:40:57.059229957 +0000 +@@ -104,8 +104,8 @@ void guac_rdp_process_cb_monitor_ready(g + + /* Respond with supported format list */ + format_list->formats = (UINT32*) malloc(sizeof(UINT32)*2); +- format_list->formats[0] = CB_FORMAT_TEXT; +- format_list->formats[1] = CB_FORMAT_UNICODETEXT; ++ format_list->formats[0] = CF_TEXT; ++ format_list->formats[1] = CF_UNICODETEXT; + format_list->num_formats = 2; + + freerdp_channels_send_event(channels, (wMessage*) format_list); +@@ -147,22 +147,22 @@ void guac_rdp_process_cb_format_list(gua + for (i=0; inum_formats; i++) { + + /* If plain text available, request it */ +- if (event->formats[i] == CB_FORMAT_TEXT) ++ if (event->formats[i] == CF_TEXT) + formats |= GUAC_RDP_CLIPBOARD_FORMAT_CP1252; +- else if (event->formats[i] == CB_FORMAT_UNICODETEXT) ++ else if (event->formats[i] == CF_UNICODETEXT) + formats |= GUAC_RDP_CLIPBOARD_FORMAT_UTF16; + + } + + /* Prefer Unicode to plain text */ + if (formats & GUAC_RDP_CLIPBOARD_FORMAT_UTF16) { +- __guac_rdp_cb_request_format(client, CB_FORMAT_UNICODETEXT); ++ __guac_rdp_cb_request_format(client, CF_UNICODETEXT); + return; + } + + /* Use plain text if Unicode unavailable */ + if (formats & GUAC_RDP_CLIPBOARD_FORMAT_CP1252) { +- __guac_rdp_cb_request_format(client, CB_FORMAT_TEXT); ++ __guac_rdp_cb_request_format(client, CF_TEXT); + return; + } + +@@ -186,11 +186,11 @@ void guac_rdp_process_cb_data_request(gu + /* Determine output encoding */ + switch (event->format) { + +- case CB_FORMAT_TEXT: ++ case CF_TEXT: + writer = GUAC_WRITE_CP1252; + break; + +- case CB_FORMAT_UNICODETEXT: ++ case CF_UNICODETEXT: + writer = GUAC_WRITE_UTF16; + break; + +@@ -232,12 +232,12 @@ void guac_rdp_process_cb_data_response(g + switch (client_data->requested_clipboard_format) { + + /* Non-Unicode */ +- case CB_FORMAT_TEXT: ++ case CF_TEXT: + reader = GUAC_READ_CP1252; + break; + + /* Unicode (UTF-16) */ +- case CB_FORMAT_UNICODETEXT: ++ case CF_UNICODETEXT: + reader = GUAC_READ_UTF16; + break; + +--- guacamole-server-0.9.5/src/protocols/rdp/client.c.orig 2015-03-17 12:40:07.079651048 +0000 ++++ guacamole-server-0.9.5/src/protocols/rdp/client.c 2015-03-17 12:40:57.064230015 +0000 +@@ -722,7 +722,7 @@ int guac_client_init(guac_client* client + guac_client_data->rdp_inst = rdp_inst; + guac_client_data->mouse_button_mask = 0; + guac_client_data->clipboard = guac_common_clipboard_alloc(GUAC_RDP_CLIPBOARD_MAX_LENGTH); +- guac_client_data->requested_clipboard_format = CB_FORMAT_TEXT; ++ guac_client_data->requested_clipboard_format = CF_TEXT; + guac_client_data->audio = NULL; + guac_client_data->filesystem = NULL; + guac_client_data->available_svc = guac_common_list_alloc(); +--- guacamole-server-0.9.5/src/protocols/rdp/rdp_stream.c.orig 2015-03-17 12:40:13.952730659 +0000 ++++ guacamole-server-0.9.5/src/protocols/rdp/rdp_stream.c 2015-03-17 12:40:57.066230038 +0000 +@@ -289,8 +289,8 @@ int guac_rdp_clipboard_end_handler(guac_ + + /* Notify server that text data is now available */ + format_list->formats = (UINT32*) malloc(sizeof(UINT32)); +- format_list->formats[0] = CB_FORMAT_TEXT; +- format_list->formats[1] = CB_FORMAT_UNICODETEXT; ++ format_list->formats[0] = CF_TEXT; ++ format_list->formats[1] = CF_UNICODETEXT; + format_list->num_formats = 2; + + freerdp_channels_send_event(channels, (wMessage*) format_list); +--- guacamole-server-0.9.5/src/protocols/rdp/client.h.orig 2015-03-17 12:40:22.535830076 +0000 ++++ guacamole-server-0.9.5/src/protocols/rdp/client.h 2015-03-17 12:40:57.067230050 +0000 +@@ -143,7 +143,7 @@ typedef struct rdp_guac_client_data { + * The format of the clipboard which was requested. Data received from + * the RDP server should conform to this format. This will be one of + * several legal clipboard format values defined within FreeRDP, such as +- * CB_FORMAT_TEXT. ++ * CF_TEXT. + */ + int requested_clipboard_format; + diff --git a/net-misc/guacamole-server/files/guacamole-server-0.9.9-glyph-order.patch b/net-misc/guacamole-server/files/guacamole-server-0.9.9-glyph-order.patch new file mode 100644 index 000000000000..70bba86d9000 --- /dev/null +++ b/net-misc/guacamole-server/files/guacamole-server-0.9.9-glyph-order.patch @@ -0,0 +1,24 @@ +--- guacamole-server-0.9.5/src/protocols/rdp/rdp_glyph.c~ 2015-02-04 05:58:22.000000000 +0000 ++++ guacamole-server-0.9.5/src/protocols/rdp/rdp_glyph.c 2015-03-17 14:04:45.549617112 +0000 +@@ -126,7 +126,8 @@ void guac_rdp_glyph_free(rdpContext* con + } + + void guac_rdp_glyph_begindraw(rdpContext* context, +- int x, int y, int width, int height, UINT32 fgcolor, UINT32 bgcolor) { ++ int x, int y, int width, int height, UINT32 fgcolor, UINT32 bgcolor, ++ BOOL fOpRedundant) { + + guac_client* client = ((rdp_freerdp_context*) context)->client; + rdp_guac_client_data* guac_client_data = +--- guacamole-server-0.9.5/src/protocols/rdp/rdp_glyph.h~ 2015-02-04 05:58:22.000000000 +0000 ++++ guacamole-server-0.9.5/src/protocols/rdp/rdp_glyph.h 2015-03-17 14:05:27.929142981 +0000 +@@ -53,7 +53,8 @@ void guac_rdp_glyph_new(rdpContext* cont + void guac_rdp_glyph_draw(rdpContext* context, rdpGlyph* glyph, int x, int y); + void guac_rdp_glyph_free(rdpContext* context, rdpGlyph* glyph); + void guac_rdp_glyph_begindraw(rdpContext* context, +- int x, int y, int width, int height, UINT32 fgcolor, UINT32 bgcolor); ++ int x, int y, int width, int height, UINT32 fgcolor, UINT32 bgcolor, ++ BOOL fOpRedundant); + void guac_rdp_glyph_enddraw(rdpContext* context, + int x, int y, int width, int height, UINT32 fgcolor, UINT32 bgcolor); + diff --git a/net-misc/guacamole-server/guacamole-server-0.9.9-r1.ebuild b/net-misc/guacamole-server/guacamole-server-0.9.9-r1.ebuild new file mode 100644 index 000000000000..75e00be6635c --- /dev/null +++ b/net-misc/guacamole-server/guacamole-server-0.9.9-r1.ebuild @@ -0,0 +1,72 @@ +# 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 +} diff --git a/net-misc/guacamole-server/guacamole-server-0.9.9.ebuild b/net-misc/guacamole-server/guacamole-server-0.9.9.ebuild deleted file mode 100644 index d05c1aad72ab..000000000000 --- a/net-misc/guacamole-server/guacamole-server-0.9.9.ebuild +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -inherit eutils 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" - -DEPEND="x11-libs/cairo - media-libs/libpng:* - virtual/jpeg:* - dev-libs/ossp-uuid - rdesktop? (