summaryrefslogtreecommitdiff
path: root/dev-tcltk/snack
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /dev-tcltk/snack
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'dev-tcltk/snack')
-rw-r--r--dev-tcltk/snack/Manifest3
-rw-r--r--dev-tcltk/snack/files/snack2.2.10-seektell-fix.patch12
-rw-r--r--dev-tcltk/snack/files/tcl-snack-2.2.10-python3.patch385
-rw-r--r--dev-tcltk/snack/snack-2.2.10-r9.ebuild120
4 files changed, 520 insertions, 0 deletions
diff --git a/dev-tcltk/snack/Manifest b/dev-tcltk/snack/Manifest
index 64432f7d096d..7be1e8253ceb 100644
--- a/dev-tcltk/snack/Manifest
+++ b/dev-tcltk/snack/Manifest
@@ -3,6 +3,9 @@ AUX snack-2.2.10-CVE-2012-6303-fix.patch 778 BLAKE2B f6f34248825da751e81f4079d70
AUX snack-2.2.10-darwin.patch 1108 BLAKE2B 862cd6a36363b45c9a27af08fa4bf347fc3e1a8fbbf972b72dfb4faf4cb135365fbe06377a20a2b77e02126e27de723b642067d8ccedb9947b9aa873069152ce SHA512 0d82270d830c8b7d15dcbead05d80c15666d1bac164f26c045859f7f4dc4c098961b48272ecd0b059a1b36ba8d560c563fe8e40add822f311026faf5f7eeaf0a
AUX snack-2.2.10-debian-args.patch 4593 BLAKE2B bebc3c5cab2fea2b3fdc1c1c1e419855e49f2457d2014b2aa0f8236a637489e8b79fdac50d0b3369b576eea9a0bb130d46854c79939e6d93711c520e83001810 SHA512 686218bb22c3c8b53dcb18e10025f1a602c06fe11989a6e46dc02022d581fd281c03d2cca0938c2bad5947f8819e3c631f90f0439a8f274742bef80755dbd20e
AUX snack-2.2.10-test.patch 8755 BLAKE2B 942832c5c80ef1ab338829a21f296f759dd8a055da58b833e80f6f18d1e31f326b8dcfa85e96248afd24c3e9e80be1612a210a16c79630fe57e4a0a8b048f371 SHA512 3ffe1965b033fa77267c67c6222599c9a3fb72012886f3382c2940bb778b606fbe74a80ce6a4e77e26a95b1fb85e191186689eec8bcccfb5f08e059a97dc5a26
+AUX snack2.2.10-seektell-fix.patch 496 BLAKE2B a2e4e782788054c047596bd989241b9ecea3eeb2984c050888aced8289e77f30692386bcc437679bb5cc7a46f1616cbb3f4f64de017c343bcce2241b016d0cd5 SHA512 3e472dc7603426d35b23714435b3a8bfb6d54326eb1eaa54d8b79b4710035b3fed4e1f6a85ebad632950222c5cd55ac917dcb8cf2e87d0baa36124f8a3361fa8
+AUX tcl-snack-2.2.10-python3.patch 12145 BLAKE2B eb33937789e0eab1316fdfcd472b5cf701a4072e498052cb2889e8c9e5a4502f193f386b83c96a2e98efcfca3dfeb389414e1b924b677ef68edfafe0e706048f SHA512 3480d83824e1d7e8250947d6f9d5a38704b302491980b7e8ad46a4d6790e3bdf9588b1d63048a9a5ed081c44b8f6c1dc42e79d3ad543f473b5469c711dc60394
DIST snack2.2.10.tar.gz 1798252 BLAKE2B e27b8e7d6082cdcfc06e7eea5ab832fb78ba104de9e56a69c6c9cd688183f7d4c6bdb974e4d5d2bf5ef2bc5518a913ddf17c90db8d10cef4dbee533307cc7718 SHA512 c17ad332fa4f3ded006b97ceca85cada079e4c7cd933768b289c13dadca1b8803fccaf709ec2def5af4abe92c307f25597ebfa6f94df2d681e40815cd7eccb9b
EBUILD snack-2.2.10-r8.ebuild 2141 BLAKE2B 9bb900a57a9549028459cafaf0973908bc2ddbd93d827c683b2942c38090fe866279ed713f21f328686254dc4f61978503405e3097a292c5f168b13a617c48c5 SHA512 3e557be876334324fb0a610cbe3013c648e4ebae380010460c08129c2e97447c4ae2c8c626033e691800156f7538521f798d5ce4167831f00d64f94f67ae0d04
+EBUILD snack-2.2.10-r9.ebuild 2524 BLAKE2B 7e139f022c52863b2939bb23f9aca9e1fc4789754648575e3a572f7618633268066d27fdaf315566fd14ca499953850df1dcbb8f54a222af6f9de47326086456 SHA512 6971bdc8e7319ce9ec60161e6310f9932eb1a66cfd39c75700b71536b1d342d0490a96f8ca6f662b4417873f5cb7831953ff80afb58edb79a6c04a1b58dc198f
MISC metadata.xml 259 BLAKE2B 174c3c7b4292350e73a38b09d473abba172ee6e82ca1b5bcb6815a9927609a7fbac063a19498e7c5deaa32530d10d8c493760ff5b6e489f821410cfeccadf566 SHA512 5943f2c9dc9a55862bae4c01be9e1f27304ffc1ce48d67341b4a19793c0bb11fe3d1a419af924ac360aeeafbce28018971602019a559a8a6c5939e05e3567639
diff --git a/dev-tcltk/snack/files/snack2.2.10-seektell-fix.patch b/dev-tcltk/snack/files/snack2.2.10-seektell-fix.patch
new file mode 100644
index 000000000000..3519b12c85d0
--- /dev/null
+++ b/dev-tcltk/snack/files/snack2.2.10-seektell-fix.patch
@@ -0,0 +1,12 @@
+diff -up snack2.2.10/generic/jkSound.h.seektell snack2.2.10/generic/jkSound.h
+--- snack2.2.10/generic/jkSound.h.seektell 2019-07-30 16:01:37.310992628 -0400
++++ snack2.2.10/generic/jkSound.h 2019-07-30 16:02:29.859840865 -0400
+@@ -603,7 +603,7 @@ extern void Snack_RemoveOptions(int objc
+
+ extern void SnackPauseAudio();
+
+-#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 4
++#if 1 || TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 4
+ #define TCL_SEEK Tcl_Seek
+ #define TCL_TELL Tcl_Tell
+ #else
diff --git a/dev-tcltk/snack/files/tcl-snack-2.2.10-python3.patch b/dev-tcltk/snack/files/tcl-snack-2.2.10-python3.patch
new file mode 100644
index 000000000000..63c13885b637
--- /dev/null
+++ b/dev-tcltk/snack/files/tcl-snack-2.2.10-python3.patch
@@ -0,0 +1,385 @@
+diff -up snack2.2.10/demos/python/dataCmd.py.py3 snack2.2.10/demos/python/dataCmd.py
+--- snack2.2.10/demos/python/dataCmd.py.py3 2018-10-04 15:46:14.974999306 -0400
++++ snack2.2.10/demos/python/dataCmd.py 2018-10-04 15:46:50.295216897 -0400
+@@ -1,7 +1,12 @@
+ #! /usr/bin/env python
+ # -*- coding: iso-8859-1 -*-
+
+-import Tkinter
++import sys
++if sys.version_info[0] == 2:
++ import Tkinter
++else:
++ import tkinter as Tkinter
++
+ import tkSnack
+
+ root = Tkinter.Tk()
+diff -up snack2.2.10/demos/python/echo.py.py3 snack2.2.10/demos/python/echo.py
+--- snack2.2.10/demos/python/echo.py.py3 2018-10-04 15:46:59.535012224 -0400
++++ snack2.2.10/demos/python/echo.py 2018-10-04 15:47:37.093180236 -0400
+@@ -1,6 +1,11 @@
+ #! /usr/bin/env python
+
+-from Tkinter import *
++import sys
++if sys.version_info[0] == 2:
++ from Tkinter import *
++else:
++ from tkinter import *
++
+ from tkSnack import *
+
+ root = Tkinter.Tk()
+diff -up snack2.2.10/demos/python/generator.py.py3 snack2.2.10/demos/python/generator.py
+--- snack2.2.10/demos/python/generator.py.py3 2018-10-04 15:47:47.332953411 -0400
++++ snack2.2.10/demos/python/generator.py 2018-10-04 15:48:06.435530261 -0400
+@@ -1,6 +1,11 @@
+ #! /usr/bin/env python
+
+-from Tkinter import *
++import sys
++if sys.version_info[0] == 2:
++ from Tkinter import *
++else:
++ from tkinter import *
++
+ from tkSnack import *
+
+ root = Tkinter.Tk()
+diff -up snack2.2.10/demos/python/MinSect.py.py3 snack2.2.10/demos/python/MinSect.py
+--- snack2.2.10/demos/python/MinSect.py.py3 2018-10-04 15:48:16.444308540 -0400
++++ snack2.2.10/demos/python/MinSect.py 2018-10-04 15:48:45.907655882 -0400
+@@ -1,6 +1,11 @@
+ #! /usr/bin/env python
+
+-from Tkinter import *
++import sys
++if sys.version_info[0] == 2:
++ from Tkinter import *
++else:
++ from tkinter import *
++
+ from tkSnack import *
+
+ root = Tkinter.Tk()
+diff -up snack2.2.10/demos/python/MinSpeg.py.py3 snack2.2.10/demos/python/MinSpeg.py
+--- snack2.2.10/demos/python/MinSpeg.py.py3 2018-10-04 15:48:57.586397173 -0400
++++ snack2.2.10/demos/python/MinSpeg.py 2018-10-04 15:49:16.562976809 -0400
+@@ -1,6 +1,11 @@
+ #! /usr/bin/env python
+
+-from Tkinter import *
++import sys
++if sys.version_info[0] == 2:
++ from Tkinter import *
++else:
++ from tkinter import *
++
+ from tkSnack import *
+
+ root = Tkinter.Tk()
+diff -up snack2.2.10/demos/python/MinWave.py.py3 snack2.2.10/demos/python/MinWave.py
+--- snack2.2.10/demos/python/MinWave.py.py3 2018-10-04 15:49:26.578754945 -0400
++++ snack2.2.10/demos/python/MinWave.py 2018-10-04 15:49:39.057478518 -0400
+@@ -1,6 +1,11 @@
+ #! /usr/bin/env python
+
+-from Tkinter import *
++import sys
++if sys.version_info[0] == 2:
++ from Tkinter import *
++else:
++ from tkinter import *
++
+ from tkSnack import *
+
+ root = Tkinter.Tk()
+diff -up snack2.2.10/demos/python/mixplay.py.py3 snack2.2.10/demos/python/mixplay.py
+--- snack2.2.10/demos/python/mixplay.py.py3 2018-10-04 15:49:49.602244931 -0400
++++ snack2.2.10/demos/python/mixplay.py 2018-10-04 15:50:04.440916236 -0400
+@@ -1,6 +1,11 @@
+ #! /usr/bin/env python
+
+-from Tkinter import *
++import sys
++if sys.version_info[0] == 2:
++ from Tkinter import *
++else:
++ from tkinter import *
++
+ from tkSnack import *
+
+ root = Tkinter.Tk()
+diff -up snack2.2.10/demos/python/notescale.py.py3 snack2.2.10/demos/python/notescale.py
+--- snack2.2.10/demos/python/notescale.py.py3 2018-10-04 15:50:13.624712803 -0400
++++ snack2.2.10/demos/python/notescale.py 2018-10-04 15:50:30.640335876 -0400
+@@ -1,6 +1,11 @@
+ #! /usr/bin/env python
+
+-from Tkinter import *
++import sys
++if sys.version_info[0] == 2:
++ from Tkinter import *
++else:
++ from tkinter import *
++
+ from tkSnack import *
+
+ root = Tkinter.Tk()
+diff -up snack2.2.10/demos/python/oggplay.py.py3 snack2.2.10/demos/python/oggplay.py
+--- snack2.2.10/demos/python/oggplay.py.py3 2018-10-04 15:50:40.330121229 -0400
++++ snack2.2.10/demos/python/oggplay.py 2018-10-04 15:51:35.127907369 -0400
+@@ -5,8 +5,13 @@
+ # Note: this script will also play audio files in any other format supported
+ # by tkSnack
+
++from __future__ import print_function
+ import sys
+-from Tkinter import *
++if sys.version_info[0] == 2:
++ from Tkinter import *
++else:
++ from tkinter import *
++
+ from tkSnack import *
+
+ initializeSnack(Tkinter.Tk())
+@@ -19,4 +24,4 @@ if sys.argv[1:]:
+ snd = Sound(file=sys.argv[1])
+ snd.play(blocking=1)
+ else:
+- print "Usage: oggplay.py file.ogg"
++ print("Usage: oggplay.py file.ogg")
+diff -up snack2.2.10/demos/python/playnotes.py.py3 snack2.2.10/demos/python/playnotes.py
+--- snack2.2.10/demos/python/playnotes.py.py3 2018-10-04 15:51:44.431701277 -0400
++++ snack2.2.10/demos/python/playnotes.py 2018-10-04 15:52:01.623320444 -0400
+@@ -1,6 +1,11 @@
+ #! /usr/bin/env python
+
+-from Tkinter import *
++import sys
++if sys.version_info[0] == 2:
++ from Tkinter import *
++else:
++ from tkinter import *
++
+ from tkSnack import *
+
+ root = Tkinter.Tk()
+diff -up snack2.2.10/demos/python/polarspec.py.py3 snack2.2.10/demos/python/polarspec.py
+--- snack2.2.10/demos/python/polarspec.py.py3 2018-10-04 15:52:11.479102123 -0400
++++ snack2.2.10/demos/python/polarspec.py 2018-10-04 15:52:24.654810263 -0400
+@@ -1,6 +1,11 @@
+ #! /usr/bin/env python
+
+-from Tkinter import *
++import sys
++if sys.version_info[0] == 2:
++ from Tkinter import *
++else:
++ from tkinter import *
++
+ from tkSnack import *
+ from math import *
+
+diff -up snack2.2.10/demos/python/spectrogram.py.py3 snack2.2.10/demos/python/spectrogram.py
+--- snack2.2.10/demos/python/spectrogram.py.py3 2018-10-04 15:52:35.462570856 -0400
++++ snack2.2.10/demos/python/spectrogram.py 2018-10-04 15:52:49.101268729 -0400
+@@ -1,6 +1,11 @@
+ #! /usr/bin/env python
+
+-from Tkinter import *
++import sys
++if sys.version_info[0] == 2:
++ from Tkinter import *
++else:
++ from tkinter import *
++
+ from tkSnack import *
+
+ root = Tkinter.Tk()
+diff -up snack2.2.10/demos/python/sphere.py.py3 snack2.2.10/demos/python/sphere.py
+--- snack2.2.10/demos/python/sphere.py.py3 2018-10-04 15:52:57.679078718 -0400
++++ snack2.2.10/demos/python/sphere.py 2018-10-04 15:53:36.557217499 -0400
+@@ -1,6 +1,12 @@
+ #! /usr/bin/env python
+
+-from Tkinter import *
++from __future__ import print_function
++import sys
++if sys.version_info[0] == 2:
++ from Tkinter import *
++else:
++ from tkinter import *
++
+ from tkSnack import *
+
+ root = Tkinter.Tk()
+@@ -15,11 +21,11 @@ snd = Sound()
+
+ file = 'test.sph'
+
+-print 'reading sphere file \'%s\'' % file
++print('reading sphere file \'%s\'' % file)
+ snd.read(file)
+
+-print 'playing file \'%s\'' % file
++print('playing file \'%s\'' % file)
+ snd.play(blocking=1)
+
+-print 'writing wav file \'%s\'' % file
++print('writing wav file \'%s\'' % file)
+ snd.write('new.wav')
+diff -up snack2.2.10/demos/python/tkSnack.py.py3 snack2.2.10/demos/python/tkSnack.py
+--- snack2.2.10/demos/python/tkSnack.py.py3 2018-10-04 15:53:45.815012427 -0400
++++ snack2.2.10/demos/python/tkSnack.py 2018-10-04 15:56:03.873998084 -0400
+@@ -7,8 +7,14 @@ by Kevin Russell and Kare Sjolander
+ last modified: Mar 28, 2003
+ """
+
+-import Tkinter
+-import types
++from __future__ import print_function
++
++import sys
++if sys.version_info[0] == 2:
++ import Tkinter
++else:
++ import tkinter as Tkinter
++
+ import string
+
+ Tkroot = None
+@@ -20,7 +26,8 @@ def initializeSnack(newroot):
+ Tkroot = newroot
+ Tkroot.tk.call('eval', 'package require snack')
+ Tkroot.tk.call('snack::createIcons')
+- Tkroot.tk.call('snack::setUseOldObjAPI')
++ if sys.version_info[0] == 2:
++ Tkroot.tk.call('snack::setUseOldObjAPI')
+ audio = AudioControllerSingleton()
+ mixer = MixerControllerSingleton()
+
+@@ -92,7 +99,7 @@ class TkObject:
+ self.tk.call(self.name, 'configure')):
+ cnf[x[0][1:]] = (x[0][1:],) + x[1:]
+ return cnf
+- if type(cnf) is types.StringType:
++ if isinstance(cnf, str):
+ x = self.tk.split(self.tk.call(self.name, 'configure', '-'+cnf))
+ return (x[0][1:],) + x[1:]
+ self.tk.call((self.name, 'configure') + self._options(cnf))
+@@ -124,8 +131,7 @@ class Sound (TkObject):
+ if Tkroot:
+ master = Tkroot
+ else:
+- raise RuntimeError, \
+- 'Tk not intialized or not registered with Snack'
++ raise RuntimeError('Tk not intialized or not registered with Snack')
+ self.tk = master.tk
+ if not name:
+ self.name = self.tk.call(('sound',) + self._options(kw))
+@@ -409,8 +415,7 @@ class Filter(TkObject):
+ if Tkroot:
+ master = Tkroot
+ else:
+- raise RuntimeError, \
+- 'Tk not intialized or not registered with Snack'
++ raise RuntimeError('Tk not intialized or not registered with Snack'
+ self.tk = master.tk
+ self.name = self.tk.call(('snack::filter', name) + args +
+ self._options(kw))
+@@ -537,7 +542,7 @@ class SoundFrame(Tkinter.Frame):
+ self.sound.record()
+
+ def info(self):
+- print self.sound.info()
++ print(self.sound.info())
+
+ def createSpectrogram(canvas, *args, **kw):
+ """Draws a spectrogram of a sound on canvas."""
+diff -up snack2.2.10/demos/python/widget.py.py3 snack2.2.10/demos/python/widget.py
+--- snack2.2.10/demos/python/widget.py.py3 2018-10-04 15:56:11.263837964 -0400
++++ snack2.2.10/demos/python/widget.py 2018-10-04 15:56:28.360467507 -0400
+@@ -1,6 +1,11 @@
+ #! /usr/bin/env python
+
+-from Tkinter import *
++import sys
++if sys.version_info[0] == 2:
++ from Tkinter import *
++else:
++ from tkinter import *
++
+ from tkSnack import *
+
+ root = Tkinter.Tk()
+diff -up snack2.2.10/python/tkSnack.py.py3 snack2.2.10/python/tkSnack.py
+--- snack2.2.10/python/tkSnack.py.py3 2018-10-04 15:56:37.537268660 -0400
++++ snack2.2.10/python/tkSnack.py 2018-10-04 15:58:47.358455670 -0400
+@@ -7,8 +7,14 @@ by Kevin Russell and Kare Sjolander
+ last modified: Mar 28, 2003
+ """
+
+-import Tkinter
+-import types
++from __future__ import print_function
++
++import sys
++if sys.version_info[0] == 2:
++ import Tkinter
++else:
++ import tkinter as Tkinter
++
+ import string
+
+ Tkroot = None
+@@ -20,7 +26,8 @@ def initializeSnack(newroot):
+ Tkroot = newroot
+ Tkroot.tk.call('eval', 'package require snack')
+ Tkroot.tk.call('snack::createIcons')
+- Tkroot.tk.call('snack::setUseOldObjAPI')
++ if sys.version_info[0] == 2:
++ Tkroot.tk.call('snack::setUseOldObjAPI')
+ audio = AudioControllerSingleton()
+ mixer = MixerControllerSingleton()
+
+@@ -92,7 +99,7 @@ class TkObject:
+ self.tk.call(self.name, 'configure')):
+ cnf[x[0][1:]] = (x[0][1:],) + x[1:]
+ return cnf
+- if type(cnf) is types.StringType:
++ if isinstance(cnf, str):
+ x = self.tk.split(self.tk.call(self.name, 'configure', '-'+cnf))
+ return (x[0][1:],) + x[1:]
+ self.tk.call((self.name, 'configure') + self._options(cnf))
+@@ -124,8 +131,7 @@ class Sound (TkObject):
+ if Tkroot:
+ master = Tkroot
+ else:
+- raise RuntimeError, \
+- 'Tk not intialized or not registered with Snack'
++ raise RuntimeError('Tk not intialized or not registered with Snack')
+ self.tk = master.tk
+ if not name:
+ self.name = self.tk.call(('sound',) + self._options(kw))
+@@ -409,8 +415,7 @@ class Filter(TkObject):
+ if Tkroot:
+ master = Tkroot
+ else:
+- raise RuntimeError, \
+- 'Tk not intialized or not registered with Snack'
++ raise RuntimeError('Tk not intialized or not registered with Snack')
+ self.tk = master.tk
+ self.name = self.tk.call(('snack::filter', name) + args +
+ self._options(kw))
+@@ -537,7 +542,7 @@ class SoundFrame(Tkinter.Frame):
+ self.sound.record()
+
+ def info(self):
+- print self.sound.info()
++ print(self.sound.info())
+
+ def createSpectrogram(canvas, *args, **kw):
+ """Draws a spectrogram of a sound on canvas."""
diff --git a/dev-tcltk/snack/snack-2.2.10-r9.ebuild b/dev-tcltk/snack/snack-2.2.10-r9.ebuild
new file mode 100644
index 000000000000..7bdbc9d8be2d
--- /dev/null
+++ b/dev-tcltk/snack/snack-2.2.10-r9.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_7} )
+DISTUTILS_USE_SETUPTOOLS=no
+DISTUTILS_OPTIONAL=yes
+
+inherit autotools distutils-r1 multilib toolchain-funcs virtualx
+
+DESCRIPTION="The Snack Sound Toolkit (Tcl)"
+HOMEPAGE="http://www.speech.kth.se/snack/"
+SRC_URI="http://www.speech.kth.se/snack/dist/${PN}${PV}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+SLOT="0"
+IUSE="alsa examples python vorbis"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ dev-lang/tcl:0=
+ dev-lang/tk:0=
+ alsa? ( media-libs/alsa-lib )
+ python? ( ${PYTHON_DEPS} )
+ vorbis? ( media-libs/libvorbis )"
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+S="${WORKDIR}/${PN}${PV}/unix"
+
+PATCHES=(
+ "${FILESDIR}"/alsa-undef-sym.patch
+ "${FILESDIR}"/${P}-CVE-2012-6303-fix.patch
+ "${FILESDIR}"/${P}-debian-args.patch
+ "${FILESDIR}"/${P}-test.patch
+ "${FILESDIR}"/${PN}${PV}-seektell-fix.patch
+ "${FILESDIR}"/tcl-${P}-python3.patch
+)
+
+HTML_DOCS="${WORKDIR}/${PN}${PV}/doc/*"
+
+src_prepare() {
+ # adds -install_name (soname on Darwin)
+ [[ ${CHOST} == *-darwin* ]] && PATCHES+=( "${FILESDIR}"/${P}-darwin.patch )
+
+ sed \
+ -e "s:ar cr:$(tc-getAR) cr:g" \
+ -e "s|-O|${CFLAGS}|g" \
+ -i Makefile.in || die
+
+ cd ..
+
+ default
+
+ sed \
+ -e 's|^\(#define roundf(.*\)|//\1|' \
+ -i generic/jkFormatMP3.c || die
+ rm tests/{play,record}.test || die
+ if use python; then
+ cd python
+ distutils-r1_src_prepare
+ fi
+}
+
+src_configure() {
+ local myconf=""
+
+ use alsa && myconf+=" --enable-alsa"
+
+ if use vorbis; then
+ myconf+=" --with-ogg-include="${EPREFIX}"/usr/include"
+ myconf+=" --with-ogg-lib="${EPREFIX}"/usr/$(get_libdir)"
+ fi
+
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --includedir="${EPREFIX}"/usr/include \
+ --with-tcl="${EPREFIX}"/usr/$(get_libdir) \
+ --with-tk="${EPREFIX}"/usr/$(get_libdir) \
+ $myconf
+ if use python; then
+ cd ../python
+ distutils-r1_src_configure
+ fi
+}
+
+src_compile() {
+ default
+ if use python; then
+ cd ../python
+ distutils-r1_src_compile
+ fi
+}
+
+src_test() {
+ TCLLIBPATH=${S} virtx default | tee snack.testResult
+ grep -q FAILED snack.testResult && die
+}
+
+src_install() {
+ default
+
+ if use python ; then
+ cd "${S}"/../python || die
+ distutils-r1_src_install
+ fi
+
+ cd "${S}"/.. || die
+
+ if use examples ; then
+ docinto examples
+ sed -i -e 's/wish[0-9.]+/wish/g' demos/tcl/* || die
+ dodoc -r demos/tcl
+
+ use python && dodoc -r demos/python
+ fi
+}