1 |
commit: 49ad90a829e2ea143388b9b7fa3bf1b12bd864ad |
2 |
Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 3 11:03:42 2018 +0000 |
4 |
Commit: Jason Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 3 11:04:47 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49ad90a8 |
7 |
|
8 |
media-sound/aacgain: fix obvious bug and recent gcc issue |
9 |
|
10 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
11 |
|
12 |
media-sound/aacgain/aacgain-1.9-r2.ebuild | 105 +++++++++++++++++++++ |
13 |
.../aacgain/files/aacgain-1.9-derefptr.patch | 11 +++ |
14 |
2 files changed, 116 insertions(+) |
15 |
|
16 |
diff --git a/media-sound/aacgain/aacgain-1.9-r2.ebuild b/media-sound/aacgain/aacgain-1.9-r2.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..6db52b1805e |
19 |
--- /dev/null |
20 |
+++ b/media-sound/aacgain/aacgain-1.9-r2.ebuild |
21 |
@@ -0,0 +1,105 @@ |
22 |
+# Copyright 1999-2018 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=6 |
26 |
+ |
27 |
+inherit eutils autotools |
28 |
+ |
29 |
+FAAD2_PV="2.7" |
30 |
+MP4V2_PV="1.9.1" |
31 |
+MP3GAIN_PV="1.5.2" |
32 |
+ |
33 |
+DESCRIPTION="AACGain normalizes the volume of music files using the Replay Gain algorithm" |
34 |
+HOMEPAGE="http://aacgain.altosdesign.com/" |
35 |
+SRC_URI="http://sbriesen.de/gentoo/distfiles/${P}.tar.xz |
36 |
+ https://mp4v2.googlecode.com/files/mp4v2-${MP4V2_PV}.tar.bz2 |
37 |
+ mirror://sourceforge/mp3gain/mp3gain-${MP3GAIN_PV//./_}-src.zip |
38 |
+ mirror://sourceforge/faac/faad2-${FAAD2_PV}.tar.gz" |
39 |
+ |
40 |
+LICENSE="GPL-2" |
41 |
+SLOT="0" |
42 |
+KEYWORDS="~amd64 ~x86" |
43 |
+IUSE="" |
44 |
+ |
45 |
+RDEPEND="" |
46 |
+DEPEND="" |
47 |
+ |
48 |
+DOCS="${PN}/README" |
49 |
+ |
50 |
+src_unpack() { |
51 |
+ mkdir -p "${S}" |
52 |
+ for X in ${A}; do |
53 |
+ case "${X}" in |
54 |
+ mp3gain*) |
55 |
+ mkdir -p "${S}/${X%%-*}" |
56 |
+ cd "${S}/${X%%-*}" |
57 |
+ unpack "${X}" |
58 |
+ ;; |
59 |
+ *) |
60 |
+ cd "${S}" |
61 |
+ unpack "${X}" |
62 |
+ [ -d "${X%%-*}" ] || mv -f "${X%%-*}"-* "${X%%-*}" |
63 |
+ ;; |
64 |
+ esac |
65 |
+ done |
66 |
+} |
67 |
+ |
68 |
+PATCHES=( |
69 |
+ ${PN}/mp4v2.patch |
70 |
+ "${FILESDIR}"/${P}-patch-dotdot.patch |
71 |
+ "${FILESDIR}"/${P}-derefptr.patch |
72 |
+) |
73 |
+ |
74 |
+src_prepare() { |
75 |
+ default |
76 |
+ |
77 |
+ sed -i -e 's:iquote :I:' faad2/libfaad/Makefile.am || die |
78 |
+ sed -i -e 's:../\(mp4v2/\):\1:g' ${PN}/mp4v2.patch || die |
79 |
+ sed -i -e 's:\(libmp4v2\|libfaad/libfaad\)\.la:README:g' \ |
80 |
+ -e 's:^\(autoreconf\|pushd\|popd\):# \1:g' aacgain/linux/prepare.sh || die |
81 |
+ |
82 |
+ cd "${S}/${PN}/linux" |
83 |
+ sh prepare.sh || die "prepare failed!" |
84 |
+ |
85 |
+ cd "${S}" |
86 |
+ eautoreconf |
87 |
+ |
88 |
+ cd "${S}/faad2" |
89 |
+ eautoreconf |
90 |
+ |
91 |
+ cd "${S}/mp4v2" |
92 |
+ elibtoolize |
93 |
+} |
94 |
+ |
95 |
+src_configure() { |
96 |
+ local myconf="--disable-dependency-tracking" |
97 |
+ local myconf2="${myconf} --disable-shared --enable-static" |
98 |
+ |
99 |
+ cd "${S}/faad2" |
100 |
+ econf ${myconf2} --without-xmms --without-mpeg4ip |
101 |
+ |
102 |
+ cd "${S}/mp4v2" |
103 |
+ econf ${myconf2} --disable-gch |
104 |
+ |
105 |
+ cd "${S}" |
106 |
+ econf ${myconf} |
107 |
+} |
108 |
+ |
109 |
+src_compile() { |
110 |
+ cd "${S}/faad2/libfaad" |
111 |
+ emake |
112 |
+ |
113 |
+ cd "${S}/mp4v2" |
114 |
+ emake |
115 |
+ |
116 |
+ cd "${S}" |
117 |
+ emake |
118 |
+} |
119 |
+ |
120 |
+pkg_postinst() { |
121 |
+ ewarn |
122 |
+ ewarn "BACK UP YOUR MUSIC FILES BEFORE USING AACGAIN!" |
123 |
+ ewarn "THIS IS EXPERIMENTAL SOFTWARE. THERE HAVE BEEN" |
124 |
+ ewarn "BUGS IN PAST RELEASES THAT CORRUPTED MUSIC FILES." |
125 |
+ ewarn |
126 |
+} |
127 |
|
128 |
diff --git a/media-sound/aacgain/files/aacgain-1.9-derefptr.patch b/media-sound/aacgain/files/aacgain-1.9-derefptr.patch |
129 |
new file mode 100644 |
130 |
index 00000000000..6973f36bf1b |
131 |
--- /dev/null |
132 |
+++ b/media-sound/aacgain/files/aacgain-1.9-derefptr.patch |
133 |
@@ -0,0 +1,11 @@ |
134 |
+--- aacgain-1.9/mp4v2/src/rtphint.cpp 2017-07-14 17:54:58.230117921 +0200 |
135 |
++++ aacgain-1.9/mp4v2/src/rtphint.cpp 2017-07-14 17:58:57.441883719 +0200 |
136 |
+@@ -345,7 +345,7 @@ |
137 |
+ pSlash = strchr(pSlash, '/'); |
138 |
+ if (pSlash != NULL) { |
139 |
+ pSlash++; |
140 |
+- if (pSlash != '\0') { |
141 |
++ if (*pSlash != '\0') { |
142 |
+ length = strlen(pRtpMap) - (pSlash - pRtpMap); |
143 |
+ *ppEncodingParams = (char *)MP4Calloc(length + 1); |
144 |
+ strncpy(*ppEncodingParams, pSlash, length); |