[arch-commits] Commit in sox/repos (6 files)
Eric Bélanger
eric at archlinux.org
Sun Jun 3 04:02:32 UTC 2012
Date: Sunday, June 3, 2012 @ 00:02:31
Author: eric
Revision: 160646
archrelease: copy trunk to extra-i686, extra-x86_64
Added:
sox/repos/extra-i686/PKGBUILD
(from rev 160645, sox/trunk/PKGBUILD)
sox/repos/extra-i686/sox_default_audio_driver_fallback.patch
(from rev 160645, sox/trunk/sox_default_audio_driver_fallback.patch)
sox/repos/extra-x86_64/PKGBUILD
(from rev 160645, sox/trunk/PKGBUILD)
sox/repos/extra-x86_64/sox_default_audio_driver_fallback.patch
(from rev 160645, sox/trunk/sox_default_audio_driver_fallback.patch)
Deleted:
sox/repos/extra-i686/PKGBUILD
sox/repos/extra-x86_64/PKGBUILD
------------------------------------------------------+
extra-i686/PKGBUILD | 71 ++++++++---------
extra-i686/sox_default_audio_driver_fallback.patch | 51 ++++++++++++
extra-x86_64/PKGBUILD | 71 ++++++++---------
extra-x86_64/sox_default_audio_driver_fallback.patch | 51 ++++++++++++
4 files changed, 176 insertions(+), 68 deletions(-)
Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD 2012-06-03 04:02:07 UTC (rev 160645)
+++ extra-i686/PKGBUILD 2012-06-03 04:02:31 UTC (rev 160646)
@@ -1,34 +0,0 @@
-# $Id$
-# Maintainer: Eric Bélanger <eric at archlinux.org>
-
-pkgname=sox
-pkgver=14.4.0
-pkgrel=1
-pkgdesc="The Swiss Army knife of sound processing tools"
-arch=('i686' 'x86_64')
-url="http://sox.sourceforge.net/"
-license=('GPL' 'LGPL')
-depends=('libltdl' 'file' 'libsndfile' 'libpng' 'lame' 'opencore-amr' 'gsm')
-makedepends=('ffmpeg' 'libao' 'libmad' 'libid3tag' 'wavpack' 'libpulse')
-optdepends=('libao: for ao plugin'
- 'ffmpeg: for ffmpeg plugin'
- 'libmad: for mp3 plugin'
- 'libid3tag: for mp3 plugin'
- 'wavpack: for wavpack plugin'
- 'libpulse: for pulse plugin')
-options=('!libtool')
-source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
-sha1sums=('12dfc57e503ed4e18cedcac292cdae7982281978')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- sed -i 's|man1/sox.1 soxeffect.7|man1/sox.1.gz soxeffect.7.gz|' Makefile.in
- ./configure --prefix=/usr --sysconfdir=/etc \
- --with-dyn-default --with-distro="Arch Linux"
- make
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" install
-}
Copied: sox/repos/extra-i686/PKGBUILD (from rev 160645, sox/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD (rev 0)
+++ extra-i686/PKGBUILD 2012-06-03 04:02:31 UTC (rev 160646)
@@ -0,0 +1,37 @@
+# $Id$
+# Maintainer: Eric Bélanger <eric at archlinux.org>
+
+pkgname=sox
+pkgver=14.4.0
+pkgrel=2
+pkgdesc="The Swiss Army knife of sound processing tools"
+arch=('i686' 'x86_64')
+url="http://sox.sourceforge.net/"
+license=('GPL' 'LGPL')
+depends=('libltdl' 'file' 'libsndfile' 'libpng' 'lame' 'opencore-amr' 'gsm')
+makedepends=('ffmpeg' 'libao' 'libmad' 'libid3tag' 'wavpack' 'libpulse')
+optdepends=('libao: for ao plugin'
+ 'ffmpeg: for ffmpeg plugin'
+ 'libmad: for mp3 plugin'
+ 'libid3tag: for mp3 plugin'
+ 'wavpack: for wavpack plugin'
+ 'libpulse: for pulse plugin')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2
+ sox_default_audio_driver_fallback.patch)
+sha1sums=('12dfc57e503ed4e18cedcac292cdae7982281978'
+ 'ab304f1fc17269262dbc4977aa9b7e97ec805ae4')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p0 -i "${srcdir}/sox_default_audio_driver_fallback.patch"
+ sed -i 's|man1/sox.1 soxeffect.7|man1/sox.1.gz soxeffect.7.gz|' Makefile.in
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --with-dyn-default --with-distro="Arch Linux"
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
Copied: sox/repos/extra-i686/sox_default_audio_driver_fallback.patch (from rev 160645, sox/trunk/sox_default_audio_driver_fallback.patch)
===================================================================
--- extra-i686/sox_default_audio_driver_fallback.patch (rev 0)
+++ extra-i686/sox_default_audio_driver_fallback.patch 2012-06-03 04:02:31 UTC (rev 160646)
@@ -0,0 +1,51 @@
+--- src/sox.c.old 2012-05-06 22:45:45.380564154 -0400
++++ src/sox.c 2012-05-06 22:47:11.948248987 -0400
+@@ -2538,20 +2538,38 @@
+ return name? from_env? from_env : name : NULL;
+ }
+
++static char const * try_device(char const * name)
++{
++ sox_format_handler_t const * handler = sox_find_format(name, sox_false);
++ if (handler) {
++ sox_format_t format, * ft = &format;
++ memset(ft, 0, sizeof(*ft));
++ ft->filename = (char *)device_name(name);
++ ft->priv = lsx_calloc(1, handler->priv_size);
++ if (handler->startwrite(ft) == SOX_SUCCESS) {
++ handler->stopwrite(ft);
++ free(ft->priv);
++ return name;
++ }
++ free(ft->priv);
++ }
++ return NULL;
++}
++
+ static char const * set_default_device(file_t * f)
+ {
+ /* Default audio driver type in order of preference: */
+ if (!f->filetype) f->filetype = getenv("AUDIODRIVER");
+- if (!f->filetype && sox_find_format("coreaudio", sox_false)) f->filetype = "coreaudio";
+- if (!f->filetype && sox_find_format("pulseaudio" , sox_false)) f->filetype = "pulseaudio";
+- if (!f->filetype && sox_find_format("alsa", sox_false)) f->filetype = "alsa";
+- if (!f->filetype && sox_find_format("waveaudio" , sox_false)) f->filetype = "waveaudio";
+- if (!f->filetype && sox_find_format("sndio", sox_false)) f->filetype = "sndio";
+- if (!f->filetype && sox_find_format("oss" , sox_false)) f->filetype = "oss";
+- if (!f->filetype && sox_find_format("sunau",sox_false)) f->filetype = "sunau";
+- if (!f->filetype && sox_find_format("ao" , sox_false) && file_count) /*!rec*/
+- f->filetype = "ao";
+-
++ if (!f->filetype) f->filetype = try_device("coreaudio");
++ if (!f->filetype) f->filetype = try_device("pulseaudio");
++ if (!f->filetype) f->filetype = try_device("alsa");
++ if (!f->filetype) f->filetype = try_device("waveaudio");
++ if (!f->filetype) f->filetype = try_device("sndio");
++ if (!f->filetype) f->filetype = try_device("oss");
++ if (!f->filetype) f->filetype = try_device("sunau");
++ if (!f->filetype && file_count) /*!rec*/
++ f->filetype = try_device("ao");
++
+ if (!f->filetype) {
+ lsx_fail("Sorry, there is no default audio device configured");
+ exit(1);
Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD 2012-06-03 04:02:07 UTC (rev 160645)
+++ extra-x86_64/PKGBUILD 2012-06-03 04:02:31 UTC (rev 160646)
@@ -1,34 +0,0 @@
-# $Id$
-# Maintainer: Eric Bélanger <eric at archlinux.org>
-
-pkgname=sox
-pkgver=14.4.0
-pkgrel=1
-pkgdesc="The Swiss Army knife of sound processing tools"
-arch=('i686' 'x86_64')
-url="http://sox.sourceforge.net/"
-license=('GPL' 'LGPL')
-depends=('libltdl' 'file' 'libsndfile' 'libpng' 'lame' 'opencore-amr' 'gsm')
-makedepends=('ffmpeg' 'libao' 'libmad' 'libid3tag' 'wavpack' 'libpulse')
-optdepends=('libao: for ao plugin'
- 'ffmpeg: for ffmpeg plugin'
- 'libmad: for mp3 plugin'
- 'libid3tag: for mp3 plugin'
- 'wavpack: for wavpack plugin'
- 'libpulse: for pulse plugin')
-options=('!libtool')
-source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
-sha1sums=('12dfc57e503ed4e18cedcac292cdae7982281978')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- sed -i 's|man1/sox.1 soxeffect.7|man1/sox.1.gz soxeffect.7.gz|' Makefile.in
- ./configure --prefix=/usr --sysconfdir=/etc \
- --with-dyn-default --with-distro="Arch Linux"
- make
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" install
-}
Copied: sox/repos/extra-x86_64/PKGBUILD (from rev 160645, sox/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD (rev 0)
+++ extra-x86_64/PKGBUILD 2012-06-03 04:02:31 UTC (rev 160646)
@@ -0,0 +1,37 @@
+# $Id$
+# Maintainer: Eric Bélanger <eric at archlinux.org>
+
+pkgname=sox
+pkgver=14.4.0
+pkgrel=2
+pkgdesc="The Swiss Army knife of sound processing tools"
+arch=('i686' 'x86_64')
+url="http://sox.sourceforge.net/"
+license=('GPL' 'LGPL')
+depends=('libltdl' 'file' 'libsndfile' 'libpng' 'lame' 'opencore-amr' 'gsm')
+makedepends=('ffmpeg' 'libao' 'libmad' 'libid3tag' 'wavpack' 'libpulse')
+optdepends=('libao: for ao plugin'
+ 'ffmpeg: for ffmpeg plugin'
+ 'libmad: for mp3 plugin'
+ 'libid3tag: for mp3 plugin'
+ 'wavpack: for wavpack plugin'
+ 'libpulse: for pulse plugin')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2
+ sox_default_audio_driver_fallback.patch)
+sha1sums=('12dfc57e503ed4e18cedcac292cdae7982281978'
+ 'ab304f1fc17269262dbc4977aa9b7e97ec805ae4')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p0 -i "${srcdir}/sox_default_audio_driver_fallback.patch"
+ sed -i 's|man1/sox.1 soxeffect.7|man1/sox.1.gz soxeffect.7.gz|' Makefile.in
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --with-dyn-default --with-distro="Arch Linux"
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
Copied: sox/repos/extra-x86_64/sox_default_audio_driver_fallback.patch (from rev 160645, sox/trunk/sox_default_audio_driver_fallback.patch)
===================================================================
--- extra-x86_64/sox_default_audio_driver_fallback.patch (rev 0)
+++ extra-x86_64/sox_default_audio_driver_fallback.patch 2012-06-03 04:02:31 UTC (rev 160646)
@@ -0,0 +1,51 @@
+--- src/sox.c.old 2012-05-06 22:45:45.380564154 -0400
++++ src/sox.c 2012-05-06 22:47:11.948248987 -0400
+@@ -2538,20 +2538,38 @@
+ return name? from_env? from_env : name : NULL;
+ }
+
++static char const * try_device(char const * name)
++{
++ sox_format_handler_t const * handler = sox_find_format(name, sox_false);
++ if (handler) {
++ sox_format_t format, * ft = &format;
++ memset(ft, 0, sizeof(*ft));
++ ft->filename = (char *)device_name(name);
++ ft->priv = lsx_calloc(1, handler->priv_size);
++ if (handler->startwrite(ft) == SOX_SUCCESS) {
++ handler->stopwrite(ft);
++ free(ft->priv);
++ return name;
++ }
++ free(ft->priv);
++ }
++ return NULL;
++}
++
+ static char const * set_default_device(file_t * f)
+ {
+ /* Default audio driver type in order of preference: */
+ if (!f->filetype) f->filetype = getenv("AUDIODRIVER");
+- if (!f->filetype && sox_find_format("coreaudio", sox_false)) f->filetype = "coreaudio";
+- if (!f->filetype && sox_find_format("pulseaudio" , sox_false)) f->filetype = "pulseaudio";
+- if (!f->filetype && sox_find_format("alsa", sox_false)) f->filetype = "alsa";
+- if (!f->filetype && sox_find_format("waveaudio" , sox_false)) f->filetype = "waveaudio";
+- if (!f->filetype && sox_find_format("sndio", sox_false)) f->filetype = "sndio";
+- if (!f->filetype && sox_find_format("oss" , sox_false)) f->filetype = "oss";
+- if (!f->filetype && sox_find_format("sunau",sox_false)) f->filetype = "sunau";
+- if (!f->filetype && sox_find_format("ao" , sox_false) && file_count) /*!rec*/
+- f->filetype = "ao";
+-
++ if (!f->filetype) f->filetype = try_device("coreaudio");
++ if (!f->filetype) f->filetype = try_device("pulseaudio");
++ if (!f->filetype) f->filetype = try_device("alsa");
++ if (!f->filetype) f->filetype = try_device("waveaudio");
++ if (!f->filetype) f->filetype = try_device("sndio");
++ if (!f->filetype) f->filetype = try_device("oss");
++ if (!f->filetype) f->filetype = try_device("sunau");
++ if (!f->filetype && file_count) /*!rec*/
++ f->filetype = try_device("ao");
++
+ if (!f->filetype) {
+ lsx_fail("Sorry, there is no default audio device configured");
+ exit(1);
More information about the arch-commits
mailing list