Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/wavegain/, media-sound/wavegain/files/
Date: Sat, 08 Aug 2020 16:55:45
Message-Id: 1596905604.9ad99e9ec198ceac774013a65828ed92e81fdfee.soap@gentoo
1 commit: 9ad99e9ec198ceac774013a65828ed92e81fdfee
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 8 16:53:24 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 8 16:53:24 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ad99e9e
7
8 media-sound/wavegain: Fix building under -fno-common
9
10 Closes: https://bugs.gentoo.org/706692
11 Package-Manager: Portage-3.0.1, Repoman-2.3.23
12 Signed-off-by: David Seifert <soap <AT> gentoo.org>
13
14 .../wavegain/files/wavegain-1.3.1-fno-common.patch | 11 +++++++++++
15 media-sound/wavegain/files/wavegain-1.3.1-makefile.patch | 7 +++++++
16 media-sound/wavegain/wavegain-1.3.1.ebuild | 15 +++++++++------
17 3 files changed, 27 insertions(+), 6 deletions(-)
18
19 diff --git a/media-sound/wavegain/files/wavegain-1.3.1-fno-common.patch b/media-sound/wavegain/files/wavegain-1.3.1-fno-common.patch
20 new file mode 100644
21 index 00000000000..ff282740f8f
22 --- /dev/null
23 +++ b/media-sound/wavegain/files/wavegain-1.3.1-fno-common.patch
24 @@ -0,0 +1,11 @@
25 +--- a/audio.h
26 ++++ b/audio.h
27 +@@ -136,7 +136,7 @@
28 + long wav_read(void *, double **buffer, int samples, int fast, int chunk);
29 + long wav_ieee_read(void *, double **buffer, int samples, int fast, int chunk);
30 +
31 +-enum {
32 ++typedef enum {
33 + WAV_NO_FMT = 0,
34 + WAV_FMT_8BIT,
35 + WAV_FMT_16BIT,
36
37 diff --git a/media-sound/wavegain/files/wavegain-1.3.1-makefile.patch b/media-sound/wavegain/files/wavegain-1.3.1-makefile.patch
38 new file mode 100644
39 index 00000000000..a5364f561b5
40 --- /dev/null
41 +++ b/media-sound/wavegain/files/wavegain-1.3.1-makefile.patch
42 @@ -0,0 +1,7 @@
43 +--- a/Makefile
44 ++++ b/Makefile
45 +@@ -0,0 +1,4 @@
46 ++LDLIBS = -lm
47 ++CPPFLAGS += -DHAVE_CONFIG_H
48 ++
49 ++wavegain: audio.o dither.o gain_analysis.o getopt1.o getopt.o main.o misc.o recurse.o
50
51 diff --git a/media-sound/wavegain/wavegain-1.3.1.ebuild b/media-sound/wavegain/wavegain-1.3.1.ebuild
52 index 8e51ee45a37..9790a1958c4 100644
53 --- a/media-sound/wavegain/wavegain-1.3.1.ebuild
54 +++ b/media-sound/wavegain/wavegain-1.3.1.ebuild
55 @@ -1,4 +1,4 @@
56 -# Copyright 1999-2019 Gentoo Authors
57 +# Copyright 1999-2020 Gentoo Authors
58 # Distributed under the terms of the GNU General Public License v2
59
60 EAPI=7
61 @@ -12,15 +12,18 @@ SRC_URI="http://www.rarewares.org/files/others/${P}srcs.zip"
62 LICENSE="LGPL-2.1"
63 SLOT="0"
64 KEYWORDS="amd64 x86"
65 -IUSE=""
66
67 BDEPEND="app-arch/unzip"
68
69 -S=${WORKDIR}/${P/wavegain/WaveGain}
70 +S="${WORKDIR}/${P/wavegain/WaveGain}"
71
72 -src_compile() {
73 - $(tc-getCC) ${LDFLAGS} ${CFLAGS} *.c -o ${PN} \
74 - -DHAVE_CONFIG_H -lm || die "build failed"
75 +PATCHES=(
76 + "${FILESDIR}"/${PN}-1.3.1-makefile.patch
77 + "${FILESDIR}"/${PN}-1.3.1-fno-common.patch
78 +)
79 +
80 +src_configure() {
81 + tc-export CC
82 }
83
84 src_install() {