On Thu, May 09, 2019 at 02:09:42PM -0400, Brian Callahan wrote:
> Hi ports --
> 
> I know this is a large diff but reviews/OKs appreciated.
> Quick rehash of an email I sent about a month ago [0]:
> 
> * All 3 flavors build and run correctly on amd64.
> * I'd like to split TimGM6mb off into its own port still, but that will
> happen after this goes in.
> 
> OK?

This looks good to me and I have tested it on amd64 and macppc.
(I didn't test all of the command line options of course..)

> 
> ~Brian
> 
> [0] https://marc.info/?l=openbsd-ports&m=155426466518289&w=2
> 

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/audio/timidity/Makefile,v
> retrieving revision 1.48
> diff -u -p -r1.48 Makefile
> --- Makefile  2 Apr 2019 06:54:05 -0000       1.48
> +++ Makefile  3 Apr 2019 04:05:20 -0000
> @@ -2,14 +2,13 @@
>  
>  COMMENT=     MIDI to WAV renderer and player
>  
> -V=           2.13.2
> +V=           2.15.0
>  DISTNAME=    TiMidity++-${V}
>  PKGNAME=     timidity-${V}
> -REVISION=    6
>  CATEGORIES=  audio
>  
>  MASTER_SITES=        ${MASTER_SITE_SOURCEFORGE:=timidity/}
> -MASTER_SITES0=       https://devio.us/~bcallah/source/
> +MASTER_SITES0=       https://mirrors.nycbug.org/pub/distfiles/
>  TIINS=               TimGM6mb-20170802.tar.gz
>  DISTFILES=   ${TIINS}:0 ${DISTNAME}.tar.gz
>  
> @@ -21,7 +20,7 @@ MAINTAINER= Brian Callahan <bcallah@open
>  #    "License: GNU GPL, version 2; Courtesy of Tim Brechbill"
>  PERMIT_PACKAGE_CDROM=        Yes
>  
> -WANTLIB=             c m ncurses sndio
> +WANTLIB += c curses m sndio
>  
>  BUILD_DEPENDS=       ${MODGNU_AUTOCONF_DEPENDS} \
>               ${MODGNU_AUTOMAKE_DEPENDS}
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/audio/timidity/distinfo,v
> retrieving revision 1.6
> diff -u -p -r1.6 distinfo
> --- distinfo  2 Aug 2017 15:21:48 -0000       1.6
> +++ distinfo  3 Apr 2019 04:05:20 -0000
> @@ -1,4 +1,4 @@
> -SHA256 (TiMidity++-2.13.2.tar.gz) = 
> 8AclLp8/fzwEOh1RWJghRqRu4ybDsXoiJa/HM8MzK0c=
> +SHA256 (TiMidity++-2.15.0.tar.gz) = 
> C2EJo8ZGBMiFHNm7TLr8AUpOE7ACX1l+WG2XQjiPb7c=
>  SHA256 (TimGM6mb-20170802.tar.gz) = 
> tyxC4aU+yDs5vXpT6ftWcbkcOekt/DUFtZk5hVzCcUQ=
> -SIZE (TiMidity++-2.13.2.tar.gz) = 1849553
> +SIZE (TiMidity++-2.15.0.tar.gz) = 1990143
>  SIZE (TimGM6mb-20170802.tar.gz) = 9032726
> Index: patches/patch-TiMidity++-2_13_2_configure_in
> ===================================================================
> RCS file: patches/patch-TiMidity++-2_13_2_configure_in
> diff -N patches/patch-TiMidity++-2_13_2_configure_in
> --- patches/patch-TiMidity++-2_13_2_configure_in      30 Jul 2009 19:35:00 
> -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,84 +0,0 @@
> ---- TiMidity++-2.13.2/configure.in.orig      Sun Oct  3 05:39:52 2004
> -+++ TiMidity++-2.13.2/configure.in   Tue Mar 24 01:31:03 2009
> -@@ -81,7 +81,7 @@ if test "x$timidity_cv_debug" = "xno"; then
> - fi
> - AC_MSG_RESULT($timidity_cv_debug)
> - 
> --CFLAGS=${CFLAGS-"-O2"}
> -+dnl CFLAGS=${CFLAGS-"-O2"}
> - 
> - dnl --with-x turns on if `--with-x' is NOT specified.
> - if test "x$with_x" = x; then
> -@@ -694,8 +694,9 @@ dnl speex(S):   Ogg Speex
> - dnl gogo(g):    MP3 GOGO
> - dnl jack(j):    JACK
> - dnl ao(O):      Libao
> -+dnl sndio(s):   sndio
> - 
> --audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas arts 
> esd vorbis flac gogo portaudio jack ao'
> -+audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas arts 
> esd vorbis flac gogo portaudio jack ao sndio'
> - 
> - AC_ARG_WITH(nas-library,
> -   [  --with-nas-library=library NAS absolute library path(Don't use 
> -laudio)])
> -@@ -722,6 +723,7 @@ AC_ARG_ENABLE(audio,
> -                               portaudio: PortAudio
> -                               jack:      JACK
> -                               ao:        Libao
> -+                              sndio:     Sndio
> -                               vorbis:    Ogg Vorbis
> -                               flac:      FLAC / OggFLAC
> -                               speex:     Ogg Speex
> -@@ -746,7 +748,7 @@ AC_ARG_WITH(default-output,
> -   [  --with-default-output=<mode>  Specify default output mode (optional):
> -                                 (default|alsa|alib|arts|nas|
> -                                 esd|wav|au|aiff|list|vorbis|flac|speex|
> --                                gogo|portaudio|jack|ao)],
> -+                                gogo|portaudio|jack|ao|sndio)],
> -   [ if test "$enable_audio" != no; then
> -     DEFAULT_PLAYMODE=$withval
> -     eval "au_enable_$DEFAULT_PLAYMODE=yes"
> -@@ -1158,6 +1160,22 @@ else
> -   AC_MSG_RESULT(no)
> - fi
> - 
> -+dnl sndio
> -+AC_MSG_CHECKING(enable_audio=sndio)
> -+if test "x$au_enable_sndio" = xyes; then
> -+  AC_MSG_RESULT([yes, configuring sndio])
> -+  AC_CHECK_HEADERS(sndio.h)
> -+  if test "x${ac_cv_header_sndio_h}" = xyes ; then
> -+    EXTRADEFS="$EXTRADEFS -DAU_SNDIO"
> -+    SYSEXTRAS="$SYSEXTRAS sndio_a.c"
> -+    EXTRALIBS="$EXTRALIBS -lsndio"
> -+  else
> -+    AC_MSG_WARN(Couldn't configure sndio.)
> -+  fi
> -+else
> -+  AC_MSG_RESULT(no)
> -+fi
> -+
> - dnl ogg's vorbis
> - AC_MSG_CHECKING(enable_audio=vorbis)
> - if test "x$au_enable_vorbis" = xyes; then
> -@@ -1304,6 +1322,8 @@ case ".$DEFAULT_PLAYMODE" in
> -   .speex)    TIMIDITY_OUTPUT_ID=S ;;
> -   .gogo)     TIMIDITY_OUTPUT_ID=g ;;
> -   .jack)     TIMIDITY_OUTPUT_ID=j ;;
> -+  .ao)       TIMIDITY_OUTPUT_ID=O ;;
> -+  .sndio)    TIMIDITY_OUTPUT_ID=s ;;
> -   *)         TIMIDITY_OUTPUT_ID= ;;
> - esac
> - AC_MSG_RESULT($DEFAULT_PLAYMODE/$TIMIDITY_OUTPUT_ID)
> -@@ -1506,10 +1526,10 @@ CONFIG_INTERFACE(slang,SLANG,s,
> -     ])
> -     AC_CHECK_HEADERS(slang/slang.h slang.h)
> -   ],
> --  [ LIBS="$LIBS -lslang"
> -+  [ LIBS="$LIBS -lslang -ltermcap"
> -     INTERFACE_SRCS="$INTERFACE_SRCS slang_c.c"
> -   ],
> --  [ s_so_libs="-lslang"
> -+  [ s_so_libs="-lslang -ltermcap"
> -     AC_CHECK_LIB(termcap,initscr,s_so_libs="$s_so_libs -ltermcap")
> -   ])
> - 
> Index: patches/patch-TiMidity++-2_13_2_interface_xaw_i_c
> ===================================================================
> RCS file: patches/patch-TiMidity++-2_13_2_interface_xaw_i_c
> diff -N patches/patch-TiMidity++-2_13_2_interface_xaw_i_c
> --- patches/patch-TiMidity++-2_13_2_interface_xaw_i_c 27 Aug 2010 00:52:01 
> -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,30 +0,0 @@
> -$OpenBSD: patch-TiMidity++-2_13_2_interface_xaw_i_c,v 1.1 2010/08/27 
> 00:52:01 jakemsr Exp $
> ---- TiMidity++-2.13.2/interface/xaw_i.c.orig Wed Aug 25 19:07:52 2010
> -+++ TiMidity++-2.13.2/interface/xaw_i.c      Wed Aug 25 19:08:36 2010
> -@@ -261,7 +261,7 @@ int amplitude = DEFAULT_AMPLIFICATION;
> - String bitmapdir = XAW_BITMAP_DIR;
> - Boolean arrangetitle,savelist;
> - static char **current_flist = NULL;
> --static int voices = 0, last_voice = 0, voices_num_width;
> -+static int nvoices = 0, last_voice = 0, voices_num_width;
> - static int maxentry_on_a_menu = 0,submenu_n = 0;
> - #define OPTIONS_WINDOW 1
> - #define FLIST_WINDOW 2
> -@@ -1329,7 +1329,7 @@ static void handle_input(XtPointer data,int *source,Xt
> -     c= *(local_buf+1);
> -     n= atoi(local_buf+2);
> -     if(c == 'L')
> --      voices = n;
> -+      nvoices = n;
> -     else
> -       last_voice = n;
> -     if(IsTracePlaying()) drawVoices();
> -@@ -2070,7 +2070,7 @@ static void drawVoices(void) {
> -   XSetForeground(disp, gct, tracecolor);
> -   XFillRectangle(disp,XtWindow(trace),gct,voices_num_width +4,
> -                  
> MAX_XAW_MIDI_CHANNELS*BAR_SPACE+TRACEV_OFS+1,VOICENUM_WIDTH,TRACE_FOOT);  
> --  sprintf(local_buf, "%3d/%d", last_voice, voices);
> -+  sprintf(local_buf, "%3d/%d", last_voice, nvoices);
> -   XSetForeground(disp, gct, capcolor);  
> -   XDrawString(disp, XtWindow(trace),gct,voices_num_width+6,
> -               
> MAX_XAW_MIDI_CHANNELS*BAR_SPACE+TRACEV_OFS+16,local_buf,strlen(local_buf));
> Index: patches/patch-TiMidity++-2_13_2_timidity_Makefile_am
> ===================================================================
> RCS file: patches/patch-TiMidity++-2_13_2_timidity_Makefile_am
> diff -N patches/patch-TiMidity++-2_13_2_timidity_Makefile_am
> --- patches/patch-TiMidity++-2_13_2_timidity_Makefile_am      30 Jul 2009 
> 19:35:00 -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,10 +0,0 @@
> ---- TiMidity++-2.13.2/timidity/Makefile.am.orig      Mon May 31 17:05:29 2004
> -+++ TiMidity++-2.13.2/timidity/Makefile.am   Tue Mar 24 01:00:25 2009
> -@@ -138,6 +138,7 @@ EXTRA_timidity_SOURCES = \
> -     mfnode.h \
> -     nas_a.c \
> -     portaudio_a.c \
> -+    sndio_a.c \
> -     sun_a.c \
> -     vorbis_a.c \
> -     flac_a.c \
> Index: patches/patch-TiMidity++-2_13_2_timidity_common_c
> ===================================================================
> RCS file: patches/patch-TiMidity++-2_13_2_timidity_common_c
> diff -N patches/patch-TiMidity++-2_13_2_timidity_common_c
> --- patches/patch-TiMidity++-2_13_2_timidity_common_c 9 Dec 2014 20:46:00 
> -0000       1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,12 +0,0 @@
> -$OpenBSD: patch-TiMidity++-2_13_2_timidity_common_c,v 1.1 2014/12/09 
> 20:46:00 sthen Exp $
> ---- TiMidity++-2.13.2/timidity/common.c.orig Tue Dec  9 20:33:09 2014
> -+++ TiMidity++-2.13.2/timidity/common.c      Tue Dec  9 20:33:30 2014
> -@@ -1133,7 +1133,7 @@ int int_rand(int n)
> -     if(n == -1)
> -         srand(time(NULL));
> -     else
> --        srand(-n);
> -+        srand_deterministic(-n);
> -     return n;
> -     }
> -     return (int)(n * (double)rand() * (1.0 / (RAND_MAX + 1.0)));
> Index: patches/patch-TiMidity++-2_13_2_timidity_freq_c
> ===================================================================
> RCS file: patches/patch-TiMidity++-2_13_2_timidity_freq_c
> diff -N patches/patch-TiMidity++-2_13_2_timidity_freq_c
> --- patches/patch-TiMidity++-2_13_2_timidity_freq_c   30 Jul 2009 19:35:00 
> -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,11 +0,0 @@
> ---- TiMidity++-2.13.2/timidity/freq.c.orig   Tue Sep  7 07:27:26 2004
> -+++ TiMidity++-2.13.2/timidity/freq.c        Tue Mar 24 01:00:15 2009
> -@@ -371,7 +371,7 @@ float freq_fourier(Sample *sp, int *chord)
> -     /* go out 2 zero crossings in both directions, starting at maxpos */
> -     /* find the peaks after the 2nd crossing */
> -     minoffset1 = 0;
> --    for (n = 0, oldamp = origdata[maxpos], i = maxpos - 1; i >= 0 && n < 2; 
> i--)
> -+    for (n = 0, oldamp = origdata[maxpos], i = maxpos - 1; i > 0 && n < 2; 
> i--)
> -     {
> -     amp = origdata[i];
> -     if ((oldamp && amp == 0) || (oldamp > 0 && amp < 0) ||
> Index: patches/patch-TiMidity++-2_13_2_timidity_mfi_c
> ===================================================================
> RCS file: patches/patch-TiMidity++-2_13_2_timidity_mfi_c
> diff -N patches/patch-TiMidity++-2_13_2_timidity_mfi_c
> --- patches/patch-TiMidity++-2_13_2_timidity_mfi_c    2 Aug 2017 15:21:48 
> -0000       1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,23 +0,0 @@
> -$OpenBSD: patch-TiMidity++-2_13_2_timidity_mfi_c,v 1.1 2017/08/02 15:21:48 
> bcallah Exp $
> -
> -Index: TiMidity++-2.13.2/timidity/mfi.c
> ---- TiMidity++-2.13.2/timidity/mfi.c.orig
> -+++ TiMidity++-2.13.2/timidity/mfi.c
> -@@ -344,7 +344,7 @@ typedef struct LastNoteInfo {
> - #define SEND_LASTNOTEINFO(lni, ch)                          if 
> (LASTNOTEINFO_HAS_DATA((lni)[ch])) SendLastNoteInfo(lni, ch);
> - #define SEND_AND_CLEAR_LASTNOTEINFO(lni, ch)        if 
> (LASTNOTEINFO_HAS_DATA((lni)[ch])) { SendLastNoteInfo(lni, ch); (lni)[ch].on 
> = NO_LAST_NOTE_INFO; }
> - 
> --inline void StoreLastNoteInfo(LastNoteInfo *info, int channel, int time, 
> int duration, int note, int velocity)
> -+void StoreLastNoteInfo(LastNoteInfo *info, int channel, int time, int 
> duration, int note, int velocity)
> - {
> -     info[channel].on = time;
> -     info[channel].off = time + duration;
> -@@ -352,7 +352,7 @@ inline void StoreLastNoteInfo(LastNoteInfo *info, int 
> -     info[channel].velocity = velocity;
> - }
> - 
> --inline void SendLastNoteInfo(const LastNoteInfo *info, int channel)
> -+void SendLastNoteInfo(const LastNoteInfo *info, int channel)
> - {
> -     NOTE_BUF_EV_DEBUGSTR(channel, info[channel].on, 
> note_name[info[channel].note % 12], info[channel].note / 12, 
> info[channel].velocity, info[channel].off);
> -     MIDIEVENT(info[channel].on, ME_NOTEON, channel, info[channel].note, 
> info[channel].velocity);
> Index: patches/patch-TiMidity++-2_13_2_timidity_output_c
> ===================================================================
> RCS file: patches/patch-TiMidity++-2_13_2_timidity_output_c
> diff -N patches/patch-TiMidity++-2_13_2_timidity_output_c
> --- patches/patch-TiMidity++-2_13_2_timidity_output_c 30 Jul 2009 19:35:00 
> -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,35 +0,0 @@
> ---- TiMidity++-2.13.2/timidity/output.c.orig Thu May 13 18:32:34 2004
> -+++ TiMidity++-2.13.2/timidity/output.c      Tue Mar 24 01:00:15 2009
> -@@ -112,6 +112,10 @@ extern PlayMode nas_play_mode;
> - extern PlayMode ao_play_mode;
> - #endif /* AU_AO */
> - 
> -+#ifdef AU_SNDIO
> -+extern PlayMode sndio_play_mode;
> -+#endif /* AU_SNDIO */
> -+
> - #ifndef __MACOS__
> - /* These are always compiled in. */
> - extern PlayMode raw_play_mode, wave_play_mode, au_play_mode, aiff_play_mode;
> -@@ -165,7 +169,7 @@ PlayMode *play_mode_list[] = {
> - 
> - #if defined(AU_JACK)
> -   &jack_play_mode,
> --#endif /* AU_PORTAUDIO */
> -+#endif /* AU_JACK */
> - 
> - #if defined(AU_NAS)
> -   &nas_play_mode,
> -@@ -173,7 +177,11 @@ PlayMode *play_mode_list[] = {
> - 
> - #if defined(AU_AO)
> -   &ao_play_mode,
> --#endif /* AU_PORTAUDIO */
> -+#endif /* AU_AO */
> -+
> -+#if defined(AU_SNDIO)
> -+  &sndio_play_mode,
> -+#endif /* AU_SNDIO */
> - 
> - #ifndef __MACOS__
> -   &wave_play_mode,
> Index: patches/patch-TiMidity++-2_13_2_timidity_sun_a_c
> ===================================================================
> RCS file: patches/patch-TiMidity++-2_13_2_timidity_sun_a_c
> diff -N patches/patch-TiMidity++-2_13_2_timidity_sun_a_c
> --- patches/patch-TiMidity++-2_13_2_timidity_sun_a_c  30 Jan 2006 10:13:11 
> -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,21 +0,0 @@
> -$OpenBSD: patch-TiMidity++-2_13_2_timidity_sun_a_c,v 1.1 2006/01/30 10:13:11 
> jsg Exp $
> ---- TiMidity++-2.13.2/timidity/sun_a.c.orig  Mon Sep 27 09:40:14 2004
> -+++ TiMidity++-2.13.2/timidity/sun_a.c       Sat Jan 21 01:06:52 2006
> -@@ -54,7 +54,7 @@
> - #include "output.h"
> - #include "controls.h"
> - 
> --#if defined(__NetBSD__) /* NetBSD */
> -+#if defined(__NetBSD__) || defined(__OpenBSD__)
> - #ifdef LITTLE_ENDIAN
> - #define AUDIO_LINEAR_TAG    AUDIO_ENCODING_SLINEAR_LE
> - #else
> -@@ -331,7 +331,7 @@ static int acntl(int request, void *arg)
> -       case PM_REQ_GETFILLED:
> -     if(ioctl(audioctl_fd, AUDIO_GETINFO, &auinfo) < 0)
> -         return -1;
> --#ifdef __NetBSD__
> -+#if defined(__NetBSD__) || defined(__OpenBSD__)
> -     *((int *)arg) = auinfo.play.seek;
> - #else
> -     if(auinfo.play.samples == play_samples_offset)
> Index: patches/patch-TiMidity++-2_15_0_configure_in
> ===================================================================
> RCS file: patches/patch-TiMidity++-2_15_0_configure_in
> diff -N patches/patch-TiMidity++-2_15_0_configure_in
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-TiMidity++-2_15_0_configure_in      3 Apr 2019 04:05:20 
> -0000
> @@ -0,0 +1,88 @@
> +$OpenBSD$
> +
> +Index: TiMidity++-2.15.0/configure.in
> +--- TiMidity++-2.15.0/configure.in.orig
> ++++ TiMidity++-2.15.0/configure.in
> +@@ -173,7 +173,7 @@ CHECK_COMPILER_OPTION(rdynamic)
> + 
> + if test "x$NOCFLAGS" = "xyes"; then
> +   if test "x$GCC" = "xyes"; then
> +-    CFLAGS="-O2"
> ++    CFLAGS=""
> +   else
> +     CFLAGS=""
> +   fi
> +@@ -875,8 +875,9 @@ dnl speex(S):   Ogg Speex
> + dnl gogo(g):    MP3 GOGO
> + dnl jack(j):    JACK
> + dnl ao(O):      Libao
> ++dnl sndio(O):   sndio
> + 
> +-audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas arts 
> esd vorbis flac gogo portaudio npipe jack ao'
> ++audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas arts 
> esd vorbis flac gogo portaudio npipe jack ao sndio'
> + 
> + AC_ARG_WITH(nas-library,
> +   AS_HELP_STRING([--with-nas-library=library], [NAS absolute library 
> path(Don't use -laudio)]))
> +@@ -904,6 +905,7 @@ AC_ARG_ENABLE(audio,
> +                               npipe:     Named Pipe(windows)
> +                               jack:      JACK
> +                               ao:        Libao
> ++                              sndio:     sndio
> +                               vorbis:    Ogg Vorbis
> +                               flac:      FLAC / OggFLAC
> +                               speex:     Ogg Speex
> +@@ -930,7 +932,7 @@ AC_ARG_WITH(default-output,
> +   [Specify default output mode (optional):
> +                                 (default|alsa|alib|arts|nas|
> +                                 esd|wav|au|aiff|list|vorbis|flac|speex|
> +-                                gogo|portaudio|npipe|jack|ao)]),
> ++                                gogo|portaudio|npipe|jack|ao|sndio)]),
> +   [ if test "$enable_audio" != no; then
> +     DEFAULT_PLAYMODE=$withval
> +     eval "au_enable_$DEFAULT_PLAYMODE=yes"
> +@@ -1372,6 +1374,22 @@ else
> +   AC_MSG_RESULT(no)
> + fi
> + 
> ++dnl sndio
> ++AC_MSG_CHECKING(enable_audio=sndio)
> ++if test "x$au_enable_sndio" = xyes; then
> ++  AC_MSG_RESULT([yes, configuring sndio])
> ++  AC_CHECK_HEADERS(sndio.h)
> ++  if test "x${ac_cv_header_sndio_h}" = xyes ; then
> ++    EXTRADEFS="$EXTRADEFS -DAU_SNDIO"
> ++    SYSEXTRAS="$SYSEXTRAS sndio_a.c"
> ++    EXTRALIBS="$EXTRALIBS -lsndio"
> ++  else
> ++    AC_MSG_WARN(Couldn't configure sndio.)
> ++  fi
> ++else
> ++  AC_MSG_RESULT(no)
> ++fi
> ++
> + dnl ogg's vorbis
> + AC_MSG_CHECKING(enable_audio=vorbis)
> + if test "x$au_enable_vorbis" = xyes; then
> +@@ -1527,6 +1545,7 @@ case ".$DEFAULT_PLAYMODE" in
> +   .gogo)     TIMIDITY_OUTPUT_ID=g ;;
> +   .jack)     TIMIDITY_OUTPUT_ID=j ;;
> +   .ao)       TIMIDITY_OUTPUT_ID=O ;;
> ++  .sndio)    TIMIDITY_OUTPUT_ID=s ;;
> +   *)         TIMIDITY_OUTPUT_ID= ;;
> + esac
> + AC_MSG_RESULT($DEFAULT_PLAYMODE/$TIMIDITY_OUTPUT_ID)
> +@@ -1765,12 +1784,12 @@ CONFIG_INTERFACE(slang,SLANG,s,
> +                      ])
> +         ;;
> +        *)
> +-        LIBS="$LIBS -lslang"
> ++        LIBS="$LIBS -lslang -ltermcap"
> +         INTERFACE_SRCS="$INTERFACE_SRCS slang_c.c"
> +        ;;
> +     esac
> +   ],
> +-  [ s_so_libs="-lslang"
> ++  [ s_so_libs="-lslang -ltermcap"
> +     AC_CHECK_LIB(termcap,initscr,s_so_libs="$s_so_libs -ltermcap")
> +   ])
> + 
> Index: patches/patch-TiMidity++-2_15_0_timidity_Makefile_am
> ===================================================================
> RCS file: patches/patch-TiMidity++-2_15_0_timidity_Makefile_am
> diff -N patches/patch-TiMidity++-2_15_0_timidity_Makefile_am
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-TiMidity++-2_15_0_timidity_Makefile_am      3 Apr 2019 
> 04:05:20 -0000
> @@ -0,0 +1,13 @@
> +$OpenBSD$
> +
> +Index: TiMidity++-2.15.0/timidity/Makefile.am
> +--- TiMidity++-2.15.0/timidity/Makefile.am.orig
> ++++ TiMidity++-2.15.0/timidity/Makefile.am
> +@@ -139,6 +139,7 @@ EXTRA_timidity_SOURCES = \
> +     mfnode.h \
> +     nas_a.c \
> +     portaudio_a.c \
> ++    sndio_a.c \
> +     npipe_a.c \
> +     sun_a.c \
> +     vorbis_a.c \
> Index: patches/patch-TiMidity++-2_15_0_timidity_common_c
> ===================================================================
> RCS file: patches/patch-TiMidity++-2_15_0_timidity_common_c
> diff -N patches/patch-TiMidity++-2_15_0_timidity_common_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-TiMidity++-2_15_0_timidity_common_c 3 Apr 2019 04:05:20 
> -0000
> @@ -0,0 +1,14 @@
> +$OpenBSD$
> +
> +Index: TiMidity++-2.15.0/timidity/common.c
> +--- TiMidity++-2.15.0/timidity/common.c.orig
> ++++ TiMidity++-2.15.0/timidity/common.c
> +@@ -1213,7 +1213,7 @@ int int_rand(int n)
> +     if(n == -1)
> +         srand(time(NULL));
> +     else
> +-        srand(-n);
> ++        srand_deterministic(-n);
> +     return n;
> +     }
> +     return (int)(n * (double)rand() * (1.0 / (RAND_MAX + 1.0)));
> Index: patches/patch-TiMidity++-2_15_0_timidity_freq_c
> ===================================================================
> RCS file: patches/patch-TiMidity++-2_15_0_timidity_freq_c
> diff -N patches/patch-TiMidity++-2_15_0_timidity_freq_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-TiMidity++-2_15_0_timidity_freq_c   3 Apr 2019 04:05:20 
> -0000
> @@ -0,0 +1,14 @@
> +$OpenBSD$
> +
> +Index: TiMidity++-2.15.0/timidity/freq.c
> +--- TiMidity++-2.15.0/timidity/freq.c.orig
> ++++ TiMidity++-2.15.0/timidity/freq.c
> +@@ -368,7 +368,7 @@ float freq_fourier(Sample *sp, int *chord)
> +     /* go out 2 zero crossings in both directions, starting at maxpos */
> +     /* find the peaks after the 2nd crossing */
> +     minoffset1 = 0;
> +-    for (n = 0, oldamp = origdata[maxpos], i = maxpos - 1; i >= 0 && n < 2; 
> i--)
> ++    for (n = 0, oldamp = origdata[maxpos], i = maxpos - 1; i > 0 && n < 2; 
> i--)
> +     {
> +     amp = origdata[i];
> +     if ((oldamp && amp == 0) || (oldamp > 0 && amp < 0) ||
> Index: patches/patch-TiMidity++-2_15_0_timidity_mfi_c
> ===================================================================
> RCS file: patches/patch-TiMidity++-2_15_0_timidity_mfi_c
> diff -N patches/patch-TiMidity++-2_15_0_timidity_mfi_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-TiMidity++-2_15_0_timidity_mfi_c    3 Apr 2019 04:05:20 
> -0000
> @@ -0,0 +1,23 @@
> +$OpenBSD$
> +
> +Index: TiMidity++-2.15.0/timidity/mfi.c
> +--- TiMidity++-2.15.0/timidity/mfi.c.orig
> ++++ TiMidity++-2.15.0/timidity/mfi.c
> +@@ -344,7 +344,7 @@ typedef struct LastNoteInfo {
> + #define SEND_LASTNOTEINFO(lni, ch)                          if 
> (LASTNOTEINFO_HAS_DATA((lni)[ch])) SendLastNoteInfo(lni, ch);
> + #define SEND_AND_CLEAR_LASTNOTEINFO(lni, ch)        if 
> (LASTNOTEINFO_HAS_DATA((lni)[ch])) { SendLastNoteInfo(lni, ch); (lni)[ch].on 
> = NO_LAST_NOTE_INFO; }
> + 
> +-static inline void StoreLastNoteInfo(LastNoteInfo *info, int channel, int 
> time, int duration, int note, int velocity)
> ++static void StoreLastNoteInfo(LastNoteInfo *info, int channel, int time, 
> int duration, int note, int velocity)
> + {
> +     info[channel].on = time;
> +     info[channel].off = time + duration;
> +@@ -352,7 +352,7 @@ static inline void StoreLastNoteInfo(LastNoteInfo *inf
> +     info[channel].velocity = velocity;
> + }
> + 
> +-static inline void SendLastNoteInfo(const LastNoteInfo *info, int channel)
> ++static void SendLastNoteInfo(const LastNoteInfo *info, int channel)
> + {
> +     NOTE_BUF_EV_DEBUGSTR(channel, info[channel].on, 
> note_name[info[channel].note % 12], info[channel].note / 12, 
> info[channel].velocity, info[channel].off);
> +     MIDIEVENT(info[channel].on, ME_NOTEON, channel, info[channel].note, 
> info[channel].velocity);
> Index: patches/patch-TiMidity++-2_15_0_timidity_output_c
> ===================================================================
> RCS file: patches/patch-TiMidity++-2_15_0_timidity_output_c
> diff -N patches/patch-TiMidity++-2_15_0_timidity_output_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-TiMidity++-2_15_0_timidity_output_c 3 Apr 2019 04:05:20 
> -0000
> @@ -0,0 +1,36 @@
> +$OpenBSD$
> +
> +Index: TiMidity++-2.15.0/timidity/output.c
> +--- TiMidity++-2.15.0/timidity/output.c.orig
> ++++ TiMidity++-2.15.0/timidity/output.c
> +@@ -116,6 +116,10 @@ extern PlayMode nas_play_mode;
> + extern PlayMode ao_play_mode;
> + #endif /* AU_AO */
> + 
> ++#ifdef AU_SNDIO
> ++extern PlayMode sndio_play_mode;
> ++#endif /* AU_SNDIO */
> ++
> + #ifndef __MACOS__
> + /* These are always compiled in. */
> + extern PlayMode raw_play_mode, wave_play_mode, au_play_mode, aiff_play_mode;
> +@@ -142,6 +146,10 @@ PlayMode *play_mode_list[] = {
> +   &ao_play_mode,
> + #endif /* AU_AO */
> + 
> ++#if defined(AU_SNDIO)
> ++  &sndio_play_mode,
> ++#endif /* AU_SNDIO */
> ++
> + #if defined(AU_ARTS)
> +   &arts_play_mode,
> + #endif /* AU_ARTS */
> +@@ -178,7 +186,7 @@ PlayMode *play_mode_list[] = {
> + 
> + #if defined(AU_JACK)
> +   &jack_play_mode,
> +-#endif /* AU_PORTAUDIO */
> ++#endif /* AU_JACK */
> + 
> + #if defined(AU_NAS)
> +   &nas_play_mode,
> Index: pkg/PFRAG.xaw
> ===================================================================
> RCS file: pkg/PFRAG.xaw
> diff -N pkg/PFRAG.xaw
> --- pkg/PFRAG.xaw     22 Nov 2007 12:52:34 -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,14 +0,0 @@
> -@comment $OpenBSD: PFRAG.xaw,v 1.1 2007/11/22 12:52:34 ajacoutot Exp $
> -lib/timidity/
> -lib/timidity/bitmaps/
> -lib/timidity/bitmaps/back.xbm
> -lib/timidity/bitmaps/fwrd.xbm
> -lib/timidity/bitmaps/next.xbm
> -lib/timidity/bitmaps/pause.xbm
> -lib/timidity/bitmaps/play.xbm
> -lib/timidity/bitmaps/prev.xbm
> -lib/timidity/bitmaps/quit.xbm
> -lib/timidity/bitmaps/random.xbm
> -lib/timidity/bitmaps/repeat.xbm
> -lib/timidity/bitmaps/stop.xbm
> -lib/timidity/bitmaps/timidity.xbm
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/audio/timidity/pkg/PLIST,v
> retrieving revision 1.8
> diff -u -p -r1.8 PLIST
> --- pkg/PLIST 2 Aug 2017 15:21:48 -0000       1.8
> +++ pkg/PLIST 3 Apr 2019 04:05:20 -0000
> @@ -189,4 +189,3 @@ share/timidity/TimGM6mb/WarmPad.pat
>  share/timidity/TimGM6mb/Whistle.pat
>  share/timidity/TimGM6mb/WoodBlock.pat
>  share/timidity/TimGM6mb/Xylophone.pat
> -%%xaw%%

Reply via email to