Sync from SUSE:SLFO:Main libmodulemd revision 5155cb28f3fb1c11f8e8eac45136088a

This commit is contained in:
Adrian Schröter 2024-11-12 12:15:20 +01:00
parent c264bd442e
commit 614adb2c16
7 changed files with 197 additions and 7 deletions

46
29c339a3.patch Normal file
View File

@ -0,0 +1,46 @@
From 29c339a31b1c753dcdef041e5c2e0e600e48b59d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Fri, 26 Jan 2024 17:09:11 +0100
Subject: [PATCH] doc: Adapt GLib documentation path to GLib 2.79.0
GLib 2.79.0 switched from gtk-doc to gi-docgen, whose format and
installation location are both not compatible. The libmodulemd build
script reported an error because of the new location.
This patch fixes the build failure by using the new location if GLib
is 2.79.0 or greater.
Although the libmodulemd documentation references to GLib remain
unresolved now (i.e. names of the functions and the types are not
hyperlinks), we keep using the new location because the new GLib
*.devhelp2 indices remain there and they can only improve over the
time.
If this expection does not fulfill, libmodulemd will either migrate to
gi-docgen, or drop the hard build-time dependency on GLib
documentation.
Reimplements: #611
---
meson.build | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 0b32f4d0..61086491 100644
--- a/meson.build
+++ b/meson.build
@@ -70,7 +70,13 @@ with_docs = get_option('with_docs')
gtk_doc_referred_paths = []
if with_docs
gtkdoc = dependency('gtk-doc')
- glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
+
+ if glib.version().version_compare('<2.79.0')
+ glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
+ 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.')
+ endif
foreach referred_module : [ 'glib', 'gobject' ]
doc_module_path = join_paths(glib_docpath, referred_module)

87
9d280909.patch Normal file
View File

