libmodulemd: Adapt to GLib 2.79 documentation

GLib 2.79.0 switched from gtk-doc to gi-docgen.
This commit is contained in:
Bobby Rong 2024-03-07 23:01:45 +08:00 committed by Maxine Aubrey
parent 8d57ba244c
commit a92079b670
No known key found for this signature in database
GPG Key ID: F6FE033DFCB899F7
2 changed files with 19 additions and 20 deletions

View File

@ -1,6 +1,7 @@
{ lib, stdenv
, substituteAll
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch2
, pkg-config
, meson
, ninja
@ -29,10 +30,15 @@ stdenv.mkDerivation rec {
};
patches = [
# Use proper glib devdoc path.
(substituteAll {
src = ./glib-devdoc.patch;
glib_devdoc = glib.devdoc;
# Adapt to GLib 2.79 documentation
# https://github.com/fedora-modularity/libmodulemd/pull/612
(fetchpatch2 {
url = "https://github.com/fedora-modularity/libmodulemd/commit/9d2809090cc0cccd7bab67453dc00cf43a289082.patch";
hash = "sha256-dMtc6GN6lIDjUReFUhEFJ/8wosASo3tLu4ve72BCXQ8=";
})
(fetchpatch2 {
url = "https://github.com/fedora-modularity/libmodulemd/commit/29c339a31b1c753dcdef041e5c2e0e600e48b59d.patch";
hash = "sha256-uniHrQdbcXlJk2hq106SgV/E330LfxDc07E4FbOMLr0=";
})
];
@ -57,6 +63,12 @@ stdenv.mkDerivation rec {
"-Dgobject_overrides_dir_py3=${placeholder "py"}/${python3.sitePackages}/gi/overrides"
];
postPatch = ''
# Use proper glib devdoc path
substituteInPlace meson.build --replace-fail \
"glib_docpath = join_paths(glib_prefix," "glib_docpath = join_paths('${lib.getOutput "devdoc" glib}',"
'';
postFixup = ''
# Python overrides depend our own typelibs and other packages
mkdir -p "$py/nix-support"
@ -69,6 +81,6 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/fedora-modularity/libmodulemd";
license = licenses.mit;
maintainers = with maintainers; [ ];
platforms = platforms.linux ++ platforms.darwin ;
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@ -1,13 +0,0 @@
diff --git a/meson.build b/meson.build
index a8b02b4..dd31a76 100644
--- a/meson.build
+++ b/meson.build
@@ -67,7 +67,7 @@ test = find_program('test')
with_docs = get_option('with_docs')
if with_docs
gtkdoc = dependency('gtk-doc')
- glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
+ glib_docpath = join_paths('@glib_devdoc@', 'share', 'gtk-doc', 'html')
ret = run_command ([test, '-e', join_paths(glib_docpath, 'glib/index.html')])
if ret.returncode() != 0