aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2019-02-17 09:27:43 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2019-02-17 09:27:43 +0000
commit515a36247131cd29eb9af370c21f85ffc3d05bb6 (patch)
treea78aadffc08d4e645f4339c416fc6f4831795b3c
parent71335f82ba9988090448f3d6c0b6399350db4c72 (diff)
downloadports-515a36247131cd29eb9af370c21f85ffc3d05bb6.tar.gz
ports-515a36247131cd29eb9af370c21f85ffc3d05bb6.zip
Notes
-rw-r--r--audio/tuxguitar/Makefile44
-rw-r--r--audio/tuxguitar/files/patch-TuxGuitar-fluidsynth_jni_org__herac__tuxguitar__player__impl__midiport__fluidsynth__MidiSynth.c67
-rw-r--r--audio/tuxguitar/files/patch-TuxGuitar_build.properties (renamed from audio/tuxguitar/files/patch-build.properties)18
3 files changed, 98 insertions, 31 deletions
diff --git a/audio/tuxguitar/Makefile b/audio/tuxguitar/Makefile
index 6ea229ea1b52..5613cc4e9624 100644
--- a/audio/tuxguitar/Makefile
+++ b/audio/tuxguitar/Makefile
@@ -18,7 +18,7 @@ MAINTAINER= yuri@FreeBSD.org
COMMENT= Multitrack tablature editor and player
LICENSE= LGPL21
-LICENSE_FILE= ${WRKSRC}/../LICENSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${JAVALIBDIR}/swt-devel.jar:x11-toolkits/swt-devel \
${JAVALIBDIR}/itext.jar:devel/itext \
@@ -38,7 +38,7 @@ USE_LDCONFIG= yes
JAVA_VERSION= 1.6+
NOCCACHE= yes
-WRKSRC_SUBDIR= TuxGuitar
+BUILD_WRKSRC= ${WRKSRC}/TuxGuitar
SF2_DIR= ${LOCALBASE}/share/sounds/sf2
OPTIONS_DEFINE= DOCS
@@ -56,11 +56,11 @@ post-extract:
@${CP} ${DISTDIR}/8MBGMSFX.SF2 ${WRKDIR}
post-patch:
- @${FIND} ${WRKSRC}/.. -name build.properties | ${XARGS} ${REINPLACE_CMD} -e '\
+ @${FIND} ${WRKSRC} -name build.properties | ${XARGS} ${REINPLACE_CMD} -e '\
s|path\.swt=.*|path.swt=${JAVAJARDIR}/swt-devel.jar|; \
s|path\.itext=.*|path.itext=${JAVAJARDIR}/itext.jar|; \
s|path\.gervill=.*|path.gervill=${JAVAJARDIR}/gervill.jar|'
- @${FIND} ${WRKSRC}/.. -name GNUmakefile | ${XARGS} ${REINPLACE_CMD} -e '\
+ @${FIND} ${WRKSRC} -name GNUmakefile | ${XARGS} ${REINPLACE_CMD} -e '\
s|-I$$(shell gcj -print-file-name=include/)|-I${JAVA_HOME}/include \
-I${JAVA_HOME}/include/freebsd -I${LOCALBASE}/include|; \
s|-I $$(shell $$(GCJ) -print-file-name=include/)|-I${JAVA_HOME}/include \
@@ -73,38 +73,38 @@ post-patch:
s|%%JAVASHAREDIR%%|${JAVASHAREDIR}|g; \
s|%%DATADIR%%|${DATADIR}|g; \
s|%%DOCSDIR%%|${DOCSDIR}|g' \
- ${WRKSRC}/build.properties
+ ${WRKSRC}/TuxGuitar/build.properties
post-build:
.for p in ${PLUGINS}
- (cd ${WRKSRC}/../TuxGuitar-${p}; \
+ (cd ${WRKSRC}/TuxGuitar-${p}; \
${SETENV} ${MAKE_ENV} ${ANT} ${MAKE_ARGS} ${ALL_TARGET})
.endfor
- cd ${WRKSRC}/../TuxGuitar-oss/jni && ${SETENV} ${MAKE_ENV} ${MAKE_CMD}
- cd ${WRKSRC}/../TuxGuitar-fluidsynth/jni && ${SETENV} ${MAKE_ENV} ${MAKE_CMD}
- cd ${WRKSRC}/../TuxGuitar-jack/jni && ${SETENV} ${MAKE_ENV} ${MAKE_CMD}
+ cd ${WRKSRC}/TuxGuitar-oss/jni && ${SETENV} ${MAKE_ENV} ${MAKE_CMD}
+ cd ${WRKSRC}/TuxGuitar-fluidsynth/jni && ${SETENV} ${MAKE_ENV} ${MAKE_CMD}
+ cd ${WRKSRC}/TuxGuitar-jack/jni && ${SETENV} ${MAKE_ENV} ${MAKE_CMD}
do-install:
${INSTALL_SCRIPT} ${WRKDIR}/tuxguitar ${STAGEDIR}${PREFIX}/bin
- ${INSTALL_LIB} ${WRKSRC}/../TuxGuitar-oss/jni/libtuxguitar-oss-jni.so ${STAGEDIR}${PREFIX}/lib
- ${INSTALL_LIB} ${WRKSRC}/../TuxGuitar-fluidsynth/jni/libtuxguitar-fluidsynth-jni.so ${STAGEDIR}${PREFIX}/lib
+ ${INSTALL_LIB} ${WRKSRC}/TuxGuitar-oss/jni/libtuxguitar-oss-jni.so ${STAGEDIR}${PREFIX}/lib
+ ${INSTALL_LIB} ${WRKSRC}/TuxGuitar-fluidsynth/jni/libtuxguitar-fluidsynth-jni.so ${STAGEDIR}${PREFIX}/lib
@${MKDIR} ${STAGEDIR}${DATADIR}/plugins
- ${INSTALL_DATA} ${WRKSRC}/tuxguitar.jar ${STAGEDIR}${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/../misc/*.tg ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/TuxGuitar/tuxguitar.jar ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/misc/*.tg ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKDIR}/8MBGMSFX.SF2 ${STAGEDIR}${DATADIR}
.for p in ${PLUGINS}
- ${INSTALL_DATA} ${WRKSRC}/../TuxGuitar-${p}/tuxguitar-${p}.jar ${STAGEDIR}${DATADIR}/plugins
+ ${INSTALL_DATA} ${WRKSRC}/TuxGuitar-${p}/tuxguitar-${p}.jar ${STAGEDIR}${DATADIR}/plugins
.endfor
# Inline documentation
- cd ${WRKSRC}/share/help && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/help
- cd ${WRKSRC}/share/lang && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/lang
- cd ${WRKSRC}/share/scales && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/scales
- cd ${WRKSRC}/share/skins && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/skins
+ cd ${WRKSRC}/TuxGuitar/share/help && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/help
+ cd ${WRKSRC}/TuxGuitar/share/lang && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/lang
+ cd ${WRKSRC}/TuxGuitar/share/scales && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/scales
+ cd ${WRKSRC}/TuxGuitar/share/skins && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/skins
- ${INSTALL_DATA} ${WRKSRC}/../misc/tuxguitar.xpm ${STAGEDIR}${PREFIX}/share/pixmaps
- ${INSTALL_DATA} ${WRKSRC}/../misc/tuxguitar.desktop ${STAGEDIR}${PREFIX}/share/applications
- ${INSTALL_MAN} ${WRKSRC}/../misc/tuxguitar.1 ${STAGEDIR}${MANPREFIX}/man/man1
+ ${INSTALL_DATA} ${WRKSRC}/misc/tuxguitar.xpm ${STAGEDIR}${PREFIX}/share/pixmaps
+ ${INSTALL_DATA} ${WRKSRC}/misc/tuxguitar.desktop ${STAGEDIR}${PREFIX}/share/applications
+ ${INSTALL_MAN} ${WRKSRC}/misc/tuxguitar.1 ${STAGEDIR}${MANPREFIX}/man/man1
# Share soundfont with FluidSynth
@${MKDIR} ${STAGEDIR}${SF2_DIR}
@@ -112,6 +112,6 @@ do-install:
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
- cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC}/TuxGuitar/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/audio/tuxguitar/files/patch-TuxGuitar-fluidsynth_jni_org__herac__tuxguitar__player__impl__midiport__fluidsynth__MidiSynth.c b/audio/tuxguitar/files/patch-TuxGuitar-fluidsynth_jni_org__herac__tuxguitar__player__impl__midiport__fluidsynth__MidiSynth.c
new file mode 100644
index 000000000000..71f4a41cc755
--- /dev/null
+++ b/audio/tuxguitar/files/patch-TuxGuitar-fluidsynth_jni_org__herac__tuxguitar__player__impl__midiport__fluidsynth__MidiSynth.c
@@ -0,0 +1,67 @@
+--- TuxGuitar-fluidsynth/jni/org_herac_tuxguitar_player_impl_midiport_fluidsynth_MidiSynth.c.orig 2009-10-31 14:34:13 UTC
++++ TuxGuitar-fluidsynth/jni/org_herac_tuxguitar_player_impl_midiport_fluidsynth_MidiSynth.c
+@@ -16,7 +16,11 @@ typedef struct{
+ jobject options;
+ }fluid_settings_foreach_option_data;
+
++#if FLUIDSYNTH_VERSION_MAJOR < 2
+ void fluid_settings_foreach_option_callback(void *data, char *name, char *option)
++#else
++void fluid_settings_foreach_option_callback(void *data, const char *name, const char *option)
++#endif
+ {
+ fluid_settings_foreach_option_data* handle = (fluid_settings_foreach_option_data *)data;
+
+@@ -255,8 +259,12 @@ JNIEXPORT void JNICALL Java_org_herac_tuxguitar_player
+ jstring jvalue = NULL;
+ char *value = NULL;
+ const jbyte *jkey = (*env)->GetStringUTFChars(env, key, NULL);
+-
++
++#if FLUIDSYNTH_VERSION_MAJOR < 2
+ fluid_settings_getstr(handle->settings,(char *)jkey, &value );
++#else
++ fluid_settings_dupstr(handle->settings,(char *)jkey, &value );
++#endif
+ jvalue = (*env)->NewStringUTF(env, value);
+
+ (*env)->ReleaseStringUTFChars(env, key, jkey);
+@@ -274,7 +282,12 @@ JNIEXPORT void JNICALL Java_org_herac_tuxguitar_player
+ jmethodID mid = (*env)->GetMethodID(env, cl, "setValue", "(D)V");
+ if (mid != 0){
+ const jbyte *jkey = (*env)->GetStringUTFChars(env, key, NULL);
++#if FLUIDSYNTH_VERSION_MAJOR < 2
+ double value = fluid_settings_getnum_default(handle->settings,(char *)jkey);
++#else
++ double value = 0.0;
++ fluid_settings_getnum_default(handle->settings, (char*)jkey, &value);
++#endif
+
+ (*env)->ReleaseStringUTFChars(env, key, jkey);
+ (*env)->CallVoidMethod( env, ref , mid , (jdouble)value );
+@@ -291,7 +304,12 @@ JNIEXPORT void JNICALL Java_org_herac_tuxguitar_player
+ jmethodID mid = (*env)->GetMethodID(env, cl, "setValue", "(I)V");
+ if (mid != 0){
+ const jbyte *jkey = (*env)->GetStringUTFChars(env, key, NULL);
++#if FLUIDSYNTH_VERSION_MAJOR < 2
+ int value = fluid_settings_getint_default(handle->settings,(char *)jkey);
++#else
++ int value = 0;
++ fluid_settings_getint_default(handle->settings,(char *)jkey, &value);
++#endif
+
+ (*env)->ReleaseStringUTFChars(env, key, jkey);
+ (*env)->CallVoidMethod( env, ref , mid , (jint)value );
+@@ -308,7 +326,12 @@ JNIEXPORT void JNICALL Java_org_herac_tuxguitar_player
+ jmethodID mid = (*env)->GetMethodID(env, cl, "setValue", "(Ljava/lang/String;)V");
+ if (mid != 0){
+ const jbyte *jkey = (*env)->GetStringUTFChars(env, key, NULL);
++#if FLUIDSYNTH_VERSION_MAJOR < 2
+ char *value = fluid_settings_getstr_default(handle->settings,(char *)jkey);
++#else
++ char *value = NULL;
++ fluid_settings_getstr_default(handle->settings,(char *)jkey, &value);
++#endif
+ jstring jvalue = (*env)->NewStringUTF(env, value);
+
+ (*env)->ReleaseStringUTFChars(env, key, jkey);
diff --git a/audio/tuxguitar/files/patch-build.properties b/audio/tuxguitar/files/patch-TuxGuitar_build.properties
index 3fcd090ccc90..7516fbcd06d2 100644
--- a/audio/tuxguitar/files/patch-build.properties
+++ b/audio/tuxguitar/files/patch-TuxGuitar_build.properties
@@ -1,5 +1,5 @@
---- build.properties.orig 2009-10-31 14:32:52 UTC
-+++ build.properties
+--- TuxGuitar/build.properties.orig 2009-10-31 14:32:52 UTC
++++ TuxGuitar/build.properties
@@ -5,15 +5,15 @@ ant.build.javac.source=1.4
ant.build.javac.target=1.4
@@ -38,15 +38,15 @@
-#dist.bin.path=/usr/local/bin/
-#dist.share.path=/usr/local/share/TuxGuitar-${dist.version}/
-#dist.doc.path=/usr/local/share/doc/TuxGuitar-${dist.version}/
-+lib.swt.jni=%%LOCALBASE%%/lib/
-+lib.swt.jar=%%JAVAJARDIR%%/swt-devel.jar
-+lib.itext.jar=%%JAVAJARDIR%%/itext.jar
++lib.swt.jni=/usr/local/lib/
++lib.swt.jar=/usr/local/share/java/classes/swt-devel.jar
++lib.itext.jar=/usr/local/share/java/classes/itext.jar
+dist.file=xml/build-freebsd.xml
+dist.version=1.2
-+dist.jar.path=%%JAVASHAREDIR%%/TuxGuitar-${dist.version}/
-+dist.bin.path=%%PREFIX%%/bin
-+dist.share.path=%%DATADIR%%
-+dist.doc.path=%%DOCSDIR%%
++dist.jar.path=/usr/local/share/java/TuxGuitar-${dist.version}/
++dist.bin.path=/usr/local/bin
++dist.share.path=/usr/local/share/tuxguitar
++dist.doc.path=/usr/local/share/doc/tuxguitar
########## DEFAULT MAC BUILD PROPERTIES ##########
#lib.swt.jni=lib/