summaryrefslogtreecommitdiff
path: root/media-libs/musicbrainz
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-28 18:57:25 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-28 18:57:25 +0000
commit7b97d94d4769a556456398d66819200655c4d76c (patch)
tree2aab1b584f3ed787c1e858dbed720266bbb31bc5 /media-libs/musicbrainz
parentddcaaaec485fcf5238dfbabb6df62a11e95a1f26 (diff)
gentoo auto-resync : 28:01:2024 - 18:57:25
Diffstat (limited to 'media-libs/musicbrainz')
-rw-r--r--media-libs/musicbrainz/Manifest3
-rw-r--r--media-libs/musicbrainz/files/musicbrainz-5.1.0-libxml2-2.12-compat.patch21
-rw-r--r--media-libs/musicbrainz/files/musicbrainz-5.1.0-libxml2-2.12.patch69
-rw-r--r--media-libs/musicbrainz/musicbrainz-5.1.0-r1.ebuild48
4 files changed, 141 insertions, 0 deletions
diff --git a/media-libs/musicbrainz/Manifest b/media-libs/musicbrainz/Manifest
index 07cf4d2dcdc7..17391beaa111 100644
--- a/media-libs/musicbrainz/Manifest
+++ b/media-libs/musicbrainz/Manifest
@@ -1,4 +1,7 @@
+AUX musicbrainz-5.1.0-libxml2-2.12-compat.patch 951 BLAKE2B aeacea1a849ad244fb63d2404fc9b1c1003fba7cfdfb3ed861da52ebf1378370bb5f85875bba91c54b9b86ff759bdfb39c31875f8d88378e628488010f9eac7c SHA512 128540b7b0e50cfbe773cf473add4ffabdfb592df143fe800475caa981749b3f56045a0ec2dc5bb3454427ef288fc44c20ce82ef5b348b465b6bad09dd5eb946
+AUX musicbrainz-5.1.0-libxml2-2.12.patch 2426 BLAKE2B dea9dca81545dc48ce64e2052eb3cd143c07100289b8aaffbc7aa7543dd36434b123eb681caae2c223c756cc25d5a39eb28d7c357df174832f06bb95923a53d6 SHA512 49d0a6e55101b41c4a7d62535c8d66ef97528bff27f16c2e662ee41024764e7af618fb37c003072006267c31ce54ec43c7b7bfaa736f8e3f9f6bd400cccbb10c
AUX musicbrainz-5.1.0-no-wildcards.patch 1316 BLAKE2B 39eb1691ec5967432cbcc166fda63f33cbb5d1ca9761ba47839733d2e78a84bc425e7b7fa200f397d6f6be982ce48688048db73ca55f2e0c84537f504b4afdab SHA512 2768c4c054fb3b1df312e7d9d41c0d9c618ce50ada9013739251933a4f84b32d147d6033507395d8d189b2d203f9c4c982d07375913907bd374587fabd8402b6
DIST libmusicbrainz-5.1.0.tar.gz 77220 BLAKE2B c655ae4a9a11adb15de559a1e518b5c5aab47ce3c36e3a264faddda36112d9caccc42d2013e451ffdf200147ffca4cbba883affa1a6465f6071fa14e1d67fbe5 SHA512 daa7ccb94e517e90f7d88a0659c84b00f04c6a73ef7771b7e3bd9101fa6569b1935a68a3689502ed0cc8c0d71ba9d2d0ebd9c074dd5eed9f75a3db390b222e03
+EBUILD musicbrainz-5.1.0-r1.ebuild 1094 BLAKE2B 4f8a9bfae6fb9cab195e45b3d96431c319a3851169012c11e6b65d085ca9f520e19b9e519415fffba7a88fe7b9f47d3ab928278d13755293c02fb688365d6297 SHA512 778afa3e9f344d1cb6d77e873d8f40ec9a3c9484386a1c03aca5f1746cf1e07427e2322f02371ee23ec7d0e0b5409cddcaec5cf47ad6415b998b50858fd809f2
EBUILD musicbrainz-5.1.0.ebuild 1000 BLAKE2B e90a8ac848380103735e2628c34995faf70986cd91d8cd5b1ec5d7b18671fdfe6508a1d2621c1341ef11b4c63e4e7589f20f93e5032cad951aec13db42c1be20 SHA512 48397025a98a4775a28c5b47f5ba845c4c2cad3c8bc1ffdacd3ecd8a135f4b0f6e69760a021e0d22691952ca1048d99031ba408d9b5462a028af5110c347aeef
MISC metadata.xml 417 BLAKE2B 30faa0db0a303a9bf9db3fbebf4eacb4496d252f29d664fa1ae781788216e4ade2257fb10383219b0096ecb5e555cb301a08b82cfc700192bffc886c61b39898 SHA512 31060609e30d13424ee72f528fb93b7e40eeae21122e8e4b1d493b1e8bc60b0572ec11186e216e1c4a1b5bcbc84cd472eedeea3b3f6464e49ca4c34126814c25
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
+}