commit 71a52672eff88de40dc64915b52d453a5d5bda04
Author: Jan Rękorajski <[email protected]>
Date:   Sun May 17 00:55:14 2020 +0200

    - fix building with libgit2 1.x
    - rel 4

 libgit2-1.0.patch | 141 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 libgit2-glib.spec |   4 +-
 2 files changed, 144 insertions(+), 1 deletion(-)
---
diff --git a/libgit2-glib.spec b/libgit2-glib.spec
index f9bb024..88136b6 100644
--- a/libgit2-glib.spec
+++ b/libgit2-glib.spec
@@ -7,11 +7,12 @@ Summary:      GLib wrapper library around the libgit2 git 
access library
 Summary(pl.UTF-8):     Biblioteka obudowania GLib do biblioteki dostępu do 
gita libgit2
 Name:          libgit2-glib
 Version:       0.28.0.1
-Release:       3
+Release:       4
 License:       LGPL v2.1+
 Group:         Libraries
 Source0:       
http://ftp.gnome.org/pub/GNOME/sources/libgit2-glib/0.28/%{name}-%{version}.tar.xz
 # Source0-md5: 04c4cf24291c16406bddb5760449ab52
+Patch0:                libgit2-1.0.patch
 URL:           https://wiki.gnome.org/Libgit2-glib
 BuildRequires: glib2-devel >= 1:2.44.0
 BuildRequires: gobject-introspection-devel >= 0.10.1
