1 |
commit: 4071642e177ae0e7289d684387d1f01af563cbd1 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 7 01:16:57 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 7 01:16:57 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4071642e |
7 |
|
8 |
media-sound/timidity++: cleanup old |
9 |
|
10 |
Package-Manager: Portage-3.0.12, Repoman-3.0.2 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
media-sound/timidity++/Manifest | 1 - |
14 |
.../files/timidity++-2.14.0-CVE-2017-11546.patch | 31 ---- |
15 |
.../files/timidity++-2.14.0-CVE-2017-11547.patch | 67 ------- |
16 |
.../timidity++/files/timidity++-2.14.0-gcc5.patch | 31 ---- |
17 |
.../files/timidity++-2.14.0-pkg-config.patch | 109 ----------- |
18 |
...ert-for-required-ctl_speana_data-function.patch | 28 --- |
19 |
.../files/timidity++-2.14.0-tcltk86.patch | 13 -- |
20 |
media-sound/timidity++/timidity++-2.14.0-r3.ebuild | 202 --------------------- |
21 |
8 files changed, 482 deletions(-) |
22 |
|
23 |
diff --git a/media-sound/timidity++/Manifest b/media-sound/timidity++/Manifest |
24 |
index 6417e3383c2..e6d1475e98f 100644 |
25 |
--- a/media-sound/timidity++/Manifest |
26 |
+++ b/media-sound/timidity++/Manifest |
27 |
@@ -1,2 +1 @@ |
28 |
-DIST TiMidity++-2.14.0.tar.xz 1356476 BLAKE2B 8d4a360d1c16b250f3bef7c010e1e263fdda13446437ff2454dc2c2a717246c4d27836a3b40586b12b33e175bc54ee211a3a1798005733461cf5833eda11811a SHA512 d8fc06fa36e4dd42de80c61943da4cd9aec5f8aaf31057a9ededa633d2d48e64c4e53391378d82a7a46ffe4f96c756b010ea9727270f80b134ae1f8bad535bd3 |
29 |
DIST TiMidity++-2.15.0.tar.xz 1363040 BLAKE2B 63612dc96ddef9b24ca35a8fa24c22fee8b0573efb09543e6017070b2d0a68494bc34afe8ffc50b5f7fe2d95397a971d5dc7afd4c9adbb524b119012e716b7f7 SHA512 36c3c79d941903109d5d6d529963d12e8192a857e80402ad5ab0d1e223451a7cf5dc8fdd046b22ae7da96f413d68db8587a8fce348635838eba2f30f7019192f |
30 |
|
31 |
diff --git a/media-sound/timidity++/files/timidity++-2.14.0-CVE-2017-11546.patch b/media-sound/timidity++/files/timidity++-2.14.0-CVE-2017-11546.patch |
32 |
deleted file mode 100644 |
33 |
index 94135e98b96..00000000000 |
34 |
--- a/media-sound/timidity++/files/timidity++-2.14.0-CVE-2017-11546.patch |
35 |
+++ /dev/null |
36 |
@@ -1,31 +0,0 @@ |
37 |
-From 2386ec2c745f6c5075e53ea051da211336b44b84 Mon Sep 17 00:00:00 2001 |
38 |
-From: Takashi Iwai <tiwai@××××.de> |
39 |
-Date: Tue, 26 Jun 2018 22:31:27 +0200 |
40 |
-Subject: readmidi: Fix division by zero |
41 |
- |
42 |
-References: CVE-2017-11546 |
43 |
- |
44 |
-An adhoc fix for division by zero in insert_note_steps(). |
45 |
- |
46 |
-Signed-off-by: Takashi Iwai <tiwai@××××.de> |
47 |
-bug-debian: https://bugs.debian.org/870338 |
48 |
-bug-suse: https://bugzilla.suse.com/show_bug.cgi?id=1081694 |
49 |
-bug: https://bugzilla.suse.com/show_bug.cgi?id=1081694 |
50 |
-origin: https://bugzilla.suse.com/attachment.cgi?id=760825 |
51 |
---- |
52 |
- timidity/readmidi.c | 2 ++ |
53 |
- 1 file changed, 2 insertions(+) |
54 |
- |
55 |
-diff --git a/timidity/readmidi.c b/timidity/readmidi.c |
56 |
-index 158388a..341777e 100644 |
57 |
---- a/timidity/readmidi.c |
58 |
-+++ b/timidity/readmidi.c |
59 |
-@@ -4585,6 +4585,8 @@ static void insert_note_steps(void) |
60 |
- if (beat != 0) |
61 |
- meas++, beat = 0; |
62 |
- num = timesig[n].a, denom = timesig[n].b, n++; |
63 |
-+ if (!denom) |
64 |
-+ denom = 1; |
65 |
- } |
66 |
- a = (meas + 1) & 0xff; |
67 |
- b = (((meas + 1) >> 8) & 0x0f) + ((beat + 1) << 4); |
68 |
|
69 |
diff --git a/media-sound/timidity++/files/timidity++-2.14.0-CVE-2017-11547.patch b/media-sound/timidity++/files/timidity++-2.14.0-CVE-2017-11547.patch |
70 |
deleted file mode 100644 |
71 |
index 12562a577e0..00000000000 |
72 |
--- a/media-sound/timidity++/files/timidity++-2.14.0-CVE-2017-11547.patch |
73 |
+++ /dev/null |
74 |
@@ -1,67 +0,0 @@ |
75 |
-From 34328d22cbb4ccf03f29223f54f1834c796d86a2 Mon Sep 17 00:00:00 2001 |
76 |
-From: Takashi Iwai <tiwai@××××.de> |
77 |
-Date: Tue, 26 Jun 2018 22:31:28 +0200 |
78 |
-Subject: resample: Fix out-of-bound access in resamplers |
79 |
- |
80 |
-References: CVE-2017-11547 |
81 |
- |
82 |
-An adhoc fix for out-of-bound accesses in resamples. |
83 |
-The offset might overflow the given data range. |
84 |
- |
85 |
-Signed-off-by: Takashi Iwai <tiwai@××××.de> |
86 |
-bug-debian: https://bugs.debian.org/870338 |
87 |
-bug-suse: https://bugzilla.suse.com/show_bug.cgi?id=1081694 |
88 |
-origin: https://bugzilla.suse.com/attachment.cgi?id=760826 |
89 |
---- |
90 |
- timidity/resample.c | 10 ++++++++++ |
91 |
- 1 file changed, 10 insertions(+) |
92 |
- |
93 |
-diff --git a/timidity/resample.c b/timidity/resample.c |
94 |
-index cd6b8e6..4a3fadf 100644 |
95 |
---- a/timidity/resample.c |
96 |
-+++ b/timidity/resample.c |
97 |
-@@ -57,6 +57,8 @@ static resample_t resample_cspline(sample_t *src, splen_t ofs, resample_rec_t *r |
98 |
- { |
99 |
- int32 ofsi, ofsf, v0, v1, v2, v3, temp; |
100 |
- |
101 |
-+ if (ofs + (1 << FRACTION_BITS) >= rec->data_length) |
102 |
-+ return src[ofs >> FRACTION_BITS]; |
103 |
- ofsi = ofs >> FRACTION_BITS; |
104 |
- v1 = src[ofsi]; |
105 |
- v2 = src[ofsi + 1]; |
106 |
-@@ -96,6 +98,8 @@ static resample_t resample_lagrange(sample_t *src, splen_t ofs, resample_rec_t * |
107 |
- { |
108 |
- int32 ofsi, ofsf, v0, v1, v2, v3; |
109 |
- |
110 |
-+ if (ofs + (1 << FRACTION_BITS) >= rec->data_length) |
111 |
-+ return src[ofs >> FRACTION_BITS]; |
112 |
- ofsi = ofs >> FRACTION_BITS; |
113 |
- v1 = (int32)src[ofsi]; |
114 |
- v2 = (int32)src[ofsi + 1]; |
115 |
-@@ -154,6 +158,8 @@ static resample_t resample_gauss(sample_t *src, splen_t ofs, resample_rec_t *rec |
116 |
- sample_t *sptr; |
117 |
- int32 left, right, temp_n; |
118 |
- |
119 |
-+ if (ofs + (1 << FRACTION_BITS) >= rec->data_length) |
120 |
-+ return src[ofs >> FRACTION_BITS]; |
121 |
- left = (ofs>>FRACTION_BITS); |
122 |
- right = (rec->data_length>>FRACTION_BITS) - left - 1; |
123 |
- temp_n = (right<<1)-1; |
124 |
-@@ -261,6 +267,8 @@ static resample_t resample_newton(sample_t *src, splen_t ofs, resample_rec_t *re |
125 |
- int32 left, right, temp_n; |
126 |
- int ii, jj; |
127 |
- |
128 |
-+ if (ofs + (1 << FRACTION_BITS) >= rec->data_length) |
129 |
-+ return src[ofs >> FRACTION_BITS]; |
130 |
- left = (ofs>>FRACTION_BITS); |
131 |
- right = (rec->data_length>>FRACTION_BITS)-(ofs>>FRACTION_BITS)-1; |
132 |
- temp_n = (right<<1)-1; |
133 |
-@@ -330,6 +338,8 @@ static resample_t resample_linear(sample_t *src, splen_t ofs, resample_rec_t *re |
134 |
- { |
135 |
- int32 v1, v2, ofsi; |
136 |
- |
137 |
-+ if (ofs + (1 << FRACTION_BITS) >= rec->data_length) |
138 |
-+ return src[ofs >> FRACTION_BITS]; |
139 |
- ofsi = ofs >> FRACTION_BITS; |
140 |
- v1 = src[ofsi]; |
141 |
- v2 = src[ofsi + 1]; |
142 |
|
143 |
diff --git a/media-sound/timidity++/files/timidity++-2.14.0-gcc5.patch b/media-sound/timidity++/files/timidity++-2.14.0-gcc5.patch |
144 |
deleted file mode 100644 |
145 |
index 50d64e3bcbb..00000000000 |
146 |
--- a/media-sound/timidity++/files/timidity++-2.14.0-gcc5.patch |
147 |
+++ /dev/null |
148 |
@@ -1,31 +0,0 @@ |
149 |
-Upstream commit 6e189f6073e979ceccaf05c3bb5f495a1b9ed87e |
150 |
- |
151 |
-inline, defaults to "extern inline" with newer gcc versions |
152 |
- |
153 |
-With newer versions of gcc, "inline" defaults to extern, and not static if |
154 |
-not specified. This causes linking problems at the end of the compile. Most |
155 |
-of this occurences are fixed (or #ifdef'ed away) except these two small |
156 |
-ones in timidity/mfi.c |
157 |
- |
158 |
-Signed-off-by: Stian Skjelstad <stian.skjelstad@...> |
159 |
- |
160 |
---- a/timidity/mfi.c 2004-02-17 17:02:18.000000000 +0100 |
161 |
-+++ b/timidity/mfi.c 2017-02-14 04:41:24.000000000 +0100 |
162 |
-@@ -344,7 +344,7 @@ |
163 |
- #define SEND_LASTNOTEINFO(lni, ch) if (LASTNOTEINFO_HAS_DATA((lni)[ch])) SendLastNoteInfo(lni, ch); |
164 |
- #define SEND_AND_CLEAR_LASTNOTEINFO(lni, ch) if (LASTNOTEINFO_HAS_DATA((lni)[ch])) { SendLastNoteInfo(lni, ch); (lni)[ch].on = NO_LAST_NOTE_INFO; } |
165 |
- |
166 |
--inline void StoreLastNoteInfo(LastNoteInfo *info, int channel, int time, int duration, int note, int velocity) |
167 |
-+static inline void StoreLastNoteInfo(LastNoteInfo *info, int channel, int time, int duration, int note, int velocity) |
168 |
- { |
169 |
- info[channel].on = time; |
170 |
- info[channel].off = time + duration; |
171 |
-@@ -352,7 +352,7 @@ |
172 |
- info[channel].velocity = velocity; |
173 |
- } |
174 |
- |
175 |
--inline void SendLastNoteInfo(const LastNoteInfo *info, int channel) |
176 |
-+static inline void SendLastNoteInfo(const LastNoteInfo *info, int channel) |
177 |
- { |
178 |
- NOTE_BUF_EV_DEBUGSTR(channel, info[channel].on, note_name[info[channel].note % 12], info[channel].note / 12, info[channel].velocity, info[channel].off); |
179 |
- MIDIEVENT(info[channel].on, ME_NOTEON, channel, info[channel].note, info[channel].velocity); |
180 |
|
181 |
diff --git a/media-sound/timidity++/files/timidity++-2.14.0-pkg-config.patch b/media-sound/timidity++/files/timidity++-2.14.0-pkg-config.patch |
182 |
deleted file mode 100644 |
183 |
index 15d6a4ec43f..00000000000 |
184 |
--- a/media-sound/timidity++/files/timidity++-2.14.0-pkg-config.patch |
185 |
+++ /dev/null |
186 |
@@ -1,109 +0,0 @@ |
187 |
-use $PKG_CONFIG rather than `pkg-config` |
188 |
- |
189 |
-https://bugs.gentoo.org/497362 |
190 |
-get ncurses info via pkg-config while we're at it |
191 |
- |
192 |
-patch by Mike Frysinger <vapier@g.o> |
193 |
- |
194 |
---- a/configure.in |
195 |
-+++ b/configure.in |
196 |
-@@ -148,6 +148,7 @@ AC_SUBST(xawresdir) |
197 |
- |
198 |
- # Checks for programs. |
199 |
- AM_PATH_LISPDIR |
200 |
-+PKG_PROG_PKG_CONFIG |
201 |
- AC_PROG_CC |
202 |
- AC_PROG_GCC_TRADITIONAL |
203 |
- AC_PROG_INSTALL |
204 |
-@@ -1318,8 +1319,8 @@ AC_MSG_CHECKING(enable_audio=jack) |
205 |
- if test "x$au_enable_jack" = xyes; then |
206 |
- AC_MSG_RESULT(yes) |
207 |
- SYSEXTRAS="$SYSEXTRAS jack_a.c" |
208 |
-- EXTRALIBS="$EXTRALIBS $(pkg-config --libs jack)" |
209 |
-- EXTRADEFS="$EXTRADEFS -DAU_JACK $(pkg-config --cflags jack)" |
210 |
-+ EXTRALIBS="$EXTRALIBS $(${PKG_CONFIG} --libs jack)" |
211 |
-+ EXTRADEFS="$EXTRADEFS -DAU_JACK $(${PKG_CONFIG} --cflags jack)" |
212 |
- else |
213 |
- AC_MSG_RESULT(no) |
214 |
- fi |
215 |
-@@ -1635,60 +1636,8 @@ dnl ncurses |
216 |
- AM_CONDITIONAL(ENABLE_NCURSES, false) |
217 |
- CONFIG_INTERFACE(ncurses,NCURSES,n, |
218 |
- AS_HELP_STRING([--enable-ncurses], [Enable ncurses interface (default is no)]), |
219 |
-- [ AC_CHECK_HEADERS(ncurses.h ncurses/curses.h curses.h) |
220 |
-- |
221 |
--dnl #include <ncurses/curses.h> is failure on Plamo Linux 1.3/ncurses 1.9.9e |
222 |
--dnl because <ncurses/curses.h> includes <unctrl.h>: |
223 |
--dnl /usr/include/ncurses/curses.h:34: unctrl.h: No such file or directory |
224 |
--dnl But surely there is unctl.h at /usr/include/ncurses/unctrl.h. |
225 |
--dnl configure must check ncurses header with -I/usr/include/ncurses option. |
226 |
-- |
227 |
-- case "$ac_cv_header_curses_h$ac_cv_header_ncurses_curses_h$ac_cv_header_ncurses_h" in |
228 |
-- *yes*);; |
229 |
-- *) for i in /usr/include /usr/local/include; do |
230 |
-- if test -f "$i/ncurses/curses.h" -a -f "$i/ncurses/unctrl.h"; then |
231 |
-- AC_MSG_WARN(ncurses test is failure. Please check config.h and common.makefile later) |
232 |
-- CPPFLAGS="$CPPFLAGS -I$i/ncurses" |
233 |
-- break |
234 |
-- fi |
235 |
-- done |
236 |
-- ;; |
237 |
-- esac |
238 |
-- |
239 |
-- AC_CHECK_LIB(ncurses,initscr,lib_curses_opt=-lncurses, |
240 |
-- [ dnl checking pdcurses |
241 |
-- AC_CHECK_LIB(curses,PDC_set_ctrl_break, |
242 |
-- [ lib_curses_opt=-lcurses |
243 |
-- AC_DEFINE(USE_PDCURSES,1,Define to 1 if you use PDcurses) |
244 |
-- lib_user32_opt="$lib_user32_test" |
245 |
-- ], |
246 |
-- [ dnl checking libpdcurses |
247 |
-- AC_CHECK_LIB(pdcurses,PDC_set_ctrl_break, |
248 |
-- [ lib_curses_opt=-lpdcurses |
249 |
-- AC_DEFINE(USE_PDCURSES,1,Define to 1 if you use PDcurses) |
250 |
-- lib_user32_opt="$lib_user32_test" |
251 |
-- ], |
252 |
-- [ dnl OpenBSD use -lcurses instead of -lncurses. |
253 |
-- case "$target" in |
254 |
-- *openbsd*) |
255 |
-- AC_CHECK_LIB(curses,initscr,lib_curses_opt=-lcurses, |
256 |
-- [ AC_MSG_WARN(ncurses interface is not enabled) |
257 |
-- enable_ncurses=no ]) |
258 |
-- ;; |
259 |
-- *) |
260 |
-- if test "x$VCPP" = xyes || test "x$BORLANDC" = xyes || test "x$WATCOM_C" = xyes || test "x$DMC" = xyes || test "x$POCC" = xyes; then |
261 |
-- lib_curses_opt=libpdcurses.lib |
262 |
-- AC_DEFINE(USE_PDCURSES,1,Define to 1 if you use PDcurses) |
263 |
-- else |
264 |
-- AC_MSG_WARN(ncurses interface is not enabled) |
265 |
-- enable_ncurses=no |
266 |
-- fi |
267 |
-- ;; |
268 |
-- esac |
269 |
-- ]) |
270 |
-- ], |
271 |
-- $lib_user32_test) |
272 |
-- ]) |
273 |
-+ [ CPPFLAGS="$CPPFLAGS $(${PKG_CONFIG} --cflags ncurses)" |
274 |
-+ lib_curses_opt=$(${PKG_CONFIG} --libs ncurses) |
275 |
- ], |
276 |
- [ LIBS="$LIBS $lib_curses_opt" |
277 |
- case "$target" in |
278 |
-@@ -1855,7 +1804,7 @@ CONFIG_INTERFACE(xaw,XAW,a, |
279 |
- lib_xmu_opt=-lXmu |
280 |
- lib_xt_opt=-lXt |
281 |
- if test "x$enable_xft" = "xyes" && test "x$have_xaw" != "xno"; then |
282 |
-- XFT_CFLAGS="$(pkg-config --cflags xft)"; |
283 |
-+ XFT_CFLAGS="$(${PKG_CONFIG} --cflags xft)"; |
284 |
- EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$XFT_CFLAGS) |
285 |
- lib_xft_opt="-lXft"; |
286 |
- fi |
287 |
-@@ -1909,7 +1858,7 @@ CONFIG_INTERFACE(xaw,XAW,a, |
288 |
- ;; |
289 |
- esac |
290 |
- if test "x$enable_xft" = "xyes" && test "x$have_xaw" != "xno"; then |
291 |
-- XFT_CFLAGS="$(pkg-config --cflags xft)"; |
292 |
-+ XFT_CFLAGS="$(${PKG_CONFIG} --cflags xft)"; |
293 |
- EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$XFT_CFLAGS) |
294 |
- a_so_libs="$a_so_libs -lXft"; |
295 |
- fi |
296 |
|
297 |
diff --git a/media-sound/timidity++/files/timidity++-2.14.0-revert-for-required-ctl_speana_data-function.patch b/media-sound/timidity++/files/timidity++-2.14.0-revert-for-required-ctl_speana_data-function.patch |
298 |
deleted file mode 100644 |
299 |
index 6f901eab8bc..00000000000 |
300 |
--- a/media-sound/timidity++/files/timidity++-2.14.0-revert-for-required-ctl_speana_data-function.patch |
301 |
+++ /dev/null |
302 |
@@ -1,28 +0,0 @@ |
303 |
-This will revert part of the commit from: |
304 |
- |
305 |
-http://timidity.git.sourceforge.net/git/gitweb.cgi?p=timidity/timidity;a=commit;h=e73b53437dbc1e57e61dd4d0c1407784797b08d9 |
306 |
- |
307 |
-Because otherwise TiMidity++ simply won't build as per: |
308 |
- |
309 |
-../interface/libinterface.a(xskin_c.o): In function `ctl_event': |
310 |
-xskin_c.c:(.text+0x17c): undefined reference to `ctl_speana_data' |
311 |
-collect2: error: ld returned 1 exit status |
312 |
- |
313 |
---- a/interface/xskin_c.c |
314 |
-+++ b/interface/xskin_c.c |
315 |
-@@ -228,7 +228,6 @@ |
316 |
- } |
317 |
- } |
318 |
- |
319 |
--#if 0 |
320 |
- static void ctl_speana_data(double *val, int size) { |
321 |
- |
322 |
- /* 0 <= val[n] <= (AMP*NCOLOR) */ |
323 |
-@@ -280,7 +279,6 @@ |
324 |
- |
325 |
- return; |
326 |
- } |
327 |
--#endif |
328 |
- |
329 |
- /*ARGSUSED*/ |
330 |
- static int ctl_open(int using_stdin, int using_stdout) { |
331 |
|
332 |
diff --git a/media-sound/timidity++/files/timidity++-2.14.0-tcltk86.patch b/media-sound/timidity++/files/timidity++-2.14.0-tcltk86.patch |
333 |
deleted file mode 100644 |
334 |
index 23ef62aa03e..00000000000 |
335 |
--- a/media-sound/timidity++/files/timidity++-2.14.0-tcltk86.patch |
336 |
+++ /dev/null |
337 |
@@ -1,13 +0,0 @@ |
338 |
-http://bugs.gentoo.org/451296 |
339 |
- |
340 |
---- a/interface/tk_c.c |
341 |
-+++ b/interface/tk_c.c |
342 |
-@@ -913,7 +913,7 @@ |
343 |
- vsnprintf(buf, sizeof(buf), fmt, ap); |
344 |
- Tcl_Eval(my_interp, buf); |
345 |
- va_end(ap); |
346 |
-- return my_interp->result; |
347 |
-+ return Tcl_GetStringResult(my_interp); |
348 |
- } |
349 |
- |
350 |
- static const char *v_get2(const char *v1, const char *v2) |
351 |
|
352 |
diff --git a/media-sound/timidity++/timidity++-2.14.0-r3.ebuild b/media-sound/timidity++/timidity++-2.14.0-r3.ebuild |
353 |
deleted file mode 100644 |
354 |
index 647057fac1e..00000000000 |
355 |
--- a/media-sound/timidity++/timidity++-2.14.0-r3.ebuild |
356 |
+++ /dev/null |
357 |
@@ -1,202 +0,0 @@ |
358 |
-# Copyright 1999-2020 Gentoo Authors |
359 |
-# Distributed under the terms of the GNU General Public License v2 |
360 |
- |
361 |
-EAPI=6 |
362 |
- |
363 |
-inherit autotools desktop elisp-common systemd toolchain-funcs user xdg-utils |
364 |
- |
365 |
-MY_PV=${PV/_/-} |
366 |
-MY_P=TiMidity++-${MY_PV} |
367 |
-S=${WORKDIR}/${MY_P} |
368 |
- |
369 |
-DESCRIPTION="A handy MIDI to WAV converter with OSS and ALSA output support" |
370 |
-HOMEPAGE="http://timidity.sourceforge.net/" |
371 |
-SRC_URI="mirror://sourceforge/timidity/${MY_P}.tar.xz" |
372 |
- |
373 |
-LICENSE="GPL-2" |
374 |
-SLOT="0" |
375 |
-KEYWORDS="amd64 arm arm64 ~hppa ppc ppc64 sparc x86" |
376 |
-IUSE="alsa ao emacs flac gtk jack motif nas ncurses oss selinux slang speex tk vorbis X" |
377 |
- |
378 |
-REQUIRED_USE="tk? ( X )" |
379 |
- |
380 |
-DEPEND=" |
381 |
- alsa? ( media-libs/alsa-lib ) |
382 |
- ao? ( >=media-libs/libao-0.8.5 ) |
383 |
- emacs? ( >=app-editors/emacs-23.1:* ) |
384 |
- flac? ( media-libs/flac ) |
385 |
- gtk? ( x11-libs/gtk+:2 ) |
386 |
- jack? ( virtual/jack ) |
387 |
- motif? ( >=x11-libs/motif-2.3:0 ) |
388 |
- nas? ( >=media-libs/nas-1.4 ) |
389 |
- ncurses? ( sys-libs/ncurses:0= ) |
390 |
- slang? ( sys-libs/slang ) |
391 |
- speex? ( media-libs/speex ) |
392 |
- tk? ( dev-lang/tk:0= ) |
393 |
- vorbis? ( media-libs/libvorbis ) |
394 |
- X? ( |
395 |
- media-libs/libpng:0= |
396 |
- x11-libs/libXaw |
397 |
- x11-libs/libXext |
398 |
- ) |
399 |
-" |
400 |
-RDEPEND="${DEPEND} |
401 |
- app-eselect/eselect-timidity |
402 |
- alsa? ( media-sound/alsa-utils ) |
403 |
- selinux? ( sec-policy/selinux-timidity ) |
404 |
-" |
405 |
- |
406 |
-PDEPEND="|| ( media-sound/timidity-eawpatches media-sound/timidity-freepats )" |
407 |
- |
408 |
-SITEFILE=50${PN}-gentoo.el |
409 |
- |
410 |
-pkg_setup() { |
411 |
- enewgroup audio 18 # Just make sure it exists |
412 |
- enewuser timidity -1 -1 /var/lib/timidity audio |
413 |
-} |
414 |
- |
415 |
-DOCS=( AUTHORS ChangeLog NEWS README "${FILESDIR}"/timidity.cfg-r1 ) |
416 |
- |
417 |
-PATCHES=( |
418 |
- "${FILESDIR}"/${P}-params.patch |
419 |
- "${FILESDIR}"/${P}-revert-for-required-ctl_speana_data-function.patch |
420 |
- "${FILESDIR}"/${P}-tcltk86.patch |
421 |
- "${FILESDIR}"/${P}-ar.patch |
422 |
- "${FILESDIR}"/${P}-configure-flags.patch |
423 |
- "${FILESDIR}"/${P}-pkg-config.patch |
424 |
- "${FILESDIR}"/${P}-CVE-2017-1154{6,7}.patch |
425 |
- "${FILESDIR}"/${P}-gcc5.patch # bug 606894 |
426 |
-) |
427 |
- |
428 |
-src_prepare() { |
429 |
- default |
430 |
- eautoreconf |
431 |
-} |
432 |
- |
433 |
-src_configure() { |
434 |
- export EXTRACFLAGS="${CFLAGS}" #385817 |
435 |
- |
436 |
- local myconf=() |
437 |
- local audios |
438 |
- |
439 |
- use flac && audios+=",flac" |
440 |
- use speex && audios+=",speex" |
441 |
- use vorbis && audios+=",vorbis" |
442 |
- use oss && audios+=",oss" |
443 |
- use jack && audios+=",jack" |
444 |
- use ao && audios+=",ao" |
445 |
- |
446 |
- if use nas; then |
447 |
- audios+=",nas" |
448 |
- myconf+=( --with-nas-library="/usr/$(get_libdir)/libaudio.so" --with-x ) |
449 |
- use X || ewarn "Basic X11 support will be enabled because required by nas." |
450 |
- fi |
451 |
- |
452 |
- if use alsa; then |
453 |
- audios+=",alsa" |
454 |
- myconf+=( --with-default-output=alsa --enable-alsaseq ) |
455 |
- fi |
456 |
- |
457 |
- # We disable motif by default and then only enable it if it's requested. |
458 |
- if use motif; then |
459 |
- myconf+=( --enable-motif --with-x ) |
460 |
- use X || ewarn "Basic X11 support will be enabled because required by motif." |
461 |
- fi |
462 |
- |
463 |
- econf \ |
464 |
- --localstatedir=/var/state/timidity++ \ |
465 |
- --with-module-dir="${EPREFIX}/usr/share/timidity" \ |
466 |
- --with-lispdir="${SITELISP}/${PN}" \ |
467 |
- --with-elf \ |
468 |
- --enable-audio=${audios} \ |
469 |
- --enable-server \ |
470 |
- --enable-network \ |
471 |
- --enable-dynamic \ |
472 |
- --enable-vt100 \ |
473 |
- --enable-spline=cubic \ |
474 |
- $(use_enable emacs) \ |
475 |
- $(use_enable slang) \ |
476 |
- $(use_enable ncurses) \ |
477 |
- $(use_with X x) \ |
478 |
- $(use_enable X spectrogram) \ |
479 |
- $(use_enable X wrd) \ |
480 |
- $(use_enable X xskin) \ |
481 |
- $(use_enable X xaw) \ |
482 |
- $(use_enable gtk) \ |
483 |
- $(use_enable tk tcltk) \ |
484 |
- --disable-motif \ |
485 |
- "${myconf[@]}" |
486 |
-} |
487 |
- |
488 |
-src_install() { |
489 |
- emake DESTDIR="${D}" install |
490 |
- einstalldocs |
491 |
- |
492 |
- # these are only for the ALSA sequencer mode |
493 |
- if use alsa; then |
494 |
- newconfd "${FILESDIR}"/conf.d.timidity.2 timidity |
495 |
- newinitd "${FILESDIR}"/init.d.timidity.4 timidity |
496 |
- |
497 |
- systemd_dounit "${FILESDIR}"/timidity.service |
498 |
- fi |
499 |
- |
500 |
- insinto /etc |
501 |
- newins "${FILESDIR}"/timidity.cfg-r1 timidity.cfg |
502 |
- |
503 |
- dodir /usr/share/timidity |
504 |
- dosym ../../../etc/timidity.cfg /usr/share/timidity/timidity.cfg |
505 |
- |
506 |
- if use emacs; then |
507 |
- elisp-site-file-install "${FILESDIR}/${SITEFILE}" |
508 |
- fi |
509 |
- |
510 |
- diropts -o timidity -g nobody -m 0700 |
511 |
- keepdir /var/lib/timidity |
512 |
- |
513 |
- doicon "${FILESDIR}"/timidity.xpm |
514 |
- newmenu "${FILESDIR}"/timidity.desktop.2 timidity.desktop |
515 |
- |
516 |
- # Order of preference: gtk, X (Xaw), ncurses, slang |
517 |
- # Do not create menu item for terminal ones |
518 |
- local interface="-id" |
519 |
- local terminal="true" |
520 |
- local nodisplay="true" |
521 |
- if use gtk || use X; then |
522 |
- interface="-ia" |
523 |
- terminal="false" |
524 |
- nodisplay="false" |
525 |
- use gtk && interface="-ig" |
526 |
- elif use ncurses || use slang; then |
527 |
- local interface="-is" |
528 |
- use ncurses && interface="-in" |
529 |
- fi |
530 |
- sed -e "s/Exec=timidity/Exec=timidity ${interface}/" \ |
531 |
- -e "s/Terminal=.*/Terminal=${terminal}/" \ |
532 |
- -e "s/NoDisplay=.*/NoDisplay=${nodisplay}/" \ |
533 |
- -i "${D}"/usr/share/applications/timidity.desktop || die |
534 |
-} |
535 |
- |
536 |
-pkg_postinst() { |
537 |
- use emacs && elisp-site-regen |
538 |
- |
539 |
- elog "A timidity config file has been installed in /etc/timidity.cfg." |
540 |
- elog "Do not edit this file as it will interfere with the eselect timidity tool." |
541 |
- elog "The tool 'eselect timidity' can be used to switch between installed patchsets." |
542 |
- |
543 |
- if use alsa; then |
544 |
- elog "An init script for the alsa timidity sequencer has been installed." |
545 |
- elog "If you wish to use the timidity virtual sequencer, edit /etc/conf.d/timidity" |
546 |
- elog "and run 'rc-update add timidity <runlevel> && /etc/init.d/timidity start'" |
547 |
- fi |
548 |
- |
549 |
- if use sparc; then |
550 |
- elog "Only saving to wave file and ALSA soundback has been tested working." |
551 |
- fi |
552 |
- |
553 |
- xdg_desktop_database_update |
554 |
-} |
555 |
- |
556 |
-pkg_postrm() { |
557 |
- use emacs && elisp-site-regen |
558 |
- xdg_desktop_database_update |
559 |
-} |