diff options
Diffstat (limited to 'app-emulation/libvirt-glib')
7 files changed, 181 insertions, 55 deletions
diff --git a/app-emulation/libvirt-glib/Manifest b/app-emulation/libvirt-glib/Manifest index 01ec657f55d8..7d53986ff7c6 100644 --- a/app-emulation/libvirt-glib/Manifest +++ b/app-emulation/libvirt-glib/Manifest @@ -1,2 +1,2 @@ -DIST libvirt-glib-3.0.0.tar.gz 899180 BLAKE2B ef10b3d9bad48e49dd1898733aacb2f51f1826330eda9c63a7f8df5f11c96812f8cc7fe6a867961efa85a433f45c934d75cf605eb523ec723459da4646335b1a SHA512 b9e7d782c25b5c3a9b2829f1be8162352438ab3505510a1ca7dd64d741eaab158dc9206fdd4b0e3e27b0c049e4bcfc47db0c9a7fa1a84888864e23d3c35c079e DIST libvirt-glib-4.0.0.tar.xz 161836 BLAKE2B e196d1f02f6f202b1883500241bbfda963b34ee12bd945b3fa897f84f55a049f98e0429132ccfad7168e5ba2b41245e9e7e3817a7f057e0dc40b674ca6c9b661 SHA512 e1b99e80aa671fa5a4d7f7f7a4ea70ce7c5fdaf97574407f79aa11a75dd177e1e3f92027728a83ded62e305852bbda76eb90326aaa1f5f19b77272b008351810 +DIST libvirt-glib-5.0.0.tar.xz 169416 BLAKE2B e80ac0cd8d39432d554e566f4e1e045ada14e66917735c1c8a6306a65272216d095f21170e1b5294e09f41aaf2a3259ad395b134087a1bc13b176afd675dcc26 SHA512 bb09474c0d6d4bc00844e7a1ede882f0834d0810804b70b8f8607f2e764f72cc9da14883794e58dd53640433ffaecc13dd3c1c147b82e86fa2fdca6e5903933c diff --git a/app-emulation/libvirt-glib/files/libvirt-glib-4.0.0-Make-xmlError-structs-constant.patch b/app-emulation/libvirt-glib/files/libvirt-glib-4.0.0-Make-xmlError-structs-constant.patch new file mode 100644 index 000000000000..654436a65d99 --- /dev/null +++ b/app-emulation/libvirt-glib/files/libvirt-glib-4.0.0-Make-xmlError-structs-constant.patch @@ -0,0 +1,64 @@ +From 56acbe8a0765a02418f80fb3599b3cf7160ef446 Mon Sep 17 00:00:00 2001 +Message-ID: <56acbe8a0765a02418f80fb3599b3cf7160ef446.1701156704.git.mprivozn@redhat.com> +From: Michal Privoznik <mprivozn@redhat.com> +Date: Sat, 25 Nov 2023 07:13:33 +0100 +Subject: [glib PATCH 1/2] Make xmlError structs constant + +In libxml2 commits v2.12.0~14 and v2.12.0~77 the API changed so +that: + +1) xmlGetLastError() returns pointer to a constant xmlError + struct, and + +2) xmlSetStructuredErrorFunc() changed the signature of callback + (gvir_xml_structured_error_nop()), it too is passed pointer to + a constant xmlError struct. + +But of course, older libxml2 expects different callback +signature. Therefore, we need to typecast it anyway. + +Signed-off-by: Michal Privoznik <mprivozn@redhat.com> +--- + libvirt-gconfig/libvirt-gconfig-helpers.c | 2 +- + libvirt-gconfig/libvirt-gconfig-object.c | 5 +++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/libvirt-gconfig/libvirt-gconfig-helpers.c b/libvirt-gconfig/libvirt-gconfig-helpers.c +index e8f9664..37075e3 100644 +--- a/libvirt-gconfig/libvirt-gconfig-helpers.c ++++ b/libvirt-gconfig/libvirt-gconfig-helpers.c +@@ -41,7 +41,7 @@ static GError *gvir_config_error_new_literal(GQuark domain, + gint code, + const gchar *message) + { +- xmlErrorPtr xerr = xmlGetLastError(); ++ const xmlError *xerr = xmlGetLastError(); + + if (!xerr) + return NULL; +diff --git a/libvirt-gconfig/libvirt-gconfig-object.c b/libvirt-gconfig/libvirt-gconfig-object.c +index eb8763e..1fcc667 100644 +--- a/libvirt-gconfig/libvirt-gconfig-object.c ++++ b/libvirt-gconfig/libvirt-gconfig-object.c +@@ -59,7 +59,7 @@ static void gvir_xml_generic_error_nop(void *userData G_GNUC_UNUSED, + } + + static void gvir_xml_structured_error_nop(void *userData G_GNUC_UNUSED, +- xmlErrorPtr error G_GNUC_UNUSED) ++ const xmlError *error G_GNUC_UNUSED) + { + } + +@@ -197,7 +197,8 @@ void gvir_config_object_validate(GVirConfigObject *config, + priv = config->priv; + + xmlSetGenericErrorFunc(NULL, gvir_xml_generic_error_nop); +- xmlSetStructuredErrorFunc(NULL, gvir_xml_structured_error_nop); ++ /* Drop this typecast when >=libxml2-2.12.0 is required */ ++ xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc) gvir_xml_structured_error_nop); + + if (!priv->node) { + gvir_config_set_error_literal(err, +-- +2.41.0 + diff --git a/app-emulation/libvirt-glib/files/libvirt-glib-4.0.0-libvirt-gconfig-Add-more-libxml-includes.patch b/app-emulation/libvirt-glib/files/libvirt-glib-4.0.0-libvirt-gconfig-Add-more-libxml-includes.patch new file mode 100644 index 000000000000..7a13eb211e20 --- /dev/null +++ b/app-emulation/libvirt-glib/files/libvirt-glib-4.0.0-libvirt-gconfig-Add-more-libxml-includes.patch @@ -0,0 +1,50 @@ +From bcc82de1d74057f6d124c2eaff0ac97cbbf52657 Mon Sep 17 00:00:00 2001 +Message-ID: <bcc82de1d74057f6d124c2eaff0ac97cbbf52657.1701156704.git.mprivozn@redhat.com> +In-Reply-To: <56acbe8a0765a02418f80fb3599b3cf7160ef446.1701156704.git.mprivozn@redhat.com> +References: <56acbe8a0765a02418f80fb3599b3cf7160ef446.1701156704.git.mprivozn@redhat.com> +From: Michal Privoznik <mprivozn@redhat.com> +Date: Sat, 25 Nov 2023 07:15:46 +0100 +Subject: [glib PATCH 2/2] libvirt-gconfig: Add more libxml/ includes + +In its 2.12.0 release, libxml reworked their header files (some +might even call it cleaning up, I call it API incompatible +change) and now we don't get all declarations we need by just +including one file. Add missing includes. + +Resolves: https://gitlab.com/libvirt/libvirt-glib/-/issues/6 +Signed-off-by: Michal Privoznik <mprivozn@redhat.com> +--- + libvirt-gconfig/libvirt-gconfig-helpers.c | 1 + + libvirt-gconfig/libvirt-gconfig-object.c | 3 +++ + 2 files changed, 4 insertions(+) + +diff --git a/libvirt-gconfig/libvirt-gconfig-helpers.c b/libvirt-gconfig/libvirt-gconfig-helpers.c +index 37075e3..4dbb177 100644 +--- a/libvirt-gconfig/libvirt-gconfig-helpers.c ++++ b/libvirt-gconfig/libvirt-gconfig-helpers.c +@@ -25,6 +25,7 @@ + + #include <string.h> + ++#include <libxml/parser.h> + #include <libxml/xmlerror.h> + #include <glib/gi18n-lib.h> + +diff --git a/libvirt-gconfig/libvirt-gconfig-object.c b/libvirt-gconfig/libvirt-gconfig-object.c +index 1fcc667..4dd189d 100644 +--- a/libvirt-gconfig/libvirt-gconfig-object.c ++++ b/libvirt-gconfig/libvirt-gconfig-object.c +@@ -25,7 +25,10 @@ + + #include <string.h> + ++#include <libxml/tree.h> ++#include <libxml/entities.h> + #include <libxml/relaxng.h> ++ + #include <glib/gi18n-lib.h> + + #include "libvirt-gconfig/libvirt-gconfig.h" +-- +2.41.0 + diff --git a/app-emulation/libvirt-glib/libvirt-glib-3.0.0.ebuild b/app-emulation/libvirt-glib/libvirt-glib-3.0.0.ebuild deleted file mode 100644 index 4ac16f7d9556..000000000000 --- a/app-emulation/libvirt-glib/libvirt-glib-3.0.0.ebuild +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -GNOME2_LA_PUNT="yes" - -inherit gnome2 vala - -DESCRIPTION="GLib and GObject mappings for libvirt" -HOMEPAGE="http://libvirt.org/git/?p=libvirt-glib.git" -SRC_URI="ftp://libvirt.org/libvirt/glib/${P}.tar.gz" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="amd64 ~arm64 ~ppc64 x86" -IUSE="+introspection nls +vala" -REQUIRED_USE="vala? ( introspection )" - -RDEPEND=" - dev-libs/libxml2:2 - >=app-emulation/libvirt-1.2.6:= - >=dev-libs/glib-2.38.0:2 - introspection? ( >=dev-libs/gobject-introspection-1.36.0:= )" -DEPEND="${RDEPEND} - dev-util/glib-utils - dev-util/gtk-doc-am - >=dev-util/intltool-0.35.0 - virtual/pkgconfig - vala? ( $(vala_depend) )" - -src_prepare() { - gnome2_src_prepare - use vala && vala_src_prepare -} - -src_configure() { - gnome2_src_configure \ - --disable-test-coverage \ - --disable-static \ - $(use_enable introspection) \ - $(use_enable nls) \ - $(use_enable vala) -} diff --git a/app-emulation/libvirt-glib/libvirt-glib-4.0.0.ebuild b/app-emulation/libvirt-glib/libvirt-glib-4.0.0.ebuild index 825b6a5327a6..c1c823159096 100644 --- a/app-emulation/libvirt-glib/libvirt-glib-4.0.0.ebuild +++ b/app-emulation/libvirt-glib/libvirt-glib-4.0.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -10,7 +10,7 @@ HOMEPAGE="https://libvirt.org/ https://gitlab.com/libvirt/libvirt-glib/" SRC_URI="https://libvirt.org/sources/glib/${P}.tar.xz" LICENSE="LGPL-2.1+" SLOT="0" -KEYWORDS="amd64 ~arm64 ~ppc64 x86" +KEYWORDS="amd64 arm64 ppc64 x86" IUSE="gtk-doc +introspection test +vala" RESTRICT="!test? ( test )" REQUIRED_USE="vala? ( introspection )" @@ -25,13 +25,17 @@ DEPEND="${RDEPEND}" BDEPEND=" dev-util/glib-utils - >=dev-util/intltool-0.35.0 virtual/pkgconfig gtk-doc? ( dev-util/gtk-doc app-text/docbook-xml-dtd:4.3 ) vala? ( $(vala_depend) ) " +PATCHES=( + "${FILESDIR}"/${PN}-4.0.0-Make-xmlError-structs-constant.patch + "${FILESDIR}"/${PN}-4.0.0-libvirt-gconfig-Add-more-libxml-includes.patch +) + src_prepare() { default use vala && vala_src_prepare diff --git a/app-emulation/libvirt-glib/libvirt-glib-5.0.0.ebuild b/app-emulation/libvirt-glib/libvirt-glib-5.0.0.ebuild new file mode 100644 index 000000000000..8b22083a5ab3 --- /dev/null +++ b/app-emulation/libvirt-glib/libvirt-glib-5.0.0.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit meson vala + +DESCRIPTION="GLib and GObject mappings for libvirt" +HOMEPAGE="https://libvirt.org/ https://gitlab.com/libvirt/libvirt-glib/" +SRC_URI="https://libvirt.org/sources/glib/${P}.tar.xz" +LICENSE="LGPL-2.1+" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +IUSE="gtk-doc +introspection test +vala" +RESTRICT="!test? ( test )" +REQUIRED_USE="vala? ( introspection )" + +RDEPEND=" + >=dev-libs/libxml2-2.9.1 + >=app-emulation/libvirt-2.3.0:= + >=dev-libs/glib-2.48.0:2 + introspection? ( >=dev-libs/gobject-introspection-1.48.0:= ) +" +DEPEND="${RDEPEND}" + +BDEPEND=" + dev-util/glib-utils + virtual/pkgconfig + gtk-doc? ( dev-util/gtk-doc + app-text/docbook-xml-dtd:4.3 ) + vala? ( $(vala_depend) ) +" + +src_prepare() { + default + use vala && vala_src_prepare +} + +src_configure() { + local emesonargs=( + $(meson_feature gtk-doc docs) + $(meson_feature introspection) + $(meson_feature test tests) + $(meson_feature vala vapi) + ) + + meson_src_configure +} diff --git a/app-emulation/libvirt-glib/metadata.xml b/app-emulation/libvirt-glib/metadata.xml index 084d30608713..08a5f06bdf97 100644 --- a/app-emulation/libvirt-glib/metadata.xml +++ b/app-emulation/libvirt-glib/metadata.xml @@ -1,12 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<maintainer type="project"> - <email>gnome@gentoo.org</email> - <name>Gentoo GNOME Desktop</name> -</maintainer> -<maintainer type="person"> - <email>tamiko@gentoo.org</email> - <name>Matthias Maier</name> -</maintainer> + <maintainer type="project"> + <email>gnome@gentoo.org</email> + <name>Gentoo GNOME Desktop</name> + </maintainer> + <maintainer type="person"> + <email>tamiko@gentoo.org</email> + <name>Matthias Maier</name> + </maintainer> + <upstream> + <remote-id type="gitlab">libvirt/libvirt-glib</remote-id> + </upstream> </pkgmetadata> |