Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/musepack-tools/files/, media-sound/musepack-tools/
Date: Mon, 20 Mar 2023 05:36:16
Message-Id: 1679290365.c0c3f271f5d35a31cfb5225885aaa5258d471590.sam@gentoo
1 commit: c0c3f271f5d35a31cfb5225885aaa5258d471590
2 Author: Cristian Othón Martínez Vera <cfuga <AT> cfuga <DOT> mx>
3 AuthorDate: Sun Mar 12 23:24:21 2023 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 20 05:32:45 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0c3f271
7
8 media-sound/musepack-tools: fix build on musl
9
10 Signed-off-by: Cristian Othón Martínez Vera <cfuga <AT> cfuga.mx>
11 Bug: https://bugs.gentoo.org/712978
12
13 This patch makes the following changes.
14 * __linux__ isn't the same as __GLIBC__
15
16 Thus, it avoids calling <fpu_control.h> macros in musl, doesn't require
17 conditional patching and still works nicely with glibc-based systems.
18
19 * Includes <sys/select.h> for select(3). That header includes <sys/time.h>
20 and also fixes the struct timeval error.
21
22 Signed-off-by: Sam James <sam <AT> gentoo.org>
23
24 .../files/musepack-tools-465-musl.patch | 24 ++++++++++++++++++++++
25 .../musepack-tools/musepack-tools-465-r2.ebuild | 3 ++-
26 2 files changed, 26 insertions(+), 1 deletion(-)
27
28 diff --git a/media-sound/musepack-tools/files/musepack-tools-465-musl.patch b/media-sound/musepack-tools/files/musepack-tools-465-musl.patch
29 new file mode 100644
30 index 000000000000..f7fb0f771082
31 --- /dev/null
32 +++ b/media-sound/musepack-tools/files/musepack-tools-465-musl.patch
33 @@ -0,0 +1,24 @@
34 +Bug: https://bugs.gentoo.org/712978
35 +
36 +--- a/mpcenc/keyboard.c
37 ++++ b/mpcenc/keyboard.c
38 +@@ -84,6 +84,8 @@
39 + # define echo_on() (void)0
40 + # endif
41 +
42 ++# include <sys/select.h>
43 ++
44 + int
45 + WaitKey ( void )
46 + {
47 +--- a/mpcenc/mpcenc.h
48 ++++ b/mpcenc/mpcenc.h
49 +@@ -50,7 +50,7 @@
50 + # include <unistd.h>
51 + #endif
52 +
53 +-#if defined __linux__
54 ++#if defined __GLIBC__
55 + # include <fpu_control.h>
56 + #elif defined __FreeBSD__
57 + # include <machine/floatingpoint.h>
58
59 diff --git a/media-sound/musepack-tools/musepack-tools-465-r2.ebuild b/media-sound/musepack-tools/musepack-tools-465-r2.ebuild
60 index 6b5b76e9cdf3..ed17b264c7fb 100644
61 --- a/media-sound/musepack-tools/musepack-tools-465-r2.ebuild
62 +++ b/media-sound/musepack-tools/musepack-tools-465-r2.ebuild
63 @@ -1,4 +1,4 @@
64 -# Copyright 1999-2022 Gentoo Authors
65 +# Copyright 1999-2023 Gentoo Authors
66 # Distributed under the terms of the GNU General Public License v2
67
68 EAPI=8
69 @@ -29,4 +29,5 @@ RDEPEND="
70 PATCHES=(
71 "${FILESDIR}"/${P}-gentoo.patch
72 "${FILESDIR}"/${P}-fno-common.patch
73 + "${FILESDIR}"/${P}-musl.patch
74 )