@@ -106,6 +107,7 @@ API języka Vala do biblioteki libgit2-glib.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %meson build \
diff --git a/libgit2-1.0.patch b/libgit2-1.0.patch
new file mode 100644
index 0000000..fec1f95
--- /dev/null
+++ b/libgit2-1.0.patch
@@ -0,0 +1,141 @@
+diff -ur libgit2-glib-0.28.0.1/libgit2-glib/ggit-clone-options.c 
libgit2-glib-0.28.0.1-libgit1/libgit2-glib/ggit-clone-options.c
+--- libgit2-glib-0.28.0.1/libgit2-glib/ggit-clone-options.c    2019-04-24 
06:18:53.000000000 +0200
++++ libgit2-glib-0.28.0.1-libgit1/libgit2-glib/ggit-clone-options.c    
2020-05-17 00:49:40.395051430 +0200
+@@ -149,7 +149,7 @@
+ 
+       if (error != NULL)
+       {
+-#if LIBGIT2_SOVERSION >= 28
++#if (LIBGIT2_VER_MAJOR >= 1) || ((LIBGIT2_VER_MAJOR == 0) && 
(LIBGIT2_VER_MINOR >= 28))
+               git_error_set_str (GIT_ERROR, error->message);
+ #else
+               giterr_set_str (GIT_ERROR, error->message);
+@@ -191,7 +191,7 @@
+ 
+       if (error)
+       {
+-#if LIBGIT2_SOVERSION >= 28
++#if (LIBGIT2_VER_MAJOR >= 1) || ((LIBGIT2_VER_MAJOR == 0) && 
(LIBGIT2_VER_MINOR >= 28))
+               git_error_set_str (GIT_ERROR, error->message);
+ #else
+               giterr_set_str (GIT_ERROR, error->message);
+diff -ur libgit2-glib-0.28.0.1/libgit2-glib/ggit-config.c 
libgit2-glib-0.28.0.1-libgit1/libgit2-glib/ggit-config.c
+--- libgit2-glib-0.28.0.1/libgit2-glib/ggit-config.c   2019-04-24 
06:18:53.000000000 +0200
++++ libgit2-glib-0.28.0.1-libgit1/libgit2-glib/ggit-config.c   2020-05-17 
00:50:21.902924233 +0200
+@@ -191,7 +191,7 @@
+       if (git_config_find_global (&buf) == GIT_OK)
+       {
+               path = g_file_new_for_path (buf.ptr);
+-#if LIBGIT2_SOVERSION >= 28
++#if (LIBGIT2_VER_MAJOR >= 1) || ((LIBGIT2_VER_MAJOR == 0) && 
(LIBGIT2_VER_MINOR >= 28))
+               git_buf_dispose (&buf);
+ #else
+               git_buf_free (&buf);
+@@ -224,7 +224,7 @@
+       if (git_config_find_system (&buf) == GIT_OK)
+       {
+               path = g_file_new_for_path (buf.ptr);
+-#if LIBGIT2_SOVERSION >= 28
++#if (LIBGIT2_VER_MAJOR >= 1) || ((LIBGIT2_VER_MAJOR == 0) && 
(LIBGIT2_VER_MINOR >= 28))
+               git_buf_dispose (&buf);
+ #else
+               git_buf_free (&buf);
+@@ -303,7 +303,7 @@
+       ret = git_config_add_file_ondisk (_ggit_native_get (config),
+                                         path,
+                                         (git_config_level_t)level,
+-#if LIBGIT2_SOVERSION >= 27
++#if (LIBGIT2_VER_MAJOR >= 1) || ((LIBGIT2_VER_MAJOR == 0) && 
(LIBGIT2_VER_MINOR >= 27))
+                                         NULL,
+ #endif
+                                         force);
+diff -ur libgit2-glib-0.28.0.1/libgit2-glib/ggit-diff.c 
libgit2-glib-0.28.0.1-libgit1/libgit2-glib/ggit-diff.c
+--- libgit2-glib-0.28.0.1/libgit2-glib/ggit-diff.c     2019-04-24 
06:18:53.000000000 +0200
++++ libgit2-glib-0.28.0.1-libgit1/libgit2-glib/ggit-diff.c     2020-05-17 
00:50:43.846896752 +0200
+@@ -786,7 +786,7 @@
+ 
+       if (ret != GIT_OK)
+       {
+-#if LIBGIT2_SOVERSION >= 28
++#if (LIBGIT2_VER_MAJOR >= 1) || ((LIBGIT2_VER_MAJOR == 0) && 
(LIBGIT2_VER_MINOR >= 28))
+               git_buf_dispose (&buf);
+ #else
+               git_buf_free (&buf);
+@@ -796,7 +796,7 @@
+       }
+ 
+       retval = g_strndup (buf.ptr, buf.size);
+-#if LIBGIT2_SOVERSION >= 28
++#if (LIBGIT2_VER_MAJOR >= 1) || ((LIBGIT2_VER_MAJOR == 0) && 
(LIBGIT2_VER_MINOR >= 28))
+       git_buf_dispose (&buf);
+ #else
+       git_buf_free (&buf);
+diff -ur libgit2-glib-0.28.0.1/libgit2-glib/ggit-error.c 
libgit2-glib-0.28.0.1-libgit1/libgit2-glib/ggit-error.c
+--- libgit2-glib-0.28.0.1/libgit2-glib/ggit-error.c    2019-04-24 
06:18:53.000000000 +0200
++++ libgit2-glib-0.28.0.1-libgit1/libgit2-glib/ggit-error.c    2020-05-17 
00:51:04.997513781 +0200
+@@ -51,7 +51,7 @@
+       g_return_if_fail (err < 0);
+ 
+       /* TODO: add more kind of errors, see git_error_t */
+-#if LIBGIT2_SOVERSION >= 28
++#if (LIBGIT2_VER_MAJOR >= 1) || ((LIBGIT2_VER_MAJOR == 0) && 
(LIBGIT2_VER_MINOR >= 28))
+       git2_err = git_error_last ();
+ #else
+       git2_err = giterr_last ();
+diff -ur libgit2-glib-0.28.0.1/libgit2-glib/ggit-message.c 
libgit2-glib-0.28.0.1-libgit1/libgit2-glib/ggit-message.c
+--- libgit2-glib-0.28.0.1/libgit2-glib/ggit-message.c  2019-04-24 
06:18:53.000000000 +0200
++++ libgit2-glib-0.28.0.1-libgit1/libgit2-glib/ggit-message.c  2020-05-17 
00:51:12.027719074 +0200
+@@ -46,7 +46,7 @@
+       git_message_prettify (&buf, message, strip_comments, comment_char);
+ 
+       d = g_strdup (buf.ptr);
+-#if LIBGIT2_SOVERSION >= 28
++#if (LIBGIT2_VER_MAJOR >= 1) || ((LIBGIT2_VER_MAJOR == 0) && 
(LIBGIT2_VER_MINOR >= 28))
+       git_buf_dispose (&buf);
+ #else
+       git_buf_free (&buf);
+diff -ur libgit2-glib-0.28.0.1/libgit2-glib/ggit-patch.c 
libgit2-glib-0.28.0.1-libgit1/libgit2-glib/ggit-patch.c
+--- libgit2-glib-0.28.0.1/libgit2-glib/ggit-patch.c    2019-04-24 
06:18:53.000000000 +0200
++++ libgit2-glib-0.28.0.1-libgit1/libgit2-glib/ggit-patch.c    2020-05-17 
00:51:18.614578177 +0200
+@@ -194,7 +194,7 @@
+       if (ret == GIT_OK)
+       {
+               result = g_strdup (buf.ptr);
+-#if LIBGIT2_SOVERSION >= 28
++#if (LIBGIT2_VER_MAJOR >= 1) || ((LIBGIT2_VER_MAJOR == 0) && 
(LIBGIT2_VER_MINOR >= 28))
+               git_buf_dispose (&buf);
+ #else
+               git_buf_free (&buf);
+diff -ur libgit2-glib-0.28.0.1/libgit2-glib/ggit-remote-callbacks.c 
libgit2-glib-0.28.0.1-libgit1/libgit2-glib/ggit-remote-callbacks.c
+--- libgit2-glib-0.28.0.1/libgit2-glib/ggit-remote-callbacks.c 2019-04-24 
06:18:53.000000000 +0200
++++ libgit2-glib-0.28.0.1-libgit1/libgit2-glib/ggit-remote-callbacks.c 
2020-05-17 00:52:04.109242895 +0200
+@@ -160,7 +160,7 @@
+               {
+                       if (error)
+                       {
+-#if LIBGIT2_SOVERSION >= 28
++#if (LIBGIT2_VER_MAJOR >= 1) || ((LIBGIT2_VER_MAJOR == 0) && 
(LIBGIT2_VER_MINOR >= 28))
+                               git_error_set_str (GIT_ERROR, error->message);
+ #else
+                               giterr_set_str (GIT_ERROR, error->message);
+diff -ur libgit2-glib-0.28.0.1/libgit2-glib/ggit-repository.c 
libgit2-glib-0.28.0.1-libgit1/libgit2-glib/ggit-repository.c
+--- libgit2-glib-0.28.0.1/libgit2-glib/ggit-repository.c       2019-04-24 
06:18:53.000000000 +0200
++++ libgit2-glib-0.28.0.1-libgit1/libgit2-glib/ggit-repository.c       
2020-05-17 00:52:18.686336953 +0200
+@@ -1013,7 +1013,7 @@
+       if (ret == GIT_OK)
+       {
+               rep = g_file_new_for_path (buf.ptr);
+-#if LIBGIT2_SOVERSION >= 28
++#if (LIBGIT2_VER_MAJOR >= 1) || ((LIBGIT2_VER_MAJOR == 0) && 
(LIBGIT2_VER_MINOR >= 28))
+               git_buf_dispose (&buf);
+ #else
+               git_buf_free (&buf);
+@@ -3684,7 +3684,7 @@
+       }
+ 
+       ref = g_strdup (buf.ptr);
+-#if LIBGIT2_SOVERSION >= 28
++#if (LIBGIT2_VER_MAJOR >= 1) || ((LIBGIT2_VER_MAJOR == 0) && 
(LIBGIT2_VER_MINOR >= 28))
+       git_buf_dispose (&buf);
+ #else
+       git_buf_free (&buf);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libgit2-glib.git/commitdiff/71a52672eff88de40dc64915b52d453a5d5bda04

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to