--- a/components/sox/Makefile Tue Nov 24 02:29:03 2015 -0800
+++ b/components/sox/Makefile Mon Nov 30 12:43:49 2015 -0800
@@ -26,16 +26,16 @@
include ../../make-rules/shared-macros.mk
COMPONENT_NAME= sox
-COMPONENT_VERSION= 14.4.0
+COMPONENT_VERSION= 14.4.2
COMPONENT_PROJECT_URL= http://sox.sourceforge.net/
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH= \
- sha256:3ee34b14dd267de378e8a117aae81ec4cae330772342e6a55bbf6520a0a88aa3
+ sha256:b45f598643ffbd8e363ff24d61166ccec4836fea6d3888881b8df53e3bb55f6c
COMPONENT_ARCHIVE_URL= http://downloads.sourceforge.net/project/$(COMPONENT_NAME)/$(COMPONENT_NAME)/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
COMPONENT_BUGDB= utility/sox
-TPNO= 9040
+TPNO= 25632
include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/configure.mk
@@ -66,3 +66,4 @@
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/math
+REQUIRED_PACKAGES += system/library/openmp
--- a/components/sox/patches/5.oss.c.patch Tue Nov 24 02:29:03 2015 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
---- sox-14.3.0/src/oss.c Wed Aug 19 16:15:08 2009
-+++ sox-14.3.0/src/oss.c.new Wed Aug 19 16:23:46 2009
-@@ -190,8 +190,10 @@
- return (SOX_EOF);
- }
-
-+#if !defined sun
- /* Change to non-buffered I/O */
- setvbuf(ft->fp, NULL, _IONBF, sizeof(char) * file->size);
-+#endif
- return(SOX_SUCCESS);
- }
-
--- a/components/sox/patches/6.formats.c.patch Tue Nov 24 02:29:03 2015 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
---- sox-14.3.0/src/formats.c Wed Aug 19 16:15:15 2009
-+++ sox-14.3.0/src/formats.c.new Wed Aug 19 16:23:06 2009
-@@ -397,6 +397,8 @@
- fp->_r += AUTO_DETECT_SIZE;
- #elif defined __GLIBC__
- fp->_IO_read_ptr = fp->_IO_read_base;
-+#elif defined sun
-+ #define NO_REWIND_PIPE
- #elif defined _MSC_VER || defined __MINGW_H || defined _ISO_STDIO_ISO_H
- fp->_ptr = fp->_base;
- #else
--- a/components/sox/patches/7.sunaudio.c.patch Tue Nov 24 02:29:03 2015 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
---- sox-14.3.0/src/sunaudio.c Wed Aug 19 16:15:20 2009
-+++ sox-14.3.0/src/sunaudio.c.new Wed Aug 19 16:24:29 2009
-@@ -172,8 +172,11 @@
- #else
- ioctl(fileno(ft->fp), I_FLUSH, FLUSHR);
- #endif
-+
-+#if !defined sun
- /* Change to non-buffered I/O*/
- setvbuf(ft->fp, NULL, _IONBF, sizeof(char) * file->size);
-+#endif
-
- return (SOX_SUCCESS);
- }
-@@ -299,8 +302,10 @@
- lsx_fail_errno(ft,errno,"Unable to initialize encoding for /dev/audio");
- return(SOX_EOF);
- }
-+#if !defined sun
- /* Change to non-buffered I/O */
- setvbuf(ft->fp, NULL, _IONBF, sizeof(char) * file->size);
-+#endif
-
- return (SOX_SUCCESS);
- }
--- a/components/sox/patches/8.libsox.c.patch Tue Nov 24 02:29:03 2015 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
---- sox-14.4.0/src/libsox.c.~1~ Mon Jan 16 16:58:41 2012
-+++ sox-14.4.0/src/libsox.c Fri Sep 21 11:52:13 2012
-@@ -79,7 +79,7 @@
- #elif defined _MSC_VER
- "msvc " STRINGIZE(_MSC_FULL_VER),
- #elif defined __SUNPRO_C
-- fprintf(file, "sun c " STRINGIZE(__SUNPRO_C),
-+ "sun c " STRINGIZE(__SUNPRO_C),
- #else
- NULL,
- #endif
--- a/components/sox/patches/9.CVE-2014-8145.patch Tue Nov 24 02:29:03 2015 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-#
-# Fix CVE-2014-8145[0]:
-# two heap-based buffer overflows
-# Upstream changesets 7d3f38 and f39c57.
-# http://sourceforge.net/p/sox/code/ci/7d3f38007a1eeaf5ab7669aba0d2a7e4d3def57e/
-# http://sourceforge.net/p/sox/code/ci/f39c574bc423fd5b12bd6510264512f5d5366183/
-#
-
---- a/src/sphere.c
-+++ b/src/sphere.c
-@@ -47,6 +47,11 @@
-
- /* Determine header size, and allocate a buffer large enough to hold it. */
- sscanf(fldsval, "%lu", &header_size_ul);
-+ if (header_size_ul < 16) {
-+ lsx_fail_errno(ft, SOX_EHDR, "Error reading Sphere header");
-+ return (SOX_EOF);
-+ }
-+
- buf = lsx_malloc(header_size = header_size_ul);
-
- /* Skip what we have read so far */
-
-
---- a/src/wav.c
-+++ b/src/wav.c
-@@ -166,7 +166,7 @@
- /* work with partial blocks. Specs say it should be null */
- /* padded but I guess this is better than trailing quiet. */
- samplesThisBlock = lsx_ms_adpcm_samples_in((size_t)0, (size_t)ft->signal.channels, bytesRead, (size_t)0);
-- if (samplesThisBlock == 0)
-+ if (samplesThisBlock == 0 || samplesThisBlock > wav->samplesPerBlock)
- {
- lsx_warn("Premature EOF on .wav input file");
- return 0;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/sox/patches/formats.c.patch Mon Nov 30 12:43:49 2015 -0800
@@ -0,0 +1,13 @@
+Solaris specific change. No plans to send upstream.
+
+--- sox-14.3.0/src/formats.c Wed Aug 19 16:15:15 2009
++++ sox-14.3.0/src/formats.c.new Wed Aug 19 16:23:06 2009
+@@ -415,6 +415,8 @@
+ fp->_r += PIPE_AUTO_DETECT_SIZE;
+ #elif defined __GLIBC__
+ fp->_IO_read_ptr = fp->_IO_read_base;
++#elif defined sun
++ #define NO_REWIND_PIPE
+ #elif defined _MSC_VER || defined _WIN32 || defined _WIN64 || \
+ defined _ISO_STDIO_ISO_H || defined __sgi
+ fp->_ptr = fp->_base;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/sox/patches/libsox.c.patch Mon Nov 30 12:43:49 2015 -0800
@@ -0,0 +1,13 @@
+Solaris specific change. No plans to send upstream.
+
+--- sox-14.4.0/src/libsox.c.~1~ Mon Jan 16 16:58:41 2012
++++ sox-14.4.0/src/libsox.c Fri Sep 21 11:52:13 2012
+@@ -79,7 +79,7 @@
+ #elif defined _MSC_VER
+ "msvc " STRINGIZE(_MSC_FULL_VER),
+ #elif defined __SUNPRO_C
+- fprintf(file, "sun c " STRINGIZE(__SUNPRO_C),
++ "sun c " STRINGIZE(__SUNPRO_C),
+ #else
+ NULL,
+ #endif
--- a/components/sox/sox.p5m Tue Nov 24 02:29:03 2015 -0800
+++ b/components/sox/sox.p5m Mon Nov 30 12:43:49 2015 -0800
@@ -44,13 +44,13 @@
file path=usr/bin/sox
link path=usr/bin/soxi target=sox
file path=usr/include/sox.h
-link path=usr/lib/$(MACH64)/libsox.so target=libsox.so.2.0.0
-link path=usr/lib/$(MACH64)/libsox.so.2 target=libsox.so.2.0.0
-file path=usr/lib/$(MACH64)/libsox.so.2.0.0
+link path=usr/lib/$(MACH64)/libsox.so target=libsox.so.3.0.0
+link path=usr/lib/$(MACH64)/libsox.so.3 target=libsox.so.3.0.0
+file path=usr/lib/$(MACH64)/libsox.so.3.0.0
file path=usr/lib/$(MACH64)/pkgconfig/sox.pc
-link path=usr/lib/libsox.so target=libsox.so.2.0.0
-link path=usr/lib/libsox.so.2 target=libsox.so.2.0.0
-file path=usr/lib/libsox.so.2.0.0
+link path=usr/lib/libsox.so target=libsox.so.3.0.0
+link path=usr/lib/libsox.so.3 target=libsox.so.3.0.0
+file path=usr/lib/libsox.so.3.0.0
file path=usr/lib/pkgconfig/sox.pc
link path=usr/share/man/man1/play.1 target=sox.1
link path=usr/share/man/man1/rec.1 target=sox.1