Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] giggle: fix cross, crash
@ 2020-12-15 10:48 sgn
  2020-12-15 15:44 ` ndowens
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: sgn @ 2020-12-15 10:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

There is a new pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages fix-giggle
https://github.com/void-linux/void-packages/pull/27179

giggle: fix cross, crash
Close #27151

@ndowens 

A patch file from https://github.com/void-linux/void-packages/pull/27179.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix-giggle-27179.patch --]
[-- Type: text/x-diff, Size: 14632 bytes --]

From 7cb857ded633d6620371d2b52eb8553469f9598c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Tue, 15 Dec 2020 17:43:33 +0700
Subject: [PATCH] giggle: fix cross, crash

---
 ...e-does-not-display-diff-for-files-th.patch | 31 ++++++++++
 ...ksource.h-instead-of-gtksourceview.h.patch | 55 +++++++++++++++++
 .../patches/0004-Port-to-vte-2.91-API.patch   | 54 ++++++++++++++++
 ...-bug-of-GUI-not-remembering-settings.patch | 45 ++++++++++++++
 srcpkgs/giggle/patches/cross.patch            | 61 +++++++++++++++++++
 srcpkgs/giggle/patches/gtksourceview3.7.patch | 36 -----------
 srcpkgs/giggle/template                       | 12 +++-
 7 files changed, 255 insertions(+), 39 deletions(-)
 create mode 100644 srcpkgs/giggle/patches/0001-Fix-628184-Giggle-does-not-display-diff-for-files-th.patch
 create mode 100644 srcpkgs/giggle/patches/0002-include-gtksource.h-instead-of-gtksourceview.h.patch
 create mode 100644 srcpkgs/giggle/patches/0004-Port-to-vte-2.91-API.patch
 create mode 100644 srcpkgs/giggle/patches/0005-Fixed-bug-of-GUI-not-remembering-settings.patch
 create mode 100644 srcpkgs/giggle/patches/cross.patch
 delete mode 100644 srcpkgs/giggle/patches/gtksourceview3.7.patch

diff --git a/srcpkgs/giggle/patches/0001-Fix-628184-Giggle-does-not-display-diff-for-files-th.patch b/srcpkgs/giggle/patches/0001-Fix-628184-Giggle-does-not-display-diff-for-files-th.patch
new file mode 100644
index 00000000000..9fe8e967c5b
--- /dev/null
+++ b/srcpkgs/giggle/patches/0001-Fix-628184-Giggle-does-not-display-diff-for-files-th.patch
@@ -0,0 +1,31 @@
+From c4963107ee97b6bf045b805ed3b8f9f824c62ccb Mon Sep 17 00:00:00 2001
+From: Guilhem Bonnefille <guilhem.bonnefille@gmail.com>
+Date: Thu, 4 Apr 2013 14:47:19 +0100
+Subject: [PATCH] Fix #628184 - Giggle does not display diff for files that
+ have spaces in names
+
+Git diff is compliant to GNU patch expected format:
+when a filename contains a SP a TAB is added.
+See Git's commit 1a9eb3b9d50367bee8fe85022684d812816fe531
+
+Signed-off-by: Guilhem Bonnefille <guilhem.bonnefille@gmail.com>
+---
+ src/giggle-diff-view.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git src/giggle-diff-view.c src/giggle-diff-view.c
+index ff6bbe3..2fbb8eb 100644
+--- src/giggle-diff-view.c
++++ src/giggle-diff-view.c
+@@ -665,6 +665,11 @@ diff_view_parse_patch (GiggleDiffView *view)
+ 			}
+ 		} else if (g_str_has_prefix (line, "--- a/") || g_str_has_prefix (line, "+++ b/")) {
+ 			g_free (filename); filename = g_strdup (line + 6);
++			if (strchr(filename, ' ')) {
++				/* Remove trailing TAB added by git for GNU patch compatibility */
++				size_t len = strlen (filename);
++				filename[len-1] = '\0';
++			}
+ 		}
+ 
+ 		g_free (line);
diff --git a/srcpkgs/giggle/patches/0002-include-gtksource.h-instead-of-gtksourceview.h.patch b/srcpkgs/giggle/patches/0002-include-gtksource.h-instead-of-gtksourceview.h.patch
new file mode 100644
index 00000000000..ddce15f4897
--- /dev/null
+++ b/srcpkgs/giggle/patches/0002-include-gtksource.h-instead-of-gtksourceview.h.patch
@@ -0,0 +1,55 @@
+From 44490f7f78c3281c8fc4f38aa7226fc5955720a9 Mon Sep 17 00:00:00 2001
+From: Dominique Leuenberger <dimstar@opensuse.org>
+Date: Wed, 3 Apr 2013 22:26:17 +0200
+Subject: [PATCH] include gtksource.h instead of gtksourceview.h
+
+The main header of gtksourceview is now called gtksource.h
+
+https://bugzilla.gnome.org/show_bug.cgi?id=697220
+---
+ configure.ac           | 2 +-
+ src/giggle-diff-view.h | 3 +--
+ src/giggle-view-file.c | 3 +--
+ 3 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git configure.ac configure.ac
+index a7011f8..3e47b48 100644
+--- configure.ac
++++ configure.ac
+@@ -54,7 +54,7 @@ dnl  ------------------
+ GLIB_REQUIRED_VERSION=2.30
+ GDK_PIXBUF_REQUIRED_VERSION=2.22
+ GTK_REQUIRED_VERSION=3.3.12
+-GTKSOURCE_REQUIRED_VERSION=3.0
++GTKSOURCE_REQUIRED_VERSION=3.8
+ EDS_REQUIRED_VERSION=3.2
+ VTE_REQUIRED_VERSION=0.28
+ 
+diff --git src/giggle-diff-view.h src/giggle-diff-view.h
+index 74fb983..28266e3 100644
+--- src/giggle-diff-view.h
++++ src/giggle-diff-view.h
+@@ -21,8 +21,7 @@
+ 
+ #include <glib-object.h>
+ #include <gtk/gtk.h>
+-#include <gtksourceview/gtksourceview.h>
+-#include <gtksourceview/gtksourcelanguagemanager.h>
++#include <gtksourceview/gtksource.h>
+ 
+ #include "libgiggle/giggle-revision.h"
+ 
+diff --git src/giggle-view-file.c src/giggle-view-file.c
+index 130af4a..94c6c76 100644
+--- src/giggle-view-file.c
++++ src/giggle-view-file.c
+@@ -38,8 +38,7 @@
+ #include <gio/gio.h>
+ #include <glib/gi18n.h>
+ 
+-#include <gtksourceview/gtksourcelanguagemanager.h>
+-#include <gtksourceview/gtksourceview.h>
++#include <gtksourceview/gtksource.h>
+ 
+ #define GIGGLE_TYPE_VIEW_FILE_SNAPSHOT            (giggle_view_file_snapshot_get_type ())
+ #define GIGGLE_VIEW_FILE_SNAPSHOT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIGGLE_TYPE_VIEW_FILE_SNAPSHOT, GiggleViewFileSnapshot))
diff --git a/srcpkgs/giggle/patches/0004-Port-to-vte-2.91-API.patch b/srcpkgs/giggle/patches/0004-Port-to-vte-2.91-API.patch
new file mode 100644
index 00000000000..a278397c044
--- /dev/null
+++ b/srcpkgs/giggle/patches/0004-Port-to-vte-2.91-API.patch
@@ -0,0 +1,54 @@
+From b9e260840d03e33ac55142719f3d54129b54cc70 Mon Sep 17 00:00:00 2001
+From: Debarshi Ray <debarshir@gnome.org>
+Date: Mon, 26 Jan 2015 15:38:24 +0100
+Subject: [PATCH] Port to vte-2.91 API
+
+https://bugzilla.gnome.org/show_bug.cgi?id=743537
+---
+ configure.ac                   |  2 +-
+ plugins/giggle-view-terminal.c | 19 ++++++++++---------
+ 2 files changed, 11 insertions(+), 10 deletions(-)
+
+diff --git configure.ac configure.ac
+index 6e27733..72e7bd1 100644
+--- configure.ac
++++ configure.ac
+@@ -106,7 +106,7 @@ AC_ARG_ENABLE([terminal],
+ AS_IF([test "x$enable_terminal" = "xyes"],
+       [
+         PKG_CHECK_MODULES([VTE],
+-                          [vte-2.90 >= $VTE_REQUIRED_VERSION],
++                          [vte-2.91 >= $VTE_REQUIRED_VERSION],
+                           [have_vte=yes
+                            AC_DEFINE([HAVE_VTE], [1],
+                                      [Use features from vte])
+diff --git plugins/giggle-view-terminal.c plugins/giggle-view-terminal.c
+index 06a9a50..cd107f2 100644
+--- plugins/giggle-view-terminal.c
++++ plugins/giggle-view-terminal.c
+@@ -186,15 +186,16 @@ giggle_view_terminal_append_tab (GiggleViewTerminal *view,
+ 	real_argv[1] = NULL;
+ 	spawn_flags = G_SPAWN_CHILD_INHERITS_STDIN | G_SPAWN_SEARCH_PATH | G_SPAWN_FILE_AND_ARGV_ZERO;
+ 
+-	succes = vte_terminal_fork_command_full (VTE_TERMINAL (terminal),
+-	                                         pty_flags,
+-	                                         directory,
+-	                                         real_argv,
+-	                                         NULL,
+-	                                         spawn_flags,
+-	                                         NULL, NULL,
+-	                                         NULL,
+-	                                         &error);
++	succes = vte_terminal_spawn_sync (VTE_TERMINAL (terminal),
++	                                  pty_flags,
++	                                  directory,
++	                                  real_argv,
++	                                  NULL,
++	                                  spawn_flags,
++	                                  NULL, NULL,
++	                                  NULL,
++	                                  NULL,
++	                                  &error);
+ 	g_strfreev (real_argv);
+ 
+ 	if (succes == FALSE) {
diff --git a/srcpkgs/giggle/patches/0005-Fixed-bug-of-GUI-not-remembering-settings.patch b/srcpkgs/giggle/patches/0005-Fixed-bug-of-GUI-not-remembering-settings.patch
new file mode 100644
index 00000000000..1f83d51b710
--- /dev/null
+++ b/srcpkgs/giggle/patches/0005-Fixed-bug-of-GUI-not-remembering-settings.patch
@@ -0,0 +1,45 @@
+From 18c9fafc9437ee62ecf2572d93a63817ab05b9df Mon Sep 17 00:00:00 2001
+From: Georgios Floros <gfloros@openmailbox.org>
+Date: Thu, 12 Nov 2015 22:24:48 +0200
+Subject: [PATCH] Fixed bug of GUI not remembering settings
+
+Actually the command "git repo-config" is obsolete.
+This patch replaces "git repo-config" with "git config".
+---
+ libgiggle-git/giggle-git-config-read.c  | 2 +-
+ libgiggle-git/giggle-git-config-write.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git libgiggle-git/giggle-git-config-read.c libgiggle-git/giggle-git-config-read.c
+index 7b4fdb9..7f24e1d 100644
+--- libgiggle-git/giggle-git-config-read.c
++++ libgiggle-git/giggle-git-config-read.c
+@@ -120,7 +120,7 @@ static gboolean
+ git_config_read_get_command_line (GiggleJob  *job,
+ 				  gchar     **command_line)
+ {
+-	*command_line = g_strdup_printf (GIT_COMMAND " repo-config --list");
++	*command_line = g_strdup_printf (GIT_COMMAND " config --list");
+ 	return TRUE;
+ }
+ 
+diff --git libgiggle-git/giggle-git-config-write.c libgiggle-git/giggle-git-config-write.c
+index e026e4f..7fd2b07 100644
+--- libgiggle-git/giggle-git-config-write.c
++++ libgiggle-git/giggle-git-config-write.c
+@@ -184,13 +184,13 @@ git_config_write_get_command_line (GiggleJob  *job,
+ 	if (priv->value) {
+ 		value = g_shell_quote (priv->value);
+ 
+-		*command_line = g_strdup_printf (GIT_COMMAND " repo-config %s %s %s",
++		*command_line = g_strdup_printf (GIT_COMMAND " config %s %s %s",
+ 					         priv->global ? "--global" : "",
+ 						 priv->field, value);
+ 
+ 		g_free (value);
+ 	} else {
+-		*command_line = g_strdup_printf (GIT_COMMAND " repo-config %s --unset %s",
++		*command_line = g_strdup_printf (GIT_COMMAND " config %s --unset %s",
+ 					         priv->global ? "--global" : "", priv->field);
+ 	}
+ 
diff --git a/srcpkgs/giggle/patches/cross.patch b/srcpkgs/giggle/patches/cross.patch
new file mode 100644
index 00000000000..889d7502899
--- /dev/null
+++ b/srcpkgs/giggle/patches/cross.patch
@@ -0,0 +1,61 @@
+diff --git configure.ac configure.ac
+index a7011f8..1ab7a52 100644
+--- configure.ac
++++ configure.ac
+@@ -125,30 +125,6 @@ dnl  ----------------------
+ 
+ AC_DEFINE(_GNU_SOURCE, 1, [Enable GNU Extensions])
+ 
+-dnl Make sure that strptime can be used (read: has gnu extensions)
+-AC_MSG_CHECKING([for GNU extensions of strptime()])
+-AC_RUN_IFELSE(
+-  [AC_LANG_PROGRAM(
+-    [[#include <time.h>]],
+-    [[const char* date = "1168635922 +0100"; struct tm tm;
+-      char const* returned = strptime(date, "%s %z", &tm);
+-      return (!returned || *returned ? 1 : 0);]])],
+-  [AC_MSG_RESULT(available)
+-   AC_DEFINE([STRPTIME_HAS_GNU], [1],
+-             [strptime() has GNU extensions %s and %z])],
+-  [AC_MSG_RESULT(not available)])
+-
+-dnl Figure out which format string to use for time_t
+-AC_MSG_CHECKING([size of time_t type])
+-AC_RUN_IFELSE(
+-  [AC_LANG_PROGRAM(
+-    [[#include <time.h>]],
+-    [[return (sizeof (time_t) == sizeof (long) ? 0 : 1);]])],
+-  [AC_MSG_RESULT(long)
+-   AC_DEFINE([GIGGLE_FORMAT_TIME_T], ["ld"], [format string for time_t])],
+-  [AC_MSG_RESULT(int)
+-   AC_DEFINE([GIGGLE_FORMAT_TIME_T], ["d"], [format string for time_t])])
+-
+ dnl  ------------------
+ dnl | Language Support |---------------------------------------
+ dnl  ------------------
+diff --git libgiggle-git/giggle-git-revisions.c libgiggle-git/giggle-git-revisions.c
+index d074d5c..692781d 100644
+--- libgiggle-git/giggle-git-revisions.c
++++ libgiggle-git/giggle-git-revisions.c
+@@ -130,7 +130,7 @@ git_revisions_get_command_line (GiggleJob  *job,
+ static struct tm *
+ git_revisions_get_time (const gchar *date)
+ {
+-#if STRPTIME_HAS_GNU
++#ifdef __GLIBC__
+ 	const gchar *returned;
+ 	struct tm   *tm;
+ 
+@@ -145,9 +145,11 @@ git_revisions_get_time (const gchar *date)
+ 	return tm;
+ #else
+ 	struct tm *tm = g_new0 (struct tm, 1);
++	long       ltime;
+ 	time_t     time;
+ 
+-	sscanf (date, "%" GIGGLE_FORMAT_TIME_T, &time);
++	sscanf (date, "%ld", &ltime);
++	time = ltime;
+ 	localtime_r (&time, tm);
+ 
+ 	return tm;
diff --git a/srcpkgs/giggle/patches/gtksourceview3.7.patch b/srcpkgs/giggle/patches/gtksourceview3.7.patch
deleted file mode 100644
index 4dee3850a67..00000000000
--- a/srcpkgs/giggle/patches/gtksourceview3.7.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 9999a7ff573b7f3320c2065e8d0eaf0fea32a41b Mon Sep 17 00:00:00 2001
-From: Dominique Leuenberger <dimstar@opensuse.org>
-Date: Wed, 03 Apr 2013 20:26:17 +0000
-Subject: Directly include gtksourcebuffer.h
-
-Until gtksourceview 3.7, it was included indirectly by gtksourceview.h.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=697220
----
-diff --git a/src/giggle-diff-view.c b/src/giggle-diff-view.c
-index 3ded28d..ff6bbe3 100644
---- src/giggle-diff-view.c
-+++ src/giggle-diff-view.c
-@@ -29,6 +29,8 @@
- #include <glib/gi18n.h>
- #include <string.h>
- 
-+#include <gtksourceview/gtksourcebuffer.h>
-+
- typedef struct GiggleDiffViewPriv GiggleDiffViewPriv;
- typedef struct GiggleDiffViewFile GiggleDiffViewFile;
- typedef struct GiggleDiffViewHunk GiggleDiffViewHunk;
-diff --git a/src/giggle-view-file.c b/src/giggle-view-file.c
-index 130af4a..517858d 100644
---- src/giggle-view-file.c
-+++ src/giggle-view-file.c
-@@ -40,6 +40,7 @@
- 
- #include <gtksourceview/gtksourcelanguagemanager.h>
- #include <gtksourceview/gtksourceview.h>
-+#include <gtksourceview/gtksourcebuffer.h>
- 
- #define GIGGLE_TYPE_VIEW_FILE_SNAPSHOT            (giggle_view_file_snapshot_get_type ())
- #define GIGGLE_VIEW_FILE_SNAPSHOT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIGGLE_TYPE_VIEW_FILE_SNAPSHOT, GiggleViewFileSnapshot))
---
-cgit v0.9.1
diff --git a/srcpkgs/giggle/template b/srcpkgs/giggle/template
index 9da11473757..1984fed3f63 100644
--- a/srcpkgs/giggle/template
+++ b/srcpkgs/giggle/template
@@ -1,9 +1,10 @@
 # Template file for 'giggle'
 pkgname=giggle
 version=0.7
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="pkg-config itstool intltool glib-devel git"
+hostmakedepends="pkg-config itstool intltool glib-devel git
+ automake gettext-devel libtool tar yelp-tools"
 makedepends="gtksourceview-devel vte290-devel"
 depends="desktop-file-utils hicolor-icon-theme"
 short_desc="Git repository viewer"
@@ -13,10 +14,15 @@ homepage="https://wiki.gnome.org/Apps/giggle"
 distfiles="${GNOME_SITE}/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
 checksum=ae2e2237fa0d0999d99d0a0ee9b7ec147e80bd2472d59a045b2b01eb02261f59
 lib32disabled=yes
-nocross=yes
 
 CFLAGS="-fcommon"
 
+pre_configure() {
+	autoreconf -fi
+	intltoolize --force
+	autoreconf
+}
+
 libgiggle_package() {
 	short_desc+=" - runtime libraries"
 	pkg_install() {

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: giggle: fix cross, crash
  2020-12-15 10:48 [PR PATCH] giggle: fix cross, crash sgn
@ 2020-12-15 15:44 ` ndowens
  2020-12-15 16:29 ` sgn
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ndowens @ 2020-12-15 15:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 240 bytes --]

New comment by ndowens on void-packages repository

https://github.com/void-linux/void-packages/pull/27179#issuecomment-745376728

Comment:
Hmm how does the cross patch work to fix? What seems to be doing is removing stuff related to time?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: giggle: fix cross, crash
  2020-12-15 10:48 [PR PATCH] giggle: fix cross, crash sgn
  2020-12-15 15:44 ` ndowens
