From e9438f14fb88e419bb69bed4c63a2be63213a827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 15 May 2024 16:21:16 +0200 Subject: [PATCH] Fix building with glib2-doc 2.80.1 Resolves: RHEL-45188 --- libmodulemd.spec | 8 ++- ...ib-documentation-path-to-GLib-2.80.1.patch | 64 +++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.80.1.patch diff --git a/libmodulemd.spec b/libmodulemd.spec index e52dfee..fc71cce 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -24,7 +24,7 @@ Name: %{upstream_name}%{?v2_suffix} Version: 2.15.0 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Module metadata manipulation library # COPYING: MIT @@ -40,6 +40,9 @@ Source2: gpgkey-E3F42FCE156830A80358E6E94FD1AEC3365AF7BF.gpg # Fix building with glib2-doc 2.79.0, in upstream after 2.15.0 Patch0: modulemd-2.15.0-build-Move-computing-gtk-doc-module-paths-to-the-che.patch Patch1: modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.79.0.patch +# Fix building with glib2-doc 2.80.1, in upstream after 2.15.0, +# . +Patch2: modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.80.1.patch BuildRequires: gnupg2 BuildRequires: meson >= 0.47 @@ -184,6 +187,9 @@ mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %changelog +* Wed Jun 26 2024 Petr Pisar - 2.15.0-10 +- Fix building with glib2-doc 2.80.1 (RHEL-45188) + * Mon Jun 24 2024 Troy Dawson - 2.15.0-9 - Bump release for June 2024 mass rebuild diff --git a/modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.80.1.patch b/modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.80.1.patch new file mode 100644 index 0000000..70a6786 --- /dev/null +++ b/modulemd-2.15.0-doc-Adapt-GLib-documentation-path-to-GLib-2.80.1.patch @@ -0,0 +1,64 @@ +From f3336199b4e69af3305f156abc7533bed9e9a762 Mon Sep 17 00:00:00 2001 +From: Dominique Leuenberger +Date: Wed, 15 May 2024 08:35:00 +0200 +Subject: [PATCH] doc: Adapt GLib documentation path to GLib 2.80.1 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +With GLib 2.80.1 (commit 548ec9f1), the installation paths for the documentation +have changed once again: + + The `gi-docgen` tool is not designed to be used like that. In + particular, when nesting documentation directories, the generated + `*.devhelp2` files (needed by Devhelp to show the documentation) are + nested one directory level too deep for Devhelp to find them, and hence + are useless, and the documentation doesn’t show up in this common + documentation viewer. + + So, change the installed documentation directory hierarchy: + * `${PREFIX}/share/doc/glib-2.0/gio` → `${PREFIX}/share/doc/gio-2.0` + * `${PREFIX}/share/doc/glib-2.0/glib-unix` → + `${PREFIX}/share/doc/glib-unix-2.0` + * `${PREFIX}/share/doc/glib-2.0/gobject` → + `${PREFIX}/share/doc/gobject-2.0` + * etc. + * `${PREFIX}/share/doc/glib-2.0/glib` → `${PREFIX}/share/doc/glib-2.0` + +https://gitlab.gnome.org/GNOME/glib/-/issues/3287 +Reimplements #618 + +Signed-off-by: Petr Písař +--- + meson.build | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 6108649..fab704f 100644 +--- a/meson.build ++++ b/meson.build +@@ -73,12 +73,19 @@ if with_docs + + if glib.version().version_compare('<2.79.0') + glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') ++ glib_modules = ['glib', 'gobject' ] + else +- glib_docpath = join_paths(glib_prefix, 'share', 'doc', 'glib-2.0') + warning('glib >= 2.79.0 documention might not be properly referred from libmodulemd documentation.') ++ if glib.version().version_compare('<2.80.1') ++ glib_docpath = join_paths(glib_prefix, 'share', 'doc', 'glib-2.0') ++ glib_modules = ['glib', 'gobject' ] ++ else ++ glib_docpath = join_paths(glib_prefix, 'share', 'doc') ++ glib_modules = ['glib-2.0', 'gobject-2.0' ] ++ endif + endif + +- foreach referred_module : [ 'glib', 'gobject' ] ++ foreach referred_module : glib_modules + doc_module_path = join_paths(glib_docpath, referred_module) + doc_index_file = join_paths(doc_module_path, 'index.html') + ret = run_command ([test, '-e', doc_index_file], +-- +2.45.0 +