Skip to content

Commit

Permalink
libgit2-glib: patch to build with libgit2 0.27, rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
dbevans committed Jul 17, 2018
1 parent 9fe0b8f commit 4156f23
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gnome/libgit2-glib/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PortGroup compiler_blacklist_versions 1.0

name libgit2-glib
version 0.26.2
revision 2
revision 3
license LGPL-2.1
set branch [join [lrange [split ${version} .] 0 1] .]
description Glib wrapper library around the libgit2 git access library.
Expand All @@ -31,7 +31,8 @@ depends_lib path:lib/pkgconfig/glib-2.0.pc:glib2 \
port:libssh2 \
port:vala

patchfiles patch-configure.ac.diff
patchfiles patch-configure.ac.diff \
patch-libgit2-0.27.diff

gobject_introspection yes

Expand Down
34 changes: 34 additions & 0 deletions gnome/libgit2-glib/files/patch-libgit2-0.27.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From f6d7a149b40a7b131852f4daf8b428bbc993b12e Mon Sep 17 00:00:00 2001
From: Steve Langasek <steve.langasek@ubuntu.com>
Date: Sun, 8 Jul 2018 12:51:22 +0100
Subject: [PATCH] Compatibility with libgit2 0.27

git_config_add_file_ondisk() now takes an additional (optional) 'repo'
argument. Fix the build failure.

[smcv: Make the API change conditional on LIBGIT2_SOVERSION so we can
build against either version]

Fixes: #1
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903146
Signed-off-by: Simon McVittie <smcv@debian.org>
---
libgit2-glib/ggit-config.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/libgit2-glib/ggit-config.c b/libgit2-glib/ggit-config.c
index b6536ce..acdad95 100644
--- libgit2-glib/ggit-config.c
+++ libgit2-glib/ggit-config.c
@@ -295,6 +295,9 @@ 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);

--
2.17.1

0 comments on commit 4156f23

Please sign in to comment.