summaryrefslogtreecommitdiffstats
path: root/libraries/libgit2-glib
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libgit2-glib')
-rw-r--r--libraries/libgit2-glib/README3
-rw-r--r--libraries/libgit2-glib/detect-libgit2-version.patch141
-rw-r--r--libraries/libgit2-glib/libgit2-glib.SlackBuild22
-rw-r--r--libraries/libgit2-glib/libgit2-glib.info2
4 files changed, 161 insertions, 7 deletions
diff --git a/libraries/libgit2-glib/README b/libraries/libgit2-glib/README
index 8cdaf65bea..9c41279a6b 100644
--- a/libraries/libgit2-glib/README
+++ b/libraries/libgit2-glib/README
@@ -1 +1,2 @@
-libgit2-glib is a glib wrapper library around the libgit2 git access library
+libgit2-glib is a glib wrapper library around the libgit2 git access
+library
diff --git a/libraries/libgit2-glib/detect-libgit2-version.patch b/libraries/libgit2-glib/detect-libgit2-version.patch
new file mode 100644
index 0000000000..5e285c9cff
--- /dev/null
+++ b/libraries/libgit2-glib/detect-libgit2-version.patch
@@ -0,0 +1,141 @@
+diff -Naur libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-clone-options.c libgit2-glib-0.28.0.1/libgit2-glib/ggit-clone-options.c
+--- libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-clone-options.c 2019-04-24 04:18:53.000000000 +0000
++++ libgit2-glib-0.28.0.1/libgit2-glib/ggit-clone-options.c 2020-05-02 03:01:42.273450898 +0000
+@@ -149,7 +149,7 @@
+
+ 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 @@
+
+ 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 -Naur libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-config.c libgit2-glib-0.28.0.1/libgit2-glib/ggit-config.c
+--- libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-config.c 2019-04-24 04:18:53.000000000 +0000
++++ libgit2-glib-0.28.0.1/libgit2-glib/ggit-config.c 2020-05-02 03:10:08.034437972 +0000
+@@ -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 > 0 || (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 > 0 || (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 > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 27)
+ NULL,
+ #endif
+ force);
+diff -Naur libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-diff.c libgit2-glib-0.28.0.1/libgit2-glib/ggit-diff.c
+--- libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-diff.c 2019-04-24 04:18:53.000000000 +0000
++++ libgit2-glib-0.28.0.1/libgit2-glib/ggit-diff.c 2020-05-02 03:04:17.745446924 +0000
+@@ -786,7 +786,7 @@
+
+ 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 @@
+ }
+
+ 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 -Naur libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-error.c libgit2-glib-0.28.0.1/libgit2-glib/ggit-error.c
+--- libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-error.c 2019-04-24 04:18:53.000000000 +0000
++++ libgit2-glib-0.28.0.1/libgit2-glib/ggit-error.c 2020-05-02 03:05:09.952445590 +0000
+@@ -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 > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28)
+ git2_err = git_error_last ();
+ #else
+ git2_err = giterr_last ();
+diff -Naur libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-message.c libgit2-glib-0.28.0.1/libgit2-glib/ggit-message.c
+--- libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-message.c 2019-04-24 04:18:53.000000000 +0000
++++ libgit2-glib-0.28.0.1/libgit2-glib/ggit-message.c 2020-05-02 03:05:44.877444697 +0000
+@@ -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 > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28)
+ git_buf_dispose (&buf);
+ #else
+ git_buf_free (&buf);
+diff -Naur libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-patch.c libgit2-glib-0.28.0.1/libgit2-glib/ggit-patch.c
+--- libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-patch.c 2019-04-24 04:18:53.000000000 +0000
++++ libgit2-glib-0.28.0.1/libgit2-glib/ggit-patch.c 2020-05-02 03:06:32.489443481 +0000
+@@ -194,7 +194,7 @@
+ 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 -Naur libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-remote-callbacks.c libgit2-glib-0.28.0.1/libgit2-glib/ggit-remote-callbacks.c
+--- libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-remote-callbacks.c 2019-04-24 04:18:53.000000000 +0000
++++ libgit2-glib-0.28.0.1/libgit2-glib/ggit-remote-callbacks.c 2020-05-02 03:07:14.164442416 +0000
+@@ -160,7 +160,7 @@
+ {
+ 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 -Naur libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-repository.c libgit2-glib-0.28.0.1/libgit2-glib/ggit-repository.c
+--- libgit2-glib-0.28.0.1.orig/libgit2-glib/ggit-repository.c 2019-04-24 04:18:53.000000000 +0000
++++ libgit2-glib-0.28.0.1/libgit2-glib/ggit-repository.c 2020-05-02 03:08:08.018441039 +0000
+@@ -1013,7 +1013,7 @@
+ 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 @@
+ }
+
+ 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/libraries/libgit2-glib/libgit2-glib.SlackBuild b/libraries/libgit2-glib/libgit2-glib.SlackBuild
index 6c30ce25b8..0ddbedf416 100644
--- a/libraries/libgit2-glib/libgit2-glib.SlackBuild
+++ b/libraries/libgit2-glib/libgit2-glib.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for libgit2-glib
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=libgit2-glib
VERSION=${VERSION:-0.28.0.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,6 +79,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Build against libgit2 version >= 1.0
+patch -p1 < $CWD/detect-libgit2-version.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
meson build \
@@ -80,8 +93,7 @@ meson build \
--buildtype=release \
-Dgtk_doc=true
-ninja -C build
-DESTDIR=$PKG ninja -C build install
+DESTDIR=$PKG "${NINJA:=ninja}" -C build install
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -94,4 +106,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/libraries/libgit2-glib/libgit2-glib.info b/libraries/libgit2-glib/libgit2-glib.info
index 4e8e02bab0..1f17833f44 100644
--- a/libraries/libgit2-glib/libgit2-glib.info
+++ b/libraries/libgit2-glib/libgit2-glib.info
@@ -5,6 +5,6 @@ DOWNLOAD="https://ftp.gnome.org/pub/GNOME/sources/libgit2-glib/0.28/libgit2-glib
MD5SUM="04c4cf24291c16406bddb5760449ab52"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="libgit2 vala meson"
+REQUIRES="libgit2"
MAINTAINER="Willy Sudiarto Raharjo"
EMAIL="willysr@slackbuilds.org"