update to 14.4.2pl20210509

This is an update to git commit
(42b3557e13e0fe01a83465b672d89faddbe65f49) in order to pull in the
latest fixes.

This diff:
- mirrors git checkout as a release tarball. this can be generated with
 `make dist' using the new dist: target.
- bumps library minor to 4.1 because of addition of symbols
- removes iconv from WANTLIB and LIB_DEPENDS as reported by make
  port-lib-depends-check
- removes opus from WANTLIB and LIB_DEPENDS because port uses opusfile
- renames CONFIGURE_ARGS
- removes --disable-silent-libtool (does not exist)
- --enable-formats=no by default to avoid picking up stray formats in
  the future
- compiles extras target during do-test to allow tests to run
- removes upstreamed patches
- removes hppa quirks

feedback from sthen@ sdk@ tj@
$MAINTAINER timeout on earlier revision
ok sthen@
This commit is contained in:
namn 2021-10-30 22:59:03 +00:00
parent d11d2fb0cd
commit 72c1f990f6
6 changed files with 80 additions and 92 deletions

View File

@ -1,12 +1,12 @@
# $OpenBSD: Makefile,v 1.72 2019/07/12 20:43:41 sthen Exp $
BROKEN-hppa = bend.c:155:12: internal compiler error: in expand_expr_addr_expr_1, at expr.c:7697
# $OpenBSD: Makefile,v 1.73 2021/10/30 22:59:03 namn Exp $
COMMENT= Sound eXchange, the Swiss Army knife of audio manipulation
DISTNAME= sox-14.4.2
REVISION= 5
SHARED_LIBS += sox 4.0 # 3.0
V= 14.4.2pl20210509
# see AC_INIT in ${WRKSRC}/configure.ac
GIT_V= 14.4.3git
DISTNAME= sox-${V}
SHARED_LIBS += sox 4.1 # 3.0
CATEGORIES= audio
HOMEPAGE= http://sox.sourceforge.net/
@ -18,10 +18,15 @@ PERMIT_PACKAGE= Yes
WANTLIB += c m z sndio
WANTLIB += FLAC gsm mad id3tag mp3lame ogg
WANTLIB += sndfile vorbis vorbisenc vorbisfile
WANTLIB += opus opusfile twolame wavpack
WANTLIB += iconv png
WANTLIB += opusfile twolame wavpack
WANTLIB += png
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=sox/}
GITWEB_URL= https://sourceforge.net/code-snapshots/git
GIT_COMMIT= 42b3557e13e0fe01a83465b672d89faddbe65f49
# mirror git checkout as tarball for latest fixes until new release.
# see dist: target and `make dist' to generate tarball.
MASTER_SITES= https://namtsui.com/source/
# see CONFIGURE_ARGS below
LIB_DEPENDS= \
@ -33,62 +38,81 @@ LIB_DEPENDS= \
audio/libogg \
audio/libsndfile \
audio/libvorbis \
audio/opus \
audio/opusfile \
audio/twolame \
audio/wavpack \
converters/libiconv \
graphics/png
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS= --datarootdir=${LOCALBASE} \
--enable-largefile \
--disable-silent-libtool \
--disable-openmp \
--enable-symlinks \
--without-libltdl \
--enable-largefile \
--enable-symlinks \
--without-libltdl \
--disable-openmp \
--with-distro=OpenBSD
# Sound drivers
CONFIGURE_ARGS+= \
--without-ao \
--without-oss \
--without-alsa \
--without-coreaudio \
--without-pulseaudio \
--without-waveaudio \
--without-sunaudio \
--with-sndio
--disable-ao \
--disable-oss \
--disable-alsa \
--disable-coreaudio \
--disable-pulseaudio \
--disable-waveaudio \
--disable-sunaudio \
--enable-sndio
# Additional file formats
CONFIGURE_ARGS+= \
--without-magic \
--with-png \
--without-ladspa \
--with-mad \
--with-id3tag \
--with-lame \
--with-twolame \
--with-oggvorbis \
--with-opus \
--with-flac \
--without-amrwb \
--without-amrnb \
--with-wavpack \
--with-sndfile \
--with-mp3 \
--with-gsm \
--with-lpc10
CONFIGURE_ARGS+= \
--with-id3tag \
--with-lame \
--with-mad \
--without-magic \
--without-opencore-amrnb \
--without-opencore-amrwb \
--with-png \
--with-twolame \
--enable-formats=no \
--disable-amrnb \
--disable-amrwb \
--enable-flac \
--enable-gsm \
--enable-lpc10 \
--enable-mp3 \
--enable-oggvorbis \
--enable-opus \
--enable-sndfile \
--enable-wavpack \
--without-ladspa
CONFIGURE_ENV= \
CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
# requires: autoconf-2.69, automake-1.16, devel/libtool, textproc/groff and
# devel/autoconf-archive
dist:
ftp -o /tmp/sox-code-${GIT_COMMIT}.zip \
${GITWEB_URL}/s/so/sox/code.git/sox-code-${GIT_COMMIT}.zip; \
t=`mktemp -d /tmp/sox.XXXXXXXXXX`; \
f=$$t/sox-code-${GIT_COMMIT}/${DISTNAME}.tar.gz; \
ac_v=2.69; \
am_v=1.16; \
cd $$t; \
unzip /tmp/sox-code-${GIT_COMMIT}.zip; \
cd sox-code-${GIT_COMMIT}; \
echo "EXTRA_DIST += libsox.sym" >> ./src/Makefile.am; \
sed -ie "s/${GIT_V}/${V}/g" ./configure.ac; \
env -i AUTOCONF_VERSION=$$ac_v AUTOMAKE_VERSION=$$am_v \
autoreconf-$$ac_v -i && \
./configure && \
${MAKE_PROGRAM} dist; \
scp $$f train:source/; \
cd -; rm -rf $$t; rm -f /tmp/sox-code-${GIT_COMMIT}.zip;
do-test:
@cd ${WRKSRC}/src && ${MAKE_PROGRAM} ${MAKE_FLAGS} \
-f ${MAKE_FILE} extras
@cd ${WRKSRC}/src && ./tests.sh && ./testall.sh
# Attempt to avoid SIGILL in gcc.
MODULES+= gcc4
MODGCC4_ARCHS= hppa
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (sox-14.4.2.tar.gz) = tF9ZhkP/vY42P/JNYRZszsSDb+ptOIiIG431Pju1X2w=
SIZE (sox-14.4.2.tar.gz) = 1134299
SHA256 (sox-14.4.2pl20210509.tar.gz) = SCj3mkHxutMo9TsSL4tp42jquTRfcMuEiE3hI9KDhm8=
SIZE (sox-14.4.2pl20210509.tar.gz) = 1013682

