[gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/

2024-04-20 Thread Alfredo Tupone
commit: 535f35b4369f28eb4f043297fc50c71e05bb9330
Author: Alfredo Tupone  gentoo  org>
AuthorDate: Sat Apr 20 14:27:37 2024 +
Commit: Alfredo Tupone  gentoo  org>
CommitDate: Sat Apr 20 14:37:39 2024 +
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  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 ..ec42b50eac88
--- /dev/null
+++ b/dev-tcltk/snack/files/snack-2.2.10-py3.8.patch
@@ -0,0 +1,11 @@
+--- a/python/tkSnack.py2024-04-20 16:01:28.403396211 +0200
 b/python/tkSnack.py2024-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/*"



[gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/

2023-01-15 Thread Alfredo Tupone
commit: a6fc08c0bf07d08f2ee66b45ee0a2cd58d266e1f
Author: Alfredo Tupone  gentoo  org>
AuthorDate: Mon Jan 16 07:43:06 2023 +
Commit: Alfredo Tupone  gentoo  org>
CommitDate: Mon Jan 16 07:46:15 2023 +
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  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 ..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/*"



[gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/

2023-01-15 Thread Alfredo Tupone
commit: 8b9ad99d5952087da5f262c4e20f236749b33f0d
Author: Alfredo Tupone  gentoo  org>
AuthorDate: Mon Jan 16 07:30:58 2023 +
Commit: Alfredo Tupone  gentoo  org>
CommitDate: Mon Jan 16 07:31:37 2023 +
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  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 ..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/*"



[gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/

2022-11-22 Thread Sam James
commit: f28a75cf5d8f637bfa798c72c64eaa964909cc28
Author: Sam James  gentoo  org>
AuthorDate: Wed Nov 23 00:13:14 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Nov 23 00:29:08 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f28a75cf

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

Signed-off-by: Sam James  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 ..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 
++#include 
+ #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"



[gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/

2022-07-18 Thread Alfredo Tupone
commit: f3945e03f09a91f63c9a4068457580d1195a5841
Author: Alfredo Tupone  gentoo  org>
AuthorDate: Mon Jul 18 06:34:01 2022 +
Commit: Alfredo Tupone  gentoo  org>
CommitDate: Mon Jul 18 06:34:01 2022 +
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  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 ..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/*"



[gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/

2020-08-12 Thread Alfredo Tupone
commit: 69bdf3174f7747beaf0ad8578553be1cbee2abb8
Author: Alfredo Tupone  gentoo  org>
AuthorDate: Wed Aug 12 11:40:42 2020 +
Commit: Alfredo Tupone  gentoo  org>
CommitDate: Wed Aug 12 11:40:42 2020 +
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  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 000..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.py32018-10-04 15:46:14.974999306 
-0400
 snack2.2.10/demos/python/dataCmd.py2018-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.py32018-10-04 15:48:16.444308540 
-0400
 snack2.2.10/demos/python/MinSect.py2018-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.py32018-10-04 15:48:57.586397173 
-0400
 snack2.2.10/demos/python/MinSpeg.py2018-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.py32018-10-04 15:49:26.578754945 
-0400
 snack2.2.10/demos/python/MinWave.py2018-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.py32018-10-04 15:49:49.602244931 
-0400
 snack2.2.10/demos/python/mixplay.py2018-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.py32018-10-04 15:50:40.330121229 
-0400

[gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/

2020-08-12 Thread Alfredo Tupone
commit: e5ff96840edfa24dd7df366162cdf3673c529ab3
Author: Alfredo Tupone  gentoo  org>
AuthorDate: Wed Aug 12 08:42:59 2020 +
Commit: Alfredo Tupone  gentoo  org>
CommitDate: Wed Aug 12 08:42:59 2020 +
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  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 000..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 000..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
+}



[gentoo-commits] repo/gentoo:master commit in: dev-tcltk/snack/files/, dev-tcltk/snack/

2018-12-02 Thread Alfredo Tupone
commit: d2e5f66588d1af0d0c6624bfb724cb8551268523
Author: Tupone Alfredo  gentoo  org>
AuthorDate: Sun Dec  2 21:05:34 2018 +
Commit: Alfredo Tupone  gentoo  org>
CommitDate: Sun Dec  2 21:05:34 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2e5f665

dev-tcltk/snack: Stabilize and fix tests

Signed-off-by: Alfredo Tupone  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 000..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], );
+   
+   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], );
+   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, ) != 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, ) != 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, ) != 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