[packages/libgit2-glib] add patch fixing compatibility with libgit2 >= 1.8

atler atler at pld-linux.org
Thu Dec 12 13:21:06 CET 2024


commit 2bbe92c31e9e8d8e4527f570a2a49584cb7d2f35
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Dec 12 12:26:23 2024 +0100

    add patch fixing compatibility with libgit2 >= 1.8

 libgit2-1.8.patch | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 libgit2-glib.spec |  2 ++
 2 files changed, 70 insertions(+)
---
diff --git a/libgit2-glib.spec b/libgit2-glib.spec
index 6abb46c..9c52557 100644
--- a/libgit2-glib.spec
+++ b/libgit2-glib.spec
@@ -12,6 +12,7 @@ License:	LGPL v2.1+
 Group:		Libraries
 Source0:	https://download.gnome.org/sources/libgit2-glib/1.2/%{name}-%{version}.tar.xz
 # Source0-md5:	e77dd1cb02d0e25f79ce8eda8dba6a7d
+Patch0:		libgit2-1.8.patch
 URL:		https://wiki.gnome.org/Libgit2-glib
 BuildRequires:	glib2-devel >= 1:2.44.0
 BuildRequires:	gobject-introspection-devel >= 0.10.1
@@ -107,6 +108,7 @@ API języka Vala do biblioteki libgit2-glib.
 
 %prep
 %setup -q
+%patch -P 0 -p1
 
 %build
 %meson build \
diff --git a/libgit2-1.8.patch b/libgit2-1.8.patch
new file mode 100644
index 0000000..0ce09b5
--- /dev/null
+++ b/libgit2-1.8.patch
@@ -0,0 +1,68 @@
+From aec87acf8933f34c1d656f198976c5da02533f68 Mon Sep 17 00:00:00 2001
+From: Jan Palus <atler at pld-linux.org>
+Date: Wed, 11 Dec 2024 10:31:06 +0100
+Subject: [PATCH] add compatibility with libgit2 >= 1.8
+
+---
+ libgit2-glib/ggit-clone-options.c    | 3 +++
+ libgit2-glib/ggit-remote-callbacks.c | 5 +++++
+ libgit2-glib/ggit-types.h            | 5 +++++
+ 3 files changed, 13 insertions(+)
+
+diff --git a/libgit2-glib/ggit-clone-options.c b/libgit2-glib/ggit-clone-options.c
+index b47fdb1..4a790f8 100644
+--- a/libgit2-glib/ggit-clone-options.c
++++ b/libgit2-glib/ggit-clone-options.c
+@@ -19,6 +19,9 @@
+  */
+ 
+ #include <git2.h>
++#if LIBGIT2_VER_MAJOR > 1 || (LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR >= 8)
++#include <git2/sys/errors.h>
++#endif
+ #include <gio/gio.h>
+ 
+ #include "ggit-clone-options.h"
+diff --git a/libgit2-glib/ggit-remote-callbacks.c b/libgit2-glib/ggit-remote-callbacks.c
+index a1e7b7d..bbff614 100644
+--- a/libgit2-glib/ggit-remote-callbacks.c
++++ b/libgit2-glib/ggit-remote-callbacks.c
+@@ -18,6 +18,11 @@
+  * along with libgit2-glib. If not, see <http://www.gnu.org/licenses/>.
+  */
+ 
++#include <git2.h>
++#if LIBGIT2_VER_MAJOR > 1 || (LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR >= 8)
++#include <git2/sys/errors.h>
++#endif
++
+ #include "ggit-remote-callbacks.h"
+ #include "ggit-cred.h"
+ #include "ggit-transfer-progress.h"
+diff --git a/libgit2-glib/ggit-types.h b/libgit2-glib/ggit-types.h
+index 7e28975..811c6a8 100644
+--- a/libgit2-glib/ggit-types.h
++++ b/libgit2-glib/ggit-types.h
+@@ -21,6 +21,7 @@
+ #ifndef __GGIT_TYPES_H__
+ #define __GGIT_TYPES_H__
+ 
++#include <git2.h>
+ #include <glib.h>
+ 
+ G_BEGIN_DECLS
+@@ -355,7 +356,11 @@ typedef enum
+ 	GGIT_CONFIG_LEVEL_XDG         = 3,
+ 	GGIT_CONFIG_LEVEL_GLOBAL      = 4,
+ 	GGIT_CONFIG_LEVEL_LOCAL       = 5,
++#if LIBGIT2_VER_MAJOR > 1 || (LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR >= 8)
++	GGIT_CONFIG_LEVEL_APP         = 7,
++#else
+ 	GGIT_CONFIG_LEVEL_APP         = 6,
++#endif
+ 	GGIT_CONFIG_LEVEL_HIGHEST     = -1
+ } GgitConfigLevel;
+ 
+-- 
+GitLab
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libgit2-glib.git/commitdiff/6824084b5851ecbe86a45c12c9d65b43e3327000



More information about the pld-cvs-commit mailing list