Last-Modified: Wed, 29 Jan 2025 04:45:53 GMT
Expires: Sat, 27 Jan 2035 04:45:53 GMT

<!DOCTYPE html>
<html lang='en'>
<head>
<title>metabat-fix-compilation.patch « patches « packages « gnu - guix - Wojtek's customized Guix</title>
<meta name='generator' content='cgit v1.2.3'/>
<meta name='robots' content='noindex, nofollow'/>
<link rel='stylesheet' type='text/css' href='/cgit-static/cgit.css'/>
<link rel='stylesheet' type='text/css' href='/cgit-static/better-cgit-markdown-heading-color.css'/>
<link rel='shortcut icon' href='/cgit-static/favicon.ico'/>
<link rel='alternate' title='Atom feed' href='https://git.koszko.org/guix/atom/gnu/packages/patches/metabat-fix-compilation.patch?h=koszko' type='application/atom+xml'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/'><img src='https://git.koszko.org/cgit-static/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/'>index</a> : <a href='/guix/'>guix</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='a6a7336964da06abba9dd40ce8d7496c9c711177'/><select name='h' onchange='this.form.submit();'>
<option value='koszko' selected='selected'>koszko</option>
<option value='koszko-scripts'>koszko-scripts</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>Wojtek's customized Guix</td><td class='sub right'>ummary</a><a href='/guix/refs/?id=a6a7336964da06abba9dd40ce8d7496c9c711177'>refs</a><a href='/guix/log/'>log</a><a href='/guix/tree/?id=a6a7336964da06abba9dd40ce8d7496c9c711177'>tree</a><a href='/guix/commit/?id=a6a7336964da06abba9dd40ce8d7496c9c711177'>commit</a><a href='/guix/diff/?id=a6a7336964da06abba9dd40ce8d7496c9c711177'>diff</a></td><td class='form'><form class='right' method='get' action='/guix/log/'>
<input type='hidden' name='id' value='a6a7336964da06abba9dd40ce8d7496c9c711177'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='content'><div id='summary'><pre>
https://gitlab.gnome.org/GNOME/vinagre/merge_requests/4.patch

From 83ec3835c36d5cd2c957512c18d21a33b4136c95 Mon Sep 17 00:00:00 2001
From: Ondrej Holy &lt;oholy@redhat.com&gt;
Date: Tue, 20 Nov 2018 14:57:17 +0100
Subject: [PATCH 1/2] Fix build with recent FreeRDP versions

Vinagre is not buildable with recent FreeRDP versions and similar patches
are used by distributions to fix that. I have also removed some old
compatibility codes, because it wasn&apos;t buildable against 1.0, nor 1.1
anyway and 1.2 has never been officially released and is superseded by 2.0.

