From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/musicbrainz/files/, media-libs/musicbrainz/
Date: Sun, 28 Jan 2024 15:52:18 +0000 (UTC) [thread overview]
Message-ID: <1706457081.1a395c389053493823136109272e5e1bd576c165.sam@gentoo> (raw)
commit: 1a395c389053493823136109272e5e1bd576c165
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 28 15:50:55 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 28 15:51:21 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a395c38
media-libs/musicbrainz: fix build w/ libxml2-2.12
Closes: https://bugs.gentoo.org/923011
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../musicbrainz-5.1.0-libxml2-2.12-compat.patch | 21 +++++++
.../files/musicbrainz-5.1.0-libxml2-2.12.patch | 69 ++++++++++++++++++++++
media-libs/musicbrainz/musicbrainz-5.1.0-r1.ebuild | 48 +++++++++++++++
3 files changed, 138 insertions(+)
diff --git a/media-libs/musicbrainz/files/musicbrainz-5.1.0-libxml2-2.12-compat.patch b/media-libs/musicbrainz/files/musicbrainz-5.1.0-libxml2-2.12-compat.patch
new file mode 100644
index 000000000000..a835ffbb0f2e
--- /dev/null
+++ b/media-libs/musicbrainz/files/musicbrainz-5.1.0-libxml2-2.12-compat.patch
@@ -0,0 +1,21 @@
+Fix build with <libxml2-2.12.
+--- a/src/xmlParser.cc
++++ b/src/xmlParser.cc
+@@ -57,7 +57,7 @@ XMLNode *XMLRootNode::parseFile(const std::string &filename, XMLResults* results
+
+ doc = xmlParseFile(filename.c_str());
+ if ((doc == NULL) && (results != NULL)) {
+- const xmlError *error = xmlGetLastError();
++ const xmlError *error = (const xmlError*) xmlGetLastError();
+ results->message = error->message;
+ results->line = error->line;
+ results->code = error->code;
+@@ -72,7 +72,7 @@ XMLNode *XMLRootNode::parseString(const std::string &xml, XMLResults* results)
+
+ doc = xmlParseMemory(xml.c_str(), xml.length());
+ if ((doc == NULL) && (results != NULL)) {
+- const xmlError *error = xmlGetLastError();
++ const xmlError *error = (const xmlError*) xmlGetLastError();
+ results->message = error->message;
+ results->line = error->line;
+ results->code = error->code;
diff --git a/media-libs/musicbrainz/files/musicbrainz-5.1.0-libxml2-2.12.patch b/media-libs/musicbrainz/files/musicbrainz-5.1.0-libxml2-2.12.patch
new file mode 100644
index 000000000000..41956918bb93
--- /dev/null
+++ b/media-libs/musicbrainz/files/musicbrainz-5.1.0-libxml2-2.12.patch
@@ -0,0 +1,69 @@
+https://bugs.gentoo.org/923011
+https://github.com/metabrainz/libmusicbrainz/commit/9ba00067a15479a52262a5126bcb6889da5884b7
+https://github.com/metabrainz/libmusicbrainz/commit/558c9ba0e6d702d5c877f75be98176f57abf1b02
+
+From 9ba00067a15479a52262a5126bcb6889da5884b7 Mon Sep 17 00:00:00 2001
+From: Christopher Degawa <ccom@randomderp.com>
+Date: Sun, 8 Oct 2023 11:41:30 -0500
+Subject: [PATCH] libxml: include parser.h
+
+libxml2 removed the inclusion of global.h in a few of its include files,
+so we can no longer rely on transitive includes.
+
+This applies to functions like xmlParseFile.
+
+Signed-off-by: Christopher Degawa <ccom@randomderp.com>
+---
+ src/xmlParser.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/xmlParser.cc b/src/xmlParser.cc
+index e63df55..53dec25 100644
+--- a/src/xmlParser.cc
++++ b/src/xmlParser.cc
+@@ -30,6 +30,7 @@
+
+ #include <cstring>
+ #include <libxml/tree.h>
++#include <libxml/parser.h>
+
+ XMLResults::XMLResults()
+ : line(0),
+
+
+From 558c9ba0e6d702d5c877f75be98176f57abf1b02 Mon Sep 17 00:00:00 2001
+From: Christopher Degawa <ccom@randomderp.com>
+Date: Sun, 8 Oct 2023 11:42:55 -0500
+Subject: [PATCH] libxml: constify the storage of xmlGetLastError()
+
+libxml2 recently made it a const return.
+Since nothing is being modified of it, this should have no real effect
+past satisfying the compiler.
+
+Signed-off-by: Christopher Degawa <ccom@randomderp.com>
+---
+ src/xmlParser.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/xmlParser.cc b/src/xmlParser.cc
+index 53dec25..fee684c 100644
+--- a/src/xmlParser.cc
++++ b/src/xmlParser.cc
+@@ -57,7 +57,7 @@ XMLNode *XMLRootNode::parseFile(const std::string &filename, XMLResults* results
+
+ doc = xmlParseFile(filename.c_str());
+ if ((doc == NULL) && (results != NULL)) {
+- xmlErrorPtr error = xmlGetLastError();
++ const xmlError *error = xmlGetLastError();
+ results->message = error->message;
+ results->line = error->line;
+ results->code = error->code;
+@@ -72,7 +72,7 @@ XMLNode *XMLRootNode::parseString(const std::string &xml, XMLResults* results)
+
+ doc = xmlParseMemory(xml.c_str(), xml.length());
+ if ((doc == NULL) && (results != NULL)) {
+- xmlErrorPtr error = xmlGetLastError();
++ const xmlError *error = xmlGetLastError();
+ results->message = error->message;
+ results->line = error->line;
+ results->code = error->code;
diff --git a/media-libs/musicbrainz/musicbrainz-5.1.0-r1.ebuild b/media-libs/musicbrainz/musicbrainz-5.1.0-r1.ebuild
new file mode 100644
index 000000000000..c0ca4e48189b
--- /dev/null
+++ b/media-libs/musicbrainz/musicbrainz-5.1.0-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Client Library for accessing the latest XML based MusicBrainz web service"
+HOMEPAGE="https://musicbrainz.org/doc/libmusicbrainz"
+SRC_URI="https://github.com/metabrainz/lib${PN}/releases/download/release-${PV}/lib${P}.tar.gz"
+S="${WORKDIR}/lib${P}"
+
+LICENSE="LGPL-2.1"
+SLOT="5/1" # soname of libmusicbrainz5.so
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="examples test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/libxml2
+ net-libs/neon
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-util/cppunit )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-no-wildcards.patch"
+ "${FILESDIR}/${P}-libxml2-2.12.patch"
+ "${FILESDIR}/${P}-libxml2-2.12-compat.patch"
+)
+
+src_prepare() {
+ use test || cmake_comment_add_subdirectory tests
+ cmake_src_prepare
+}
+
+src_install() {
+ cmake_src_install
+
+ if use examples; then
+ docinto examples
+ dodoc examples/*.{c,cc,txt}
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
next reply other threads:[~2024-01-28 15:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-28 15:52 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-06-04 20:07 [gentoo-commits] repo/gentoo:master commit in: media-libs/musicbrainz/files/, media-libs/musicbrainz/ Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1706457081.1a395c389053493823136109272e5e1bd576c165.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox