From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] giggle: fix cross, crash
Date: Tue, 15 Dec 2020 11:48:20 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27179@inbox.vuxu.org> (raw)
[-- 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", <ime);
++ 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() {
next reply other threads:[~2020-12-15 10:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 10:48 sgn [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27179@inbox.vuxu.org \
--to=sgn@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).