commit: fdb1782174e7db8b4674d678312de7c8b85b6716 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Mon Oct 10 16:11:10 2022 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Mon Oct 10 16:11:42 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdb17821
media-sound/kid3: Fix build with musl Closes: https://bugs.gentoo.org/832301 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> media-sound/kid3/files/kid3-3.9.2-musl.patch | 27 +++++++++++++++++++++++++++ media-sound/kid3/kid3-3.9.2-r1.ebuild | 2 ++ 2 files changed, 29 insertions(+) diff --git a/media-sound/kid3/files/kid3-3.9.2-musl.patch b/media-sound/kid3/files/kid3-3.9.2-musl.patch new file mode 100644 index 000000000000..05eb15536386 --- /dev/null +++ b/media-sound/kid3/files/kid3-3.9.2-musl.patch @@ -0,0 +1,27 @@ +From 15655cd3f19b95d5533bdfd52b0f38c51a4fdf88 Mon Sep 17 00:00:00 2001 +From: Bart Ribbers <[email protected]> +Date: Sat, 24 Sep 2022 17:20:06 +0200 +Subject: [PATCH] Fix build on Musl libc + +malloc_trim is only implemented on glibc, so rather than checking if the +OS is Linux and not Android, check if it's Linux and glibc. +--- + src/core/model/kid3application.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/model/kid3application.cpp b/src/core/model/kid3application.cpp +index d40bca83..03409d1b 100644 +--- a/src/core/model/kid3application.cpp ++++ b/src/core/model/kid3application.cpp +@@ -995,7 +995,7 @@ void Kid3Application::unloadAllTags() + taggedFile->closeFileHandle(); + } + } +-#if defined Q_OS_LINUX && !defined Q_OS_ANDROID ++#if defined Q_OS_LINUX && defined __GLIBC__ + if (::malloc_trim(0)) { + qDebug("Memory released by malloc_trim()"); + } +-- +GitLab + diff --git a/media-sound/kid3/kid3-3.9.2-r1.ebuild b/media-sound/kid3/kid3-3.9.2-r1.ebuild index b298c0f7a0d9..332eb6c4f7d3 100644 --- a/media-sound/kid3/kid3-3.9.2-r1.ebuild +++ b/media-sound/kid3/kid3-3.9.2-r1.ebuild @@ -63,6 +63,8 @@ BDEPEND="${PYTHON_DEPS} kde? ( kde-frameworks/extra-cmake-modules:5 ) " +PATCHES=( "${FILESDIR}/${P}-musl.patch" ) + pkg_setup() { use test && python-any-r1_pkg_setup }