@ 2020-12-15 16:29 ` sgn
  2020-12-17 18:30 ` [PR REVIEW] " ericonr
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: sgn @ 2020-12-15 16:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/27179#issuecomment-745406062

Comment:
> Hmm how does the cross patch work to fix? What seems to be doing is removing stuff related to time?

By not depends on `configure`'s result but libc's pre-defined macro. And not trying to mess to `sizeof(time_t)`, (messing like that is not correct anyway).

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR REVIEW] giggle: fix cross, crash
  2020-12-15 10:48 [PR PATCH] giggle: fix cross, crash sgn
  2020-12-15 15:44 ` ndowens
  2020-12-15 16:29 ` sgn
@ 2020-12-17 18:30 ` ericonr
  2020-12-17 23:42 ` sgn
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ericonr @ 2020-12-17 18:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 315 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/27179#discussion_r545310394

Comment:
```
#include <stdio.h>

int main()
{
        printf("%ld\n", sizeof(long));
}
```

on my rpi prints 4, so I think it'd be more correct to use `long long` here.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR REVIEW] giggle: fix cross, crash
  2020-12-15 10:48 [PR PATCH] giggle: fix cross, crash sgn
                   ` (2 preceding siblings ...)
  2020-12-17 18:30 ` [PR REVIEW] " ericonr
