summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/subsurface/libgit2-0.23.x.patch37
-rw-r--r--misc/subsurface/subsurface.SlackBuild4
2 files changed, 40 insertions, 1 deletions
diff --git a/misc/subsurface/libgit2-0.23.x.patch b/misc/subsurface/libgit2-0.23.x.patch
new file mode 100644
index 0000000000..2765cfc861
--- /dev/null
+++ b/misc/subsurface/libgit2-0.23.x.patch
@@ -0,0 +1,37 @@
+From 95664af53bc6faf352cf5b193fe9dfd42fa25e60 Mon Sep 17 00:00:00 2001
+From: Dirk Hohndel <dirk@hohndel.org>
+Date: Thu, 28 May 2015 09:13:51 -0700
+Subject: [PATCH] Add libgit2 0.23 API
+
+Just as we would expect, the libgit2 developers of course once again broke
+their API. In order to compile against current master we need to remap
+those APIs once again.
+
+Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
+---
+ save-git.c | 9 +++++++++
+ 1 files changed, 9 insertions(+)
+
+diff --git a/save-git.c b/save-git.c
+index a7b5144..6461366 100644
+--- a/save-git.c
++++ b/save-git.c
+@@ -34,6 +34,15 @@
+ #else
+ #define git_treebuilder_write(id, repo, bld) git_treebuilder_write(id, bld)
+ #endif
++/*
++ * api break introduced in libgit2 master after 0.22 - let's guess this is the v0.23 API
++ */
++#if LIBGIT2_VER_MINOR >= 23
++ #define git_branch_create(out, repo, branch_name, target, force, signature, log_message) \
++ git_branch_create(out, repo, branch_name, target, force)
++ #define git_reference_set_target(out, ref, id, author, log_message) \
++ git_reference_set_target(out, ref, id, log_message)
++#endif
+
+ #define VA_BUF(b, fmt) do { va_list args; va_start(args, fmt); put_vformat(b, fmt, args); va_end(args); } while (0)
+
+--
+1.9.1
+
diff --git a/misc/subsurface/subsurface.SlackBuild b/misc/subsurface/subsurface.SlackBuild
index 20bc7977d6..d3c07d9312 100644
--- a/misc/subsurface/subsurface.SlackBuild
+++ b/misc/subsurface/subsurface.SlackBuild
@@ -25,7 +25,7 @@
PRGNAM=subsurface
SRCNAM=Subsurface
VERSION=${VERSION:-4.4.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -74,6 +74,8 @@ find -L . \
sed -i '/MANDIR =/s|=.*|= /usr/man/man1|' $PRGNAM-install.pri
# Build with Qt4.
patch -p1 < packaging/ubuntu/0001-Make-build-with-Qt4.patch
+# Build with newer libgit2.
+patch -Np1 < $CWD/libgit2-0.23.x.patch
qmake PREFX="/usr" QMAKE_CFLAGS+="$SLKCFLAGS" QMAKE_CXXFLAGS+="$SLKCFLAGS" \
V=1 -config release -o Makefile $PRGNAM.pro