public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/musicbrainz/files/, media-libs/musicbrainz/
@ 2020-06-04 20:07 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2020-06-04 20:07 UTC (permalink / raw
  To: gentoo-commits

commit:     2e3353efaacf80e2ac04c3ef59bc91db4fe62937
Author:     William Breathitt Gray <vilhelm.gray <AT> gmail <DOT> com>
AuthorDate: Fri May  1 18:11:10 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Jun  4 20:07:22 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e3353ef

media-libs/musicbrainz: Fix CMake error

This fixes a build error caused by improper use of wildcards in the
project's src/CMakelists.txt file.

Closes: https://bugs.gentoo.org/698090
Signed-off-by: William Breathitt Gray <vilhelm.gray <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/15600
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/musicbrainz-5.1.0-no-wildcards.patch     | 27 ++++++++++++++++++++++
 media-libs/musicbrainz/musicbrainz-5.1.0.ebuild    |  2 ++
 2 files changed, 29 insertions(+)

diff --git a/media-libs/musicbrainz/files/musicbrainz-5.1.0-no-wildcards.patch b/media-libs/musicbrainz/files/musicbrainz-5.1.0-no-wildcards.patch
new file mode 100644
index 00000000000..d0bf0868d54
--- /dev/null
+++ b/media-libs/musicbrainz/files/musicbrainz-5.1.0-no-wildcards.patch
@@ -0,0 +1,27 @@
+From 36262d60fe92fe7a2c9bfb40e736bfcd29a6c3bd Mon Sep 17 00:00:00 2001
+From: Abderrahim Kitouni <a.kitouni@gmail.com>
+Date: Fri, 13 Apr 2018 09:56:57 +0100
+Subject: [PATCH 2/2] src/CMakelists.txt: do not use wildcards for dependencies
+
+This is discouraged by cmake's documentation and doesn't work with the ninja generator.
+---
+ src/CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 68c04e3..f7439d3 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -37,7 +37,8 @@ ADD_CUSTOM_COMMAND(
+ 	OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mb5_c.cc ${CMAKE_CURRENT_BINARY_DIR}/mb5_c.h ${CMAKE_CURRENT_BINARY_DIR}/../include/musicbrainz5/mb5_c.h
+ 	COMMAND make-c-interface ${CMAKE_CURRENT_SOURCE_DIR} cinterface.xml ${CMAKE_CURRENT_BINARY_DIR} mb5_c.cc mb5_c.h
+ 	COMMAND ${CMAKE_COMMAND} -E copy_if_different 	${CMAKE_CURRENT_BINARY_DIR}/mb5_c.h ${CMAKE_CURRENT_BINARY_DIR}/../include/musicbrainz5/mb5_c.h
+-	DEPENDS make-c-interface cinterface.xml *.inc
++	DEPENDS make-c-interface cinterface.xml c-int-medium-defines.inc c-int-query-source.inc c-int-source-funcs.inc
++                c-int-medium-source.inc c-int-release-defines.inc c-int-query-defines.inc c-int-release-source.inc
+ )
+ 
+ ADD_CUSTOM_TARGET(src_gen DEPENDS mb5_c.h)
+-- 
+2.26.2
+

diff --git a/media-libs/musicbrainz/musicbrainz-5.1.0.ebuild b/media-libs/musicbrainz/musicbrainz-5.1.0.ebuild
index 3c7debe1451..25b005bc1bd 100644
--- a/media-libs/musicbrainz/musicbrainz-5.1.0.ebuild
+++ b/media-libs/musicbrainz/musicbrainz-5.1.0.ebuild
@@ -25,6 +25,8 @@ DEPEND="${RDEPEND}
 
 S="${WORKDIR}/lib${P}"
 
+PATCHES=( "${FILESDIR}/${P}-no-wildcards.patch" )
+
 src_prepare() {
 	use test || cmake_comment_add_subdirectory tests
 	cmake-utils_src_prepare


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/musicbrainz/files/, media-libs/musicbrainz/
@ 2024-01-28 15:52 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2024-01-28 15:52 UTC (permalink / raw
  To: gentoo-commits

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
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-28 15:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-04 20:07 [gentoo-commits] repo/gentoo:master commit in: media-libs/musicbrainz/files/, media-libs/musicbrainz/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2024-01-28 15:52 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox