rpms/tcl-snack/F-8 snack2.2.10-extracflags.patch, NONE, 1.1 snack2.2.10-nomp3.patch, NONE, 1.1 snack2.2.10-shared-stubs.patch, NONE, 1.1 tcl-snack.spec, NONE, 1.1 sources, 1.1, 1.2

Tom Callaway spot at fedoraproject.org
Sat Sep 13 01:19:21 UTC 2008


Author: spot

Update of /cvs/pkgs/rpms/tcl-snack/F-8
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20645/F-8

Modified Files:
	sources 
Added Files:
	snack2.2.10-extracflags.patch snack2.2.10-nomp3.patch 
	snack2.2.10-shared-stubs.patch tcl-snack.spec 
Log Message:
initial branching

snack2.2.10-extracflags.patch:

--- NEW FILE snack2.2.10-extracflags.patch ---
diff -up snack2.2.10/unix/Makefile.in.BAD snack2.2.10/unix/Makefile.in
--- snack2.2.10/unix/Makefile.in.BAD	2008-06-11 15:26:32.000000000 -0400
+++ snack2.2.10/unix/Makefile.in	2008-06-11 15:26:55.000000000 -0400
@@ -31,7 +31,9 @@ CC        = @CC@
 
 INCLUDES  = ${XINCLUDES} @TCL_INCLUDE_SPEC@ -I${TCL_INCPATH} -I${TK_INCPATH} @AINC@ @NISTINC@
 
-CFLAGS    = -O @CFLAGS@ @AFLAG@ ${INCLUDES} @TCLAPI@ -I${GENERIC_DIR} @DEFS@
+EXTRACFLAGS =
+
+CFLAGS    = -O @CFLAGS@ @AFLAG@ ${INCLUDES} ${EXTRACFLAGS} @TCLAPI@ -I${GENERIC_DIR} @DEFS@
 
 LIBSO     = -lc @ALIB@ @TCL_LIB_SPEC@
 

snack2.2.10-nomp3.patch:

--- NEW FILE snack2.2.10-nomp3.patch ---
diff -up snack2.2.10/doc/python-man.html.BAD snack2.2.10/doc/python-man.html
--- snack2.2.10/doc/python-man.html.BAD	2008-06-11 15:12:44.000000000 -0400
+++ snack2.2.10/doc/python-man.html	2008-06-11 15:13:47.000000000 -0400
@@ -158,7 +158,7 @@ than or equal to 1, or <tt>"Mono"</tt> o
 be read -- not all of them can be <emph>written</emph>.)</dd>
   <ul type="">
  <li> "WAV"</li>
-  <li> "MP3"</li>
+  <li> "MP3" (MP3 support is disabled in Fedora releases)</li>
   <li> "AU"</li>
   <li> "SND"</li>
   <li> "AIFF"</li>
@@ -381,7 +381,7 @@ operation</td>
   
 <h4> read (<i>filename</i>)</h4>
  Reads new sound data from a file. Current supported file formats are WAV, 
-MP3, AU, SND, AIFF, SD, SMP, CSL, and RAW binary. The command returns the 
+MP3 (disabled in Fedora), AU, SND, AIFF, SD, SMP, CSL, and RAW binary. The command returns the 
 file format detected. It is possible to force a file to be read as RAW using
 by setting the option <b>fileformat=RAW</b>. In this case, properties of
 the sound data can be specified by hand, using the <b>rate, channels, encoding,
