[arch-commits] Commit in lxterminal/trunk (2 files)

Balló György bgyorgy at archlinux.org
Wed Mar 11 12:13:28 UTC 2020


    Date: Wednesday, March 11, 2020 @ 12:13:28
  Author: bgyorgy
Revision: 594190

upgpkg: lxterminal 0.3.2-2: Fix URL highlighting with vte 0.60 (FS#65783)

Added:
  lxterminal/trunk/0001-Don-t-use-deprecated-vte_terminal_match_add_gregex.patch
Modified:
  lxterminal/trunk/PKGBUILD

---------------------------------------------------------------+
 0001-Don-t-use-deprecated-vte_terminal_match_add_gregex.patch |   51 ++++++++++
 PKGBUILD                                                      |   14 ++
 2 files changed, 62 insertions(+), 3 deletions(-)

Added: 0001-Don-t-use-deprecated-vte_terminal_match_add_gregex.patch
===================================================================
--- 0001-Don-t-use-deprecated-vte_terminal_match_add_gregex.patch	                        (rev 0)
+++ 0001-Don-t-use-deprecated-vte_terminal_match_add_gregex.patch	2020-03-11 12:13:28 UTC (rev 594190)
@@ -0,0 +1,51 @@
+From 847d7a9e919c397b173ab0c622405d2a91bd81ea Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor at gmail.com>
+Date: Wed, 11 Mar 2020 12:39:48 +0100
+Subject: [PATCH] Don't use deprecated vte_terminal_match_add_gregex
+
+It's no longer work with VTE>=0.60.
+---
+ src/lxterminal.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/src/lxterminal.c b/src/lxterminal.c
+index ac7d0fb..394f855 100644
+--- a/src/lxterminal.c
++++ b/src/lxterminal.c
+@@ -34,6 +34,11 @@
+ #include <sys/stat.h>
+ #include <pwd.h>
+ 
++#if VTE_CHECK_VERSION (0, 46, 0)
++#define PCRE2_CODE_UNIT_WIDTH 0
++#include <pcre2.h>
++#endif
++
+ #include "lxterminal.h"
+ #include "setting.h"
+ #include "preferences.h"
+@@ -1168,12 +1173,21 @@ static Term * terminal_new(LXTerminal * terminal, const gchar * label, const gch
+ 
+     /* steal from tilda-0.09.6/src/tilda_terminal.c:145 */
+     /* Match URL's, etc. */
++#if VTE_CHECK_VERSION (0, 46, 0)
++    VteRegex * dingus1 = vte_regex_new_for_match(DINGUS1, -1, PCRE2_UTF | PCRE2_NO_UTF_CHECK | PCRE2_UCP | PCRE2_MULTILINE, NULL);
++    VteRegex * dingus2 = vte_regex_new_for_match(DINGUS2, -1, PCRE2_UTF | PCRE2_NO_UTF_CHECK | PCRE2_UCP | PCRE2_MULTILINE, NULL);
++    gint ret = vte_terminal_match_add_regex(VTE_TERMINAL(term->vte), dingus1, 0);
++    vte_terminal_match_set_cursor_type(VTE_TERMINAL(term->vte), ret, GDK_HAND2);
++    ret = vte_terminal_match_add_regex(VTE_TERMINAL(term->vte), dingus2, 0);
++    vte_terminal_match_set_cursor_type(VTE_TERMINAL(term->vte), ret, GDK_HAND2);
++#else
+     GRegex * dingus1 = g_regex_new(DINGUS1, G_REGEX_OPTIMIZE, 0, NULL);
+     GRegex * dingus2 = g_regex_new(DINGUS2, G_REGEX_OPTIMIZE, 0, NULL);
+     gint ret = vte_terminal_match_add_gregex(VTE_TERMINAL(term->vte), dingus1, 0);
+     vte_terminal_match_set_cursor_type(VTE_TERMINAL(term->vte), ret, GDK_HAND2);
+     ret = vte_terminal_match_add_gregex(VTE_TERMINAL(term->vte), dingus2, 0);
+     vte_terminal_match_set_cursor_type(VTE_TERMINAL(term->vte), ret, GDK_HAND2);
++#endif
+     g_regex_unref(dingus1);
+     g_regex_unref(dingus2);
+ 
+-- 
+2.25.1
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-03-11 12:03:51 UTC (rev 594189)
+++ PKGBUILD	2020-03-11 12:13:28 UTC (rev 594190)
@@ -5,7 +5,7 @@
 
 pkgname=lxterminal
 pkgver=0.3.2
-pkgrel=1
+pkgrel=2
 pkgdesc="VTE-based terminal emulator (part of LXDE)"
 arch=('x86_64')
 url="https://lxde.org/"
@@ -15,9 +15,17 @@
 makedepends=('intltool')
 conflicts=('lxterminal-gtk3')
 replaces=('lxterminal-gtk3')
-source=(https://downloads.sourceforge.net/lxde/${pkgname}-${pkgver}.tar.xz)
-sha256sums=('3166b18493a8e55811b02aa0de825cbbea65e2b628e69006c1a65b98e1bb4484')
+source=(https://downloads.sourceforge.net/lxde/${pkgname}-${pkgver}.tar.xz
+        0001-Don-t-use-deprecated-vte_terminal_match_add_gregex.patch)
+sha256sums=('3166b18493a8e55811b02aa0de825cbbea65e2b628e69006c1a65b98e1bb4484'
+            'bae1370beff82d14eea14b684ace5033c70483184030ac46547cadba33a5d9a5')
 
+prepare() {
+  cd $pkgname-$pkgver
+  # https://sourceforge.net/p/lxde/bugs/932/
+  patch -Np1 -i ../0001-Don-t-use-deprecated-vte_terminal_match_add_gregex.patch
+}
+
 build() {
   cd $pkgname-$pkgver
   ./configure --sysconfdir=/etc --prefix=/usr --enable-gtk3



More information about the arch-commits mailing list