Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Nov 2018 14:34:54 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r485865 - in head/audio/fluidsynth-dssi: . files
Message-ID:  <201811251434.wAPEYskO079917@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Sun Nov 25 14:34:53 2018
New Revision: 485865
URL: https://svnweb.freebsd.org/changeset/ports/485865

Log:
  audio/fluidsynth-dssi: Fix build with FluidSynth 2.x
  
  fluidsynth-dssi.c:170:20: error: variable has incomplete type 'fluid_preset_t' (aka 'struct _fluid_preset_t')
      fluid_preset_t preset;
                     ^
  
  PR:		233503
  Reported by:	jbeich
  Obtained from:	PLD Linux

Added:
  head/audio/fluidsynth-dssi/files/patch-src_fluidsynth-dssi.c   (contents, props changed)
Modified:
  head/audio/fluidsynth-dssi/Makefile

Modified: head/audio/fluidsynth-dssi/Makefile
==============================================================================
--- head/audio/fluidsynth-dssi/Makefile	Sun Nov 25 14:30:49 2018	(r485864)
+++ head/audio/fluidsynth-dssi/Makefile	Sun Nov 25 14:34:53 2018	(r485865)
@@ -3,7 +3,7 @@
 
 PORTNAME=	fluidsynth-dssi
 PORTVERSION=	1.0.0
-PORTREVISION=	11
+PORTREVISION=	12
 CATEGORIES=	audio
 MASTER_SITES=	SF/dssi/${PORTNAME}/${PORTVERSION}
 

Added: head/audio/fluidsynth-dssi/files/patch-src_fluidsynth-dssi.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/fluidsynth-dssi/files/patch-src_fluidsynth-dssi.c	Sun Nov 25 14:34:53 2018	(r485865)
@@ -0,0 +1,57 @@
+From de62a3a1e3fc7df57e014b6c7e269d1b6195924a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Wed, 10 Oct 2018 01:00:06 +0200
+Subject: [PATCH] Fix build with fluidsynth > 2.0.0
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ src/fluidsynth-dssi.c | 15 +++++++++++++++
+  1 file changed, 15 insertions(+)
+
+--- src/fluidsynth-dssi.c.orig	2008-11-16 17:41:35 UTC
++++ src/fluidsynth-dssi.c
+@@ -167,7 +167,11 @@ fsd_get_soundfont(const char *path)
+     fsd_sfont_t *sfont;
+     int palloc;
+     fluid_sfont_t *fluid_sfont;
++#if FLUIDSYNTH_VERSION_MAJOR < 2
+     fluid_preset_t preset;
++#else
++    fluid_preset_t *preset;
++#endif
+ 
+     /* soundfont already loaded? */
+     sfont = fsd_find_loaded_soundfont(path);
+@@ -206,8 +210,13 @@ fsd_get_soundfont(const char *path)
+         return NULL;
+     }
+     fluid_sfont = fluid_synth_get_sfont_by_id(fsd_synth.fluid_synth, sfont->sfont_id);
++#if FLUIDSYNTH_VERSION_MAJOR < 2
+     fluid_sfont->iteration_start(fluid_sfont);
+     while (fluid_sfont->iteration_next(fluid_sfont, &preset)) {
++#else
++    fluid_sfont_iteration_start(fluid_sfont);
++    while ((preset = fluid_sfont_iteration_next(fluid_sfont))) {
++#endif
+         if (sfont->preset_count == palloc) {
+             palloc *= 2;
+             sfont->presets = (DSSI_Program_Descriptor *)realloc(sfont->presets,
+@@ -219,9 +228,15 @@ fsd_get_soundfont(const char *path)
+                 return NULL;
+             }
+         }
++#if FLUIDSYNTH_VERSION_MAJOR < 2
+         sfont->presets[sfont->preset_count].Bank = preset.get_banknum(&preset);
+         sfont->presets[sfont->preset_count].Program = preset.get_num(&preset);
+         sfont->presets[sfont->preset_count].Name = preset.get_name(&preset);
++#else
++        sfont->presets[sfont->preset_count].Bank = fluid_preset_get_banknum(preset);
++        sfont->presets[sfont->preset_count].Program = fluid_preset_get_num(preset);
++        sfont->presets[sfont->preset_count].Name = fluid_preset_get_name(preset);
++#endif
+         sfont->preset_count++;
+     }
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811251434.wAPEYskO079917>