Tuesday, March 05, 2019

Re: audacity-2.2.2

On Sun, Feb 24, 2019 at 08:20:04PM +0100, Jeremie Courreges-Anglas wrote:
>
> So audacity is still currently BROKEN. Here's an unfinished update to
> version 2.2.2.
>
> Some notes:
> - audio/libsoxr has replaced libsamplerate
> - I disabled the use of system vamp-plugin-sdk, see the comments
> - audio/portaudio-svn is used instead of the not-so-mandatory bundled
> version (the bundled version adds an interface which is only used in
> portmixer, which we don't activate anyway).
> - INSTALL also mentions the mandatory use of the bundled portmidi, which
> doesn't work on OpenBSD yet. Alexandre expressed interest in writing
> a backend.
> - also in INSTALL: "Audacity 2.2.2 requires wxWidgets 3.0.x, preferably
> 3.0.2, built with gtk2.". I hope that the use of gtk3 is not
> a problem...

I think you should just commit this.
It will well people working on it directly in-tree.


>
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/audio/audacity/Makefile,v
> retrieving revision 1.55
> diff -u -p -r1.55 Makefile
> --- Makefile 2 Jan 2019 12:44:53 -0000 1.55
> +++ Makefile 24 Feb 2019 18:51:34 -0000
> @@ -1,18 +1,14 @@
> # $OpenBSD: Makefile,v 1.55 2019/01/02 12:44:53 jca Exp $
>
> -BROKEN= requires old wxWidgets: http://trac.wxwidgets.org/ticket/16300
> -
> COMMENT= free audio editor
>
> -V= 1.3.9
> +V= 2.2.2
> DISTNAME= audacity-minsrc-${V}
> PKGNAME= audacity-${V}
> -REVISION= 17
> CATEGORIES= audio
>
> -EXTRACT_SUFX= .tar.bz2
> -
> MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=audacity/}
> +EXTRACT_SUFX= .tar.xz
>
> HOMEPAGE= http://audacity.sourceforge.net/
>
> @@ -25,34 +21,36 @@ WANTLIB += atk-1.0 c cairo expat fontcon
> WANTLIB += gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 gtk-x11-2.0
> WANTLIB += id3tag intl m mad ogg pango-1.0 pangocairo-1.0 pangoft2-1.0
> WANTLIB += portaudio samplerate sndfile tag vamp-hostsdk vorbis
> -WANTLIB += vorbisenc vorbisfile wx_base wx_base_net wx_base_odbc
> -WANTLIB += wx_base_xml wx_gtk2_adv wx_gtk2_aui wx_gtk2_core wx_gtk2_dbgrid
> -WANTLIB += wx_gtk2_html wx_gtk2_qa wx_gtk2_richtext wx_gtk2_xrc
> -WANTLIB += z
> +# XXX wxwidgets WANTLIB
> +WANTLIB += vorbisenc vorbisfile z
>
> COMPILER = base-clang ports-gcc base-gcc
>
> BUILD_DEPENDS= archivers/zip \
> - devel/gettext-tools
> -LIB_DEPENDS= x11/wxWidgets>=2.8.6 \
> - audio/libsamplerate \
> + devel/gettext-tools \
> + shells/bash
> +LIB_DEPENDS= x11/wxWidgets>=3.0.4 \
> + audio/libsoxr \
> audio/flac \
> audio/libvorbis \
> audio/libid3tag \
> audio/libmad \
> audio/portaudio-svn>=1406p1 \
> audio/soundtouch \
> - audio/vamp-plugin-sdk>=2.2.1p0 \
> audio/taglib
> +# XXX libtool/ld(1) fail to find libvamp-hostsdk.so
> +#LIB_DEPENDS+= audio/vamp-plugin-sdk>=2.2.1p0
> RUN_DEPENDS= devel/desktop-file-utils \
> misc/shared-mime-info
>
> USE_GMAKE= Yes
> CONFIGURE_STYLE= gnu
> -CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
> - CFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
> - LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib" \
> - gl_cv_cc_visibility=no
> +CONFIGURE_ENV= CC="${CC}" CXX="${CXX}" OBJCXX="${CXX}" \
> + CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
> + CFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include ${CFLAGS}" \
> + LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib ${LDFLAGS}"
> +# Silence noisy warnings
> +CONFIGURE_ENV+= CXXFLAGS="-Wno-inconsistent-missing-override ${CXXFLAGS}"
>
> MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC} \
> ${WRKSRC}/lib-src/lib-widget-extra \
> @@ -67,28 +65,32 @@ CONFIGURE_ARGS= --enable-unicode \
> --with-lib-preferences=system \
> --with-libsndfile=system \
> --with-expat=system \
> - --with-libsamplerate=system \
> - --without-libresample \
> + --with-libsoxr=system \
> --with-libvorbis=system \
> --with-libmad=system \
> --with-libflac=system \
> --with-libid3tag=system \
> + --with-portaudio=system \
> --with-soundtouch=system \
> - --with-libvamp=system \
> --without-libtwolame \
> --without-ffmpeg \
> --without-redland \
> --without-slv2 \
> --without-liblrdf \
> --with-portmixer=no
> +# XXX libtool/ld(1) fail to find libvamp-hostsdk.so
> +CONFIGURE_ARGS+= --with-libvamp=no
>
> -MAKE_FLAGS= CC="${CC}"
> -WRKDIST= ${WRKDIR}/audacity-src-${V}
> +WRKDIST= ${WRKDIR}/${DISTNAME}-rc1
>
> # Regression tests are in the source tarball but as of 2007, they have
> # not been updated for 3 years ; as they're completely out-of-sync with
> # the ongoing development, there's no point in running them
> NO_TEST= Yes
> +
> +# dummy Makefile to disable portmixer
> +post-extract:
> + printf 'all:\ninstall:\n' > ${WRKSRC}/lib-src/portmixer/Makefile
>
> post-install:
> ${INSTALL_DATA_DIR} ${PREFIX}/share/pixmaps
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/audio/audacity/distinfo,v
> retrieving revision 1.10
> diff -u -p -r1.10 distinfo
> --- distinfo 18 Jan 2015 03:12:40 -0000 1.10
> +++ distinfo 24 Feb 2019 18:51:34 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (audacity-minsrc-1.3.9.tar.bz2) = 9Hr+jc84Fl01UBYOt+lGlBGfXaVjZ0BgqTxbxm4voBI=
> -SIZE (audacity-minsrc-1.3.9.tar.bz2) = 6719955
> +SHA256 (audacity-minsrc-2.2.2.tar.xz) = l3UaAOMwJrYdBQV8FSXW3d/U5kc3vTX1ncLiHj1nYuI=
> +SIZE (audacity-minsrc-2.2.2.tar.xz) = 8210700
> Index: patches/patch-Makefile_in
> ===================================================================
> RCS file: patches/patch-Makefile_in
> diff -N patches/patch-Makefile_in
> --- patches/patch-Makefile_in 14 Mar 2009 03:49:43 -0000 1.4
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,24 +0,0 @@
> -$OpenBSD: patch-Makefile_in,v 1.4 2009/03/14 03:49:43 jakemsr Exp $
> ---- Makefile.in.orig Tue Jan 27 12:52:00 2009
> -+++ Makefile.in Tue Feb 10 03:21:24 2009
> -@@ -30,17 +30,11 @@ install: audacity $(EXTRAINSTALLTARGETS)
> - $(INSTALL) -d $(DESTDIR)$(BINDIR)
> - $(INSTALL) -m 755 audacity $(DESTDIR)$(BINDIR)/$(AUDACITY_NAME)
> -
> -- # install docs
> -- $(INSTALL) -d $(DESTDIR)$(DATADIR)/$(AUDACITY_NAME)
> -- $(INSTALL) -d $(DESTDIR)$(DATADIR)/doc/$(AUDACITY_NAME)
> -- $(INSTALL) -m 644 README.txt $(DESTDIR)$(DATADIR)/doc/$(AUDACITY_NAME)/README.txt
> -- $(INSTALL) -m 644 LICENSE.txt $(DESTDIR)$(DATADIR)/doc/$(AUDACITY_NAME)/LICENSE.txt
> --
> - # install manpage
> - $(INSTALL) -d $(DESTDIR)$(MANDIR)/man1
> -- -test -f help/audacity.1.gz && \
> -- $(INSTALL) -m 644 help/audacity.1.gz \
> -- $(DESTDIR)$(MANDIR)/man1/$(AUDACITY_NAME).1.gz
> -+ -test -f help/audacity.1 && \
> -+ $(INSTALL) -m 644 help/audacity.1 \
> -+ $(DESTDIR)$(MANDIR)/man1/$(AUDACITY_NAME).1
> -
> - # install nyquist
> - $(INSTALL) -d $(DESTDIR)$(DATADIR)/$(AUDACITY_NAME)/nyquist
> Index: patches/patch-configure
> ===================================================================
> RCS file: /cvs/ports/audio/audacity/patches/patch-configure,v
> retrieving revision 1.17
> diff -u -p -r1.17 patch-configure
> --- patches/patch-configure 3 Nov 2018 13:26:27 -0000 1.17
> +++ patches/patch-configure 24 Feb 2019 18:51:34 -0000
> @@ -1,140 +1,22 @@
> -$OpenBSD: patch-configure,v 1.17 2018/11/03 13:26:27 ajacoutot Exp $
> +$OpenBSD$
>
> -- last hunk: use ',' as separator, otherwise the paths in $pa_libs get
> - interpreted as part of the regex.
> -
> -- GTK_LIBS: fix linking with ld.lld
> +- force-disable check for Pa_GetStreamHostApiType, likely not needed
> + anyway. (Seems only used in portmixer, which we disable.) We want to
> + try to use audio/portaudio instead.
>
> Index: configure
> --- configure.orig
> +++ configure
> -@@ -822,7 +822,6 @@ JACK_CFLAGS
> - JACK_LIBS'
> - ac_subdirs_all='"lib-src/FileDialog"
> - $CONFIG_SUBDIRS
> --lib-src/portaudio-v19
> - lib-src/portmixer'
> -
> - # Initialize some variables set by options.
> -@@ -6933,7 +6932,7 @@ if test "${ac_cv_lib_FLAC_FLAC__stream_decoder_new+set
> - $as_echo_n "(cached) " >&6
> - else
> - ac_check_lib_save_LIBS=$LIBS
> --LIBS="-lFLAC -lFLAC++ -lFLAC $LIBS"
> -+LIBS="-lFLAC -lFLAC++ -lFLAC -logg $LIBS"
> - cat >conftest.$ac_ext <<_ACEOF
> - /* confdefs.h. */
> - _ACEOF
> -@@ -7136,7 +7135,7 @@ fi
> +@@ -22409,12 +22409,7 @@ fi
> + #include <portaudio.h>
>
> - if test "x$lib_found" = "xyes" && test "x$header_found" = "xyes" ; then
> - LIBFLAC_SYSTEM_AVAILABLE="yes"
> -- LIBFLAC_SYSTEM_LIBS="-lFLAC++ -lFLAC"
> -+ LIBFLAC_SYSTEM_LIBS="-lFLAC++ -lFLAC -logg"
> - LIBFLAC_SYSTEM_CPPSYMBOLS="USE_LIBFLAC"
> - { $as_echo "$as_me:$LINENO: FLAC libraries are available as system libraries" >&5
> - $as_echo "$as_me: FLAC libraries are available as system libraries" >&6;}
> -@@ -7684,12 +7683,12 @@ if test -n "$SOUNDTOUCH_CFLAGS"; then
> - pkg_cv_SOUNDTOUCH_CFLAGS="$SOUNDTOUCH_CFLAGS"
> - elif test -n "$PKG_CONFIG"; then
> - if test -n "$PKG_CONFIG" && \
> -- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"soundtouch-1.0 >= 1.3.0\"") >&5
> -- ($PKG_CONFIG --exists --print-errors "soundtouch-1.0 >= 1.3.0") 2>&5
> -+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"soundtouch >= 1.3.0\"") >&5
> -+ ($PKG_CONFIG --exists --print-errors "soundtouch >= 1.3.0") 2>&5
> - ac_status=$?
> - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
> - (exit $ac_status); }; then
> -- pkg_cv_SOUNDTOUCH_CFLAGS=`$PKG_CONFIG --cflags "soundtouch-1.0 >= 1.3.0" 2>/dev/null`
> -+ pkg_cv_SOUNDTOUCH_CFLAGS=`$PKG_CONFIG --cflags "soundtouch >= 1.3.0" 2>/dev/null`
> - else
> - pkg_failed=yes
> - fi
> -@@ -7700,12 +7699,12 @@ if test -n "$SOUNDTOUCH_LIBS"; then
> - pkg_cv_SOUNDTOUCH_LIBS="$SOUNDTOUCH_LIBS"
> - elif test -n "$PKG_CONFIG"; then
> - if test -n "$PKG_CONFIG" && \
> -- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"soundtouch-1.0 >= 1.3.0\"") >&5
> -- ($PKG_CONFIG --exists --print-errors "soundtouch-1.0 >= 1.3.0") 2>&5
> -+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"soundtouch >= 1.3.0\"") >&5
> -+ ($PKG_CONFIG --exists --print-errors "soundtouch >= 1.3.0") 2>&5
> - ac_status=$?
> - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
> - (exit $ac_status); }; then
> -- pkg_cv_SOUNDTOUCH_LIBS=`$PKG_CONFIG --libs "soundtouch-1.0 >= 1.3.0" 2>/dev/null`
> -+ pkg_cv_SOUNDTOUCH_LIBS=`$PKG_CONFIG --libs "soundtouch >= 1.3.0" 2>/dev/null`
> - else
> - pkg_failed=yes
> - fi
> -@@ -7723,9 +7722,9 @@ else
> - _pkg_short_errors_supported=no
> - fi
> - if test $_pkg_short_errors_supported = yes; then
> -- SOUNDTOUCH_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "soundtouch-1.0 >= 1.3.0" 2>&1`
> -+ SOUNDTOUCH_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "soundtouch >= 1.3.0" 2>&1`
> - else
> -- SOUNDTOUCH_PKG_ERRORS=`$PKG_CONFIG --print-errors "soundtouch-1.0 >= 1.3.0" 2>&1`
> -+ SOUNDTOUCH_PKG_ERRORS=`$PKG_CONFIG --print-errors "soundtouch >= 1.3.0" 2>&1`
> - fi
> - # Put the nasty error message in config.log where it belongs
> - echo "$SOUNDTOUCH_PKG_ERRORS" >&5
> -@@ -9210,18 +9209,14 @@ cat >>confdefs.h <<\_ACEOF
> _ACEOF
> +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
> +- $EGREP "Pa_GetStreamHostApiType" >/dev/null 2>&1; then :
> + have_portaudio_support=yes
> +-else
> +- have_portaudio_support=no
> +-fi
> + rm -f conftest*
>
> - CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
> -+ LIBS="$LIBS $GTK_LIBS"
> - fi
> - ;;
> - esac
> -
> -
> --LOCAL_LIBS="$LOCAL_LIBS portaudio-v19/lib/libportaudio.a"
> --EXTRAOBJS="$EXTRAOBJS ../lib-src/portaudio-v19/lib/libportaudio.a"
> --CXXFLAGS="-I\$(top_srcdir)/lib-src/portaudio-v19/include $CXXFLAGS"
> -
> --subdirs="$subdirs lib-src/portaudio-v19"
> -
> --
> - case "${host_os}" in
> - darwin* | rhapsody*)
> - LIBS="-framework AudioUnit -framework AudioToolbox $LIBS"
> -@@ -9371,9 +9366,7 @@ else
> - $as_echo "yes" >&6; }
> - have_jack=yes
> - fi
> -- if [ $have_jack = "yes" ] ; then
> -- LIBS="$LIBS $JACK_LIBS"
> -- fi
> -+
> - { $as_echo "$as_me:$LINENO: checking for HPI_SubSysCreate in -lhpi" >&5
> - $as_echo_n "checking for HPI_SubSysCreate in -lhpi... " >&6; }
> - if test "${ac_cv_lib_hpi_HPI_SubSysCreate+set}" = set; then
> -@@ -9637,7 +9630,6 @@ _ACEOF
> -
> - subdirs="$subdirs lib-src/portmixer"
> -
> -- ac_configure_args="$ac_configure_args --with-pa-include=../portaudio-v19/include"
> - fi
> -
> - { $as_echo "$as_me:$LINENO: checking for lrint" >&5
> -@@ -11255,7 +11247,7 @@ $as_echo "$as_me: WARNING: no configuration informatio
> - { $as_echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
> - $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
> - # The eval makes quoting arguments work.
> -- eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
> -+ eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args CFLAGS='"$CFLAGS"' CXXFLAGS='"$CXXFLAGS"' LDFLAGS='"$LDFLAGS"' \
> - --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
> - { { $as_echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
> - $as_echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
> -@@ -11271,9 +11263,8 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_u
> - fi
> -
> -
> --pa_libs=
> --pa_libs=`grep 'Libs:' lib-src/portaudio-v19/portaudio-2.0.pc | sed -e 's/Libs://;s/-L${libdir}//;s/-lportaudio//'`
> --sed -i -e "s/@PA_LIBS@/$pa_libs/" src/Makefile
> -+pa_libs=`pkg-config --libs portaudio-2.0`
> -+sed -i -e "s,@PA_LIBS@,$pa_libs," src/Makefile
>
> - echo ""
> - echo "Finished configure:"
> Index: patches/patch-lib-src_libnyquist_Makefile_in
> ===================================================================
> RCS file: /cvs/ports/audio/audacity/patches/patch-lib-src_libnyquist_Makefile_in,v
> retrieving revision 1.4
> diff -u -p -r1.4 patch-lib-src_libnyquist_Makefile_in
> --- patches/patch-lib-src_libnyquist_Makefile_in 28 Oct 2009 18:40:13 -0000 1.4
> +++ patches/patch-lib-src_libnyquist_Makefile_in 24 Feb 2019 18:51:34 -0000
> @@ -1,14 +1,18 @@
> $OpenBSD: patch-lib-src_libnyquist_Makefile_in,v 1.4 2009/10/28 18:40:13 jakemsr Exp $
> ---- lib-src/libnyquist/Makefile.in.orig Sun Oct 18 15:39:32 2009
> -+++ lib-src/libnyquist/Makefile.in Sun Oct 18 15:39:06 2009
> -@@ -251,8 +251,8 @@ top_build_prefix = @top_build_prefix@
> +
> +- don't use the bundled portaudio and sndfile libraries
> +
> +Index: lib-src/libnyquist/Makefile.in
> +--- lib-src/libnyquist/Makefile.in.orig
> ++++ lib-src/libnyquist/Makefile.in
> +@@ -477,8 +477,8 @@ target_alias = @target_alias@
> + top_build_prefix = @top_build_prefix@
> top_builddir = @top_builddir@
> top_srcdir = @top_srcdir@
> - NYQUIST = nyquist
> --PORTAUDIO_CFLAGS = -I../portaudio-v19/include
> --SNDFILE_CFLAGS = -I../libsndfile/src
> -+PORTAUDIO_CFLAGS =
> -+SNDFILE_CFLAGS =
> +-PORTAUDIO_CFLAGS = -I${srcdir}/../portaudio-v19/include
> +-SNDFILE_CFLAGS = -I${builddir}/../libsndfile/src
> ++PORTAUDIO_CFLAGS =
> ++SNDFILE_CFLAGS =
>
> # tell aclocal that extra macros can be found in autotools/m4/
> ACLOCAL_AMFLAGS = -I autotools/m4
> Index: patches/patch-lib-src_libnyquist_nyquist_cmt_midifns_c
> ===================================================================
> RCS file: /cvs/ports/audio/audacity/patches/patch-lib-src_libnyquist_nyquist_cmt_midifns_c,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-lib-src_libnyquist_nyquist_cmt_midifns_c
> --- patches/patch-lib-src_libnyquist_nyquist_cmt_midifns_c 5 Dec 2013 21:58:50 -0000 1.1
> +++ patches/patch-lib-src_libnyquist_nyquist_cmt_midifns_c 24 Feb 2019 18:51:34 -0000
> @@ -1,7 +1,11 @@
> -$OpenBSD: patch-lib-src_libnyquist_nyquist_cmt_midifns_c,v 1.1 2013/12/05 21:58:50 naddy Exp $
> ---- lib-src/libnyquist/nyquist/cmt/midifns.c.orig Mon Aug 31 12:45:45 2009
> -+++ lib-src/libnyquist/nyquist/cmt/midifns.c Thu Dec 5 22:41:35 2013
> -@@ -117,7 +117,6 @@
> +$OpenBSD$
> +
> +- sys/timeb.h and ftime were removed from POSIX-2008
> +
> +Index: lib-src/libnyquist/nyquist/cmt/midifns.c
> +--- lib-src/libnyquist/nyquist/cmt/midifns.c.orig
> ++++ lib-src/libnyquist/nyquist/cmt/midifns.c
> +@@ -118,7 +118,6 @@
> #ifdef UNIX
> #ifndef UNIX_IRIX
> #include "sys/time.h"
> Index: patches/patch-lib-src_libnyquist_nyquist_ffts_src_fftlib_c
> ===================================================================
> RCS file: patches/patch-lib-src_libnyquist_nyquist_ffts_src_fftlib_c
> diff -N patches/patch-lib-src_libnyquist_nyquist_ffts_src_fftlib_c
> --- patches/patch-lib-src_libnyquist_nyquist_ffts_src_fftlib_c 4 May 2017 12:58:04 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,222 +0,0 @@
> -$OpenBSD: patch-lib-src_libnyquist_nyquist_ffts_src_fftlib_c,v 1.1 2017/05/04 12:58:04 espie Exp $
> -fix for C99 inline semantics
> -
> -Index: lib-src/libnyquist/nyquist/ffts/src/fftlib.c
> ---- lib-src/libnyquist/nyquist/ffts/src/fftlib.c.orig
> -+++ lib-src/libnyquist/nyquist/ffts/src/fftlib.c
> -@@ -61,7 +61,7 @@ for (i1 = 0; i1 < Nroot_1; i1++){
> - parts of ffts1
> - *************************************************/
> -
> --inline void bitrevR2(float *ioptr, long M, short *BRLow);
> -+void bitrevR2(float *ioptr, long M, short *BRLow);
> - inline void bitrevR2(float *ioptr, long M, short *BRLow){
> - /*** bit reverse and first radix 2 stage of forward or inverse fft ***/
> - float f0r;
> -@@ -198,7 +198,7 @@ for (; ioptr < iolimit; ioptr += POW2(M/2+1)){
> - };
> - }
> -
> --inline void fft2pt(float *ioptr);
> -+void fft2pt(float *ioptr);
> - inline void fft2pt(float *ioptr){
> - /*** RADIX 2 fft ***/
> - float f0r, f0i, f1r, f1i;
> -@@ -229,7 +229,7 @@ ioptr[3] = f1i;
> - }
> -
> -
> --inline void fft4pt(float *ioptr);
> -+void fft4pt(float *ioptr);
> - inline void fft4pt(float *ioptr){
> - /*** RADIX 4 fft ***/
> - float f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
> -@@ -284,7 +284,7 @@ ioptr[6] = f3r;
> - ioptr[7] = f3i;
> - }
> -
> --inline void fft8pt(float *ioptr);
> -+void fft8pt(float *ioptr);
> - inline void fft8pt(float *ioptr){
> - /*** RADIX 8 fft ***/
> - float w0r = 1.0/MYROOT2; /* cos(pi/4) */
> -@@ -403,7 +403,7 @@ ioptr[14] = f6r;
> - ioptr[15] = f6i;
> - }
> -
> --inline void bfR2(float *ioptr, long M, long NDiffU);
> -+void bfR2(float *ioptr, long M, long NDiffU);
> - inline void bfR2(float *ioptr, long M, long NDiffU){
> - /*** 2nd radix 2 stage ***/
> - unsigned long pos;
> -@@ -512,7 +512,7 @@ for (SameUCnt = NSameU; SameUCnt > 0 ; SameUCnt--){
> - }
> - }
> -
> --inline void bfR4(float *ioptr, long M, long NDiffU);
> -+void bfR4(float *ioptr, long M, long NDiffU);
> - inline void bfR4(float *ioptr, long M, long NDiffU){
> - /*** 1 radix 4 stage ***/
> - unsigned long pos;
> -@@ -721,7 +721,7 @@ f4i = f4i * Two - f6i;
> -
> - }
> -
> --inline void bfstages(float *ioptr, long M, float *Utbl, long Ustride, long NDiffU, long StageCnt);
> -+void bfstages(float *ioptr, long M, float *Utbl, long Ustride, long NDiffU, long StageCnt);
> - inline void bfstages(float *ioptr, long M, float *Utbl, long Ustride, long NDiffU, long StageCnt){
> - /*** RADIX 8 Stages ***/
> - unsigned long pos;
> -@@ -1125,7 +1125,7 @@ default:
> - parts of iffts1
> - *************************************************/
> -
> --inline void scbitrevR2(float *ioptr, long M, short *BRLow, float scale);
> -+void scbitrevR2(float *ioptr, long M, short *BRLow, float scale);
> - inline void scbitrevR2(float *ioptr, long M, short *BRLow, float scale){
> - /*** scaled bit reverse and first radix 2 stage forward or inverse fft ***/
> - float f0r;
> -@@ -1262,7 +1262,7 @@ for (; ioptr < iolimit; ioptr += POW2(M/2+1)){
> - };
> - }
> -
> --inline void ifft2pt(float *ioptr, float scale);
> -+void ifft2pt(float *ioptr, float scale);
> - inline void ifft2pt(float *ioptr, float scale){
> - /*** RADIX 2 ifft ***/
> - float f0r, f0i, f1r, f1i;
> -@@ -1292,7 +1292,7 @@ ioptr[2] = scale*f1r;
> - ioptr[3] = scale*f1i;
> - }
> -
> --inline void ifft4pt(float *ioptr, float scale);
> -+void ifft4pt(float *ioptr, float scale);
> - inline void ifft4pt(float *ioptr, float scale){
> - /*** RADIX 4 ifft ***/
> - float f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
> -@@ -1347,7 +1347,7 @@ ioptr[6] = scale*f3r;
> - ioptr[7] = scale*f3i;
> - }
> -
> --inline void ifft8pt(float *ioptr, float scale);
> -+void ifft8pt(float *ioptr, float scale);
> - inline void ifft8pt(float *ioptr, float scale){
> - /*** RADIX 8 ifft ***/
> - float w0r = 1.0/MYROOT2; /* cos(pi/4) */
> -@@ -1467,7 +1467,7 @@ ioptr[14] = scale*f6r;
> - ioptr[15] = scale*f6i;
> - }
> -
> --inline void ibfR2(float *ioptr, long M, long NDiffU);
> -+void ibfR2(float *ioptr, long M, long NDiffU);
> - inline void ibfR2(float *ioptr, long M, long NDiffU){
> - /*** 2nd radix 2 stage ***/
> - unsigned long pos;
> -@@ -1576,7 +1576,7 @@ for (SameUCnt = NSameU; SameUCnt > 0 ; SameUCnt--){
> - }
> - }
> -
> --inline void ibfR4(float *ioptr, long M, long NDiffU);
> -+void ibfR4(float *ioptr, long M, long NDiffU);
> - inline void ibfR4(float *ioptr, long M, long NDiffU){
> - /*** 1 radix 4 stage ***/
> - unsigned long pos;
> -@@ -1785,7 +1785,7 @@ f4i = f4i * Two - f6i;
> -
> - }
> -
> --inline void ibfstages(float *ioptr, long M, float *Utbl, long Ustride, long NDiffU, long StageCnt);
> -+void ibfstages(float *ioptr, long M, float *Utbl, long Ustride, long NDiffU, long StageCnt);
> - inline void ibfstages(float *ioptr, long M, float *Utbl, long Ustride, long NDiffU, long StageCnt){
> - /*** RADIX 8 Stages ***/
> - unsigned long pos;
> -@@ -2193,7 +2193,7 @@ default:
> - parts of rffts1
> - *************************************************/
> -
> --inline void rfft1pt(float *ioptr);
> -+void rfft1pt(float *ioptr);
> - inline void rfft1pt(float *ioptr){
> - /*** RADIX 2 rfft ***/
> - float f0r, f0i;
> -@@ -2212,7 +2212,7 @@ ioptr[0] = t0r;
> - ioptr[1] = t0i;
> - }
> -
> --inline void rfft2pt(float *ioptr);
> -+void rfft2pt(float *ioptr);
> - inline void rfft2pt(float *ioptr){
> - /*** RADIX 4 rfft ***/
> - float f0r, f0i, f1r, f1i;
> -@@ -2245,7 +2245,7 @@ ioptr[2] = f1r;
> - ioptr[3] = f1i;
> - }
> -
> --inline void rfft4pt(float *ioptr);
> -+void rfft4pt(float *ioptr);
> - inline void rfft4pt(float *ioptr){
> - /*** RADIX 8 rfft ***/
> - float f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
> -@@ -2318,7 +2318,7 @@ ioptr[6] = scale*f3r;
> - ioptr[7] = scale*f3i;
> - }
> -
> --inline void rfft8pt(float *ioptr);
> -+void rfft8pt(float *ioptr);
> - inline void rfft8pt(float *ioptr){
> - /*** RADIX 16 rfft ***/
> - float w0r = 1.0/MYROOT2; /* cos(pi/4) */
> -@@ -2477,7 +2477,7 @@ ioptr[14] = scale*f6r;
> - ioptr[15] = scale*f6i;
> - }
> -
> --inline void frstage(float *ioptr, long M, float *Utbl);
> -+void frstage(float *ioptr, long M, float *Utbl);
> - inline void frstage(float *ioptr, long M, float *Utbl){
> - /* Finish RFFT */
> -
> -@@ -2687,7 +2687,7 @@ default:
> - parts of riffts1
> - *************************************************/
> -
> --inline void rifft1pt(float *ioptr, float scale);
> -+void rifft1pt(float *ioptr, float scale);
> - inline void rifft1pt(float *ioptr, float scale){
> - /*** RADIX 2 rifft ***/
> - float f0r, f0i;
> -@@ -2706,7 +2706,7 @@ ioptr[0] = scale*t0r;
> - ioptr[1] = scale*t0i;
> - }
> -
> --inline void rifft2pt(float *ioptr, float scale);
> -+void rifft2pt(float *ioptr, float scale);
> - inline void rifft2pt(float *ioptr, float scale){
> - /*** RADIX 4 rifft ***/
> - float f0r, f0i, f1r, f1i;
> -@@ -2740,7 +2740,7 @@ ioptr[2] = scale*f1r;
> - ioptr[3] = scale*f1i;
> - }
> -
> --inline void rifft4pt(float *ioptr, float scale);
> -+void rifft4pt(float *ioptr, float scale);
> - inline void rifft4pt(float *ioptr, float scale){
> - /*** RADIX 8 rifft ***/
> - float f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
> -@@ -2811,7 +2811,7 @@ ioptr[6] = scale*f3r;
> - ioptr[7] = scale*f3i;
> - }
> -
> --inline void rifft8pt(float *ioptr, float scale);
> -+void rifft8pt(float *ioptr, float scale);
> - inline void rifft8pt(float *ioptr, float scale){
> - /*** RADIX 16 rifft ***/
> - float w0r = 1.0/MYROOT2; /* cos(pi/4) */
> -@@ -2968,7 +2968,7 @@ ioptr[14] = scale*f6r;
> - ioptr[15] = scale*f6i;
> - }
> -
> --inline void ifrstage(float *ioptr, long M, float *Utbl);
> -+void ifrstage(float *ioptr, long M, float *Utbl);
> - inline void ifrstage(float *ioptr, long M, float *Utbl){
> - /* Start RIFFT */
> -
> Index: patches/patch-lib-src_libnyquist_nyquist_nyqstk_include_Stk_h
> ===================================================================
> RCS file: /cvs/ports/audio/audacity/patches/patch-lib-src_libnyquist_nyquist_nyqstk_include_Stk_h,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-lib-src_libnyquist_nyquist_nyqstk_include_Stk_h
> --- patches/patch-lib-src_libnyquist_nyquist_nyqstk_include_Stk_h 28 Oct 2009 18:40:13 -0000 1.1
> +++ patches/patch-lib-src_libnyquist_nyquist_nyqstk_include_Stk_h 24 Feb 2019 18:51:34 -0000
> @@ -1,20 +1,18 @@
> -$OpenBSD: patch-lib-src_libnyquist_nyquist_nyqstk_include_Stk_h,v 1.1 2009/10/28 18:40:13 jakemsr Exp $
> ---- lib-src/libnyquist/nyquist/nyqstk/include/Stk.h.orig Sat Oct 17 15:24:11 2009
> -+++ lib-src/libnyquist/nyquist/nyqstk/include/Stk.h Sat Oct 17 15:24:11 2009
> -@@ -127,13 +127,13 @@ class Stk (public)
> +$OpenBSD$
> +
> +- namespace clash with sys/endian.h
> +
> +Index: lib-src/libnyquist/nyquist/nyqstk/include/Stk.h
> +--- lib-src/libnyquist/nyquist/nyqstk/include/Stk.h.orig
> ++++ lib-src/libnyquist/nyquist/nyqstk/include/Stk.h
> +@@ -126,6 +126,10 @@ class Stk (public)
> + //! Static method which sets the STK rawwave path.
> static void setRawwavePath(std::string path);
>
> ++#undef swap16
> ++#undef swap32
> ++#undef swap64
> ++
> //! Static method which byte-swaps a 16-bit data type.
> -- static void swap16(unsigned char *ptr);
> -+ static void NYswap16(unsigned char *ptr);
> + static void swap16(unsigned char *ptr);
>
> - //! Static method which byte-swaps a 32-bit data type.
> -- static void swap32(unsigned char *ptr);
> -+ static void NYswap32(unsigned char *ptr);
> -
> - //! Static method which byte-swaps a 64-bit data type.
> -- static void swap64(unsigned char *ptr);
> -+ static void NYswap64(unsigned char *ptr);
> -
> - //! Static cross-platform method to sleep for a number of milliseconds.
> - static void sleep(unsigned long milliseconds);
> Index: patches/patch-lib-src_libnyquist_nyquist_nyqstk_src_FileRead_cpp
> ===================================================================
> RCS file: patches/patch-lib-src_libnyquist_nyquist_nyqstk_src_FileRead_cpp
> diff -N patches/patch-lib-src_libnyquist_nyquist_nyqstk_src_FileRead_cpp
> --- patches/patch-lib-src_libnyquist_nyquist_nyqstk_src_FileRead_cpp 28 Oct 2009 18:40:13 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,279 +0,0 @@
> -$OpenBSD: patch-lib-src_libnyquist_nyquist_nyqstk_src_FileRead_cpp,v 1.1 2009/10/28 18:40:13 jakemsr Exp $
> ---- lib-src/libnyquist/nyquist/nyqstk/src/FileRead.cpp.orig Sat Oct 17 15:24:50 2009
> -+++ lib-src/libnyquist/nyquist/nyqstk/src/FileRead.cpp Sat Oct 17 15:28:03 2009
> -@@ -160,7 +160,7 @@ bool FileRead :: getWavInfo( const char *fileName )
> - while ( strncmp(id, "fmt ", 4) ) {
> - if ( fread(&chunkSize, 4, 1, fd_) != 1 ) goto error;
> - #ifndef __LITTLE_ENDIAN__
> -- swap32((unsigned char *)&chunkSize);
> -+ NYswap32((unsigned char *)&chunkSize);
> -

No comments:

Post a Comment