public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/
@ 2018-12-02 21:05 Alfredo Tupone
  0 siblings, 0 replies; 8+ messages in thread
From: Alfredo Tupone @ 2018-12-02 21:05 UTC (permalink / raw
  To: gentoo-commits

commit:     d2e5f66588d1af0d0c6624bfb724cb8551268523
Author:     Tupone Alfredo <tupone <AT> gentoo <DOT> org>
AuthorDate: Sun Dec  2 21:05:34 2018 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sun Dec  2 21:05:34 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2e5f665

dev-tcltk/snack: Stabilize and fix tests

Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 .../snack/files/snack-2.2.10-debian-args.patch     | 154 +++++++++++++++++++++
 dev-tcltk/snack/files/snack-2.2.10-test.patch      |  22 +++
 dev-tcltk/snack/snack-2.2.10-r8.ebuild             | 100 +++++++++++++
 3 files changed, 276 insertions(+)

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 00000000000..1f306d61266
--- /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 00000000000..724ccd686fc
--- /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 267
 1.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 26
 71.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 00000000000..773eb22926a
--- /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
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/
@ 2020-08-12  8:43 Alfredo Tupone
  0 siblings, 0 replies; 8+ messages in thread
From: Alfredo Tupone @ 2020-08-12  8:43 UTC (permalink / raw
  To: gentoo-commits

commit:     e5ff96840edfa24dd7df366162cdf3673c529ab3
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 12 08:42:59 2020 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Wed Aug 12 08:42:59 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5ff9684

dev-tcltk/snack: EAPI 7 and fixes

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 .../snack/files/snack2.2.10-seektell-fix.patch     |  12 +++
 dev-tcltk/snack/snack-2.2.10-r9.ebuild             | 119 +++++++++++++++++++++
 2 files changed, 131 insertions(+)

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 00000000000..3519b12c85d
--- /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/snack-2.2.10-r9.ebuild b/dev-tcltk/snack/snack-2.2.10-r9.ebuild
new file mode 100644
index 00000000000..8349e89b3bc
--- /dev/null
+++ b/dev-tcltk/snack/snack-2.2.10-r9.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_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
+)
+
+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
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/
@ 2020-08-12 11:41 Alfredo Tupone
  0 siblings, 0 replies; 8+ messages in thread
From: Alfredo Tupone @ 2020-08-12 11:41 UTC (permalink / raw
  To: gentoo-commits

commit:     69bdf3174f7747beaf0ad8578553be1cbee2abb8
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 12 11:40:42 2020 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Wed Aug 12 11:40:42 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69bdf317

dev-tcltk/snack: porting to python3_7

Closes: https://bugs.gentoo.org/735304
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 .../snack/files/tcl-snack-2.2.10-python3.patch     | 385 +++++++++++++++++++++
 dev-tcltk/snack/snack-2.2.10-r9.ebuild             |   3 +-
 2 files changed, 387 insertions(+), 1 deletion(-)

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 00000000000..63c13885b63
--- /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
index 8349e89b3bc..7bdbc9d8be2 100644
--- a/dev-tcltk/snack/snack-2.2.10-r9.ebuild
+++ b/dev-tcltk/snack/snack-2.2.10-r9.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python2_7 )
+PYTHON_COMPAT=( python{2_7,3_7} )
 DISTUTILS_USE_SETUPTOOLS=no
 DISTUTILS_OPTIONAL=yes
 
@@ -37,6 +37,7 @@ PATCHES=(
 	"${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/*"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/
@ 2022-07-18  6:34 Alfredo Tupone
  0 siblings, 0 replies; 8+ messages in thread
From: Alfredo Tupone @ 2022-07-18  6:34 UTC (permalink / raw
  To: gentoo-commits

commit:     f3945e03f09a91f63c9a4068457580d1195a5841
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 18 06:34:01 2022 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Mon Jul 18 06:34:01 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3945e03

dev-tcltk/snack: fix type mismatch

Closes: https://bugs.gentoo.org/858263
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-tcltk/snack/files/snack-2.2.10-lto.patch | 28 ++++++++++++++++++++++++++++
 dev-tcltk/snack/snack-2.2.10-r9.ebuild       |  1 +
 2 files changed, 29 insertions(+)

diff --git a/dev-tcltk/snack/files/snack-2.2.10-lto.patch b/dev-tcltk/snack/files/snack-2.2.10-lto.patch
new file mode 100644
index 000000000000..27c6b6c9126f
--- /dev/null
+++ b/dev-tcltk/snack/files/snack-2.2.10-lto.patch
@@ -0,0 +1,28 @@
+--- a/generic/sound.c	2022-07-18 08:21:20.492977432 +0200
++++ b/generic/sound.c	2022-07-18 08:21:44.720698702 +0200
+@@ -120,9 +120,9 @@
+ int littleEndian = 0;
+ 
+ #ifdef __cplusplus
+-extern "C" SnackStubs *snackStubs;
++extern "C" SnackStubs snackStubs;
+ #else
+-extern SnackStubs *snackStubs;
++extern SnackStubs snackStubs;
+ #endif
+ 
+ extern Tcl_HashTable *filterHashTable;
+--- a/generic/snack.c	2022-07-18 08:21:29.953868734 +0200
++++ b/generic/snack.c	2022-07-18 08:22:05.978453035 +0200
+@@ -203,9 +203,9 @@
+ int littleEndian = 0;
+ 
+ #ifdef __cplusplus
+-extern "C" SnackStubs *snackStubs;
++extern "C" SnackStubs snackStubs;
+ #else
+-extern SnackStubs *snackStubs;
++extern SnackStubs snackStubs;
+ #endif
+ 
+ extern Tcl_HashTable *filterHashTable;

diff --git a/dev-tcltk/snack/snack-2.2.10-r9.ebuild b/dev-tcltk/snack/snack-2.2.10-r9.ebuild
index 4466b95ddb31..d95bd49e31da 100644
--- a/dev-tcltk/snack/snack-2.2.10-r9.ebuild
+++ b/dev-tcltk/snack/snack-2.2.10-r9.ebuild
@@ -37,6 +37,7 @@ PATCHES=(
 	"${FILESDIR}"/${P}-test.patch
 	"${FILESDIR}"/${PN}${PV}-seektell-fix.patch
 	"${FILESDIR}"/tcl-${P}-python3.patch
+	"${FILESDIR}"/${P}-lto.patch
 )
 
 HTML_DOCS="${WORKDIR}/${PN}${PV}/doc/*"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/
@ 2022-11-23  0:48 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-11-23  0:48 UTC (permalink / raw
  To: gentoo-commits

commit:     f28a75cf5d8f637bfa798c72c64eaa964909cc28
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 23 00:13:14 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov 23 00:29:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f28a75cf

dev-tcltk/snack: fix configure w/ clang 16

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-tcltk/snack/files/snack-2.2.10-configure-clang16.patch   | 12 ++++++++++++
 .../{snack-2.2.10-r9.ebuild => snack-2.2.10-r10.ebuild}      |  6 +++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/dev-tcltk/snack/files/snack-2.2.10-configure-clang16.patch b/dev-tcltk/snack/files/snack-2.2.10-configure-clang16.patch
new file mode 100644
index 000000000000..e038bf570abf
--- /dev/null
+++ b/dev-tcltk/snack/files/snack-2.2.10-configure-clang16.patch
@@ -0,0 +1,12 @@
+Issue in autoconf which is already fixed upstream but we can't autoreconf,
+it seems.
+--- a/unix/configure
++++ b/unix/configure
+@@ -2928,6 +2928,7 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <ctype.h>
++#include <stdlib.h>
+ #if ((' ' & 0x0FF) == 0x020)
+ # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+ # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))

diff --git a/dev-tcltk/snack/snack-2.2.10-r9.ebuild b/dev-tcltk/snack/snack-2.2.10-r10.ebuild
similarity index 93%
rename from dev-tcltk/snack/snack-2.2.10-r9.ebuild
rename to dev-tcltk/snack/snack-2.2.10-r10.ebuild
index d95bd49e31da..4bed77e60cd6 100644
--- a/dev-tcltk/snack/snack-2.2.10-r9.ebuild
+++ b/dev-tcltk/snack/snack-2.2.10-r10.ebuild
@@ -6,7 +6,7 @@ EAPI=7
 PYTHON_COMPAT=( python3_{7,8,9,10} )
 DISTUTILS_OPTIONAL=yes
 
-inherit distutils-r1 toolchain-funcs virtualx
+inherit distutils-r1 flag-o-matic toolchain-funcs virtualx
 
 DESCRIPTION="The Snack Sound Toolkit (Tcl)"
 HOMEPAGE="http://www.speech.kth.se/snack/"
@@ -38,6 +38,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}${PV}-seektell-fix.patch
 	"${FILESDIR}"/tcl-${P}-python3.patch
 	"${FILESDIR}"/${P}-lto.patch
+	"${FILESDIR}"/${P}-configure-clang16.patch
 )
 
 HTML_DOCS="${WORKDIR}/${PN}${PV}/doc/*"
@@ -66,6 +67,9 @@ src_prepare() {
 }
 
 src_configure() {
+	# For Clang 16, bunch of -Wimplicit-int, etc
+	append-flags -std=gnu89
+
 	local myconf=""
 
 	use alsa && myconf+=" --enable-alsa"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/
@ 2023-01-16  7:31 Alfredo Tupone
  0 siblings, 0 replies; 8+ messages in thread
From: Alfredo Tupone @ 2023-01-16  7:31 UTC (permalink / raw
  To: gentoo-commits

commit:     8b9ad99d5952087da5f262c4e20f236749b33f0d
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 16 07:30:58 2023 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Mon Jan 16 07:31:37 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b9ad99d

dev-tcltk/snack: fix implicit warnings

Closes: https://bugs.gentoo.org/884413
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-tcltk/snack/files/snack-2.2.10-implicit.patch | 92 +++++++++++++++++++++++
 dev-tcltk/snack/snack-2.2.10-r11.ebuild           |  1 +
 2 files changed, 93 insertions(+)

diff --git a/dev-tcltk/snack/files/snack-2.2.10-implicit.patch b/dev-tcltk/snack/files/snack-2.2.10-implicit.patch
new file mode 100644
index 000000000000..965b1af0dbe2
--- /dev/null
+++ b/dev-tcltk/snack/files/snack-2.2.10-implicit.patch
@@ -0,0 +1,92 @@
+--- a/generic/sigproc2.c	2023-01-16 08:03:06.605091947 +0100
++++ b/generic/sigproc2.c	2023-01-16 08:11:03.641089339 +0100
+@@ -465,9 +465,7 @@
+ }
+ 
+ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+-int get_window(dout, n, type)
+-     register double *dout;
+-     register int n;
++int get_window(register double *dout, register int n, int type)
+ {
+   static short *din = NULL;
+   static int n0 = 0;
+@@ -506,9 +504,7 @@
+ }
+ 
+ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+-int get_float_window(fout, n, type)
+-     register float *fout;
+-     register int n;
++int get_float_window(register float *fout, register int n, int type)
+ {
+   static int n0 = 0;
+   static double *dout = NULL;
+@@ -533,10 +529,7 @@
+ }
+ 
+ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+-int fwindow(din, dout, n, preemp, type)
+-     register short *din;
+-     register float *dout, preemp;
+-     register int n;
++int fwindow(register short *din, register float *dout, register int n, register float preemp, int type)
+ {
+   static float *fwind=NULL;
+   static int size=0, otype= (-100);
+@@ -572,10 +565,7 @@
+   
+ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+ /* same as fwindow() but input is float */
+-int fwindow_f(din, dout, n, preemp, type)
+-     register float *din;
+-     register float *dout, preemp;
+-     register int n;
++int fwindow_f(register float *din, register float *dout, register int n, register float preemp, int type)
+ {
+   static float *fwind=NULL;
+   static int size=0, otype= (-100);
+@@ -611,10 +601,7 @@
+   
+ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+ /* same as fwindow() but I/O is double */
+-int fwindow_d(din, dout, n, preemp, type)
+-     register double *din;
+-     register double *dout, preemp;
+-     register int n;
++int fwindow_d(register double *din, register double *dout, register int n, register double preemp, int type)
+ {
+   static float *fwind=NULL;
+   static int size=0, otype= (-100);
+@@ -651,10 +638,7 @@
+ 
+ 
+ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+-void w_window(din, dout, n, preemp, type)
+-     register short *din;
+-     register double *dout, preemp;
+-     register int n;
++void w_window(register short *din, register double *dout, register int n, register double preemp, int type)
+ {
+   switch(type) {
+   case 0:
+--- a/generic/jkCanvSpeg.c	2023-01-16 08:25:51.880415841 +0100
++++ b/generic/jkCanvSpeg.c	2023-01-16 08:26:43.667561725 +0100
+@@ -92,7 +92,7 @@
+ 			 Tk_Window tkwin, CONST84 char *value, char *recordPtr,
+ 			 int offset);
+ 
+-static char *PrintColorMap(ClientData clientData, Tk_Window tkwin,
++static const char *PrintColorMap(ClientData clientData, Tk_Window tkwin,
+ 			   char *recordPtr, int offset,
+ 			   Tcl_FreeProc **freeProcPtr);
+ 
+@@ -1797,7 +1797,7 @@
+   return TCL_OK;
+ }
+ 
+-static char*
++static const char*
+ PrintColorMap(ClientData clientData, Tk_Window tkwin, char *recordPtr,
+ 	      int offset, Tcl_FreeProc **freeProcPtr)
+ {

diff --git a/dev-tcltk/snack/snack-2.2.10-r11.ebuild b/dev-tcltk/snack/snack-2.2.10-r11.ebuild
index ee85a588fdfc..6d62f7387c2b 100644
--- a/dev-tcltk/snack/snack-2.2.10-r11.ebuild
+++ b/dev-tcltk/snack/snack-2.2.10-r11.ebuild
@@ -44,6 +44,7 @@ PATCHES=(
 	"${FILESDIR}"/tcl-${P}-python3.patch
 	"${FILESDIR}"/${P}-lto.patch
 	"${FILESDIR}"/${P}-configure-clang16.patch
+	"${FILESDIR}"/${P}-implicit.patch
 )
 
 HTML_DOCS="${WORKDIR}/${PN}${PV}/doc/*"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/
@ 2023-01-16  7:46 Alfredo Tupone
  0 siblings, 0 replies; 8+ messages in thread
From: Alfredo Tupone @ 2023-01-16  7:46 UTC (permalink / raw
  To: gentoo-commits

commit:     a6fc08c0bf07d08f2ee66b45ee0a2cd58d266e1f
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 16 07:43:06 2023 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Mon Jan 16 07:46:15 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6fc08c0

dev-tcltk/snack: fix parallelMake

Closes: https://bugs.gentoo.org/884611
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 .../snack/files/snack-2.2.10-parallelMake.patch      | 20 ++++++++++++++++++++
 dev-tcltk/snack/snack-2.2.10-r11.ebuild              |  1 +
 2 files changed, 21 insertions(+)

diff --git a/dev-tcltk/snack/files/snack-2.2.10-parallelMake.patch b/dev-tcltk/snack/files/snack-2.2.10-parallelMake.patch
new file mode 100644
index 000000000000..53e79c0f1eff
--- /dev/null
+++ b/dev-tcltk/snack/files/snack-2.2.10-parallelMake.patch
@@ -0,0 +1,20 @@
+--- a/unix/Makefile.in	2023-01-16 08:39:23.021056229 +0100
++++ b/unix/Makefile.in	2023-01-16 08:40:31.485926112 +0100
+@@ -290,7 +290,7 @@
+ SphereFile.o: $(GENERIC_DIR)/SphereFile.c
+ 	$(CC) -c $(CFLAGS) -DUSE_SNACK_STUBS $(GENERIC_DIR)/SphereFile.c
+ 
+-libsnacksphere${SHLIB_SUFFIX}: ${OBJNIST}
++libsnacksphere${SHLIB_SUFFIX}: ${OBJNIST} stublib
+ 	${SHLIB_LD} ${OBJNIST} ${LIBNIST} -o libsnacksphere${SHLIB_SUFFIX}
+ 
+ LIBOGG = @OGGLIBS@ -lc @TCL_LIB_SPEC@ -L. @SNACK_STUB_LIB_FLAG@
+@@ -299,7 +299,7 @@
+ SnackOgg.o: $(GENERIC_DIR)/SnackOgg.c
+ 	$(CC) @OGGINC@ -c $(CFLAGS) -DUSE_SNACK_STUBS $(GENERIC_DIR)/SnackOgg.c
+ 
+-libsnackogg${SHLIB_SUFFIX}: ${OBJOGG}
++libsnackogg${SHLIB_SUFFIX}: ${OBJOGG} stublib
+ 	${SHLIB_LD} ${OBJOGG} ${LIBOGG} -o libsnackogg${SHLIB_SUFFIX}
+ 
+ install:

diff --git a/dev-tcltk/snack/snack-2.2.10-r11.ebuild b/dev-tcltk/snack/snack-2.2.10-r11.ebuild
index 6d62f7387c2b..86a34a7ced5e 100644
--- a/dev-tcltk/snack/snack-2.2.10-r11.ebuild
+++ b/dev-tcltk/snack/snack-2.2.10-r11.ebuild
@@ -45,6 +45,7 @@ PATCHES=(
 	"${FILESDIR}"/${P}-lto.patch
 	"${FILESDIR}"/${P}-configure-clang16.patch
 	"${FILESDIR}"/${P}-implicit.patch
+	"${FILESDIR}"/${P}-parallelMake.patch
 )
 
 HTML_DOCS="${WORKDIR}/${PN}${PV}/doc/*"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/
@ 2024-04-20 14:37 Alfredo Tupone
  0 siblings, 0 replies; 8+ messages in thread
From: Alfredo Tupone @ 2024-04-20 14:37 UTC (permalink / raw
  To: gentoo-commits

commit:     535f35b4369f28eb4f043297fc50c71e05bb9330
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 20 14:27:37 2024 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sat Apr 20 14:37:39 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=535f35b4

dev-tcltk/snack: PythonCompatUpdate

Closes: https://bugs.gentoo.org/929524
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-tcltk/snack/files/snack-2.2.10-py3.8.patch                | 11 +++++++++++
 dev-tcltk/snack/snack-2.2.10-r11.ebuild                       |  8 ++++----
 .../{snack-2.2.10-r12.ebuild => snack-2.2.10-r13.ebuild}      | 11 ++++++-----
 3 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/dev-tcltk/snack/files/snack-2.2.10-py3.8.patch b/dev-tcltk/snack/files/snack-2.2.10-py3.8.patch
new file mode 100644
index 000000000000..ec42b50eac88
--- /dev/null
+++ b/dev-tcltk/snack/files/snack-2.2.10-py3.8.patch
@@ -0,0 +1,11 @@
+--- a/python/tkSnack.py	2024-04-20 16:01:28.403396211 +0200
++++ b/python/tkSnack.py	2024-04-20 16:01:55.094084757 +0200
+@@ -267,7 +267,7 @@
+         
+     def pitch(self, method=None, **kw):
+         """Returns a list of pitch values."""
+-        if method is None or method is "amdf" or method is "AMDF":
++        if method is None or method == "amdf" or method == "AMDF":
+             result = self.tk.call((self.name, 'pitch') + self._options(kw))
+             return self._getdoubles(result)
+         else:

diff --git a/dev-tcltk/snack/snack-2.2.10-r11.ebuild b/dev-tcltk/snack/snack-2.2.10-r11.ebuild
index 86a34a7ced5e..1c38016a77ef 100644
--- a/dev-tcltk/snack/snack-2.2.10-r11.ebuild
+++ b/dev-tcltk/snack/snack-2.2.10-r11.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -13,9 +13,11 @@ 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"
 
+S="${WORKDIR}/${PN}${PV}/unix"
+
 LICENSE="GPL-2"
-KEYWORDS="amd64 ~hppa ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
 SLOT="0"
+KEYWORDS="amd64 ~hppa ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
 IUSE="alsa examples python vorbis"
 RESTRICT="!test? ( test )"
 
@@ -33,8 +35,6 @@ BDEPEND="python? (
 
 REQUIRED_USE=${PYTHON_REQUIRED_USE}
 
-S="${WORKDIR}/${PN}${PV}/unix"
-
 PATCHES=(
 	"${FILESDIR}"/alsa-undef-sym.patch
 	"${FILESDIR}"/${P}-CVE-2012-6303-fix.patch

diff --git a/dev-tcltk/snack/snack-2.2.10-r12.ebuild b/dev-tcltk/snack/snack-2.2.10-r13.ebuild
similarity index 96%
rename from dev-tcltk/snack/snack-2.2.10-r12.ebuild
rename to dev-tcltk/snack/snack-2.2.10-r13.ebuild
index f99820784cc1..2e42ff833080 100644
--- a/dev-tcltk/snack/snack-2.2.10-r12.ebuild
+++ b/dev-tcltk/snack/snack-2.2.10-r13.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{9..12} )
 DISTUTILS_USE_PEP517=setuptools
 DISTUTILS_OPTIONAL=yes
 
@@ -13,10 +13,12 @@ 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"
 
+S="${WORKDIR}/${PN}${PV}/unix"
 LICENSE="GPL-2"
-KEYWORDS="amd64 ~arm64 ~hppa ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
 SLOT="0"
+KEYWORDS="amd64 ~arm64 ~hppa ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
 IUSE="alsa examples python vorbis"
+
 RESTRICT="!test? ( test )"
 
 DEPEND="
@@ -33,8 +35,6 @@ BDEPEND="python? (
 
 REQUIRED_USE=${PYTHON_REQUIRED_USE}
 
-S="${WORKDIR}/${PN}${PV}/unix"
-
 PATCHES=(
 	"${FILESDIR}"/alsa-undef-sym.patch
 	"${FILESDIR}"/${P}-CVE-2012-6303-fix.patch
@@ -46,6 +46,7 @@ PATCHES=(
 	"${FILESDIR}"/${P}-configure-clang16.patch
 	"${FILESDIR}"/${P}-implicit.patch
 	"${FILESDIR}"/${P}-parallelMake.patch
+	"${FILESDIR}"/${P}-py3.8.patch
 )
 
 HTML_DOCS="${WORKDIR}/${PN}${PV}/doc/*"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-20 14:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-23  0:48 [gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2024-04-20 14:37 Alfredo Tupone
2023-01-16  7:46 Alfredo Tupone
2023-01-16  7:31 Alfredo Tupone
2022-07-18  6:34 Alfredo Tupone
2020-08-12 11:41 Alfredo Tupone
2020-08-12  8:43 Alfredo Tupone
2018-12-02 21:05 Alfredo Tupone

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox