commit: 410e52c04e41e112890649f995e3cde7ae149931 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Thu Nov 28 22:49:05 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Nov 28 22:49:05 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=410e52c0
dev-libs/libgit2-glib: fix compat w/ >=libgit2-1.8.0 I was really hoping for some upstream activity but it hasn't happened, so take the upstream MR but modify it to not unnecssarily require newer libgit2. Closes: https://bugs.gentoo.org/927383 Signed-off-by: Sam James <sam <AT> gentoo.org> .../files/libgit2-glib-1.2.0-libgit2-1.8.0.patch | 54 ++++++++++++++++++ dev-libs/libgit2-glib/libgit2-glib-1.2.0-r1.ebuild | 66 ++++++++++++++++++++++ 2 files changed, 120 insertions(+) diff --git a/dev-libs/libgit2-glib/files/libgit2-glib-1.2.0-libgit2-1.8.0.patch b/dev-libs/libgit2-glib/files/libgit2-glib-1.2.0-libgit2-1.8.0.patch new file mode 100644 index 000000000000..2c61e32fec8b --- /dev/null +++ b/dev-libs/libgit2-glib/files/libgit2-glib-1.2.0-libgit2-1.8.0.patch @@ -0,0 +1,54 @@ +https://gitlab.gnome.org/GNOME/libgit2-glib/-/merge_requests/40 (modified to drop const changes, dep increase) + +From a76fdf96c3af9ce9d21a3985c4be8a1aa6eea661 Mon Sep 17 00:00:00 2001 +From: Dominique Leuenberger <[email protected]> +Date: Fri, 5 Apr 2024 10:28:16 +0200 +Subject: [PATCH] build: Fix build against, and require, libgit2 1.8.0 + +--- + libgit2-glib/ggit-clone-options.c | 1 + + libgit2-glib/ggit-cred-ssh-interactive.c | 2 +- + libgit2-glib/ggit-remote-callbacks.h | 1 + + libgit2-glib/ggit-repository.c | 4 ++-- + libgit2-glib/ggit-types.h | 3 ++- + meson.build | 2 +- + 6 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/libgit2-glib/ggit-clone-options.c b/libgit2-glib/ggit-clone-options.c +index b47fdb1..30c7d86 100644 +--- a/libgit2-glib/ggit-clone-options.c ++++ b/libgit2-glib/ggit-clone-options.c +@@ -19,6 +19,7 @@ + */ + + #include <git2.h> ++#include <git2/sys/errors.h> + #include <gio/gio.h> + + #include "ggit-clone-options.h" +diff --git a/libgit2-glib/ggit-remote-callbacks.h b/libgit2-glib/ggit-remote-callbacks.h +index 3005ff4..2340712 100644 +--- a/libgit2-glib/ggit-remote-callbacks.h ++++ b/libgit2-glib/ggit-remote-callbacks.h +@@ -24,6 +24,7 @@ + + #include <glib-object.h> + #include <git2.h> ++#include <git2/sys/errors.h> + #include <libgit2-glib/ggit-cred.h> + + G_BEGIN_DECLS +diff --git a/libgit2-glib/ggit-types.h b/libgit2-glib/ggit-types.h +index 7e28975..2a2ed99 100644 +--- a/libgit2-glib/ggit-types.h ++++ b/libgit2-glib/ggit-types.h +@@ -355,7 +355,8 @@ typedef enum + GGIT_CONFIG_LEVEL_XDG = 3, + GGIT_CONFIG_LEVEL_GLOBAL = 4, + GGIT_CONFIG_LEVEL_LOCAL = 5, +- GGIT_CONFIG_LEVEL_APP = 6, ++ GGIT_CONFIG_LEVEL_WORKTREE = 6, ++ GGIT_CONFIG_LEVEL_APP = 7, + GGIT_CONFIG_LEVEL_HIGHEST = -1 + } GgitConfigLevel; + diff --git a/dev-libs/libgit2-glib/libgit2-glib-1.2.0-r1.ebuild b/dev-libs/libgit2-glib/libgit2-glib-1.2.0-r1.ebuild new file mode 100644 index 000000000000..590714adcf8c --- /dev/null +++ b/dev-libs/libgit2-glib/libgit2-glib-1.2.0-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit gnome.org meson python-r1 vala xdg + +DESCRIPTION="Git library for GLib" +HOMEPAGE="https://wiki.gnome.org/Projects/Libgit2-glib" + +LICENSE="LGPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" +IUSE="gtk-doc python +ssh +vala" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + >=dev-libs/gobject-introspection-1.54:= + >=dev-libs/glib-2.44.0:2 + >=dev-libs/libgit2-0.26.0:0=[ssh?] + python? ( + ${PYTHON_DEPS} + dev-python/pygobject:3[${PYTHON_USEDEP}] + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-util/glib-utils + virtual/pkgconfig + gtk-doc? ( dev-util/gi-docgen ) + vala? ( $(vala_depend) ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.0-libgit2-1.8.0.patch +) + +src_prepare() { + default + + sed -i -e '/meson_python_compile.py/d' meson.build || die +} + +src_configure() { + local emesonargs=( + $(meson_use gtk-doc gtk_doc) + -Dintrospection=true + -Dpython=false # we install python scripts manually + $(meson_use ssh) + $(meson_use vala vapi) + ) + + use vala && vala_setup + meson_src_configure +} + +src_install() { + meson_src_install + + if use python ; then + python_moduleinto gi.overrides + python_foreach_impl python_domodule libgit2-glib/Ggit.py + fi +}