@ -0,0 +1,87 @@
From 9d2809090cc0cccd7bab67453dc00cf43a289082 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Fri, 26 Jan 2024 15:44:39 +0100
Subject: [PATCH] build: Move computing gtk-doc module paths to the check place
A checks and an application of extra directories for gtkdoc-fixxref
were computed independetly. This patch removes the code duplication.
It also adds the discovered path to a "meson setup" summary output.
---
meson.build | 25 ++++++++++++-------------
modulemd/meson.build | 9 +++++----
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/meson.build b/meson.build
index a5d13300..0b32f4d0 100644
--- a/meson.build
+++ b/meson.build
@@ -67,23 +67,21 @@ sed = find_program('sed')
test = find_program('test')
with_docs = get_option('with_docs')
+gtk_doc_referred_paths = []
if with_docs
gtkdoc = dependency('gtk-doc')
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
- glib_index_path = join_paths(glib_docpath, 'glib/index.html')
- ret = run_command ([test, '-e', glib_index_path],
- check: false)
- if ret.returncode() != 0
- error('Missing documentation for GLib: @0@'.format(glib_index_path))
- endif
-
- gobject_index_path = join_paths(glib_docpath, 'gobject/index.html')
- ret = run_command ([test, '-e', gobject_index_path],
- check: false)
- if ret.returncode() != 0
- error('Missing documentation for GObject: @0@'.format(gobject_index_path))
- endif
+ foreach referred_module : [ 'glib', 'gobject' ]
+ 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],
+ check: false)
+ if ret.returncode() != 0
+ error('Missing GTK documentation for @0@: @1@'.format(referred_module, doc_index_file))
+ endif
+ gtk_doc_referred_paths += [ doc_module_path ]
+ endforeach
endif
# Keep with_manpages option a tristate feature for backward compatibility.
@@ -198,6 +196,7 @@ summary({'prefix': get_option('prefix'),
'datadir': get_option('datadir'),
'Python 2 GObject Overrides': gobject_overrides_dir_py2,
'Python 3 GObject Overrides': gobject_overrides_dir_py3,
+ 'GTK-Doc Referred Paths': gtk_doc_referred_paths,
}, section: 'Directories')
summary({'Custom Python': get_option('python_name'),
diff --git a/modulemd/meson.build b/modulemd/meson.build
index a816e13c..844f1357 100644
--- a/modulemd/meson.build
+++ b/modulemd/meson.build
@@ -256,6 +256,10 @@ configure_file(
# --- Documenatation --- #
if with_docs
+ fixxref_args = []
+ foreach path : gtk_doc_referred_paths
+ fixxref_args += [ '--extra-dir=@0@'.format(path) ]
+ endforeach
gnome.gtkdoc(
'modulemd-2.0',
install_dir: 'modulemd-2.0',
@@ -265,10 +269,7 @@ if with_docs
dependencies : [
modulemd_dep,
],
- fixxref_args: [
- '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
- '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
- ],
+ fixxref_args: [ fixxref_args ],
install : true,
)
endif

View File

@ -0,0 +1,25 @@
diff --git a/meson.build b/meson.build
index 6108649..c6d432f 100644
--- a/meson.build
+++ b/meson.build
@@ -73,12 +73,18 @@ if with_docs
if glib.version().version_compare('<2.79.0')
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
- else
+ modules = ['glib', 'gobject' ]
+ elif glib.version().version_compare('<2.80.2')
glib_docpath = join_paths(glib_prefix, 'share', 'doc', 'glib-2.0')
+ modules = ['glib', 'gobject' ]
+ warning('glib >= 2.79.0 documention might not be properly referred from libmodulemd documentation.')
+ else
+ glib_docpath = join_paths(glib_prefix, 'share', 'doc')
+ modules = ['glib-2.0', 'gobject-2.0' ]
warning('glib >= 2.79.0 documention might not be properly referred from libmodulemd documentation.')
endif
- foreach referred_module : [ 'glib', 'gobject' ]
+ foreach referred_module : 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],

View File

@ -1,3 +1,33 @@
-------------------------------------------------------------------
Wed May 15 06:27:51 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Add glib-2.80.2-glibdoc-path.patch: Fix GLib documentation path
for GLib 2.80.2
(https://github.com/fedora-modularity/libmodulemd/pull/618).
-------------------------------------------------------------------
Tue Mar 19 14:56:47 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Add 9d280909.patch and 29c339a3.patch: Adapt GLib documentation
path to GLib 2.79.0.
-------------------------------------------------------------------
Sat Nov 4 18:23:32 UTC 2023 - Neal Gompa <ngompa@opensuse.org>
- Update to 2.15.0
+ Add support for decompressing Zstandard-compressed YAML files
+ Remove a dependency on "file" library (libmagic)
+ Add a XML specification for in-YUM-repository metadata
+ Deprecate intents in modulemd-defaults specification
+ Fix a crash when converting a modulemd-packager object with a default
profile and without a module name or stream to a module index
+ Fix parsing empty profiles
+ A specification for modulemd-v2 format was corrected to require a "content"
license subtree only if the module build contains artifacts.
+ Double-quote strings in scalar YAML values when they look like a number
+ Warnings from g_str_equal() macro of glib2 about passing an unsigned
char * to strcmp() were fixed
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Oct 15 19:41:24 UTC 2022 - Andreas Stieger <andreas.stieger@gmx.de> Sat Oct 15 19:41:24 UTC 2022 - Andreas Stieger <andreas.stieger@gmx.de>

View File

@ -1,8 +1,8 @@
# #
# spec file for package libmodulemd # spec file for package libmodulemd
# #
# Copyright (c) 2022 SUSE LLC # Copyright (c) 2024 SUSE LLC
# Copyright (c) 2020-2021 Neal Gompa <ngompa13@gmail.com>. # Copyright (c) 2020-2023 Neal Gompa <ngompa13@gmail.com>.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -18,7 +18,7 @@
%global majorversion 2 %global majorversion 2
%global minorversion 14 %global minorversion 15
%global patchversion 0 %global patchversion 0
%global majorminorversion %{majorversion}.%{minorversion} %global majorminorversion %{majorversion}.%{minorversion}
%global nsversion %{majorversion}.0 %global nsversion %{majorversion}.0
@ -37,8 +37,10 @@ License: MIT
Group: System/Packages Group: System/Packages
URL: https://github.com/fedora-modularity/libmodulemd URL: https://github.com/fedora-modularity/libmodulemd
Source0: %{url}/releases/download/%{libmodulemd_version}/modulemd-%{libmodulemd_version}.tar.xz Source0: %{url}/releases/download/%{libmodulemd_version}/modulemd-%{libmodulemd_version}.tar.xz
Patch0: https://github.com/fedora-modularity/libmodulemd/commit/9d280909.patch
Patch1: https://github.com/fedora-modularity/libmodulemd/commit/29c339a3.patch
Patch2: glib-2.80.2-glibdoc-path.patch
BuildRequires: file-devel
BuildRequires: gcc BuildRequires: gcc
BuildRequires: glib2-doc BuildRequires: glib2-doc
BuildRequires: help2man BuildRequires: help2man

BIN
modulemd-2.14.0.tar.xz (Stored with Git LFS)

Binary file not shown.

BIN
modulemd-2.15.0.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.