libgit2-glib: update to 0.99.0.1.

This commit is contained in:
Đoàn Trần Công Danh 2020-08-22 18:11:02 +07:00
parent 2464e6e4a4
commit d8e3f880b8
3 changed files with 28 additions and 167 deletions

View File

@ -1,156 +0,0 @@
commit bcbd4b6c84779413162f1e7fdd2a4a5329fef04a
Author: q66 <daniel@octaforge.org>
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);

View File

@ -0,0 +1,11 @@
--- meson_vapi_link.py.orig 2020-08-22 14:36:38.509123984 +0700
+++ meson_vapi_link.py 2020-08-22 14:37:05.199021653 +0700
@@ -4,7 +4,7 @@
import subprocess
import sys
-vapidir = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], sys.argv[1], 'vala', 'vapi')
+vapidir = os.path.join(os.environ['DESTDIR'] + sys.argv[1], 'vala', 'vapi')
# FIXME: meson will not track the creation of these files
# https://github.com/mesonbuild/meson/blob/master/mesonbuild/scripts/uninstall.py#L39

View File

@ -1,22 +1,30 @@
# Template file for 'libgit2-glib'
pkgname=libgit2-glib
version=0.28.0.1
revision=3
version=0.99.0.1
revision=1
build_style=meson
build_helper="gir"
configure_args="-Dintrospection=$(vopt_if gir true false)
-Dvapi=$(vopt_if vala true false)"
hostmakedepends="pkg-config glib-devel $(vopt_if vala vala)"
-Dvapi=$(vopt_if gir true false)"
hostmakedepends="pkg-config glib-devel $(vopt_if gir vala)"
makedepends="libglib-devel libgit2-devel python-gobject-devel"
short_desc="Glib wrapper library around libgit2"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://github.com/GNOME/${pkgname}"
homepage="https://github.com/GNOME/libgit2-glib"
distfiles="${homepage}/archive/v${version}.tar.gz"
checksum=c9dd1333ae664f21cec05196cd052169fcd819d6ad8e40e3b9914ef240801408
checksum=22dccc7aa9ff6f29edf50352b17d58c3f9289ba1cfa7952f70d7feb48676f10c
build_options="gir vala"
build_options_default="gir vala"
build_options="gir"
build_options_default="gir"
CPPFLAGS="-UG_DISABLE_ASSERT"
post_patch() {
if [ "$XBPS_TARGET_LIBC" = musl ]; then
vsed -i "s,TEST.*encoding.*,/* & */," tests/repository.c
fi
}
libgit2-glib-devel_package() {
depends="${sourcepkg}>=${version}_${revision} libglib-devel libgit2-devel"
@ -25,11 +33,9 @@ libgit2-glib-devel_package() {
vmove "usr/lib/*.so"
vmove usr/include
vmove usr/lib/pkgconfig
if [ "$build_option_vala" ]; then
vmove usr/share/vala
fi
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0
vmove usr/share/vala
fi
}
}