summaryrefslogtreecommitdiff
path: root/media-libs/fluidsynth-dssi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-06-16 21:23:20 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-06-16 21:23:20 +0100
commitfab849d1daed0ba7f2ac497d07985c3dbb692543 (patch)
tree10baa743a5340b42ad538dd19d48669ccac209b1 /media-libs/fluidsynth-dssi
parent73c318acdaf6f8309d68bd266051e6dd1f1bd787 (diff)
gentoo resync : 16.06.2019
Diffstat (limited to 'media-libs/fluidsynth-dssi')
-rw-r--r--media-libs/fluidsynth-dssi/Manifest2
-rw-r--r--media-libs/fluidsynth-dssi/files/1.0.0-fluidsynth2.patch76
-rw-r--r--media-libs/fluidsynth-dssi/fluidsynth-dssi-1.0.0-r1.ebuild33
3 files changed, 111 insertions, 0 deletions
diff --git a/media-libs/fluidsynth-dssi/Manifest b/media-libs/fluidsynth-dssi/Manifest
index d65c36078f96..0be94150a783 100644
--- a/media-libs/fluidsynth-dssi/Manifest
+++ b/media-libs/fluidsynth-dssi/Manifest
@@ -1,3 +1,5 @@
+AUX 1.0.0-fluidsynth2.patch 2976 BLAKE2B 37574f9644ca71cd2d3eda56582deed12affc57a0ede91ed7f5c8ad41e438c4cdb2463897ead130ceda633781094e2ed03354689308653e018e58dd6412c3cfc SHA512 62848af647f754d46e785c3af13cb5921bdadf54fffbe4bb9d6f15ba1f8ddd1ed55e1c28ec95470cc101a948028f2861820f8d2e77619e58dd4e215d5277d557
DIST fluidsynth-dssi-1.0.0.tar.gz 325047 BLAKE2B 1290a3eda38e9381bba3fcdaeac7cdcd6fe4bd33e521d40ae084118da77f8aa00c45456b5bf71c919c3009b47aa18f4cfc4eb9a643e66c9e0e6b25b6f2fa021d SHA512 e67ef9c4133c1c0bdba16a094f2e179ddc4c0ed5cff22bfd832dd29697604211de6dc5092e9d6cc82dfe6243fa2a91fe6fc41cccb1d9f5a8ee5b31ebc9d2b724
+EBUILD fluidsynth-dssi-1.0.0-r1.ebuild 553 BLAKE2B ba86898645de7f5928853511437176d7b6f05932a8040cd913677b0622cfd8ea2e3016e0563f41dba455b9d68d6b818224ae8e3b6d9a30079de46edab8642254 SHA512 bf04f0d39662891528b29ee66621b0f4460d0c555153c6c897697b737791b92cbcf53798e1fa795adcfcbd38321639b7ae1a0c10a79eb17fb64eaf0f15d69dd0
EBUILD fluidsynth-dssi-1.0.0.ebuild 453 BLAKE2B 6a8abd215ddf4cf8a78b80d67c526bdb9c69758de28f0a4205108d2b329c8ac19318f0623db4adf70e5632d29052a24d405ac74fa004bed595989dee06b14b0e SHA512 db5f0af73dbea7e49c458055edad07e83ce429789d91c2cd3125cf725e1124a8ace450c3729339d5f3ef5c98f830460602edf085c5f5846a7128c2d0b5e05cd1
MISC metadata.xml 343 BLAKE2B e857bc160f1b72d05f1395dea52fac9f2084e559480515b1f123c027d24e3e2c170045006dcf877a7dc7fdd5df7e8cb412d74f6c0f8f3ddd5df7242da15f57e5 SHA512 a7eb8732dae53f7a4c9766de1a04a093483149b52c4b180bcb44b32c751741414b075e65c191c0fa01d50af75ca24d569c0d001211a826e546fff94886b0a44d
diff --git a/media-libs/fluidsynth-dssi/files/1.0.0-fluidsynth2.patch b/media-libs/fluidsynth-dssi/files/1.0.0-fluidsynth2.patch
new file mode 100644
index 000000000000..8d187864c71b
--- /dev/null
+++ b/media-libs/fluidsynth-dssi/files/1.0.0-fluidsynth2.patch
@@ -0,0 +1,76 @@
+Patch based on https://sourceforge.net/p/dssi/fluidsynth-dssi/merge-requests/1
+
+diff --git a/configure.ac b/configure.ac
+index 365957d..dbf6d82 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -33,6 +33,12 @@ else
+ echo "using fluid_synth_nwrite_float() workaround"
+ echo "(You may wish to upgrade your FluidSynth to version 1.0.6 or later)"
+ fi
++have200=no
++PKG_CHECK_EXISTS(fluidsynth >= 2.0.0, have200=yes)
++if test "x${have200}" = xyes ; then
++ echo "using FluidSynth API V2 (>= 2.0.0)"
++ AC_DEFINE(USE_FLUIDSYNTH_API_V2, 1, [Define to 1 if your libfluidsynth is version 2.0.0 or later])
++fi
+
+ dnl Check for GTK+
+ AC_ARG_WITH(gtk2, AC_HELP_STRING([--with-gtk2], [use GTK+ 2.0 default=yes]),
+@@ -43,10 +49,6 @@ dnl First look for GTK+ 2.x, unless '--without-gtk2' was specified.
+ if test "x${try_gtk2}" = 'xyes'; then
+ AM_PATH_GTK_2_0(2.0.0, with_gtk='yes (version 2.0)', with_gtk=no)
+ fi
+-dnl No GTK+ 2.x found, look for GTK+ 1.2 instead
+-if test "x${with_gtk}" = 'xno'; then
+- AM_PATH_GTK(1.2.0, with_gtk='yes (version 1.2)', AC_MSG_WARN([GUI will not be built because no version of GTK+ was found]))
+-fi
+ AM_CONDITIONAL(BUILD_GUI, test "x${with_gtk}" != 'xno')
+ echo "GTK support: $with_gtk"
+
+diff --git a/src/fluidsynth-dssi.c b/src/fluidsynth-dssi.c
+index 99436c3..428f5bd 100644
+--- a/src/fluidsynth-dssi.c
++++ b/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;
++#ifdef USE_FLUIDSYNTH_API_V2
++ 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);
++#ifdef USE_FLUIDSYNTH_API_V2
++ fluid_sfont_iteration_start(fluid_sfont);
++ while ((preset = fluid_sfont_iteration_next(fluid_sfont)) != NULL) {
++#else
+ fluid_sfont->iteration_start(fluid_sfont);
+ while (fluid_sfont->iteration_next(fluid_sfont, &preset)) {
++#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;
+ }
+ }
++#ifdef USE_FLUIDSYNTH_API_V2
++ 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);
++#else
+ 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);
++#endif
+ sfont->preset_count++;
+ }
+
diff --git a/media-libs/fluidsynth-dssi/fluidsynth-dssi-1.0.0-r1.ebuild b/media-libs/fluidsynth-dssi/fluidsynth-dssi-1.0.0-r1.ebuild
new file mode 100644
index 000000000000..a858fce99498
--- /dev/null
+++ b/media-libs/fluidsynth-dssi/fluidsynth-dssi-1.0.0-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="DSSI Soft Synth Interface"
+HOMEPAGE="http://dssi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dssi/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+BDEPEND="virtual/pkgconfig"
+DEPEND="
+ media-libs/dssi
+ media-libs/liblo
+ media-sound/fluidsynth:=
+ x11-libs/gtk+:2
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PV}-fluidsynth2.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}