Author: glen                         Date: Thu Feb 25 22:13:54 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new, based on fc

---- Files affected:
packages/tcl-snack:
   snack-extracflags.patch (NONE -> 1.1)  (NEW), snack-newALSA.patch (NONE -> 
1.1)  (NEW), snack-shared-stubs.patch (NONE -> 1.1)  (NEW), tcl-snack.spec 
(NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/tcl-snack/snack-extracflags.patch
diff -u /dev/null packages/tcl-snack/snack-extracflags.patch:1.1
--- /dev/null   Thu Feb 25 23:13:54 2010
+++ packages/tcl-snack/snack-extracflags.patch  Thu Feb 25 23:13:49 2010
@@ -0,0 +1,14 @@
+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@
+ 

================================================================
Index: packages/tcl-snack/snack-newALSA.patch
diff -u /dev/null packages/tcl-snack/snack-newALSA.patch:1.1
--- /dev/null   Thu Feb 25 23:13:54 2010
+++ packages/tcl-snack/snack-newALSA.patch      Thu Feb 25 23:13:49 2010
@@ -0,0 +1,50 @@
+diff -up snack2.2.10/unix/jkAudIO_alsa.c.newALSA 
snack2.2.10/unix/jkAudIO_alsa.c
+--- snack2.2.10/unix/jkAudIO_alsa.c.newALSA    2008-09-22 14:19:55.000000000 
-0400
++++ snack2.2.10/unix/jkAudIO_alsa.c    2008-09-22 14:21:44.000000000 -0400
+@@ -49,6 +49,8 @@ static int littleEndian = 0;
+ 
+ static int minNumChan = 1;
+ 
++static snd_pcm_uframes_t hw_bufsize = 0; 
++
+ int
+ SnackAudioOpen(ADesc *A, Tcl_Interp *interp, char *device, int mode, int freq,
+              int nchannels, int encoding)
+@@ -135,6 +137,9 @@ SnackAudioOpen(ADesc *A, Tcl_Interp *int
+     Tcl_AppendResult(interp, "Failed setting HW params.", NULL);
+     return TCL_ERROR;
+   }
++
++  snd_pcm_hw_params_get_buffer_size (hw_params, &hw_bufsize); 
++
+   snd_pcm_hw_params_free(hw_params);
+   snd_pcm_prepare(A->handle);
+   if (A->mode == RECORD) {
+@@ -202,6 +207,8 @@ SnackAudioPost(ADesc *A)
+   int i;
+   static char buf[64];
+ 
++  return;
++
+   if (A->debug > 1) Snack_WriteLog("  Enter SnackAudioPost\n");
+ 
+   for (i = 0; i < 1000; i++) {
+@@ -267,12 +274,14 @@ SnackAudioWriteable(ADesc *A)
+ long
+ SnackAudioPlayed(ADesc *A)
+ {
+-  long avail = _snd_pcm_mmap_hw_ptr(A->handle);
++  // FIX Here, _snd_pcm_mmap_hw_ptr is deprecated in new alsalib
++  long played = A->nWritten - (hw_bufsize - SnackAudioWriteable(A));
++  // long avail = _snd_pcm_mmap_hw_ptr(A->handle); 
+   
+-  if (avail < 0)
+-    avail = 0;
++  if (played < 0)
++    return 0;
+ 
+-  return (avail+A->nPlayed);
++  return (played);
+ }
+ 
+ void

================================================================
Index: packages/tcl-snack/snack-shared-stubs.patch
diff -u /dev/null packages/tcl-snack/snack-shared-stubs.patch:1.1
--- /dev/null   Thu Feb 25 23:13:54 2010
+++ packages/tcl-snack/snack-shared-stubs.patch Thu Feb 25 23:13:49 2010
@@ -0,0 +1,36 @@
+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}/

================================================================
Index: packages/tcl-snack/tcl-snack.spec
diff -u /dev/null packages/tcl-snack/tcl-snack.spec:1.1
--- /dev/null   Thu Feb 25 23:13:55 2010
+++ packages/tcl-snack/tcl-snack.spec   Thu Feb 25 23:13:49 2010
@@ -0,0 +1,132 @@
+# $Revision$, $Date$
+%define realname snack
+Summary:       Sound toolkit
+Name:          tcl-%{realname}
+Version:       2.2.10
+Release:       0.1
+License:       GPL v2+
+Group:         Libraries
+URL:           http://www.speech.kth.se/snack/
+Source0:       http://www.speech.kth.se/snack/dist/snack%{version}.tar.gz
+# Source0-md5: 98da0dc73599b3a039cba1b7ff169399
+Patch1:                snack-extracflags.patch
+Patch2:                snack-shared-stubs.patch
+Patch3:                snack-newALSA.patch
+BuildRequires: alsa-lib-devel
+BuildRequires: libogg-devel
+BuildRequires: libvorbis-devel
+BuildRequires: python-devel
+BuildRequires: tcl-devel
+BuildRequires: tk-devel
+BuildRequires: xorg-lib-libXft-devel
+Requires:      tcl(abi) = %{tcl_version}
+Provides:      %{realname} = %{version}-%{release}
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%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 devel
+Summary:       Development files for Snack Sound Toolkit
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description devel
+This package contains development files for the Snack Sound Toolkit.
+
+%package -n python-%{realname}
+Summary:       Python bindings for Snack Sound Toolkit
+Group:         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}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+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 \
+       --with-tcl=%{_libdir} \
+       --with-tk=%{_libdir} \
+       --with-ogg-include=%{_includedir} \
+       --with-ogg-lib=%{_libdir} \
+       --enable-alsa \
+
+%{__make} EXTRACFLAGS="%{optflags}"
+cd ../python
+%{__python} setup.py build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+cd unix
+%{__make} install DESTDIR=$RPM_BUILD_ROOT
+find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
+cd -
+
+cd python
+%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{tcl_sitearch}
+mv $RPM_BUILD_ROOT%{_libdir}/%{realname}2.2 
$RPM_BUILD_ROOT%{tcl_sitearch}/%{realname}2.2
+chmod -x $RPM_BUILD_ROOT%{tcl_sitearch}/%{realname}2.2/snack.tcl
+cd -
+
+# Devel bits
+install -d $RPM_BUILD_ROOT%{_includedir}
+install -p generic/*.h $RPM_BUILD_ROOT%{_includedir}
+install -p unix/snackConfig.sh $RPM_BUILD_ROOT%{_libdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc COPYING README
+%{_libdir}/libsnackstub2.2.so
+%{tcl_sitearch}/%{realname}2.2/
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/*.h
+%{_libdir}/snackConfig.sh
+
+%files -n python-%{realname}
+%defattr(644,root,root,755)
+%doc doc/python-man.html demos/python/
+%{py_sitedir}/tkSnack*
+
+%define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <[email protected]>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2010/02/25 22:13:49  glen
+- new, based on fc
+
================================================================
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to