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/toolame/, media-sound/toolame/files/
Date: Sat, 08 Aug 2020 16:55:45
Message-Id: 1596905610.297d4661482aca2bcba3c279da06a7361b11368f.soap@gentoo
1 commit: 297d4661482aca2bcba3c279da06a7361b11368f
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 8 16:53:30 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 8 16:53:30 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=297d4661
7
8 media-sound/toolame: Fix building under -fno-common
9
10 Closes: https://bugs.gentoo.org/706758
11 Package-Manager: Portage-3.0.1, Repoman-2.3.23
12 Signed-off-by: David Seifert <soap <AT> gentoo.org>
13
14 ...-02l-gentoo.diff => toolame-02l-Makefile.patch} | 17 +++++++++--------
15 .../toolame/files/toolame-02l-fno-common.patch | 20 ++++++++++++++++++++
16 media-sound/toolame/toolame-02l-r4.ebuild | 22 +++++++++-------------
17 3 files changed, 38 insertions(+), 21 deletions(-)
18
19 diff --git a/media-sound/toolame/files/toolame-02l-gentoo.diff b/media-sound/toolame/files/toolame-02l-Makefile.patch
20 similarity index 81%
21 rename from media-sound/toolame/files/toolame-02l-gentoo.diff
22 rename to media-sound/toolame/files/toolame-02l-Makefile.patch
23 index f96020f0a81..28009555d85 100644
24 --- a/media-sound/toolame/files/toolame-02l-gentoo.diff
25 +++ b/media-sound/toolame/files/toolame-02l-Makefile.patch
26 @@ -1,5 +1,5 @@
27 ---- toolame-02l/Makefile 2003-03-02 08:07:02.000000000 +0100
28 -+++ toolame-02l/Makefile.new 2003-04-14 14:00:10.000000000 +0200
29 +--- a/Makefile
30 ++++ b/Makefile
31 @@ -1,6 +1,3 @@
32 -
33 -CC = gcc
34 @@ -7,7 +7,7 @@
35 c_sources = \
36 common.c \
37 encode.c \
38 -@@ -26,37 +23,16 @@
39 +@@ -26,29 +23,8 @@
40
41 OBJ = $(c_sources:.c=.o)
42
43 @@ -19,8 +19,8 @@
44 -OPTIM = -O3
45 -
46 # These flags are pretty much mandatory
47 - REQUIRED = -DNDEBUG -DINLINE=inline
48 -
49 +-REQUIRED = -DNDEBUG -DINLINE=inline
50 +-
51 -#pick your architecture
52 -ARCH = -march=pentium
53 -#Possible x86 architectures
54 @@ -34,15 +34,16 @@
55 -# -malign-double \
56 -# -mfancy-math-387 -funroll-loops -funroll-all-loops -pipe \
57 -# -fschedule-insns2 -fno-strength-reduce
58 --
59 ++REQUIRED = -DNDEBUG -DINLINE=
60 +
61 #Set a stack of warnings to overcome my atrocious coding style . MFC.
62 WARNINGS = -Wall
63 - WARNINGS2 = -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-variable -Wunused-value -Wredundant-decls
64 +@@ -56,7 +32,7 @@
65
66 NEW_02L_FIXES = -DNEWENCODE -DNEWATAN
67
68 -CC_SWITCHES = $(OPTIM) $(REQUIRED) $(ARCH) $(PG) $(TWEAKS) $(WARNINGS) $(NEW_02L_FIXES)
69 -+CC_SWITCHES = $(CFLAGS) $(REQUIRED) $(WARNINGS) $(NEW_02L_FIXES)
70 ++CC_SWITCHES = $(CFLAGS) $(CPPFLAGS) $(REQUIRED) $(WARNINGS) $(NEW_02L_FIXES)
71
72 PGM = toolame
73
74
75 diff --git a/media-sound/toolame/files/toolame-02l-fno-common.patch b/media-sound/toolame/files/toolame-02l-fno-common.patch
76 new file mode 100644
77 index 00000000000..c414324785b
78 --- /dev/null
79 +++ b/media-sound/toolame/files/toolame-02l-fno-common.patch
80 @@ -0,0 +1,20 @@
81 +--- a/common.c
82 ++++ b/common.c
83 +@@ -19,6 +19,8 @@
84 + *
85 + ***********************************************************************/
86 +
87 ++options glopts;
88 ++
89 + char *mode_names[4] = { "stereo", "j-stereo", "dual-ch", "single-ch" };
90 + char *version_names[2] = { "MPEG-2 LSF", "MPEG-1" };
91 +
92 +--- a/options.h
93 ++++ b/options.h
94 +@@ -19,5 +19,5 @@
95 + }
96 + options;
97 +
98 +-options glopts;
99 ++extern options glopts;
100 + #endif
101
102 diff --git a/media-sound/toolame/toolame-02l-r4.ebuild b/media-sound/toolame/toolame-02l-r4.ebuild
103 index fea144e8c60..659ebf40b04 100644
104 --- a/media-sound/toolame/toolame-02l-r4.ebuild
105 +++ b/media-sound/toolame/toolame-02l-r4.ebuild
106 @@ -1,8 +1,9 @@
107 # Copyright 1999-2020 Gentoo Authors
108 # Distributed under the terms of the GNU General Public License v2
109
110 -EAPI=6
111 -inherit eutils flag-o-matic toolchain-funcs
112 +EAPI=7
113 +
114 +inherit flag-o-matic toolchain-funcs
115
116 DESCRIPTION="tooLAME - an optimized mpeg 1/2 layer 2 audio encoder"
117 HOMEPAGE="http://www.planckenergy.com"
118 @@ -11,25 +12,20 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
119 LICENSE="LGPL-2.1"
120 SLOT="0"
121 KEYWORDS="~alpha amd64 arm hppa ~ia64 ppc ppc64 sparc x86"
122 -IUSE=""
123
124 PATCHES=(
125 - "${FILESDIR}/${P}-gentoo.diff"
126 - "${FILESDIR}/${P}-uint.patch"
127 - "${FILESDIR}/${P}-uint32_t.patch"
128 + "${FILESDIR}"/${P}-Makefile.patch
129 + "${FILESDIR}"/${P}-uint.patch
130 + "${FILESDIR}"/${P}-uint32_t.patch
131 + "${FILESDIR}"/${P}-fno-common.patch
132 )
133
134 -src_prepare() {
135 - # fix #571774 by restoring pre-GCC5 inline semantics
136 - append-cflags -std=gnu89
137 -
138 +src_configure() {
139 append-lfs-flags
140 tc-export CC
141 -
142 - default
143 }
144
145 src_install() {
146 dobin ${PN}
147 - dodoc README HISTORY FUTURE html/* text/*
148 + dodoc -r README HISTORY FUTURE html/. text/.
149 }