summaryrefslogtreecommitdiff
path: root/dev-tcltk/snack
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
commitde49812990871e1705b64051c35161d5e6400269 (patch)
tree5e1e8fcb0ff4579dbd22a1bfee28a6b97dc8aaeb /dev-tcltk/snack
parent536c3711867ec947c1738f2c4b96f22e4863322d (diff)
gentoo resync : 24.12.2018
Diffstat (limited to 'dev-tcltk/snack')
-rw-r--r--dev-tcltk/snack/Manifest3
-rw-r--r--dev-tcltk/snack/files/snack-2.2.10-debian-args.patch154
-rw-r--r--dev-tcltk/snack/files/snack-2.2.10-test.patch22
-rw-r--r--dev-tcltk/snack/snack-2.2.10-r8.ebuild100
4 files changed, 279 insertions, 0 deletions
diff --git a/dev-tcltk/snack/Manifest b/dev-tcltk/snack/Manifest
index f024d6b34417..4ede58505f8c 100644
--- a/dev-tcltk/snack/Manifest
+++ b/dev-tcltk/snack/Manifest
@@ -1,7 +1,10 @@
AUX alsa-undef-sym.patch 1230 BLAKE2B 9551a46a1852a8503898d74927cd0b83c2508cb06db5292b557e99a1ad6873d749bf23e69d164ee54bdc68f4b4d60adf7f2bfd425d7bbc40f57e8e98d090131e SHA512 d730d6dbf721eeb46333f52824272cdecc48d975d5ef7eb21f7ba18ab2458dff72e33b3eb2dad489e65d651ddabfb478d4457d60affe172bc2433257863f37a0
AUX snack-2.2.10-CVE-2012-6303-fix.patch 778 BLAKE2B f6f34248825da751e81f4079d70fa7dec4dcbc5e63931aee58ad1f021e0a47f0bfdc7a52e69693bf32bae618a49f5c35c757694dd14984ebc79cd62acce2bda7 SHA512 6e2f7fcf8ca0c2792cf52432340f2319b8c82677a3568c9e382f91758f5e6bf26c3a05939d4a748c4198c4e50f27141ebd2cb298d8363765ed6582192d64d3e8
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 6924 BLAKE2B c161141a85f9e8f0b28f4f90f069f45bef9719998fc28832d7afe3504a2d6234d80c010dbd62931b8ff4420fbc03e8a43ead4a91a7e5b1045db52c7ea23de5c8 SHA512 e3af62714d3e35426a7187c3807281a943c16f492abc8166c3a2053b5f4f738584eac469d4271d30cafe8742d05032aaf01464c7821ce0dacb567a9e53ccadd5
DIST snack2.2.10.tar.gz 1798252 BLAKE2B e27b8e7d6082cdcfc06e7eea5ab832fb78ba104de9e56a69c6c9cd688183f7d4c6bdb974e4d5d2bf5ef2bc5518a913ddf17c90db8d10cef4dbee533307cc7718 SHA512 c17ad332fa4f3ded006b97ceca85cada079e4c7cd933768b289c13dadca1b8803fccaf709ec2def5af4abe92c307f25597ebfa6f94df2d681e40815cd7eccb9b
EBUILD snack-2.2.10-r6.ebuild 2012 BLAKE2B db70db5649537e2a4fb3d4484eafd6366e016b384415ec40330c4ff345c934c8554fdd34a91734c074d37096401ae883ad8d359deeeb6fb465950c16157cb0bf SHA512 30849b4e77e6177d41d32004ad1026ef44a57d654d25e583ebe6e7a16a08d0224ea3a79e0df62c7238b19b3d92fb1ab51325404e7f1e5e324208e3ccbeb13d62
EBUILD snack-2.2.10-r7.ebuild 1940 BLAKE2B e6e88ef6cba18d2b1de2cee927c48208a612e2929e47cfe4d4b3d5256984653acc5ebcac712084f3046d540aff81301ce2c4adcf0253a20f4f4d59472a1c37af SHA512 32339642f2f30d41df5f0f381cba807d80f63a6e1d10870c70865ddd11e653422109cdcdd5927cf0c703b314d7499ab578dcd012e528a102fc328d65f9050231
+EBUILD snack-2.2.10-r8.ebuild 2074 BLAKE2B 80c23d7432125fcf1841a7e3dfd484b519666fcaed23f36ab7f251fb2e74414bdeb320bb7f660630b49b3aaa904d3921e26e05d39b22647f4937edf9374b2ffc SHA512 96603fbf7c9d41c75d6846732fffcbaa2d62dd351e7444fad2938f979392cb445e089f2f35c5ded56b780e409cc9955165e7c8e24cac20051ef15915b1c28d69
MISC metadata.xml 259 BLAKE2B 174c3c7b4292350e73a38b09d473abba172ee6e82ca1b5bcb6815a9927609a7fbac063a19498e7c5deaa32530d10d8c493760ff5b6e489f821410cfeccadf566 SHA512 5943f2c9dc9a55862bae4c01be9e1f27304ffc1ce48d67341b4a19793c0bb11fe3d1a419af924ac360aeeafbce28018971602019a559a8a6c5939e05e3567639
diff --git a/dev-tcltk/snack/files/snack-2.2.10-debian-args.patch b/dev-tcltk/snack/files/snack-2.2.10-debian-args.patch
new file mode 100644
index 000000000000..1f306d612669
--- /dev/null
+++ b/dev-tcltk/snack/files/snack-2.2.10-debian-args.patch
@@ -0,0 +1,154 @@
+Patch by Sergei Golovan fixes several cases of access beyond array boundaries.
+
+--- a/generic/jkFilterIIR.c
++++ b/generic/jkFilterIIR.c
+@@ -125,6 +125,12 @@
+ return TCL_ERROR;
+ }
+
++ if (arg + 1 == objc) {
++ Tcl_AppendResult(interp, "No argument given for ",
++ optionStrings[index], " option", (char *) NULL);
++ return TCL_ERROR;
++ }
++
+ switch ((enum options) index) {
+ /* size of triangular dithering on output */
+ case DITHER:
+--- a/generic/jkPitchCmd.c
++++ b/generic/jkPitchCmd.c
+@@ -850,7 +850,7 @@
+
+ for (arg = 2; arg < objc; arg += 2) {
+ char *opt = Tcl_GetStringFromObj(objv[arg], NULL);
+- char *val = Tcl_GetStringFromObj(objv[arg+1], NULL);
++ char *val = (arg + 1 == objc) ? "" : Tcl_GetStringFromObj(objv[arg+1], NULL);
+
+ if ((strcmp("-method", opt) == 0) && (strcasecmp("esps", val) == 0)) {
+ Get_f0(s, interp, objc, objv);
+--- a/generic/jkSoundEdit.c
++++ b/generic/jkSoundEdit.c
+@@ -291,6 +291,12 @@
+ string = Tcl_GetStringFromObj(objv[arg], &len);
+
+ if (strncmp(string, "-units", len) == 0) {
++ if (arg + 1 == objc) {
++ Tcl_AppendResult(interp, "No argument given for ",
++ string, " option", (char *) NULL);
++ return TCL_ERROR;
++ }
++
+ string = Tcl_GetStringFromObj(objv[arg+1], &len);
+ if (strncasecmp(string, "seconds", len) == 0) type = 1;
+ if (strncasecmp(string, "samples", len) == 0) type = 0;
+@@ -1152,6 +1158,12 @@
+ return TCL_ERROR;
+ }
+
++ if (arg + 1 == objc) {
++ Tcl_AppendResult(interp, "No argument given for ",
++ subOptionStrings[index], " option", (char *) NULL);
++ return TCL_ERROR;
++ }
++
+ switch ((enum subOptions) index) {
+ case RATE:
+ case FREQUENCY:
+--- a/generic/shape.c
++++ b/generic/shape.c
+@@ -103,6 +103,12 @@
+ "option", 0, &index) != TCL_OK) {
+ return TCL_ERROR;
+ }
++ if (arg + 1 == objc) {
++ Tcl_AppendResult(interp, "No argument given for ",
++ subOptionStrings[index], " option", (char *) NULL);
++ return TCL_ERROR;
++ }
++
+ switch ((enum subOptions) index) {
+ case START:
+ {
+@@ -155,6 +161,12 @@
+ "option", 0, &index) != TCL_OK) {
+ return TCL_ERROR;
+ }
++ if (arg + 1 == objc) {
++ Tcl_AppendResult(interp, "No argument given for ",
++ subOptionStrings[index], " option", (char *) NULL);
++ return TCL_ERROR;
++ }
++
+ switch ((enum subOptions) index) {
+ case START:
+ {
+@@ -384,6 +396,12 @@
+ "option", 0, &index) != TCL_OK) {
+ return TCL_ERROR;
+ }
++ if (arg + 1 == objc) {
++ Tcl_AppendResult(interp, "No argument given for ",
++ subOptionStrings[index], " option", (char *) NULL);
++ return TCL_ERROR;
++ }
++
+ switch ((enum subOptions) index) {
+ case START:
+ {
+--- /dev/null
++++ b/tests/zargs.test
+@@ -0,0 +1,54 @@
++# Tests cover lack of command arguments
++
++package require -exact snack 2.2
++
++if {[lsearch [namespace children] ::tcltest] == -1} {
++ package require tcltest
++ namespace import ::tcltest::*
++}
++
++test zargs-1.1 {pitch command, with missing argument for -start option} {
++ set s [snack::sound snd -load ex1.wav]
++ catch {$s pitch -start} msg
++ $s destroy
++ set msg
++} {No argument given for -start option}
++
++test zargs-1.2 {length command, with missing argument for -units option} {
++ set s [snack::sound snd -load ex1.wav]
++ catch {$s length 10 10 -units} msg
++ $s destroy
++ set msg
++} {No argument given for -units option}
++
++test zargs-1.3 {convert command, with missing argument for -rate option} {
++ set s [snack::sound snd -load ex1.wav]
++ catch {$s convert -rate 1 -rate} msg
++ $s destroy
++ set msg
++} {No argument given for -rate option}
++
++test zargs-1.4 {iir filter, with missing argument for -denominator option} {
++ set s [snack::sound snd -load ex1.wav]
++ catch {snack::filter iir -denominator} msg
++ $s destroy
++ set msg
++} {No argument given for -denominator option}
++
++test zargs-1.5 {shape command, with missing argument for -start option} {
++ set s [snack::sound snd -load ex1.wav]
++ catch {$s shape -start 0 -start} msg
++ $s destroy
++ set msg
++} {No argument given for -start option}
++
++test zargs-1.6 {datasamples command, with missing argument for -start option} {
++ set s [snack::sound snd -load ex1.wav]
++ catch {$s datasamples -start 0 -start} msg
++ $s destroy
++ set msg
++} {No argument given for -start option}
++
++# cleanup
++::tcltest::cleanupTests
++return
diff --git a/dev-tcltk/snack/files/snack-2.2.10-test.patch b/dev-tcltk/snack/files/snack-2.2.10-test.patch
new file mode 100644
index 000000000000..724ccd686fc7
--- /dev/null
+++ b/dev-tcltk/snack/files/snack-2.2.10-test.patch
@@ -0,0 +1,22 @@
+--- a/tests/pitch.test 2018-12-02 21:56:08.315195566 +0100
++++ b/tests/pitch.test 2018-12-02 21:54:19.853964344 +0100
+@@ -28,7 +28,7 @@
+ set res [$s pitch -method ESPS]
+ $s destroy
+ set res
+-} {{0.0 0.0 0.0 0.7046} {0.0 0.0 773.75 0.65552} {0.0 0.0 818.19 0.24061} {0.0 0.0 813.11 0.56787} {0.0 0.0 808.38 0.51307} {0.0 0.0 826.19 0.49327} {0.0 0.0 856.39 0.9469} {0.0 0.0 851.94 0.0} {0.0 0.0 869.07 0.48861} {0.0 0.0 842.5 0.39768} {0.0 0.0 839.18 0.4009} {0.0 0.0 820.35 0.81465} {0.0 0.0 833.41 0.95806} {0.0 0.0 855.43 0.89539} {0.0 0.0 853.1 0.28335} {0.0 0.0 889.35 0.59169} {0.0 0.0 1070.4 0.68884} {0.0 0.0 878.07 0.5143} {0.0 0.0 893.05 0.3997} {0.0 0.0 873.35 0.68623} {0.0 0.0 965.28 0.57252} {0.0 0.0 882.13 0.49351} {0.0 0.0 1196.0 0.70511} {209.81 1.0 3310.1 0.88756} {162.78 1.0 3659.8 0.99115} {161.92 1.0 3512.8 0.99646} {158.92 1.0 3547.8 0.99354} {155.91 1.0 3468.3 0.98505} {149.48 1.0 3284.6 0.99364} {143.31 1.0 3007.4 0.98736} {133.77 1.0 2823.2 0.94805} {126.48 1.0 2640.0 0.98759} {119.94 1.0 2332.5 0.9852} {112.98 1.0 2040.0 0.95218} {109.81 1.0 2122.5 0.9571} {107.68 1.0 2418.8 0.92161} {106.6 1.0 2507.1 0.95998} {105.57 1.0 2478.7 0.95695} {105.43 1.0 2671.9 0.96458} {106.74 1.0 2706.4 0.98918} {109.0 1.0 2755.5 0.99448} {111.84 1.0 2716.9 0.97564} {115.73 1.0 2274.5 0.87201} {99.183 1.0 920.17 0.60726} {120.34 1.0 860.54 0.84981} {150.88 1.0 2140.9 0.93803} {136.25 1.0 2838.7 0.98336} {141.73 1.0 2877.0 0.99704} {145.06 1.0 2894.6 0.98906} {146.54 1.0 2748.1 0.98797} {149.82 1.0 2700.2 0.94096} {149.23 1.0 2838.5 0.98879} {146.53 1.0 2629.4 0.95378} {141.86 1.0 2179.6 0.97326} {133.37 1.0 1887.6 0.85003} {124.99 1.0 1659.4 0.94212} {117.97 1.0 1442.7 0.96375} {109.74 1.0 1090.7 0.96917} {103.63 1.0 915.58 0.92499} {111.49 1.0 852.97 0.69573} {107.37 1.0 786.45 0.86455} {93.37 1.0 815.31 0.81332} {123.3 1.0 804.19 0.61468} {84.033 1.0 762.64 0.74945} {121.1 1.0 725.97 0.5574} {114.08 1.0 700.18 0.82347} {101.78 1.0 704.91 0.57994} {103.43 1.0 695.82 0.75774} {101.42 1.0 699.76 0.79472} {105.86 1.0 714.6 0.70127} {0.0 0.0 745.64 0.828} {0.0 0.0 736.29 0.64289} {0.0 0.0 696.31 0.40449} {0.0 0.0 684.55 0.44551} {0.0 0.0 639.39 0.38997} {0.0 0.0 561.58 0.0} {0.0 0.0 628.03 0.34976} {0.0 0.0 717.81 0.38937} {0.0 0.0 748.32 0.41932} {0.0 0.0 750.33 0.86962} {0.0 0.0 783.32 0.82826} {0.0 0.0 761.07 0.20038} {0.0 0.0 809.66 0.35076} {0.0 0.0 831.98 0.7714} {0.0 0.0 872.36 0.67117} {0.0 0.0 826.35 0.6413} {0.0 0.0 717.04 0.0} {0.0 0.0 723.39 0.54415} {0.0 0.0 751.84 0.33728} {0.0 0.0 818.29 0.31209} {0.0 0.0 837.27 0.4341} {0.0 0.0 849.58 0.3289} {0.0 0.0 862.31 0.28854} {0.0 0.0 845.67 0.68362} {0.0 0.0 868.24 0.74526}}
++} {{0.0 0.0 0.0 0.7046} {0.0 0.0 773.7 0.65552} {0.0 0.0 818.08 0.24061} {0.0 0.0 813.13 0.56787} {0.0 0.0 808.39 0.51307} {0.0 0.0 826.01 0.49327} {0.0 0.0 856.56 0.9469} {0.0 0.0 851.72 0.0} {0.0 0.0 869.15 0.48861} {0.0 0.0 842.57 0.39768} {0.0 0.0 839.14 0.4009} {0.0 0.0 820.39 0.81465} {0.0 0.0 833.47 0.95806} {0.0 0.0 855.33 0.89539} {0.0 0.0 852.97 0.28335} {0.0 0.0 889.07 0.59169} {0.0 0.0 1070.5 0.68884} {0.0 0.0 878.41 0.5143} {0.0 0.0 892.74 0.3997} {0.0 0.0 873.53 0.68623} {0.0 0.0 965.13 0.57252} {0.0 0.0 882.69 0.49351} {0.0 0.0 1193.0 0.70511} {209.81 1.0 3304.3 0.88756} {162.78 1.0 3660.9 0.99115} {161.92 1.0 3512.7 0.99646} {158.92 1.0 3547.9 0.99354} {155.91 1.0 3468.7 0.98505} {149.48 1.0 3285.3 0.99364} {143.31 1.0 3008.2 0.98736} {133.77 1.0 2823.7 0.94805} {126.48 1.0 2640.8 0.98759} {119.94 1.0 2333.7 0.9852} {112.98 1.0 2040.5 0.95218} {109.81 1.0 2121.6 0.9571} {107.68 1.0 2418.1 0.92161} {106.6 1.0 2507.3 0.95998} {105.57 1.0 2478.0 0.95695} {105.43 1.0 2671.9 0.96458} {106.74 1.0 2706.6 0.98918} {109.0 1.0 2755.4 0.99448} {111.84 1.0 2717.5 0.97564} {115.73 1.0 2277.5 0.87201} {99.183 1.0 924.36 0.60726} {120.34 1.0 859.79 0.84981} {150.88 1.0 2136.3 0.93803} {136.25 1.0 2838.1 0.98336} {141.73 1.0 2877.0 0.99704} {145.06 1.0 2894.6 0.98906} {146.54 1.0 2749.1 0.98797} {149.82 1.0 2699.5 0.94096} {149.23 1.0 2838.4 0.98879} {146.53 1.0 2630.6 0.95378} {141.86 1.0 2181.0 0.97326} {133.37 1.0 1888.3 0.85003} {124.99 1.0 1660.0 0.94212} {117.97 1.0 1443.6 0.96375} {109.74 1.0 1091.7 0.96917} {103.63 1.0 915.75 0.92499} {111.49 1.0 853.13 0.69573} {107.37 1.0 786.42 0.86455} {93.37 1.0 815.44 0.81332} {123.3 1.0 804.05 0.61468} {84.033 1.0 762.98 0.74945} {121.1 1.0 725.91 0.5574} {114.08 1.0 700.22 0.82347} {101.78 1.0 704.95 0.57994} {103.43 1.0 695.87 0.75774} {101.42 1.0 699.81 0.79472} {105.86 1.0 714.47 0.70127} {0.0 0.0 745.7 0.828} {0.0 0.0 736.31 0.64289} {0.0 0.0 696.35 0.40449} {0.0 0.0 684.65 0.44551} {0.0 0.0 639.58 0.38997} {0.0 0.0 561.77 0.0} {0.0 0.0 627.65 0.34976} {0.0 0.0 717.62 0.38937} {0.0 0.0 748.27 0.41932} {0.0 0.0 750.33 0.86962} {0.0 0.0 783.3 0.82826} {0.0 0.0 761.05 0.20038} {0.0 0.0 809.51 0.35076} {0.0 0.0 831.97 0.7714} {0.0 0.0 872.22 0.67117} {0.0 0.0 826.62 0.6413} {0.0 0.0 717.3 0.0} {0.0 0.0 723.3 0.54415} {0.0 0.0 751.75 0.33728} {0.0 0.0 818.03 0.31209} {0.0 0.0 837.29 0.4341} {0.0 0.0 849.53 0.3289} {0.0 0.0 862.33 0.28854} {0.0 0.0 845.65 0.68362} {0.0 0.0 868.25 0.74526}}
+
+ test pitch-2.1 {pitch command, with missing argument for -start option} {
+ set s [snack::sound snd -load ex1.wav]
+--- a/tests/power.test 2018-12-02 21:58:19.319057755 +0100
++++ b/tests/power.test 2018-12-02 21:56:48.303543173 +0100
+@@ -14,7 +14,7 @@
+ set res [$s power]
+ $s destroy
+ set res
+-} {57.668 58.916 57.992 58.647 58.462 58.415 58.353 58.948 58.897 59.02 58.761 58.745 58.248 58.595 59.158 58.846 58.467 61.37 59.153 59.315 58.301 60.035 59.451 58.963 71.281 71.387 71.13 71.213 71.01 70.635 69.845 68.822 68.986 68.525 67.103 66.664 67.365 67.627 66.72 67.337 67.657 68.365 68.854 68.204 58.26 58.141 66.927 69.789 69.122 69.601 69.076 68.909 69.337 68.621 67.11 65.266 64.678 64.223 61.751 60.287 59.447 57.811 58.444 58.209 57.645 57.279 56.377 56.572 56.467 56.796 57.045 57.735 57.858 57.081 56.943 56.421 54.929 56.202 57.349 57.643 57.477 58.207 57.706 58.385 58.601 59.228 58.694 57.176 57.423 57.733 58.599 58.614 58.771 59.005 58.651 59.077 59.001 58.113 58.374}
++} {57.668 58.916 57.992 58.647 58.463 58.415 58.353 58.948 58.897 59.02 58.761 58.745 58.248 58.595 59.158 58.846 58.467 61.37 59.153 59.315 58.301 60.035 59.451 58.963 71.281 71.387 71.13 71.213 71.01 70.635 69.845 68.822 68.986 68.525 67.103 66.664 67.365 67.627 66.72 67.337 67.657 68.365 68.854 68.204 58.26 58.141 66.927 69.789 69.122 69.601 69.076 68.909 69.337 68.621 67.11 65.266 64.678 64.223 61.751 60.287 59.447 57.811 58.444 58.209 57.645 57.279 56.377 56.572 56.467 56.796 57.045 57.735 57.858 57.081 56.943 56.421 54.929 56.202 57.349 57.643 57.477 58.207 57.706 58.385 58.601 59.228 58.694 57.176 57.423 57.733 58.599 58.614 58.771 59.005 58.651 59.077 59.001 58.113 58.374}
+
+ test power-1.2 {power command} {
+ set s [snack::sound snd -load ex1.wav]
diff --git a/dev-tcltk/snack/snack-2.2.10-r8.ebuild b/dev-tcltk/snack/snack-2.2.10-r8.ebuild
new file mode 100644
index 000000000000..773eb22926a0
--- /dev/null
+++ b/dev-tcltk/snack/snack-2.2.10-r8.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 pypy )
+
+inherit autotools distutils-r1 multilib 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="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+SLOT="0"
+IUSE="alsa examples python vorbis"
+
+DEPEND="
+ dev-lang/tcl:0=
+ dev-lang/tk:0=
+ alsa? ( media-libs/alsa-lib )
+ python? ( ${PYTHON_DEPS} )
+ vorbis? ( media-libs/libvorbis )"
+RDEPEND="${DEPEND}"
+
+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
+)
+
+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
+}
+
+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
+}
+
+src_compile() {
+ default
+}
+
+src_test() {
+ TCLLIBPATH=${S} virtx default | grep FAILED && 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
+}