aboutsummaryrefslogtreecommitdiffstats
path: root/community/sox
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-03-07 14:59:38 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-03-07 14:59:38 +0000
commit304c15f39c09cabeb81bbf573e0faa17c299236f (patch)
tree4bb3ea59be03f0ead328ee9c4f0fa447bf0f40dd /community/sox
parent86af2e5ff04833d3253b23011018adf4aba81892 (diff)
downloadaports-304c15f39c09cabeb81bbf573e0faa17c299236f.tar.bz2
aports-304c15f39c09cabeb81bbf573e0faa17c299236f.tar.xz
{main => community}/sox: move
Diffstat (limited to 'community/sox')
-rw-r--r--community/sox/APKBUILD60
-rw-r--r--community/sox/sox-dynamic.patch12
-rw-r--r--community/sox/sox-uclibc.patch20
3 files changed, 92 insertions, 0 deletions
diff --git a/community/sox/APKBUILD b/community/sox/APKBUILD
new file mode 100644
index 0000000000..28822dfcb5
--- /dev/null
+++ b/community/sox/APKBUILD
@@ -0,0 +1,60 @@
+# Contributor: Ɓukasz Jendrysik <scadu@yandex.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=sox
+pkgver=14.4.2
+pkgrel=0
+pkgdesc="The Swiss Army knife of sound processing tools"
+url="http://sox.sourceforge.net/"
+arch="all"
+license="GPL LGPL"
+makedepends="ffmpeg-dev libao-dev libvorbis-dev libogg-dev lame-dev
+ libmad-dev bash alsa-lib-dev libsndfile-dev libsamplerate-dev
+ libtool file-dev libid3tag-dev flac-dev gsm-dev opusfile-dev
+ autoconf automake libtool
+ "
+depends=
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
+ sox-uclibc.patch
+ sox-dynamic.patch
+ "
+
+prepare() {
+ cd "$srcdir"/$pkgname-$pkgver
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ autoreconf -vif
+}
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --with-dyn-default \
+ --with-distro="Alpine Linux" \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make DESTDIR="$pkgdir" install || return 1
+ ln -sf play "$pkgdir"/usr/bin/rec || return 1
+ ln -sf ../man1/sox.1.gz "$pkgdir"/usr/share/man/man7/soxeffect.7 || return 1
+ rm "$pkgdir"/usr/lib/sox/*.a || return 1
+}
+md5sums="d04fba2d9245e661f245de0577f48a33 sox-14.4.2.tar.gz
+b734d72321470f9aaf44464878b1d12f sox-uclibc.patch
+630cf245f283b4dd205bdafde421240c sox-dynamic.patch"
+sha256sums="b45f598643ffbd8e363ff24d61166ccec4836fea6d3888881b8df53e3bb55f6c sox-14.4.2.tar.gz
+0d1447942cf64b0307baa7a16f0a91f553597be187d5c94eadc56d180615717d sox-uclibc.patch
+49fd1d0fc08d4d6722d9dcf7bc44d95122627191c876a5d1748b991cddb604d1 sox-dynamic.patch"
+sha512sums="b5c6203f4f5577503a034fe5b3d6a033ee97fe4d171c533933e2b036118a43a14f97c9668433229708609ccf9ee16abdeca3fc7501aa0aafe06baacbba537eca sox-14.4.2.tar.gz
+08c55a0de96733e10544d450f39c2205b4057b9fc024503ec97b1906a075752ee8a4b0a1b4c5bbad2eebec17bcf8d069b22d243a63d28b77c23d545efcca6aec sox-uclibc.patch
+3950834db26faa0523006c6fd8e0769d080518f127d345c8ec9bf53e9db8a6bd67cd724f0f86492aaf9ce6ede2dfbde167049768f35c14ef3c2b96e7e00302b6 sox-dynamic.patch"
diff --git a/community/sox/sox-dynamic.patch b/community/sox/sox-dynamic.patch
new file mode 100644
index 0000000000..94ac6a282d
--- /dev/null
+++ b/community/sox/sox-dynamic.patch
@@ -0,0 +1,12 @@
+diff -Naur sox-14.4.2-orig/src/Makefile.am sox-14.4.2/src/Makefile.am
+--- sox-14.4.2-orig/src/Makefile.am 2015-04-08 17:11:09.555343005 -0400
++++ sox-14.4.2/src/Makefile.am 2015-04-08 17:11:25.115317153 -0400
+@@ -95,7 +95,7 @@
+
+ libsox_la_CFLAGS = @WARN_CFLAGS@
+ libsox_la_LDFLAGS = @APP_LDFLAGS@ -version-info @SHLIB_VERSION@ \
+- -export-symbols-regex '^(sox_.*|lsx_(check_read_params|(close|open)_dllibrary|(debug(_more|_most)?|fail|report|warn)_impl|eof|fail_errno|filelength|find_(enum_(text|value)|file_extension)|getopt(_init)?|lpc10_(create_(de|en)coder_state|(de|en)code)|raw(read|write)|read(_b_buf|buf|chars)|realloc|rewind|seeki|sigfigs3p?|strcasecmp|tell|unreadb|write(b|_b_buf|buf|s)))$$'
++ -export-symbols-regex '^(sox_.*|lsx_(error|flush|check_read_params|(close|open)_dllibrary|(debug(_more|_most)?|fail|report|warn)_impl|eof|fail_errno|filelength|find_(enum_(text|value)|file_extension)|getopt(_init)?|lpc10_(create_(de|en)coder_state|(de|en)code)|raw(read|write)|read(_b_buf|buf|chars)|realloc|rewind|seeki|sigfigs3p?|strcasecmp|tell|unreadb|write(b|_b_buf|buf|s)))$$'
+
+ if HAVE_WIN32_LTDL
+ libsox_la_SOURCES += win32-ltdl.c win32-ltdl.h
diff --git a/community/sox/sox-uclibc.patch b/community/sox/sox-uclibc.patch
new file mode 100644
index 0000000000..5f4ed4abbf
--- /dev/null
+++ b/community/sox/sox-uclibc.patch
@@ -0,0 +1,20 @@
+--- ./src/formats.c.orig 2013-02-17 12:19:38.318344596 +0000
++++ ./src/formats.c 2013-02-17 12:50:31.560549872 +0000
+@@ -409,7 +409,7 @@
+ #if defined _FSTDIO || defined _NEWLIB_VERSION || defined __APPLE__
+ fp->_p -= PIPE_AUTO_DETECT_SIZE;
+ fp->_r += PIPE_AUTO_DETECT_SIZE;
+-#elif defined __GLIBC__
++#elif defined __GLIBC__ && ! defined __UCLIBC__
+ fp->_IO_read_ptr = fp->_IO_read_base;
+ #elif defined _MSC_VER || defined _WIN32 || defined _WIN64 || defined _ISO_STDIO_ISO_H
+ fp->_ptr = fp->_base;
+@@ -417,7 +417,7 @@
+ /* To fix this #error, either simply remove the #error line and live without
+ * file-type detection with pipes, or add support for your compiler in the
+ * lines above. Test with cat monkey.wav | ./sox --info - */
+- #error FIX NEEDED HERE
++// #error FIX NEEDED HERE
+ #define NO_REWIND_PIPE
+ (void)fp;
+ #endif