On 2021/10/30 14:25, Nam Nguyen wrote:
> Here is a diff incorporating sthen@'s feedback and tj@'s feedback to add
> a comment about mirroring.
>
> Stuart Henderson writes:
>
> > On 2021/10/28 22:36, Nam Nguyen wrote:
> >> I prepared a release tarball from a checkout:
> >> install groff for tbl and nroff
> >> install autoconf-archive, autoconf and automake
> >> edit src/Makefile.am append "libsox.sym" to EXTRA_DIST (needed to avoid
> >> compilation error)
> >> edit configure.ac: 14.4.3git --> 14.4.2pl20210509
> >> $ AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.16 autoreconf-2.69 -i
> >> $ ./configure
> >> $ gmake dist
> >
> > I would prefer it if those extra steps were done in the port, either as
> > a "dist" target to generate the tar, or as steps in the normal build
> > so that it can use an unmodified archive from git. Alternatively (less
> > preferred but I would still be ok with it) with comments showing how
> > to do it. Bsaically so that somebody else wanting to update it doesn't
> > need to figure it out for themselves.
>
> It has a new dist target copied from net/librenms. scp is sent to my
> server, so that would have to be modified. GIT_V is also set to
> 14.4.3git. I use `make dist' instead of `gmake dist' and it still seems
> to work.
>
> I had to add some BUILD_DEPENDS for the dist target: autoconf, automake,
> libtool, groff and autoconf-archive. I retain CONFIURE_STYLE=gnu.
Oh could you skip those BUILD_DEPENDS/AUTOxxxx_VERSION please, just put
a comment near dist
> > Could you remove that please - sox doesn't use libopus functions directly,
> > only uses other libraries which call those functions. This changed because
> > sox now uses -Wl,--as-needed.
>
> `make port-lib-depends' wants to remove LIB_DEPENDS=audio/opus but I
> kept it in for clarity. I removed WANTLIB opus.
LIB_DEPENDS should not be there unless there's an associated WANTLIB,
otherwise you get this
===> Building package for sox-14.4.2pl20210509
Create /usr/ports/packages/amd64/all/sox-14.4.2pl20210509.tgz
LIB_DEPENDS audio/opus not needed for audio/sox ?
> >
> >> - --without-amrwb \
> >> - --without-amrnb \
> >
> >> + --enable-formats=no \
> >
> > Though --enable-formats=no stops it from building the amr format
> > support, I think it would be better to disable it detecting it at all,
> > i.e.
> >
> > --without-opencore-amrnb \
> > --without-opencore-amrwb \
>
> It complains about "configure: WARNING: unrecognized options:
> --without-opencore-amrnb, --without-opencore-amrwb."
>
> As intended, it still skips over the check because this used to be
> printed but is no longer printed:
>
> checking for opencore-amrnb/interf_dec.h... no
> checking for opencore-amrwb/dec_if.h... no
strange, it definitely does honour them, their unrecognized option
warning is missing something :)
you removed --enable-formats=no which you had in the last diff, was
that on purpose? seem like it might be useful to avoid hidden deps in
future updates.
> + ${MAKE_PROGRAM} dist; \
> + scp $$f train:source/; \
> + cd -; rm -rf $$t; rm -f /tmp/sox-code-${GIT_COMMIT}.zip;
nit, <space><tab> on the line above
> +
> 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>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/audio/sox/distinfo,v
> retrieving revision 1.14
> diff -u -p -u -p -r1.14 distinfo
> --- distinfo 18 Mar 2015 13:13:08 -0000 1.14
> +++ distinfo 30 Oct 2021 21:20:51 -0000
> @@ -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) =
> V/qDSH4yoxHteEaVT5P0qciuplLDRJt2Cs7WquyFiNk=
> +SIZE (sox-14.4.2pl20210509.tar.gz) = 1013680
> Index: patches/patch-src_formats_c
> ===================================================================
> RCS file: /cvs/ports/audio/sox/patches/patch-src_formats_c,v
> retrieving revision 1.6
> diff -u -p -u -p -r1.6 patch-src_formats_c
> --- patches/patch-src_formats_c 18 Mar 2015 13:13:08 -0000 1.6
> +++ patches/patch-src_formats_c 30 Oct 2021 21:20:51 -0000
> @@ -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)
> +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
> {
> 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
> Index: patches/patch-src_sndio_c
> ===================================================================
> RCS file: patches/patch-src_sndio_c
> diff -N patches/patch-src_sndio_c
> --- patches/patch-src_sndio_c 21 Sep 2016 11:40:14 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -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)
> Index: patches/patch-src_sox_h
> ===================================================================
> RCS file: patches/patch-src_sox_h
> diff -N patches/patch-src_sox_h
> --- patches/patch-src_sox_h 22 Sep 2016 19:58:22 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -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 */
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/audio/sox/pkg/PLIST,v
> retrieving revision 1.9
> diff -u -p -u -p -r1.9 PLIST
> --- pkg/PLIST 18 Mar 2015 13:13:08 -0000 1.9
> +++ pkg/PLIST 30 Oct 2021 21:20:51 -0000
> @@ -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