@ 2020-12-17 23:42 ` sgn
  2020-12-17 23:47 ` [PR PATCH] [Updated] " sgn
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: sgn @ 2020-12-17 23:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 183 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/27179#discussion_r545477856

Comment:
Make sense, the original code is cursed.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR PATCH] [Updated] giggle: fix cross, crash
  2020-12-15 10:48 [PR PATCH] giggle: fix cross, crash sgn
                   ` (3 preceding siblings ...)
  2020-12-17 23:42 ` sgn
@ 2020-12-17 23:47 ` sgn
  2020-12-17 23:47 ` [PR REVIEW] " sgn
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: sgn @ 2020-12-17 23:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages fix-giggle
https://github.com/void-linux/void-packages/pull/27179

giggle: fix cross, crash
Close #27151

@ndowens 

A patch file from https://github.com/void-linux/void-packages/pull/27179.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix-giggle-27179.patch --]
[-- Type: text/x-diff, Size: 14633 bytes --]

From 2baadb48841f33747da17431f85637668a47441a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Tue, 15 Dec 2020 17:43:33 +0700
Subject: [PATCH] giggle: fix cross, crash

---
 ...e-does-not-display-diff-for-files-th.patch | 31 ++++++++++
 ...ksource.h-instead-of-gtksourceview.h.patch | 55 +++++++++++++++++
 .../patches/0004-Port-to-vte-2.91-API.patch   | 54 ++++++++++++++++
 ...-bug-of-GUI-not-remembering-settings.patch | 45 ++++++++++++++
 srcpkgs/giggle/patches/cross.patch            | 61 +++++++++++++++++++
 srcpkgs/giggle/patches/gtksourceview3.7.patch | 36 -----------
 srcpkgs/giggle/template                       | 12 +++-
 7 files changed, 255 insertions(+), 39 deletions(-)
 create mode 100644 srcpkgs/giggle/patches/0001-Fix-628184-Giggle-does-not-display-diff-for-files-th.patch
 create mode 100644 srcpkgs/giggle/patches/0002-include-gtksource.h-instead-of-gtksourceview.h.patch
 create mode 100644 srcpkgs/giggle/patches/0004-Port-to-vte-2.91-API.patch
 create mode 100644 srcpkgs/giggle/patches/0005-Fixed-bug-of-GUI-not-remembering-settings.patch
 create mode 100644 srcpkgs/giggle/patches/cross.patch
 delete mode 100644 srcpkgs/giggle/patches/gtksourceview3.7.patch

