diff options
author | Matt Turner <mattst88@gentoo.org> | 2023-04-13 17:42:46 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2023-04-13 17:45:45 -0400 |
commit | 6e869269d7ecbe671bb98b9242f7b6c7195b01e1 (patch) | |
tree | c2e4979a46dd1abca370355cfe1392f87c866a79 /dev-libs/libgit2-glib | |
parent | dev-qt/qtwebengine: 5.15.9_p20230404 version bump (diff) | |
download | gentoo-6e869269d7ecbe671bb98b9242f7b6c7195b01e1.tar.gz gentoo-6e869269d7ecbe671bb98b9242f7b6c7195b01e1.tar.bz2 gentoo-6e869269d7ecbe671bb98b9242f7b6c7195b01e1.zip |
dev-libs/libgit2-glib: Fix build without Python native-symlinks
Closes: https://bugs.gentoo.org/829888
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'dev-libs/libgit2-glib')
-rw-r--r-- | dev-libs/libgit2-glib/files/1.1.0-meson-Use-install_symlink.patch | 80 | ||||
-rw-r--r-- | dev-libs/libgit2-glib/libgit2-glib-1.1.0.ebuild | 10 |
2 files changed, 90 insertions, 0 deletions
diff --git a/dev-libs/libgit2-glib/files/1.1.0-meson-Use-install_symlink.patch b/dev-libs/libgit2-glib/files/1.1.0-meson-Use-install_symlink.patch new file mode 100644 index 000000000000..d5ca886685ec --- /dev/null +++ b/dev-libs/libgit2-glib/files/1.1.0-meson-Use-install_symlink.patch @@ -0,0 +1,80 @@ +https://gitlab.gnome.org/GNOME/libgit2-glib/-/merge_requests/37 + +From 1659bb3a124c935848203828304c9efe943258db Mon Sep 17 00:00:00 2001 +From: Matt Turner <mattst88@gmail.com> +Date: Thu, 13 Apr 2023 17:36:52 -0400 +Subject: [PATCH] meson: Use install_symlink + +New in v0.61.0, the install_symlink function lets us install symlinks +directly from Meson, allowing us to remove the meson_vapi_link.py +script. +--- + meson.build | 10 ++++++++-- + meson_vapi_link.py | 27 --------------------------- + 2 files changed, 8 insertions(+), 29 deletions(-) + delete mode 100755 meson_vapi_link.py + +diff --git a/meson.build b/meson.build +index 8f30cda..5598e19 100644 +--- a/meson.build ++++ b/meson.build +@@ -3,7 +3,7 @@ project( + version: '1.1.0', + default_options: 'buildtype=debugoptimized', + license: 'LGPL2+', +- meson_version: '>= 0.50.0', ++ meson_version: '>= 0.61.0', + ) + + libgit2_glib_version = meson.project_version() +@@ -136,7 +136,13 @@ if enable_vapi + assert(enable_gir, 'vapi support was requested, but introspection support is mandatory.') + assert(add_languages('vala', required: false), 'vapi support was requested, but vala not found.') + +- meson.add_install_script('meson_vapi_link.py', libgit2_glib_datadir) ++ foreach ext : ['vapi', 'deps'] ++ install_symlink( ++ 'ggit-1.0.' + ext, ++ install_dir: libgit2_glib_prefix / libgit2_glib_datadir / 'vala' / 'vapi', ++ pointing_to: 'libgit2-glib-1.0.' + ext, ++ ) ++ endforeach + endif + + # Check for libgit2 ssh support +diff --git a/meson_vapi_link.py b/meson_vapi_link.py +deleted file mode 100755 +index 20afe0c..0000000 +--- a/meson_vapi_link.py ++++ /dev/null +@@ -1,27 +0,0 @@ +-#!/usr/bin/env python3 +- +-import os +-import shutil +-import sys +- +-prefix = os.environ['MESON_INSTALL_DESTDIR_PREFIX'] if os.environ.get('DESTDIR') else os.environ['MESON_INSTALL_PREFIX'] +- +-datadir = os.path.join(prefix, sys.argv[1]) +- +-vapidir = os.path.join(datadir, 'vala', 'vapi') +-os.chdir(vapidir) +- +-# FIXME: meson will not track the creation of these files +-# https://github.com/mesonbuild/meson/blob/master/mesonbuild/scripts/uninstall.py#L39 +-old = 'ggit-1.0' +-new = 'libgit2-glib-1.0' +- +-for ext in ['vapi', 'deps']: +- src = '{}.{}'.format(new, ext) +- dest = '{}.{}'.format(old, ext) +- try: +- os.symlink(src, dest) +- except FileExistsError: +- pass +- except OSError: +- shutil.copy(src, dest) +-- +2.39.2 + diff --git a/dev-libs/libgit2-glib/libgit2-glib-1.1.0.ebuild b/dev-libs/libgit2-glib/libgit2-glib-1.1.0.ebuild index 74abcf2694d0..121c3a8099ea 100644 --- a/dev-libs/libgit2-glib/libgit2-glib-1.1.0.ebuild +++ b/dev-libs/libgit2-glib/libgit2-glib-1.1.0.ebuild @@ -33,6 +33,16 @@ BDEPEND=" vala? ( $(vala_depend) ) " +PATCHES=( + "${FILESDIR}/${PV}-meson-Use-install_symlink.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) |