View File

@ -1,7 +1,8 @@
$OpenBSD: patch-src_formats_c,v 1.6 2015/03/18 13:13:08 naddy Exp $
--- src/formats.c.orig Mon Oct 27 03:55:50 2014
+++ src/formats.c Tue Feb 24 17:07:28 2015
@@ -353,7 +353,7 @@ static int sox_checkformat(sox_format_t * ft)
$OpenBSD: patch-src_formats_c,v 1.7 2021/10/30 22:59:03 namn Exp $
Index: src/formats.c
--- src/formats.c.orig
+++ src/formats.c
@@ -360,7 +360,7 @@ static int sox_checkformat(sox_format_t * ft)
return SOX_SUCCESS;
}
@ -10,7 +11,7 @@ $OpenBSD: patch-src_formats_c,v 1.6 2015/03/18 13:13:08 naddy Exp $
{
return !(
strncasecmp(text, "http:" , (size_t)5) &&
@@ -390,7 +390,7 @@ static FILE * xfopen(char const * identifier, char con
@@ -442,7 +442,7 @@ static FILE * xfopen(char const * identifier, char con
else if (is_url(identifier)) {
FILE * f = NULL;
#ifdef HAVE_POPEN

View File

@ -1,25 +0,0 @@
$OpenBSD: patch-src_sndio_c,v 1.1 2016/09/21 11:40:14 ratchov Exp $
--- src/sndio.c.orig Mon Jan 30 04:01:44 2012
+++ src/sndio.c Tue Feb 9 23:23:00 2016
@@ -113,8 +113,6 @@ static int startany(sox_format_t *ft, unsigned mode)
else
reqpar.rchan = ft->signal.channels;
}
- if (ft->signal.precision > 0)
- reqpar.bits = ft->signal.precision;
switch (ft->encoding.encoding) {
case SOX_ENCODING_SIGN2:
reqpar.sig = 1;
@@ -127,6 +125,12 @@ static int startany(sox_format_t *ft, unsigned mode)
}
if (ft->encoding.bits_per_sample > 0)
reqpar.bits = ft->encoding.bits_per_sample;
+ else if (ft->signal.precision > 0)
+ reqpar.bits = ft->signal.precision;
+ else
+ reqpar.bits = SOX_DEFAULT_PRECISION;
+ reqpar.bps = (reqpar.bits + 7) / 8;
+ reqpar.msb = 1;
if (ft->encoding.reverse_bytes != sox_option_default) {
reqpar.le = SIO_LE_NATIVE;
if (ft->encoding.reverse_bytes)

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-src_sox_h,v 1.1 2016/09/22 19:58:22 sthen Exp $
--- src/sox.h.orig Mon Oct 6 03:02:30 2014
+++ src/sox.h Tue Sep 20 11:14:30 2016
@@ -44,7 +44,7 @@ Plugins API:
Attribute required on all functions exported by libSoX and on all function
pointer types used by the libSoX API.
*/
-#ifdef __GNUC__
+#if defined(__GNUC__) && defined(__i386)
#define LSX_API __attribute__ ((cdecl)) /* libSoX function */
#elif _MSC_VER
#define LSX_API __cdecl /* libSoX function */

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.9 2015/03/18 13:13:08 naddy Exp $
@comment $OpenBSD: PLIST,v 1.10 2021/10/30 22:59:03 namn Exp $
@pkgpath audio/sox,mp3
@pkgpath audio/sox,mp3,vorbis
@pkgpath audio/sox,vorbis
@ -7,7 +7,7 @@ bin/rec
@bin bin/sox
bin/soxi
include/sox.h
lib/libsox.a
@static-lib lib/libsox.a
lib/libsox.la
@lib lib/libsox.so.${LIBsox_VERSION}
lib/pkgconfig/sox.pc