diff -up snack2.2.10/generic/jkSound.h.BAD snack2.2.10/generic/jkSound.h
--- snack2.2.10/generic/jkSound.h.BAD	2008-06-11 15:15:03.000000000 -0400
+++ snack2.2.10/generic/jkSound.h	2008-06-11 15:15:44.000000000 -0400
@@ -413,6 +413,9 @@ extern int swapCmd(Sound *s, Tcl_Interp 
 #define MP3_STRING "MP3"
 #define CSL_STRING "CSL"
 
+/* 
+ * MP3 code is disabled due to patents.
+ *
 extern char *GuessMP3File(char *buf, int len);
 
 extern int GetMP3Header(Sound *s, Tcl_Interp *interp, Tcl_Channel ch,
@@ -434,6 +437,8 @@ extern void FreeMP3Header(Sound *s);
 
 extern int ConfigMP3Header(Sound *s, Tcl_Interp *interp, int objc,
 			   Tcl_Obj *CONST objv[]);
+ */
+
 
 typedef enum {
   SNACK_WIN_HAMMING,
diff -up snack2.2.10/unix/Makefile.in.BAD snack2.2.10/unix/Makefile.in
--- snack2.2.10/unix/Makefile.in.BAD	2008-06-11 15:09:59.000000000 -0400
+++ snack2.2.10/unix/Makefile.in	2008-06-11 15:10:14.000000000 -0400
@@ -43,13 +43,13 @@ SHLIB_SUFFIX = @SHLIB_SUFFIX@
 all: libsound${SHLIB_SUFFIX} libsnack${SHLIB_SUFFIX} @DOSTUBLIB@ @LIBNIST@ @LIBOGG@ editversion
 
 OBJSO = sound.o jkSound.o jkSoundEngine.o jkSoundEdit.o jkSoundFile.o \
-	g711.o @AOBJ@ jkFormatMP3.o jkSoundProc.o ffa.o jkPitchCmd.o \
+	g711.o @AOBJ@ jkSoundProc.o ffa.o jkPitchCmd.o \
 	@STUBINITOBJ@ jkAudio.o jkMixer.o shape.o jkFilter.o jkSynthesis.o \
 	jkFilterIIR.o jkGetF0.o sigproc.o jkFormant.o sigproc2.o
 
 OBJSN = snack.o jkSound.o jkSoundEngine.o jkSoundEdit.o jkSoundFile.o \
 	jkCanvSpeg.o jkCanvWave.o jkCanvSect.o ffa.o g711.o @AOBJ@ \
-	jkFormatMP3.o jkSoundProc.o jkPitchCmd.o @STUBINITOBJ@ \
+	jkSoundProc.o jkPitchCmd.o @STUBINITOBJ@ \
 	jkAudio.o jkMixer.o shape.o jkFilter.o jkSynthesis.o jkFilterIIR.o \
 	jkGetF0.o sigproc.o jkFormant.o sigproc2.o
 
@@ -73,9 +73,6 @@ jkSoundFile.o: $(GENERIC_DIR)/jkSoundFil
 g711.o: $(GENERIC_DIR)/g711.c
 	$(CC) -c $(CFLAGS) $(GENERIC_DIR)/g711.c
 
-jkFormatMP3.o: $(GENERIC_DIR)/jkFormatMP3.c
-	$(CC) -c $(CFLAGS) $(GENERIC_DIR)/jkFormatMP3.c
-
 jkSoundProc.o: $(GENERIC_DIR)/jkSoundProc.c
 	$(CC) -c $(CFLAGS) $(GENERIC_DIR)/jkSoundProc.c
 
diff -up snack2.2.10/unix/snack.tcl.BAD snack2.2.10/unix/snack.tcl
--- snack2.2.10/unix/snack.tcl.BAD	2008-06-11 15:10:44.000000000 -0400
+++ snack2.2.10/unix/snack.tcl	2008-06-11 15:11:26.000000000 -0400
@@ -216,7 +216,7 @@ namespace eval snack {
 	if {$::tcl_platform(platform) == "windows"} {
 	    set l [concat {{{MS Wav Files} {.wav}} {{Smp Files} {.smp}} {{Snd Files} {.snd}} {{AU Files} {.au}} {{AIFF Files} {.aif}} {{AIFF Files} {.aiff}} {{Waves Files} {.sd}} {{MP3 Files} {.mp3}} {{CSL Files} {.nsp}}} $loadTypes {{{All Files} * }}]
 	} else {
-	    set l [concat {{{MS Wav Files} {.wav .WAV}} {{Smp Files} {.smp .SMP}} {{Snd Files} {.snd .SND}} {{AU Files} {.au .AU}} {{AIFF Files} {.aif .AIF}} {{AIFF Files} {.aiff .AIFF}} {{Waves Files} {.sd .SD}} {{MP3 Files} {.mp3 .MP3}} {{CSL Files} {.nsp .NSP}}} $loadTypes {{{All Files} * }}]
+	    set l [concat {{{MS Wav Files} {.wav .WAV}} {{Smp Files} {.smp .SMP}} {{Snd Files} {.snd .SND}} {{AU Files} {.au .AU}} {{AIFF Files} {.aif .AIF}} {{AIFF Files} {.aiff .AIFF}} {{Waves Files} {.sd .SD}} {{CSL Files} {.nsp .NSP}}} $loadTypes {{{All Files} * }}]
 	}
 	return [swapListElem $l $filebox(l$fmt)]
     }
@@ -229,7 +229,6 @@ namespace eval snack {
     set filebox(SD) .sd
     set filebox(SND) .snd
     set filebox(AIFF) .aif
-    set filebox(MP3) .mp3
     set filebox(CSL) .nsp
 
     set filebox(lWAV) 0
@@ -239,7 +238,7 @@ namespace eval snack {
     set filebox(lAIFF)  4
     # skip 2 because of aif and aiff
     set filebox(lSD)  6
-    set filebox(lMP3)  7
+    # skip 1 because of mp3
     set filebox(lCSL)  8
     set filebox(lRAW) end
     # Do not forget to update indexes
@@ -350,7 +349,6 @@ namespace eval snack {
     set filebox(.sd) SD
     set filebox(.aif) AIFF
     set filebox(.aiff) AIFF
-    set filebox(.mp3) MP3
     set filebox(.nsp) CSL
     set filebox() WAV
 
diff -up snack2.2.10/generic/jkSoundFile.c.BAD snack2.2.10/generic/jkSoundFile.c
--- snack2.2.10/generic/jkSoundFile.c.BAD	2008-06-11 15:22:35.000000000 -0400
+++ snack2.2.10/generic/jkSoundFile.c	2008-06-11 15:24:16.000000000 -0400
@@ -35,9 +35,11 @@ GuessWavFile(char *buf, int len)
 {
   if (len < 21) return(QUE_STRING);
   if (strncasecmp("RIFF", buf, strlen("RIFF")) == 0) {
+/*
     if (buf[20] == 85) {
       return(MP3_STRING);
     }
+*/
     if (strncasecmp("WAVE", &buf[8], strlen("WAVE")) == 0) {
       return(WAV_STRING);
     }
@@ -3305,6 +3307,8 @@ Snack_FileFormat snackRawFormat = {
   (Snack_FileFormat *) NULL
 };
 
+/*
+
 Snack_FileFormat snackMp3Format = {
   MP3_STRING,
   GuessMP3File,
@@ -3321,6 +3325,8 @@ Snack_FileFormat snackMp3Format = {
   (Snack_FileFormat *) NULL
 };
 
+*/
+
 Snack_FileFormat snackSmpFormat = {
   SMP_STRING,
   GuessSmpFile,
@@ -3427,15 +3433,13 @@ SnackDefineFileFormats(Tcl_Interp *inter
   snackAuFormat.nextPtr   = &snackSmpFormat;
   snackSmpFormat.nextPtr  = &snackCslFormat;
   snackCslFormat.nextPtr  = &snackSdFormat;
-  snackSdFormat.nextPtr   = &snackMp3Format;
-  snackMp3Format.nextPtr  = &snackRawFormat;
+  snackSdFormat.nextPtr   = &snackRawFormat;
   snackRawFormat.nextPtr  = NULL;
 }
 */
 {
   snackFileFormats        = &snackWavFormat;
-  snackWavFormat.nextPtr  = &snackMp3Format;
-  snackMp3Format.nextPtr  = &snackAiffFormat;
+  snackWavFormat.nextPtr  = &snackAiffFormat;
   snackAiffFormat.nextPtr = &snackAuFormat;
   snackAuFormat.nextPtr   = &snackSmpFormat;
   snackSmpFormat.nextPtr  = &snackCslFormat;

snack2.2.10-shared-stubs.patch:

--- NEW FILE snack2.2.10-shared-stubs.patch ---
diff -up snack2.2.10/unix/configure.shared-stubs snack2.2.10/unix/configure
--- snack2.2.10/unix/configure.shared-stubs	2008-06-11 16:33:05.000000000 -0400
+++ snack2.2.10/unix/configure	2008-06-11 16:33:33.000000000 -0400
@@ -1663,7 +1663,7 @@ echo "${ECHO_T}will use stubs (normal)" 
     TCL_LIB_SPEC="${TCL_STUB_LIB_SPEC}"
     TK_LIB_SPEC="${TK_STUB_LIB_SPEC}"
     STUBINITOBJ="snackStubInit.o"
-    DOSTUBLIB="stublib"
+    DOSTUBLIB="libsnackstub$SNACK_VERSION${SHLIB_SUFFIX}"
     SNACK_STUB_LIB_FLAG="-lsnackstub$SNACK_VERSION"
     if test "$TCLVER" = "8.0"; then
         { echo "$as_me:$LINENO: WARNING: \"You probably forgot to specify --disable-stubs\"" >&5
diff -up snack2.2.10/unix/Makefile.in.shared-stubs snack2.2.10/unix/Makefile.in
--- snack2.2.10/unix/Makefile.in.shared-stubs	2008-06-11 16:29:57.000000000 -0400
+++ snack2.2.10/unix/Makefile.in	2008-06-11 16:32:36.000000000 -0400
@@ -164,8 +164,9 @@ libsnack${SHLIB_SUFFIX}: ${OBJSN}
 	${SHLIB_LD} ${OBJSN} ${LIBSN} -o libsnack${SHLIB_SUFFIX} 
 	sed s/.dll/${SHLIB_SUFFIX}/ < $(UNIX_DIR)/pkgIndex.tcl.dll > pkgIndex.tcl
 
-stublib: ${OBJSNST}
-	ar cr libsnackstub${VERSION}.a ${OBJSNST}
+libsnackstub${VERSION}${SHLIB_SUFFIX}: ${OBJSNST}
+	${SHLIB_LD} ${OBJSNST} -o libsnackstub${VERSION}${SHLIB_SUFFIX}
+#	ar cr libsnackstub${VERSION}.a ${OBJSNST}
 
 editversion: ${OBJSN}
 	if test "$(TCL_VERSION)" != "8.4"; then\
@@ -310,7 +311,7 @@ install:
         fi;
 	cp -f libsound${SHLIB_SUFFIX} ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}/
 	cp -f libsnack${SHLIB_SUFFIX} ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}/
-	if test -f libsnackstub${VERSION}.a; then cp -f libsnackstub${VERSION}.a ${DESTDIR}${SNACK_INSTALL_PATH}/; fi
+	if test -f libsnackstub${VERSION}${SHLIB_SUFFIX}; then cp -f libsnackstub${VERSION}${SHLIB_SUFFIX} ${DESTDIR}${SNACK_INSTALL_PATH}/; fi
 	if test -f libsnacksphere${SHLIB_SUFFIX}; then cp -f libsnacksphere${SHLIB_SUFFIX} ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}/; fi
 	if test -f libsnackogg${SHLIB_SUFFIX}; then cp -f libsnackogg${SHLIB_SUFFIX} ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}/; fi
 	cp -f $(UNIX_DIR)/snack.tcl ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}/


--- NEW FILE tcl-snack.spec ---
%{!?tcl_version: %define tcl_version %(echo 'puts $tcl_version' | tclsh)}
%{!?tcl_sitearch: %define tcl_sitearch %{_libdir}/tcl%{tcl_version}}
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define realname snack

Name:		tcl-%{realname}
Version:	2.2.10
Release:	2%{?dist}
Summary:	Sound toolkit
Group:		System Environment/Libraries
License:	GPLv2+
URL:		http://www.speech.kth.se/snack/
# The upstream source has two files which implement MP3 decoding.
# ./generic/jkFormatMP3.c and ./generic/jkFormatMP3.h
# Due to patent concerns, we cannot ship that code, thus, the modified tarball.
# Those files are not present in the tarball, all other related removals is done 
# with a patch.
# Upstream source can be found here: http://www.speech.kth.se/snack/dist/snack2.2.10.tar.gz
Source0:	%{realname}%{version}-nomp3.tar.gz
Patch0:		snack2.2.10-nomp3.patch
Patch1:		snack2.2.10-extracflags.patch
Patch2:		snack2.2.10-shared-stubs.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	tcl-devel, tk-devel, alsa-lib-devel, libogg-devel, libvorbis-devel
BuildRequires:	python-devel
Requires:	tcl(abi) = 8.5
Provides:	%{realname} = %{version}-%{release}

%description
The Snack Sound Toolkit is designed to be used with a scripting language such 
as Tcl/Tk or Python. Using Snack you can create powerful multi-platform audio 
applications with just a few lines of code. Snack has commands for basic sound 
handling, such as playback, recording, file and socket I/O. Snack also provides 
primitives for sound visualization, e.g. waveforms and spectrograms. It was 
developed mainly to handle digital recordings of speech, but is just as useful 
for general audio. Snack has also successfully been applied to other 
one-dimensional signals. The combination of Snack and a scripting language 
makes it possible to create sound tools and applications with a minimum of 
effort. This is due to the rapid development nature of scripting languages. As 
a bonus you get an application that is cross-platform from start. It is also 
easy to integrate Snack based applications with existing sound analysis 
software.

%package -n python-%{realname}
Summary:	Python bindings for Snack Sound Toolkit
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}

%description -n python-%{realname}
This package contains python bindings for the Snack Sound Toolkit. Tcl, Tk, and
Tkinter are also required to use Snack.

%prep
%setup -q -n %{realname}%{version}
%patch0 -p1 -b .nomp3
%patch1 -p1 -b .extracflags
%patch2 -p1 -b .shared-stubs
chmod -x generic/*.c generic/*.h unix/*.c COPYING README demos/python/*
iconv -f iso-8859-1 -t utf-8 -o README{.utf8,}
mv README{.utf8,}
sed -i -e 's|\r||g' demos/python/*.txt

%build
cd unix/
%configure --disable-static --enable-alsa --with-tcl=%{_libdir} --with-tk=%{_libdir} --with-ogg-include=%{_includedir} --with-ogg-lib=%{_libdir}
make %{?_smp_mflags} EXTRACFLAGS="%{optflags}"
cd ../python
%{__python} setup.py build

%install
rm -rf %{buildroot}
cd unix/
make install DESTDIR=%{buildroot}
find %{buildroot} -name '*.la' -exec rm -f {} ';'
cd ../python
%{__python} setup.py install --skip-build --root %{buildroot}
install -d %{buildroot}%{tcl_sitearch}
mv %{buildroot}%{_libdir}/%{realname}2.2 %{buildroot}%{tcl_sitearch}/%{realname}2.2
chmod -x %{buildroot}%{tcl_sitearch}/%{realname}2.2/snack.tcl

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc COPYING README
%{_libdir}/libsnackstub2.2.so
%{tcl_sitearch}/%{realname}2.2/

%files -n python-%{realname}
%defattr(-,root,root,-)
%doc doc/python-man.html demos/python/
%{python_sitelib}/tkSnack*

%changelog
* Mon Aug  4 2008 Tom "spot" Callaway <tcallawa at redhat.com> 2.2.10-2
- add BR: python

* Wed Jun 11 2008 Tom "spot" Callaway <tcallawa at redhat.com> 2.2.10-1
- Initial package for Fedora



Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/tcl-snack/F-8/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	12 Sep 2008 21:11:41 -0000	1.1
+++ sources	13 Sep 2008 01:18:50 -0000	1.2
@@ -0,0 +1 @@
+14ded94e2e93a28585e48536b7044ae5  snack2.2.10-nomp3.tar.gz




More information about the fedora-extras-commits mailing list