https://gitlab.gnome.org/GNOME/vinagre/issues/4
---
 configure.ac                  |   7 +-
 plugins/rdp/vinagre-rdp-tab.c | 129 +++++++---------------------------
 2 files changed, 27 insertions(+), 109 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5b51a82..61617f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,16 +58,15 @@ AS_IF([test &quot;x$have_ssh&quot; = &quot;xyes&quot;],
 AM_CONDITIONAL([VINAGRE_ENABLE_SSH], [test &quot;x$have_ssh&quot; = &quot;xyes&quot;])
 
 # Whether to enable support for RDP.
-RDP_DEPS=&quot;freerdp x11&quot;
+RDP_DEPS=&quot;freerdp2 x11&quot;
+
 AC_ARG_ENABLE([rdp],
   [AS_HELP_STRING([--disable-rdp],
     [Disable Remote Desktop Protocol (RDP) support])])
 
 AS_IF([test &quot;x$enable_rdp&quot; != &quot;xno&quot;],
   [PKG_CHECK_EXISTS([$RDP_DEPS],
-    [have_rdp=yes
-     PKG_CHECK_EXISTS(freerdp &gt;= 1.1,
-       [AC_DEFINE([HAVE_FREERDP_1_1], [1], [FreeRDP is of version 1.1 or newer])], [])],
+    [have_rdp=yes],
     [have_rdp=no])],
   [have_rdp=no])
 
diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c
index 5b98c24..28e3eb6 100644
--- a/plugins/rdp/vinagre-rdp-tab.c
+++ b/plugins/rdp/vinagre-rdp-tab.c
@@ -29,12 +29,7 @@
 #include &lt;freerdp/types.h&gt;
 #include &lt;freerdp/freerdp.h&gt;
 #include &lt;freerdp/gdi/gdi.h&gt;
-#if HAVE_FREERDP_1_1
 #include &lt;freerdp/locale/keyboard.h&gt;
-#else
-#include &lt;freerdp/kbd/vkcodes.h&gt;
-#include &lt;gdk/gdkx.h&gt;
-#endif
 
 #include &quot;vinagre-rdp-tab.h&quot;
 #include &quot;vinagre-rdp-connection.h&quot;
@@ -44,12 +39,6 @@
 
 #define SELECT_TIMEOUT 50
 
-#if !HAVE_FREERDP_1_1
-typedef boolean BOOL;
-typedef uint8   UINT8;
-typedef uint16  UINT16;
-#endif
-
 struct _VinagreRdpTabPrivate
 {
   freerdp         *freerdp_session;
@@ -476,16 +465,18 @@ frdp_drawing_area_draw (GtkWidget *area,
   return TRUE;
 }
 
-static void
+static BOOL
 frdp_begin_paint (rdpContext *context)
 {
   rdpGdi *gdi = context-&gt;gdi;
 
   gdi-&gt;primary-&gt;hdc-&gt;hwnd-&gt;invalid-&gt;null = 1;
   gdi-&gt;primary-&gt;hdc-&gt;hwnd-&gt;ninvalid = 0;
+
+  return TRUE;
 }
 
-static void
+static BOOL
 frdp_end_paint (rdpContext *context)
 {
   VinagreRdpTab        *rdp_tab = ((frdpContext *) context)-&gt;rdp_tab;
@@ -495,7 +486,7 @@ frdp_end_paint (rdpContext *context)
   gint                  x, y, w, h;
 
   if (gdi-&gt;primary-&gt;hdc-&gt;hwnd-&gt;invalid-&gt;null)
-    return;
+    return TRUE;
 
   x = gdi-&gt;primary-&gt;hdc-&gt;hwnd-&gt;invalid-&gt;x;
   y = gdi-&gt;primary-&gt;hdc-&gt;hwnd-&gt;invalid-&gt;y;
@@ -517,6 +508,8 @@ frdp_end_paint (rdpContext *context)
     {
       gtk_widget_queue_draw_area (priv-&gt;display, x, y, w, h);
     }
+
+  return TRUE;
 }
 
 static BOOL
@@ -524,7 +517,6 @@ frdp_pre_connect (freerdp *instance)
 {
   rdpSettings *settings = instance-&gt;settings;
 
-#if HAVE_FREERDP_1_1
   settings-&gt;OrderSupport[NEG_DSTBLT_INDEX] = TRUE;
   settings-&gt;OrderSupport[NEG_PATBLT_INDEX] = TRUE;
   settings-&gt;OrderSupport[NEG_SCRBLT_INDEX] = TRUE;
@@ -549,32 +541,6 @@ frdp_pre_connect (freerdp *instance)
   settings-&gt;OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE;
   settings-&gt;OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE;
   settings-&gt;OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
-#else
-  settings-&gt;order_support[NEG_DSTBLT_INDEX] = true;
-  settings-&gt;order_support[NEG_PATBLT_INDEX] = true;
-  settings-&gt;order_support[NEG_SCRBLT_INDEX] = true;
-  settings-&gt;order_support[NEG_OPAQUE_RECT_INDEX] = true;
-  settings-&gt;order_support[NEG_DRAWNINEGRID_INDEX] = false;
-  settings-&gt;order_support[NEG_MULTIDSTBLT_INDEX] = false;
-  settings-&gt;order_support[NEG_MULTIPATBLT_INDEX] = false;
-  settings-&gt;order_support[NEG_MULTISCRBLT_INDEX] = false;
-  settings-&gt;order_support[NEG_MULTIOPAQUERECT_INDEX] = true;
-  settings-&gt;order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = false;
-  settings-&gt;order_support[NEG_LINETO_INDEX] = true;
-  settings-&gt;order_support[NEG_POLYLINE_INDEX] = true;
-  settings-&gt;order_support[NEG_MEMBLT_INDEX] = true;
-  settings-&gt;order_support[NEG_MEM3BLT_INDEX] = false;
-  settings-&gt;order_support[NEG_MEMBLT_V2_INDEX] = true;
-  settings-&gt;order_support[NEG_MEM3BLT_V2_INDEX] = false;
-  settings-&gt;order_support[NEG_SAVEBITMAP_INDEX] = false;
-  settings-&gt;order_support[NEG_GLYPH_INDEX_INDEX] = true;
-  settings-&gt;order_support[NEG_FAST_INDEX_INDEX] = true;
-  settings-&gt;order_support[NEG_FAST_GLYPH_INDEX] = false;
-  settings-&gt;order_support[NEG_POLYGON_SC_INDEX] = false;
-  settings-&gt;order_support[NEG_POLYGON_CB_INDEX] = false;
-  settings-&gt;order_support[NEG_ELLIPSE_SC_INDEX] = false;
-  settings-&gt;order_support[NEG_ELLIPSE_CB_INDEX] = false;
-#endif
 
   return TRUE;
 }
@@ -587,15 +553,7 @@ frdp_post_connect (freerdp *instance)
   rdpGdi               *gdi;
   int                   stride;
 
-  gdi_init (instance,
-#if defined(FREERDP_VERSION_MAJOR) &amp;&amp; defined(FREERDP_VERSION_MINOR) &amp;&amp; \
-    !(FREERDP_VERSION_MAJOR &gt; 1 || (FREERDP_VERSION_MAJOR == 1 &amp;&amp; \
-    FREERDP_VERSION_MINOR &gt;= 2))
-                    CLRBUF_24BPP,
-#else
-                    CLRBUF_32BPP,
-#endif
-                    NULL);
+  gdi_init (instance, PIXEL_FORMAT_BGRA32);
   gdi = instance-&gt;context-&gt;gdi;
 
   instance-&gt;update-&gt;BeginPaint = frdp_begin_paint;
@@ -705,21 +663,15 @@ frdp_key_pressed (GtkWidget   *widget,
   VinagreRdpTab        *rdp_tab = (VinagreRdpTab *) user_data;
   VinagreRdpTabPrivate *priv = rdp_tab-&gt;priv;
   frdpEventKey         *frdp_event;
-#if HAVE_FREERDP_1_1
   UINT16                scancode;
-#endif
 
   frdp_event = g_new0 (frdpEventKey, 1);
   frdp_event-&gt;type = FRDP_EVENT_TYPE_KEY;
   frdp_event-&gt;flags = event-&gt;type == GDK_KEY_PRESS ? KBD_FLAGS_DOWN : KBD_FLAGS_RELEASE;
 
-#if HAVE_FREERDP_1_1
   scancode = freerdp_keyboard_get_rdp_scancode_from_x11_keycode (event-&gt;hardware_keycode);
   frdp_event-&gt;code = RDP_SCANCODE_CODE(scancode);
   frdp_event-&gt;extended = RDP_SCANCODE_EXTENDED(scancode);
-#else
-  frdp_event-&gt;code = freerdp_kbd_get_scancode_by_keycode (event-&gt;hardware_keycode, &amp;frdp_event-&gt;extended);
-#endif
 
   if (frdp_event-&gt;extended)
     frdp_event-&gt;flags |= KBD_FLAGS_EXTENDED;
@@ -934,11 +886,13 @@ frdp_authenticate (freerdp  *instance,
   return TRUE;
 }
 
-static BOOL
+static DWORD
 frdp_certificate_verify (freerdp *instance,
-                         char    *subject,
-                         char    *issuer,
-                         char    *fingerprint)
+                         const char *common_name,
+                         const char *subject,
+                         const char *issuer,
+                         const char *fingerprint,
+                         BOOL host_mismatch)
 {
   VinagreTab *tab = VINAGRE_TAB (((frdpContext *) instance-&gt;context)-&gt;rdp_tab);
   GtkBuilder *builder;
@@ -968,17 +922,18 @@ frdp_certificate_verify (freerdp *instance,
   gtk_widget_hide (dialog);
 
 
-  return response == GTK_RESPONSE_YES;
+  return (response == GTK_RESPONSE_YES) ? 1 : 0;
 }
 
-
-#if HAVE_FREERDP_1_1
-static BOOL
+static DWORD
 frdp_changed_certificate_verify (freerdp *instance,
-                                 char    *subject,
-                                 char    *issuer,
-                                 char    *new_fingerprint,
-                                 char    *old_fingerprint)
+                                 const char *common_name,
+                                 const char *subject,
+                                 const char *issuer,
+                                 const char *new_fingerprint,
+                                 const char *old_subject,
+                                 const char *old_issuer,
+                                 const char *old_fingerprint)
 {
   VinagreTab *tab = VINAGRE_TAB (((frdpContext *) instance-&gt;context)-&gt;rdp_tab);
   GtkBuilder *builder;
@@ -1023,9 +978,8 @@ frdp_changed_certificate_verify (freerdp *instance,
   gtk_widget_hide (dialog);
 
 
-  return response == GTK_RESPONSE_YES;
+  return (response == GTK_RESPONSE_YES) ? 1 : 0;
 }
-#endif
 
 static void
 init_freerdp (VinagreRdpTab *rdp_tab)
@@ -1053,15 +1007,9 @@ init_freerdp (VinagreRdpTab *rdp_tab)
   priv-&gt;freerdp_session-&gt;PostConnect = frdp_post_connect;
   priv-&gt;freerdp_session-&gt;Authenticate = frdp_authenticate;
   priv-&gt;freerdp_session-&gt;VerifyCertificate = frdp_certificate_verify;
-#if HAVE_FREERDP_1_1
   priv-&gt;freerdp_session-&gt;VerifyChangedCertificate = frdp_changed_certificate_verify;
-#endif
 
-#if HAVE_FREERDP_1_1
   priv-&gt;freerdp_session-&gt;ContextSize = sizeof (frdpContext);
-#else
-  priv-&gt;freerdp_session-&gt;context_size = sizeof (frdpContext);
-#endif
 
   freerdp_context_new (priv-&gt;freerdp_session);
   ((frdpContext *) priv-&gt;freerdp_session-&gt;context)-&gt;rdp_tab = rdp_tab;
@@ -1070,53 +1018,24 @@ init_freerdp (VinagreRdpTab *rdp_tab)
   settings = priv-&gt;freerdp_session-&gt;settings;
 
   /* Security settings */
-#if HAVE_FREERDP_1_1
   settings-&gt;RdpSecurity = TRUE;
   settings-&gt;TlsSecurity = TRUE;
   settings-&gt;NlaSecurity = TRUE;
   settings-&gt;EncryptionMethods = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS;
   settings-&gt;EncryptionLevel = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE;
-#else
-  settings-&gt;rdp_security = true;
-  settings-&gt;tls_security = true;
-  settings-&gt;nla_security = true;
-  settings-&gt;encryption = true;
-  settings-&gt;encryption_method = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS;
-  settings-&gt;encryption_level = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE;
-#endif
-#include &lt;freerdp/version.h&gt;
-#if (FREERDP_VERSION_MAJOR == 1 &amp;&amp; FREERDP_VERSION_MINOR &gt;= 2 &amp;&amp; FREERDP_VERSION_REVISION &gt;= 1) || (FREERDP_VERSION_MAJOR == 2)
   settings-&gt;UseRdpSecurityLayer = FALSE;
-#else
-  settings-&gt;DisableEncryption = FALSE;
-#endif
 
   /* Set display size */
-#if HAVE_FREERDP_1_1
   settings-&gt;DesktopWidth = width;
   settings-&gt;DesktopHeight = height;
-#else
-  settings-&gt;width = width;
-  settings-&gt;height = height;
-#endif
 
   /* Set hostname */
-#if HAVE_FREERDP_1_1
   settings-&gt;WindowTitle = g_strdup (hostname);
   settings-&gt;ServerHostname = g_strdup (hostname);
   settings-&gt;ServerPort = port;
-#else
-  settings-&gt;window_title = g_strdup (hostname);
-  settings-&gt;hostname = g_strdup (hostname);
-  settings-&gt;port = port;
-#endif
 
   /* Set keyboard layout */
-#if HAVE_FREERDP_1_1
   freerdp_keyboard_init (KBD_US);
-#else
-  freerdp_kbd_init (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), KBD_US);
-#endif
 
   /* Allow font smoothing by default */
   settings-&gt;AllowFontSmoothing = TRUE;
-- 
2.18.1

</pre>
</div></div> <!-- class=content -->
                         <div class=footer>generated by
                             <a href="https://git.zx2c4.com/cgit/about/">
                                 cgit
                             </a>
                         </div>
                        </div> <!-- id=cgit -->
</body>
</html>
