From 3dcf2552ee3ee579c78a4d608330b75221a3286a Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 3 May 2020 19:21:16 +0200 Subject: [PATCH] libgit2-glib: rebuild for libgit2-1.0.0 --- .../libgit2-glib/patches/libgit2-1.0.patch | 156 ++++++++++++++++++ srcpkgs/libgit2-glib/template | 2 +- 2 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/libgit2-glib/patches/libgit2-1.0.patch diff --git a/srcpkgs/libgit2-glib/patches/libgit2-1.0.patch b/srcpkgs/libgit2-glib/patches/libgit2-1.0.patch new file mode 100644 index 0000000000..183be9909b --- /dev/null +++ b/srcpkgs/libgit2-glib/patches/libgit2-1.0.patch @@ -0,0 +1,156 @@ +commit bcbd4b6c84779413162f1e7fdd2a4a5329fef04a +Author: q66 +Date: Sun May 3 19:27:40 2020 +0200 + + libgit2 1.0 build fix + +diff --git libgit2-glib/ggit-clone-options.c libgit2-glib/ggit-clone-options.c +index 5e69eec..b47fdb1 100644 +--- libgit2-glib/ggit-clone-options.c ++++ libgit2-glib/ggit-clone-options.c +@@ -149,7 +149,7 @@ create_repository_wrapper (git_repository **out, + + if (error != NULL) + { +-#if LIBGIT2_SOVERSION >= 28 ++#if LIBGIT2_VER_MAJOR > 0 || (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 @@ create_remote_wrapper (git_remote **out, + + if (error) + { +-#if LIBGIT2_SOVERSION >= 28 ++#if LIBGIT2_VER_MAJOR > 0 || (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 --git libgit2-glib/ggit-config.c libgit2-glib/ggit-config.c +index 626f7f0..58c2bbe 100644 +--- libgit2-glib/ggit-config.c ++++ libgit2-glib/ggit-config.c +@@ -191,7 +191,7 @@ ggit_config_find_global (void) + if (git_config_find_global (&buf) == GIT_OK) + { + path = g_file_new_for_path (buf.ptr); +-#if LIBGIT2_SOVERSION >= 28 ++#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28) + git_buf_dispose (&buf); + #else + git_buf_free (&buf); +@@ -224,7 +224,7 @@ ggit_config_find_system (void) + if (git_config_find_system (&buf) == GIT_OK) + { + path = g_file_new_for_path (buf.ptr); +-#if LIBGIT2_SOVERSION >= 28 ++#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28) + git_buf_dispose (&buf); + #else + git_buf_free (&buf); +@@ -303,9 +303,7 @@ ggit_config_add_file (GgitConfig *config, + ret = git_config_add_file_ondisk (_ggit_native_get (config), + path, + (git_config_level_t)level, +-#if LIBGIT2_SOVERSION >= 27 + NULL, +-#endif + force); + g_free (path); + +diff --git libgit2-glib/ggit-diff.c libgit2-glib/ggit-diff.c +index 43fa6cf..5189724 100644 +--- libgit2-glib/ggit-diff.c ++++ libgit2-glib/ggit-diff.c +@@ -786,7 +786,7 @@ ggit_diff_format_email (GgitDiff *diff, + + if (ret != GIT_OK) + { +-#if LIBGIT2_SOVERSION >= 28 ++#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28) + git_buf_dispose (&buf); + #else + git_buf_free (&buf); +@@ -796,7 +796,7 @@ ggit_diff_format_email (GgitDiff *diff, + } + + retval = g_strndup (buf.ptr, buf.size); +-#if LIBGIT2_SOVERSION >= 28 ++#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28) + git_buf_dispose (&buf); + #else + git_buf_free (&buf); +diff --git libgit2-glib/ggit-error.c libgit2-glib/ggit-error.c +index 9247064..dbdaf4e 100644 +--- libgit2-glib/ggit-error.c ++++ libgit2-glib/ggit-error.c +@@ -51,7 +51,7 @@ _ggit_error_set (GError **error, + g_return_if_fail (err < 0); + + /* TODO: add more kind of errors, see git_error_t */ +-#if LIBGIT2_SOVERSION >= 28 ++#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28) + git2_err = git_error_last (); + #else + git2_err = giterr_last (); +diff --git libgit2-glib/ggit-message.c libgit2-glib/ggit-message.c +index 7bd6983..4d1b1b8 100644 +--- libgit2-glib/ggit-message.c ++++ libgit2-glib/ggit-message.c +@@ -46,7 +46,7 @@ ggit_message_prettify (const gchar *message, + git_message_prettify (&buf, message, strip_comments, comment_char); + + d = g_strdup (buf.ptr); +-#if LIBGIT2_SOVERSION >= 28 ++#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28) + git_buf_dispose (&buf); + #else + git_buf_free (&buf); +diff --git libgit2-glib/ggit-patch.c libgit2-glib/ggit-patch.c +index cd35be7..b544591 100644 +--- libgit2-glib/ggit-patch.c ++++ libgit2-glib/ggit-patch.c +@@ -194,7 +194,7 @@ ggit_patch_to_string (GgitPatch *patch, + if (ret == GIT_OK) + { + result = g_strdup (buf.ptr); +-#if LIBGIT2_SOVERSION >= 28 ++#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28) + git_buf_dispose (&buf); + #else + git_buf_free (&buf); +diff --git libgit2-glib/ggit-remote-callbacks.c libgit2-glib/ggit-remote-callbacks.c +index 7956f8b..a1e7b7d 100644 +--- libgit2-glib/ggit-remote-callbacks.c ++++ libgit2-glib/ggit-remote-callbacks.c +@@ -160,7 +160,7 @@ credentials_wrap (git_cred **cred, + { + if (error) + { +-#if LIBGIT2_SOVERSION >= 28 ++#if LIBGIT2_VER_MAJOR > 0 || (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 --git libgit2-glib/ggit-repository.c libgit2-glib/ggit-repository.c +index 42490f4..dd9c7d6 100644 +--- libgit2-glib/ggit-repository.c ++++ libgit2-glib/ggit-repository.c +@@ -1013,7 +1013,7 @@ ggit_repository_discover_full (GFile *location, + if (ret == GIT_OK) + { + rep = g_file_new_for_path (buf.ptr); +-#if LIBGIT2_SOVERSION >= 28 ++#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28) + git_buf_dispose (&buf); + #else + git_buf_free (&buf); +@@ -3684,7 +3684,7 @@ ggit_repository_get_default_notes_ref (GgitRepository *repository, + } + + ref = g_strdup (buf.ptr); +-#if LIBGIT2_SOVERSION >= 28 ++#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28) + git_buf_dispose (&buf); + #else + git_buf_free (&buf); diff --git a/srcpkgs/libgit2-glib/template b/srcpkgs/libgit2-glib/template index ce68cb35d6..89551f7b75 100644 --- a/srcpkgs/libgit2-glib/template +++ b/srcpkgs/libgit2-glib/template @@ -1,7 +1,7 @@ # Template file for 'libgit2-glib' pkgname=libgit2-glib version=0.28.0.1 -revision=2 +revision=3 build_style=meson build_helper="gir" configure_args="-Dintrospection=$(vopt_if gir true false)