diff --git a/srcpkgs/giggle/patches/0001-Fix-628184-Giggle-does-not-display-diff-for-files-th.patch b/srcpkgs/giggle/patches/0001-Fix-628184-Giggle-does-not-display-diff-for-files-th.patch
new file mode 100644
index 00000000000..9fe8e967c5b
--- /dev/null
+++ b/srcpkgs/giggle/patches/0001-Fix-628184-Giggle-does-not-display-diff-for-files-th.patch
@@ -0,0 +1,31 @@
+From c4963107ee97b6bf045b805ed3b8f9f824c62ccb Mon Sep 17 00:00:00 2001
+From: Guilhem Bonnefille <guilhem.bonnefille@gmail.com>
+Date: Thu, 4 Apr 2013 14:47:19 +0100
+Subject: [PATCH] Fix #628184 - Giggle does not display diff for files that
+ have spaces in names
+
+Git diff is compliant to GNU patch expected format:
+when a filename contains a SP a TAB is added.
+See Git's commit 1a9eb3b9d50367bee8fe85022684d812816fe531
+
+Signed-off-by: Guilhem Bonnefille <guilhem.bonnefille@gmail.com>
+---
+ src/giggle-diff-view.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git src/giggle-diff-view.c src/giggle-diff-view.c
+index ff6bbe3..2fbb8eb 100644
+--- src/giggle-diff-view.c
++++ src/giggle-diff-view.c
+@@ -665,6 +665,11 @@ diff_view_parse_patch (GiggleDiffView *view)
+ 			}
+ 		} else if (g_str_has_prefix (line, "--- a/") || g_str_has_prefix (line, "+++ b/")) {
+ 			g_free (filename); filename = g_strdup (line + 6);
++			if (strchr(filename, ' ')) {
++				/* Remove trailing TAB added by git for GNU patch compatibility */
++				size_t len = strlen (filename);
++				filename[len-1] = '\0';
++			}
+ 		}
+ 
+ 		g_free (line);
diff --git a/srcpkgs/giggle/patches/0002-include-gtksource.h-instead-of-gtksourceview.h.patch b/srcpkgs/giggle/patches/0002-include-gtksource.h-instead-of-gtksourceview.h.patch
new file mode 100644
index 00000000000..ddce15f4897
--- /dev/null
+++ b/srcpkgs/giggle/patches/0002-include-gtksource.h-instead-of-gtksourceview.h.patch
@@ -0,0 +1,55 @@
+From 44490f7f78c3281c8fc4f38aa7226fc5955720a9 Mon Sep 17 00:00:00 2001
+From: Dominique Leuenberger <dimstar@opensuse.org>
+Date: Wed, 3 Apr 2013 22:26:17 +0200
+Subject: [PATCH] include gtksource.h instead of gtksourceview.h
+
+The main header of gtksourceview is now called gtksource.h
+
+https://bugzilla.gnome.org/show_bug.cgi?id=697220
+---
+ configure.ac           | 2 +-
+ src/giggle-diff-view.h | 3 +--
+ src/giggle-view-file.c | 3 +--
+ 3 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git configure.ac configure.ac
+index a7011f8..3e47b48 100644
+--- configure.ac
++++ configure.ac
+@@ -54,7 +54,7 @@ dnl  ------------------
+ GLIB_REQUIRED_VERSION=2.30
+ GDK_PIXBUF_REQUIRED_VERSION=2.22
+ GTK_REQUIRED_VERSION=3.3.12
+-GTKSOURCE_REQUIRED_VERSION=3.0
++GTKSOURCE_REQUIRED_VERSION=3.8
+ EDS_REQUIRED_VERSION=3.2
+ VTE_REQUIRED_VERSION=0.28
+ 
+diff --git src/giggle-diff-view.h src/giggle-diff-view.h
+index 74fb983..28266e3 100644
+--- src/giggle-diff-view.h
++++ src/giggle-diff-view.h
+@@ -21,8 +21,7 @@
+ 
+ #include <glib-object.h>
+ #include <gtk/gtk.h>
+-#include <gtksourceview/gtksourceview.h>
+-#include <gtksourceview/gtksourcelanguagemanager.h>
++#include <gtksourceview/gtksource.h>
+ 
+ #include "libgiggle/giggle-revision.h"
+ 
+diff --git src/giggle-view-file.c src/giggle-view-file.c
+index 130af4a..94c6c76 100644
+--- src/giggle-view-file.c
++++ src/giggle-view-file.c
+@@ -38,8 +38,7 @@
+ #include <gio/gio.h>
+ #include <glib/gi18n.h>
+ 
+-#include <gtksourceview/gtksourcelanguagemanager.h>
+-#include <gtksourceview/gtksourceview.h>
++#include <gtksourceview/gtksource.h>
+ 
+ #define GIGGLE_TYPE_VIEW_FILE_SNAPSHOT            (giggle_view_file_snapshot_get_type ())
+ #define GIGGLE_VIEW_FILE_SNAPSHOT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIGGLE_TYPE_VIEW_FILE_SNAPSHOT, GiggleViewFileSnapshot))
diff --git a/srcpkgs/giggle/patches/0004-Port-to-vte-2.91-API.patch b/srcpkgs/giggle/patches/0004-Port-to-vte-2.91-API.patch
new file mode 100644
index 00000000000..a278397c044
--- /dev/null
+++ b/srcpkgs/giggle/patches/0004-Port-to-vte-2.91-API.patch
@@ -0,0 +1,54 @@
+From b9e260840d03e33ac55142719f3d54129b54cc70 Mon Sep 17 00:00:00 2001
+From: Debarshi Ray <debarshir@gnome.org>
+Date: Mon, 26 Jan 2015 15:38:24 +0100
+Subject: [PATCH] Port to vte-2.91 API
+
+https://bugzilla.gnome.org/show_bug.cgi?id=743537
+---
+ configure.ac                   |  2 +-
+ plugins/giggle-view-terminal.c | 19 ++++++++++---------
+ 2 files changed, 11 insertions(+), 10 deletions(-)
+
+diff --git configure.ac configure.ac
+index 6e27733..72e7bd1 100644
+--- configure.ac
++++ configure.ac
+@@ -106,7 +106,7 @@ AC_ARG_ENABLE([terminal],
+ AS_IF([test "x$enable_terminal" = "xyes"],
+       [
+         PKG_CHECK_MODULES([VTE],
+-                          [vte-2.90 >= $VTE_REQUIRED_VERSION],
++                          [vte-2.91 >= $VTE_REQUIRED_VERSION],
+                           [have_vte=yes
+                            AC_DEFINE([HAVE_VTE], [1],
+                                      [Use features from vte])
+diff --git plugins/giggle-view-terminal.c plugins/giggle-view-terminal.c
+index 06a9a50..cd107f2 100644
+--- plugins/giggle-view-terminal.c
++++ plugins/giggle-view-terminal.c
+@@ -186,15 +186,16 @@ giggle_view_terminal_append_tab (GiggleViewTerminal *view,
+ 	real_argv[1] = NULL;
+ 	spawn_flags = G_SPAWN_CHILD_INHERITS_STDIN | G_SPAWN_SEARCH_PATH | G_SPAWN_FILE_AND_ARGV_ZERO;
+ 
+-	succes = vte_terminal_fork_command_full (VTE_TERMINAL (terminal),
+-	                                         pty_flags,
+-	                                         directory,
+-	                                         real_argv,
+-	                                         NULL,
+-	                                         spawn_flags,
+-	                                         NULL, NULL,
+-	                                         NULL,
+-	                                         &error);
++	succes = vte_terminal_spawn_sync (VTE_TERMINAL (terminal),
++	                                  pty_flags,
++	                                  directory,
++	                                  real_argv,
++	                                  NULL,
++	                                  spawn_flags,
++	                                  NULL, NULL,
++	                                  NULL,
++	                                  NULL,
++	                                  &error);
+ 	g_strfreev (real_argv);
+ 
+ 	if (succes == FALSE) {
diff --git a/srcpkgs/giggle/patches/0005-Fixed-bug-of-GUI-not-remembering-settings.patch b/srcpkgs/giggle/patches/0005-Fixed-bug-of-GUI-not-remembering-settings.patch
new file mode 100644
index 00000000000..1f83d51b710
--- /dev/null
+++ b/srcpkgs/giggle/patches/0005-Fixed-bug-of-GUI-not-remembering-settings.patch
@@ -0,0 +1,45 @@
+From 18c9fafc9437ee62ecf2572d93a63817ab05b9df Mon Sep 17 00:00:00 2001
+From: Georgios Floros <gfloros@openmailbox.org>
+Date: Thu, 12 Nov 2015 22:24:48 +0200
+Subject: [PATCH] Fixed bug of GUI not remembering settings
+
+Actually the command "git repo-config" is obsolete.
+This patch replaces "git repo-config" with "git config".
+---
+ libgiggle-git/giggle-git-config-read.c  | 2 +-
+ libgiggle-git/giggle-git-config-write.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git libgiggle-git/giggle-git-config-read.c libgiggle-git/giggle-git-config-read.c
+index 7b4fdb9..7f24e1d 100644
+--- libgiggle-git/giggle-git-config-read.c
++++ libgiggle-git/giggle-git-config-read.c
+@@ -120,7 +120,7 @@ static gboolean
+ git_config_read_get_command_line (GiggleJob  *job,
+ 				  gchar     **command_line)
+ {
+-	*command_line = g_strdup_printf (GIT_COMMAND " repo-config --list");
++	*command_line = g_strdup_printf (GIT_COMMAND " config --list");
+ 	return TRUE;
+ }
+ 
+diff --git libgiggle-git/giggle-git-config-write.c libgiggle-git/giggle-git-config-write.c
+index e026e4f..7fd2b07 100644
+--- libgiggle-git/giggle-git-config-write.c
++++ libgiggle-git/giggle-git-config-write.c
+@@ -184,13 +184,13 @@ git_config_write_get_command_line (GiggleJob  *job,
+ 	if (priv->value) {
+ 		value = g_shell_quote (priv->value);
+ 
+-		*command_line = g_strdup_printf (GIT_COMMAND " repo-config %s %s %s",
++		*command_line = g_strdup_printf (GIT_COMMAND " config %s %s %s",
+ 					         priv->global ? "--global" : "",
+ 						 priv->field, value);
+ 
+ 		g_free (value);
+ 	} else {
+-		*command_line = g_strdup_printf (GIT_COMMAND " repo-config %s --unset %s",
++		*command_line = g_strdup_printf (GIT_COMMAND " config %s --unset %s",
+ 					         priv->global ? "--global" : "", priv->field);
+ 	}
+ 
diff --git a/srcpkgs/giggle/patches/cross.patch b/srcpkgs/giggle/patches/cross.patch
new file mode 100644
index 00000000000..9ca51e64ab6
--- /dev/null
+++ b/srcpkgs/giggle/patches/cross.patch
@@ -0,0 +1,61 @@
+diff --git configure.ac configure.ac
+index a7011f8..1ab7a52 100644
+--- configure.ac
++++ configure.ac
+@@ -125,30 +125,6 @@ dnl  ----------------------
+ 
+ AC_DEFINE(_GNU_SOURCE, 1, [Enable GNU Extensions])
+ 
+-dnl Make sure that strptime can be used (read: has gnu extensions)
+-AC_MSG_CHECKING([for GNU extensions of strptime()])
+-AC_RUN_IFELSE(
+-  [AC_LANG_PROGRAM(
+-    [[#include <time.h>]],
+-    [[const char* date = "1168635922 +0100"; struct tm tm;
+-      char const* returned = strptime(date, "%s %z", &tm);
+-      return (!returned || *returned ? 1 : 0);]])],
+-  [AC_MSG_RESULT(available)
+-   AC_DEFINE([STRPTIME_HAS_GNU], [1],
+-             [strptime() has GNU extensions %s and %z])],
+-  [AC_MSG_RESULT(not available)])
+-
+-dnl Figure out which format string to use for time_t
+-AC_MSG_CHECKING([size of time_t type])
+-AC_RUN_IFELSE(
+-  [AC_LANG_PROGRAM(
+-    [[#include <time.h>]],
+-    [[return (sizeof (time_t) == sizeof (long) ? 0 : 1);]])],
+-  [AC_MSG_RESULT(long)
+-   AC_DEFINE([GIGGLE_FORMAT_TIME_T], ["ld"], [format string for time_t])],
+-  [AC_MSG_RESULT(int)
+-   AC_DEFINE([GIGGLE_FORMAT_TIME_T], ["d"], [format string for time_t])])
+-
+ dnl  ------------------
+ dnl | Language Support |---------------------------------------
+ dnl  ------------------
+diff --git libgiggle-git/giggle-git-revisions.c libgiggle-git/giggle-git-revisions.c
+index d074d5c..692781d 100644
+--- libgiggle-git/giggle-git-revisions.c
++++ libgiggle-git/giggle-git-revisions.c
+@@ -130,7 +130,7 @@ git_revisions_get_command_line (GiggleJob  *job,
+ static struct tm *
+ git_revisions_get_time (const gchar *date)
+ {
+-#if STRPTIME_HAS_GNU
++#ifdef __GLIBC__
+ 	const gchar *returned;
+ 	struct tm   *tm;
+ 
+@@ -145,9 +145,11 @@ git_revisions_get_time (const gchar *date)
+ 	return tm;
+ #else
+ 	struct tm *tm = g_new0 (struct tm, 1);
++	long long  ltime;
+ 	time_t     time;
+ 
+-	sscanf (date, "%" GIGGLE_FORMAT_TIME_T, &time);
++	sscanf (date, "%lld", &ltime);
++	time = ltime;
+ 	localtime_r (&time, tm);
+ 
+ 	return tm;
diff --git a/srcpkgs/giggle/patches/gtksourceview3.7.patch b/srcpkgs/giggle/patches/gtksourceview3.7.patch
deleted file mode 100644
index 4dee3850a67..00000000000
--- a/srcpkgs/giggle/patches/gtksourceview3.7.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 9999a7ff573b7f3320c2065e8d0eaf0fea32a41b Mon Sep 17 00:00:00 2001
-From: Dominique Leuenberger <dimstar@opensuse.org>
-Date: Wed, 03 Apr 2013 20:26:17 +0000
-Subject: Directly include gtksourcebuffer.h
-
-Until gtksourceview 3.7, it was included indirectly by gtksourceview.h.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=697220
----
-diff --git a/src/giggle-diff-view.c b/src/giggle-diff-view.c
-index 3ded28d..ff6bbe3 100644
---- src/giggle-diff-view.c
-+++ src/giggle-diff-view.c
-@@ -29,6 +29,8 @@
- #include <glib/gi18n.h>
- #include <string.h>
- 
-+#include <gtksourceview/gtksourcebuffer.h>
-+
- typedef struct GiggleDiffViewPriv GiggleDiffViewPriv;
- typedef struct GiggleDiffViewFile GiggleDiffViewFile;
- typedef struct GiggleDiffViewHunk GiggleDiffViewHunk;
-diff --git a/src/giggle-view-file.c b/src/giggle-view-file.c
-index 130af4a..517858d 100644
---- src/giggle-view-file.c
-+++ src/giggle-view-file.c
-@@ -40,6 +40,7 @@
- 
- #include <gtksourceview/gtksourcelanguagemanager.h>
- #include <gtksourceview/gtksourceview.h>
-+#include <gtksourceview/gtksourcebuffer.h>
- 
- #define GIGGLE_TYPE_VIEW_FILE_SNAPSHOT            (giggle_view_file_snapshot_get_type ())
- #define GIGGLE_VIEW_FILE_SNAPSHOT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIGGLE_TYPE_VIEW_FILE_SNAPSHOT, GiggleViewFileSnapshot))
---
-cgit v0.9.1
diff --git a/srcpkgs/giggle/template b/srcpkgs/giggle/template
index 9da11473757..1984fed3f63 100644
--- a/srcpkgs/giggle/template
+++ b/srcpkgs/giggle/template
@@ -1,9 +1,10 @@
 # Template file for 'giggle'
 pkgname=giggle
 version=0.7
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="pkg-config itstool intltool glib-devel git"
+hostmakedepends="pkg-config itstool intltool glib-devel git
+ automake gettext-devel libtool tar yelp-tools"
 makedepends="gtksourceview-devel vte290-devel"
 depends="desktop-file-utils hicolor-icon-theme"
 short_desc="Git repository viewer"
@@ -13,10 +14,15 @@ homepage="https://wiki.gnome.org/Apps/giggle"
 distfiles="${GNOME_SITE}/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
 checksum=ae2e2237fa0d0999d99d0a0ee9b7ec147e80bd2472d59a045b2b01eb02261f59
 lib32disabled=yes
-nocross=yes
 
 CFLAGS="-fcommon"
 
+pre_configure() {
+	autoreconf -fi
+	intltoolize --force
+	autoreconf
+}
+
 libgiggle_package() {
 	short_desc+=" - runtime libraries"
 	pkg_install() {

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR REVIEW] giggle: fix cross, crash
  2020-12-15 10:48 [PR PATCH] giggle: fix cross, crash sgn
                   ` (4 preceding siblings ...)
  2020-12-17 23:47 ` [PR PATCH] [Updated] " sgn
@ 2020-12-17 23:47 ` sgn
  2020-12-18  0:09 ` [PR PATCH] [Updated] " sgn
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: sgn @ 2020-12-17 23:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 200 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/27179#discussion_r545479858

Comment:
Anyway, correct format specifier for `size_t` is `zu` :-p

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR PATCH] [Updated] giggle: fix cross, crash
  2020-12-15 10:48 [PR PATCH] giggle: fix cross, crash sgn
                   ` (5 preceding siblings ...)
  2020-12-17 23:47 ` [PR REVIEW] " sgn
@ 2020-12-18  0:09 ` sgn
  2020-12-18  0:27 ` sgn
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: sgn @ 2020-12-18  0:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages fix-giggle
https://github.com/void-linux/void-packages/pull/27179

giggle: fix cross, crash
Close #27151

@ndowens 

A patch file from https://github.com/void-linux/void-packages/pull/27179.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix-giggle-27179.patch --]
[-- Type: text/x-diff, Size: 14612 bytes --]

From 529f24aaa06a50b0d4b240a79061f4e0be0b26b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Tue, 15 Dec 2020 17:43:33 +0700
Subject: [PATCH] giggle: fix cross, crash

---
 ...e-does-not-display-diff-for-files-th.patch | 31 ++++++++++
 ...ksource.h-instead-of-gtksourceview.h.patch | 55 +++++++++++++++++
 .../patches/0004-Port-to-vte-2.91-API.patch   | 54 +++++++++++++++++
 ...-bug-of-GUI-not-remembering-settings.patch | 45 ++++++++++++++
 srcpkgs/giggle/patches/cross.patch            | 60 +++++++++++++++++++
 srcpkgs/giggle/patches/gtksourceview3.7.patch | 36 -----------
 srcpkgs/giggle/template                       | 12 +++-
 7 files changed, 254 insertions(+), 39 deletions(-)
 create mode 100644 srcpkgs/giggle/patches/0001-Fix-628184-Giggle-does-not-display-diff-for-files-th.patch
 create mode 100644 srcpkgs/giggle/patches/0002-include-gtksource.h-instead-of-gtksourceview.h.patch
 create mode 100644 srcpkgs/giggle/patches/0004-Port-to-vte-2.91-API.patch
 create mode 100644 srcpkgs/giggle/patches/0005-Fixed-bug-of-GUI-not-remembering-settings.patch
 create mode 100644 srcpkgs/giggle/patches/cross.patch
 delete mode 100644 srcpkgs/giggle/patches/gtksourceview3.7.patch

diff --git a/srcpkgs/giggle/patches/0001-Fix-628184-Giggle-does-not-display-diff-for-files-th.patch b/srcpkgs/giggle/patches/0001-Fix-628184-Giggle-does-not-display-diff-for-files-th.patch
new file mode 100644
index 00000000000..9fe8e967c5b
--- /dev/null
+++ b/srcpkgs/giggle/patches/0001-Fix-628184-Giggle-does-not-display-diff-for-files-th.patch
@@ -0,0 +1,31 @@
+From c4963107ee97b6bf045b805ed3b8f9f824c62ccb Mon Sep 17 00:00:00 2001
+From: Guilhem Bonnefille <guilhem.bonnefille@gmail.com>
+Date: Thu, 4 Apr 2013 14:47:19 +0100
+Subject: [PATCH] Fix #628184 - Giggle does not display diff for files that
+ have spaces in names
+
+Git diff is compliant to GNU patch expected format:
+when a filename contains a SP a TAB is added.
+See Git's commit 1a9eb3b9d50367bee8fe85022684d812816fe531
+
+Signed-off-by: Guilhem Bonnefille <guilhem.bonnefille@gmail.com>
+---
+ src/giggle-diff-view.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git src/giggle-diff-view.c src/giggle-diff-view.c
+index ff6bbe3..2fbb8eb 100644
+--- src/giggle-diff-view.c
++++ src/giggle-diff-view.c
+@@ -665,6 +665,11 @@ diff_view_parse_patch (GiggleDiffView *view)
+ 			}
+ 		} else if (g_str_has_prefix (line, "--- a/") || g_str_has_prefix (line, "+++ b/")) {
+ 			g_free (filename); filename = g_strdup (line + 6);
++			if (strchr(filename, ' ')) {
++				/* Remove trailing TAB added by git for GNU patch compatibility */
++				size_t len = strlen (filename);
++				filename[len-1] = '\0';
++			}
+ 		}
+ 
+ 		g_free (line);
diff --git a/srcpkgs/giggle/patches/0002-include-gtksource.h-instead-of-gtksourceview.h.patch b/srcpkgs/giggle/patches/0002-include-gtksource.h-instead-of-gtksourceview.h.patch
new file mode 100644
index 00000000000..ddce15f4897
--- /dev/null
+++ b/srcpkgs/giggle/patches/0002-include-gtksource.h-instead-of-gtksourceview.h.patch
@@ -0,0 +1,55 @@
+From 44490f7f78c3281c8fc4f38aa7226fc5955720a9 Mon Sep 17 00:00:00 2001
+From: Dominique Leuenberger <dimstar@opensuse.org>
+Date: Wed, 3 Apr 2013 22:26:17 +0200
+Subject: [PATCH] include gtksource.h instead of gtksourceview.h
+
+The main header of gtksourceview is now called gtksource.h
+
+https://bugzilla.gnome.org/show_bug.cgi?id=697220
+---
+ configure.ac           | 2 +-
+ src/giggle-diff-view.h | 3 +--
+ src/giggle-view-file.c | 3 +--
+ 3 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git configure.ac configure.ac
+index a7011f8..3e47b48 100644
+--- configure.ac
++++ configure.ac
+@@ -54,7 +54,7 @@ dnl  ------------------
+ GLIB_REQUIRED_VERSION=2.30
+ GDK_PIXBUF_REQUIRED_VERSION=2.22
+ GTK_REQUIRED_VERSION=3.3.12
+-GTKSOURCE_REQUIRED_VERSION=3.0
++GTKSOURCE_REQUIRED_VERSION=3.8
+ EDS_REQUIRED_VERSION=3.2
+ VTE_REQUIRED_VERSION=0.28
+ 
+diff --git src/giggle-diff-view.h src/giggle-diff-view.h
+index 74fb983..28266e3 100644
+--- src/giggle-diff-view.h
++++ src/giggle-diff-view.h
+@@ -21,8 +21,7 @@
+ 
+ #include <glib-object.h>
+ #include <gtk/gtk.h>
+-#include <gtksourceview/gtksourceview.h>
+-#include <gtksourceview/gtksourcelanguagemanager.h>
++#include <gtksourceview/gtksource.h>
+ 
+ #include "libgiggle/giggle-revision.h"
+ 
+diff --git src/giggle-view-file.c src/giggle-view-file.c
+index 130af4a..94c6c76 100644
+--- src/giggle-view-file.c
++++ src/giggle-view-file.c
+@@ -38,8 +38,7 @@
+ #include <gio/gio.h>
+ #include <glib/gi18n.h>
+ 
+-#include <gtksourceview/gtksourcelanguagemanager.h>
+-#include <gtksourceview/gtksourceview.h>
++#include <gtksourceview/gtksource.h>
+ 
+ #define GIGGLE_TYPE_VIEW_FILE_SNAPSHOT            (giggle_view_file_snapshot_get_type ())
+ #define GIGGLE_VIEW_FILE_SNAPSHOT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIGGLE_TYPE_VIEW_FILE_SNAPSHOT, GiggleViewFileSnapshot))
diff --git a/srcpkgs/giggle/patches/0004-Port-to-vte-2.91-API.patch b/srcpkgs/giggle/patches/0004-Port-to-vte-2.91-API.patch
new file mode 100644
index 00000000000..a278397c044
--- /dev/null
+++ b/srcpkgs/giggle/patches/0004-Port-to-vte-2.91-API.patch
@@ -0,0 +1,54 @@
+From b9e260840d03e33ac55142719f3d54129b54cc70 Mon Sep 17 00:00:00 2001
+From: Debarshi Ray <debarshir@gnome.org>
+Date: Mon, 26 Jan 2015 15:38:24 +0100
+Subject: [PATCH] Port to vte-2.91 API
+
+https://bugzilla.gnome.org/show_bug.cgi?id=743537
+---
+ configure.ac                   |  2 +-
+ plugins/giggle-view-terminal.c | 19 ++++++++++---------
+ 2 files changed, 11 insertions(+), 10 deletions(-)
+
+diff --git configure.ac configure.ac
+index 6e27733..72e7bd1 100644
+--- configure.ac
++++ configure.ac
+@@ -106,7 +106,7 @@ AC_ARG_ENABLE([terminal],
+ AS_IF([test "x$enable_terminal" = "xyes"],
+       [
+         PKG_CHECK_MODULES([VTE],
+-                          [vte-2.90 >= $VTE_REQUIRED_VERSION],
++                          [vte-2.91 >= $VTE_REQUIRED_VERSION],
+                           [have_vte=yes
+                            AC_DEFINE([HAVE_VTE], [1],
+                                      [Use features from vte])
+diff --git plugins/giggle-view-terminal.c plugins/giggle-view-terminal.c
+index 06a9a50..cd107f2 100644
+--- plugins/giggle-view-terminal.c
++++ plugins/giggle-view-terminal.c
+@@ -186,15 +186,16 @@ giggle_view_terminal_append_tab (GiggleViewTerminal *view,
+ 	real_argv[1] = NULL;
+ 	spawn_flags = G_SPAWN_CHILD_INHERITS_STDIN | G_SPAWN_SEARCH_PATH | G_SPAWN_FILE_AND_ARGV_ZERO;
+ 
+-	succes = vte_terminal_fork_command_full (VTE_TERMINAL (terminal),
+-	                                         pty_flags,
+-	                                         directory,
+-	                                         real_argv,
+-	                                         NULL,
+-	                                         spawn_flags,
+-	                                         NULL, NULL,
+-	                                         NULL,
+-	                                         &error);
++	succes = vte_terminal_spawn_sync (VTE_TERMINAL (terminal),
++	                                  pty_flags,
++	                                  directory,
++	                                  real_argv,
++	                                  NULL,
++	                                  spawn_flags,
++	                                  NULL, NULL,
++	                                  NULL,
++	                                  NULL,
++	                                  &error);
+ 	g_strfreev (real_argv);
+ 
+ 	if (succes == FALSE) {
diff --git a/srcpkgs/giggle/patches/0005-Fixed-bug-of-GUI-not-remembering-settings.patch b/srcpkgs/giggle/patches/0005-Fixed-bug-of-GUI-not-remembering-settings.patch
new file mode 100644
index 00000000000..1f83d51b710
--- /dev/null
+++ b/srcpkgs/giggle/patches/0005-Fixed-bug-of-GUI-not-remembering-settings.patch
@@ -0,0 +1,45 @@
+From 18c9fafc9437ee62ecf2572d93a63817ab05b9df Mon Sep 17 00:00:00 2001
+From: Georgios Floros <gfloros@openmailbox.org>
+Date: Thu, 12 Nov 2015 22:24:48 +0200
+Subject: [PATCH] Fixed bug of GUI not remembering settings
+
+Actually the command "git repo-config" is obsolete.
+This patch replaces "git repo-config" with "git config".
+---
+ libgiggle-git/giggle-git-config-read.c  | 2 +-
+ libgiggle-git/giggle-git-config-write.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git libgiggle-git/giggle-git-config-read.c libgiggle-git/giggle-git-config-read.c
+index 7b4fdb9..7f24e1d 100644
+--- libgiggle-git/giggle-git-config-read.c
++++ libgiggle-git/giggle-git-config-read.c
+@@ -120,7 +120,7 @@ static gboolean
+ git_config_read_get_command_line (GiggleJob  *job,
+ 				  gchar     **command_line)
+ {
+-	*command_line = g_strdup_printf (GIT_COMMAND " repo-config --list");
++	*command_line = g_strdup_printf (GIT_COMMAND " config --list");
+ 	return TRUE;
+ }
+ 
+diff --git libgiggle-git/giggle-git-config-write.c libgiggle-git/giggle-git-config-write.c
+index e026e4f..7fd2b07 100644
+--- libgiggle-git/giggle-git-config-write.c
++++ libgiggle-git/giggle-git-config-write.c
+@@ -184,13 +184,13 @@ git_config_write_get_command_line (GiggleJob  *job,
+ 	if (priv->value) {
+ 		value = g_shell_quote (priv->value);
+ 
+-		*command_line = g_strdup_printf (GIT_COMMAND " repo-config %s %s %s",
++		*command_line = g_strdup_printf (GIT_COMMAND " config %s %s %s",
+ 					         priv->global ? "--global" : "",
+ 						 priv->field, value);
+ 
+ 		g_free (value);
+ 	} else {
+-		*command_line = g_strdup_printf (GIT_COMMAND " repo-config %s --unset %s",
++		*command_line = g_strdup_printf (GIT_COMMAND " config %s --unset %s",
+ 					         priv->global ? "--global" : "", priv->field);
+ 	}
+ 
diff --git a/srcpkgs/giggle/patches/cross.patch b/srcpkgs/giggle/patches/cross.patch
new file mode 100644
index 00000000000..c985b4acdf2
--- /dev/null
+++ b/srcpkgs/giggle/patches/cross.patch
@@ -0,0 +1,60 @@
+diff --git configure.ac configure.ac
+index a7011f8..1ab7a52 100644
+--- configure.ac
++++ configure.ac
+@@ -125,30 +125,6 @@ dnl  ----------------------
+ 
+ AC_DEFINE(_GNU_SOURCE, 1, [Enable GNU Extensions])
+ 
+-dnl Make sure that strptime can be used (read: has gnu extensions)
+-AC_MSG_CHECKING([for GNU extensions of strptime()])
+-AC_RUN_IFELSE(
+-  [AC_LANG_PROGRAM(
+-    [[#include <time.h>]],
+-    [[const char* date = "1168635922 +0100"; struct tm tm;
+-      char const* returned = strptime(date, "%s %z", &tm);
+-      return (!returned || *returned ? 1 : 0);]])],
+-  [AC_MSG_RESULT(available)
+-   AC_DEFINE([STRPTIME_HAS_GNU], [1],
+-             [strptime() has GNU extensions %s and %z])],
+-  [AC_MSG_RESULT(not available)])
+-
+-dnl Figure out which format string to use for time_t
+-AC_MSG_CHECKING([size of time_t type])
+-AC_RUN_IFELSE(
+-  [AC_LANG_PROGRAM(
+-    [[#include <time.h>]],
+-    [[return (sizeof (time_t) == sizeof (long) ? 0 : 1);]])],
+-  [AC_MSG_RESULT(long)
+-   AC_DEFINE([GIGGLE_FORMAT_TIME_T], ["ld"], [format string for time_t])],
+-  [AC_MSG_RESULT(int)
+-   AC_DEFINE([GIGGLE_FORMAT_TIME_T], ["d"], [format string for time_t])])
+-
+ dnl  ------------------
+ dnl | Language Support |---------------------------------------
+ dnl  ------------------
+diff --git libgiggle-git/giggle-git-revisions.c libgiggle-git/giggle-git-revisions.c
+--- libgiggle-git/giggle-git-revisions.c
++++ libgiggle-git/giggle-git-revisions.c
+@@ -130,7 +130,7 @@ git_revisions_get_command_line (GiggleJob  *job,
+ static struct tm *
+ git_revisions_get_time (const gchar *date)
+ {
+-#if STRPTIME_HAS_GNU
++#ifdef __GLIBC__
+ 	const gchar *returned;
+ 	struct tm   *tm;
+ 
+@@ -145,9 +145,11 @@ git_revisions_get_time (const gchar *date)
+ 	return tm;
+ #else
+ 	struct tm *tm = g_new0 (struct tm, 1);
++	gint64   ltime;
+ 	time_t     time;
+ 
+-	sscanf (date, "%" GIGGLE_FORMAT_TIME_T, &time);
++	ltime = g_ascii_strtoull(date, NULL, 10);
++	time = ltime;
+ 	localtime_r (&time, tm);
+ 
+ 	return tm;
diff --git a/srcpkgs/giggle/patches/gtksourceview3.7.patch b/srcpkgs/giggle/patches/gtksourceview3.7.patch
deleted file mode 100644
index 4dee3850a67..00000000000
--- a/srcpkgs/giggle/patches/gtksourceview3.7.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 9999a7ff573b7f3320c2065e8d0eaf0fea32a41b Mon Sep 17 00:00:00 2001
-From: Dominique Leuenberger <dimstar@opensuse.org>
-Date: Wed, 03 Apr 2013 20:26:17 +0000
-Subject: Directly include gtksourcebuffer.h
-
-Until gtksourceview 3.7, it was included indirectly by gtksourceview.h.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=697220
----
-diff --git a/src/giggle-diff-view.c b/src/giggle-diff-view.c
-index 3ded28d..ff6bbe3 100644
---- src/giggle-diff-view.c
-+++ src/giggle-diff-view.c
-@@ -29,6 +29,8 @@
- #include <glib/gi18n.h>
- #include <string.h>
- 
-+#include <gtksourceview/gtksourcebuffer.h>
-+
- typedef struct GiggleDiffViewPriv GiggleDiffViewPriv;
- typedef struct GiggleDiffViewFile GiggleDiffViewFile;
- typedef struct GiggleDiffViewHunk GiggleDiffViewHunk;
-diff --git a/src/giggle-view-file.c b/src/giggle-view-file.c
-index 130af4a..517858d 100644
---- src/giggle-view-file.c
-+++ src/giggle-view-file.c
-@@ -40,6 +40,7 @@
- 
- #include <gtksourceview/gtksourcelanguagemanager.h>
- #include <gtksourceview/gtksourceview.h>
-+#include <gtksourceview/gtksourcebuffer.h>
- 
- #define GIGGLE_TYPE_VIEW_FILE_SNAPSHOT            (giggle_view_file_snapshot_get_type ())
- #define GIGGLE_VIEW_FILE_SNAPSHOT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIGGLE_TYPE_VIEW_FILE_SNAPSHOT, GiggleViewFileSnapshot))
---
-cgit v0.9.1
diff --git a/srcpkgs/giggle/template b/srcpkgs/giggle/template
index 9da11473757..1984fed3f63 100644
--- a/srcpkgs/giggle/template
+++ b/srcpkgs/giggle/template
@@ -1,9 +1,10 @@
 # Template file for 'giggle'
 pkgname=giggle
 version=0.7
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="pkg-config itstool intltool glib-devel git"
+hostmakedepends="pkg-config itstool intltool glib-devel git
+ automake gettext-devel libtool tar yelp-tools"
 makedepends="gtksourceview-devel vte290-devel"
 depends="desktop-file-utils hicolor-icon-theme"
 short_desc="Git repository viewer"
@@ -13,10 +14,15 @@ homepage="https://wiki.gnome.org/Apps/giggle"
 distfiles="${GNOME_SITE}/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
 checksum=ae2e2237fa0d0999d99d0a0ee9b7ec147e80bd2472d59a045b2b01eb02261f59
 lib32disabled=yes
-nocross=yes
 
 CFLAGS="-fcommon"
 
+pre_configure() {
+	autoreconf -fi
+	intltoolize --force
+	autoreconf
+}
+
 libgiggle_package() {
 	short_desc+=" - runtime libraries"
 	pkg_install() {

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: giggle: fix cross, crash
  2020-12-15 10:48 [PR PATCH] giggle: fix cross, crash sgn
                   ` (6 preceding siblings ...)
  2020-12-18  0:09 ` [PR PATCH] [Updated] " sgn
@ 2020-12-18  0:27 ` sgn
  2020-12-18  2:36 ` [PR REVIEW] " ericonr
  2020-12-18 11:37 ` [PR PATCH] [Merged]: " sgn
  9 siblings, 0 replies; 11+ messages in thread
From: sgn @ 2020-12-18  0:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/27179#issuecomment-747790515

Comment:
https://gitlab.gnome.org/GNOME/giggle/-/merge_requests/3

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR REVIEW] giggle: fix cross, crash
  2020-12-15 10:48 [PR PATCH] giggle: fix cross, crash sgn
                   ` (7 preceding siblings ...)
  2020-12-18  0:27 ` sgn
@ 2020-12-18  2:36 ` ericonr
  2020-12-18 11:37 ` [PR PATCH] [Merged]: " sgn
  9 siblings, 0 replies; 11+ messages in thread
From: ericonr @ 2020-12-18  2:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 156 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/27179#discussion_r545535079

Comment:
Heh, true

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR PATCH] [Merged]: giggle: fix cross, crash
  2020-12-15 10:48 [PR PATCH] giggle: fix cross, crash sgn
                   ` (8 preceding siblings ...)
  2020-12-18  2:36 ` [PR REVIEW] " ericonr
@ 2020-12-18 11:37 ` sgn
  9 siblings, 0 replies; 11+ messages in thread
From: sgn @ 2020-12-18 11:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 183 bytes --]

There's a merged pull request on the void-packages repository

giggle: fix cross, crash
https://github.com/void-linux/void-packages/pull/27179

Description:
Close #27151

@ndowens 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-12-18 11:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 10:48 [PR PATCH] giggle: fix cross, crash sgn
2020-12-15 15:44 ` ndowens
2020-12-15 16:29 ` sgn
2020-12-17 18:30 ` [PR REVIEW] " ericonr
2020-12-17 23:42 ` sgn
2020-12-17 23:47 ` [PR PATCH] [Updated] " sgn
2020-12-17 23:47 ` [PR REVIEW] " sgn
2020-12-18  0:09 ` [PR PATCH] [Updated] " sgn
2020-12-18  0:27 ` sgn
2020-12-18  2:36 ` [PR REVIEW] " ericonr
2020-12-18 11:37 ` [PR PATCH] [Merged]: " sgn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).