Bug#946916: libtritonus-java FTBFS after libfluidsynth update
peter green
plugwash at p10link.net
Thu Dec 19 03:59:16 GMT 2019
tags 946916 +patch
thanks
I whipped up a patch for this and was able to get the package to build succesfully.
I also had to bump the java source/binary version to 1.6 because the compiler in sid apparently no longer supports 1.5.
Debdiff attatched, I have no immediate plans to NMU, but I may do so later, especially if I get postive feedback on the patch from users.
-------------- next part --------------
diff -Nru libtritonus-java-20070428/debian/ant.properties libtritonus-java-20070428/debian/ant.properties
--- libtritonus-java-20070428/debian/ant.properties 2018-05-09 08:45:00.000000000 +0000
+++ libtritonus-java-20070428/debian/ant.properties 2019-12-19 03:03:53.000000000 +0000
@@ -1,2 +1,2 @@
-ant.build.javac.source=1.5
-ant.build.javac.target=1.5
+ant.build.javac.source=1.6
+ant.build.javac.target=1.6
diff -Nru libtritonus-java-20070428/debian/changelog libtritonus-java-20070428/debian/changelog
--- libtritonus-java-20070428/debian/changelog 2018-05-09 13:06:26.000000000 +0000
+++ libtritonus-java-20070428/debian/changelog 2019-12-19 03:09:23.000000000 +0000
@@ -1,3 +1,13 @@
+libtritonus-java (20070428-14.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Bump java source/binary versions to 1.6, since unstable's compiler
+ no longer accepts 1.5
+ * Fix build with new fluidsynth.
+ * Bump fluidsynth build-dependency.
+
+ -- Peter Michael Green <plugwash at debian.org> Thu, 19 Dec 2019 03:09:23 +0000
+
libtritonus-java (20070428-14) unstable; urgency=medium
* Team upload.
diff -Nru libtritonus-java-20070428/debian/control libtritonus-java-20070428/debian/control
--- libtritonus-java-20070428/debian/control 2018-05-09 13:05:47.000000000 +0000
+++ libtritonus-java-20070428/debian/control 2019-12-19 03:09:23.000000000 +0000
@@ -13,7 +13,7 @@
default-jdk,
libasound2-dev | libasound-dev,
libcdparanoia-dev,
- libfluidsynth-dev,
+ libfluidsynth-dev (>= 2),
libjlayer-java,
libjorbis-java,
libogg-dev,
diff -Nru libtritonus-java-20070428/debian/patches/bump-java-to-1.6.patch libtritonus-java-20070428/debian/patches/bump-java-to-1.6.patch
--- libtritonus-java-20070428/debian/patches/bump-java-to-1.6.patch 1970-01-01 00:00:00.000000000 +0000
+++ libtritonus-java-20070428/debian/patches/bump-java-to-1.6.patch 2019-12-19 03:09:23.000000000 +0000
@@ -0,0 +1,54 @@
+Description: Bump java source/binary versions to 1.6, since unstable's compiler no longer accepts 1.5
+ Note: the java version is also mentioned in debian/ant.properties, I don't know
+ which one takes precedence.
+Author: Peter Michael Green <plugwash at debian.org>
+
+--- libtritonus-java-20070428.orig/build-common.xml
++++ libtritonus-java-20070428/build-common.xml
+@@ -15,7 +15,7 @@
+ <property name="src.classes" value="${src}/classes" />
+ <property name="src.misc" value="${src}/misc" />
+ <property name="debug" value="on"/>
+- <property name="source" value="1.5"/>
++ <property name="source" value="1.6"/>
+ <available
+ classname="grame.midishare.Midi"
+ property="midishare-present" />
+@@ -404,7 +404,7 @@
+ Windowtitle="Tritonus API"
+ link="http://java.sun.com/j2se/1.5.0/docs/api/"
+ use="true"
+- source="1.5"
++ source="1.6"
+ additionalparam="-breakiterator">
+ </javadoc>
+ <!-- additionalparam="-breakiterator" -->
+@@ -416,7 +416,7 @@
+ package="true" sourcepath="${src}" destdir="${javadoc.dir}"
+ packagenames="javax.sound.*"
+ Windowtitle="Java Sound API"
+- source="1.5"
++ source="1.6"
+ additionalparam="-breakiterator">
+ </javadoc>
+ <!-- additionalparam="-breakiterator" -->
+--- libtritonus-java-20070428.orig/test/suite/build.xml
++++ libtritonus-java-20070428/test/suite/build.xml
+@@ -45,7 +45,7 @@
+ <target name="compile-api" depends="prepare">
+ <javac srcdir="${src.dir}"
+ destdir="${build.dir}"
+- source="1.5"
++ source="1.6"
+ debug="on">
+ <compilerarg value="-Xlint:unchecked"/>
+ <exclude name="org/tritonus/test/*.java"/>
+@@ -59,7 +59,7 @@
+ <target name="compile-tritonus" depends="prepare, init-tritonus">
+ <javac srcdir="${src.dir}"
+ destdir="${build.dir}"
+- source="1.5"
++ source="1.6"
+ debug="on">
+ <exclude name="org/tritonus/test/api/"/>
+ <classpath refid="compile.classpath"/>
diff -Nru libtritonus-java-20070428/debian/patches/fluidsynth2.patch libtritonus-java-20070428/debian/patches/fluidsynth2.patch
--- libtritonus-java-20070428/debian/patches/fluidsynth2.patch 1970-01-01 00:00:00.000000000 +0000
+++ libtritonus-java-20070428/debian/patches/fluidsynth2.patch 2019-12-19 03:09:23.000000000 +0000
@@ -0,0 +1,54 @@
+Description: Fix build with new fluidsynth.
+Author: Peter Michael Green <plugwash at debian.org>
+
+--- libtritonus-java-20070428.orig/src/lib/fluidsynth/org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c
++++ libtritonus-java-20070428/src/lib/fluidsynth/org_tritonus_midi_device_fluidsynth_FluidSynthesizer.c
+@@ -282,7 +282,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_
+ jobject instrument;
+
+ fluid_sfont_t* sfont;
+- fluid_preset_t preset;
++ fluid_preset_t* preset;
+ int offset;
+ int i = 0;
+ fluid_synth_t* synth;
+@@ -313,9 +313,9 @@ JNIEXPORT jobjectArray JNICALL Java_org_
+
+ if (sfont != NULL)
+ {
+- sfont->iteration_start(sfont);
++ fluid_sfont_iteration_start(sfont);
+
+- while (sfont->iteration_next(sfont, &preset))
++ while ((preset = fluid_sfont_iteration_next(sfont)))
+ {
+ count++;
+ }
+@@ -330,19 +330,19 @@ JNIEXPORT jobjectArray JNICALL Java_org_
+ if (sfont == NULL)
+ return 0;
+
+- sfont->iteration_start(sfont);
++ fluid_sfont_iteration_start(sfont);
+
+- while (sfont->iteration_next(sfont, &preset))
++ while ((preset = fluid_sfont_iteration_next(sfont)))
+ {
+ instrname = (*env)->NewStringUTF(env,
+- // fluid_preset_get_name(&preset)
+- preset.get_name(&preset)
++ fluid_preset_get_name(preset)
++ // preset.get_name(&preset)
+ );
+ instrument = (*env)->NewObject(env, fluidinstrclass, initid, obj,
+- // (jint) fluid_preset_get_banknum(&preset) + offset,
+- (jint) (preset.get_banknum(&preset) + offset),
+- // (jint) fluid_preset_get_num(&preset),
+- (jint) (preset.get_num(&preset)),
++ (jint) fluid_preset_get_banknum(preset) + offset,
++ // (jint) (preset.get_banknum(&preset) + offset),
++ (jint) fluid_preset_get_num(preset),
++ // (jint) (preset.get_num(&preset)),
+ (jobject) instrname);
+ (*env)->SetObjectArrayElement(env, instruments, i++, instrument);
+ }
diff -Nru libtritonus-java-20070428/debian/patches/series libtritonus-java-20070428/debian/patches/series
--- libtritonus-java-20070428/debian/patches/series 2018-05-09 12:28:07.000000000 +0000
+++ libtritonus-java-20070428/debian/patches/series 2019-12-19 03:09:23.000000000 +0000
@@ -7,3 +7,5 @@
alsa-1.0.16.diff
ignore-ant-dtd.diff
java10-compatibility.diff
+bump-java-to-1.6.patch
+fluidsynth2.patch
More information about the pkg-java-maintainers
mailing list