summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristian Othón Martínez Vera <cfuga@cfuga.mx>2023-03-12 17:24:21 -0600
committerSam James <sam@gentoo.org>2023-03-20 05:32:45 +0000
commitc0c3f271f5d35a31cfb5225885aaa5258d471590 (patch)
treed9ddb1519d387e307ff2deab156b7dc6796d996e /media-sound/musepack-tools
parentdev-libs/apr-util: remove unused patches (diff)
downloadgentoo-c0c3f271f5d35a31cfb5225885aaa5258d471590.tar.gz
gentoo-c0c3f271f5d35a31cfb5225885aaa5258d471590.tar.bz2
gentoo-c0c3f271f5d35a31cfb5225885aaa5258d471590.zip
media-sound/musepack-tools: fix build on musl
Signed-off-by: Cristian Othón Martínez Vera <cfuga@cfuga.mx> Bug: https://bugs.gentoo.org/712978 This patch makes the following changes. * __linux__ isn't the same as __GLIBC__ Thus, it avoids calling <fpu_control.h> macros in musl, doesn't require conditional patching and still works nicely with glibc-based systems. * Includes <sys/select.h> for select(3). That header includes <sys/time.h> and also fixes the struct timeval error. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-sound/musepack-tools')
-rw-r--r--media-sound/musepack-tools/files/musepack-tools-465-musl.patch24
-rw-r--r--media-sound/musepack-tools/musepack-tools-465-r2.ebuild3
2 files changed, 26 insertions, 1 deletions
diff --git a/media-sound/musepack-tools/files/musepack-tools-465-musl.patch b/media-sound/musepack-tools/files/musepack-tools-465-musl.patch
new file mode 100644
index 000000000000..f7fb0f771082
--- /dev/null
+++ b/media-sound/musepack-tools/files/musepack-tools-465-musl.patch
@@ -0,0 +1,24 @@
+Bug: https://bugs.gentoo.org/712978
+
+--- a/mpcenc/keyboard.c
++++ b/mpcenc/keyboard.c
+@@ -84,6 +84,8 @@
+ # define echo_on() (void)0
+ # endif
+
++# include <sys/select.h>
++
+ int
+ WaitKey ( void )
+ {
+--- a/mpcenc/mpcenc.h
++++ b/mpcenc/mpcenc.h
+@@ -50,7 +50,7 @@
+ # include <unistd.h>
+ #endif
+
+-#if defined __linux__
++#if defined __GLIBC__
+ # include <fpu_control.h>
+ #elif defined __FreeBSD__
+ # include <machine/floatingpoint.h>
diff --git a/media-sound/musepack-tools/musepack-tools-465-r2.ebuild b/media-sound/musepack-tools/musepack-tools-465-r2.ebuild
index 6b5b76e9cdf3..ed17b264c7fb 100644
--- a/media-sound/musepack-tools/musepack-tools-465-r2.ebuild
+++ b/media-sound/musepack-tools/musepack-tools-465-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -29,4 +29,5 @@ RDEPEND="
PATCHES=(
"${FILESDIR}"/${P}-gentoo.patch
"${FILESDIR}"/${P}-fno-common.patch
+ "${FILESDIR}"/${P}-musl.patch
)