diff options
author | edwin <edwin@FreeBSD.org> | 2006-04-09 19:02:32 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2006-04-09 19:02:32 +0800 |
commit | b26429dc3a9fdd38cfa8f11ed9ad2b3782f6097a (patch) | |
tree | c883e2da6b3312f3dddc8df64ce47678b4beb380 /audio/xmms2 | |
parent | 8b714b528bea181d7574079b4677f5c9a0037f0e (diff) | |
download | freebsd-ports-gnome-b26429dc3a9fdd38cfa8f11ed9ad2b3782f6097a.tar.gz freebsd-ports-gnome-b26429dc3a9fdd38cfa8f11ed9ad2b3782f6097a.tar.zst freebsd-ports-gnome-b26429dc3a9fdd38cfa8f11ed9ad2b3782f6097a.zip |
[PATCH] audio/xmms2: mark slave ports BROKEN; general cleanup
- Do not declare DATADIR; xmms2 port uses default anyway
- All the bindings are broken on 4.x, so mark all slave ports broken
PR: ports/95496
Submitted by: Alexander Botero-Lowry <alex@foxybanana.com>
Diffstat (limited to 'audio/xmms2')
-rw-r--r-- | audio/xmms2/Makefile | 10 | ||||
-rw-r--r-- | audio/xmms2/files/patch-src_clients_lib_java_callbacks.c | 77 | ||||
-rw-r--r-- | audio/xmms2/files/patch-src_clients_lib_java_include_callbacks.h | 25 | ||||
-rw-r--r-- | audio/xmms2/files/patch-src_clients_lib_java_include_misc.h | 24 | ||||
-rw-r--r-- | audio/xmms2/files/patch-src_clients_lib_java_misc.c | 32 |
5 files changed, 165 insertions, 3 deletions
diff --git a/audio/xmms2/Makefile b/audio/xmms2/Makefile index 8eb98ddb33d2..e0f3a5e39041 100644 --- a/audio/xmms2/Makefile +++ b/audio/xmms2/Makefile @@ -7,7 +7,7 @@ PORTNAME= xmms2 PORTVERSION= 0.2.d.4 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= audio MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -42,8 +42,6 @@ MAN8= xmms2d.8 MANCOMPRESSED= yes .endif -DATADIR= share/xmms2 - SCONS_TARGET?= .if defined(WITH_CURL) @@ -166,6 +164,12 @@ PLIST_SUB+= MDNS="@comment " .include <bsd.port.pre.mk> +.if defined(XMMS2_SLAVE) && ${XMMS2_SLAVE} != "java" +.if ${OSVERSION} < 500000 +BROKEN= Broken on FreeBSD 4.x +.endif +.endif + pre-everything:: .if defined(WITH_SAMBA) @${ECHO_MSG} "WARNING: Samba plugin is experimental and not fully working" diff --git a/audio/xmms2/files/patch-src_clients_lib_java_callbacks.c b/audio/xmms2/files/patch-src_clients_lib_java_callbacks.c new file mode 100644 index 000000000000..a527d91e2b56 --- /dev/null +++ b/audio/xmms2/files/patch-src_clients_lib_java_callbacks.c @@ -0,0 +1,77 @@ +--- src/clients/lib/java/callbacks.c.orig Mon Mar 27 11:34:45 2006 ++++ src/clients/lib/java/callbacks.c Sat Apr 8 00:27:56 2006 +@@ -38,11 +38,12 @@ + } + + void io_want_out_callback(int val, void *error){ ++ jobject callbackObject; + JNIEnv *environment = checkEnv(); + if (environment == NULL) + return; + +- jobject callbackObject = (*environment)->NewLocalRef(environment, globalMainloopObj); ++ callbackObject = (*environment)->NewLocalRef(environment, globalMainloopObj); + if (io_want_out_mid == 0) + return; + +@@ -117,6 +118,7 @@ + void callback_dict_foreach_function(const void *key, xmmsc_result_value_type_t type, const void *value, void *user_data){ + jint jres_val = 0; + jstring jkey, jvalue; ++ jobject callbackObject; + JNIEnv *environment = checkEnv(); + + if (key == NULL || value == NULL) return; +@@ -124,7 +126,7 @@ + if (environment == NULL) + return; + +- jobject callbackObject = (*environment)->NewLocalRef(environment, globalObj); ++ callbackObject = (*environment)->NewLocalRef(environment, globalObj); + if (dict_foreach_mid == 0) + return; + +@@ -138,13 +140,14 @@ + void callback_propdict_foreach_function(const void *key, xmmsc_result_value_type_t type, const void *value, const char *source, void *user_data){ + jint jres_val = 0; + jstring jkey, jvalue, jsource; ++ jobject callbackObject; + JNIEnv *environment = checkEnv(); + if (environment == NULL) + return; + + if (key == NULL || value == NULL) return; + +- jobject callbackObject = (*environment)->NewLocalRef(environment, globalObj); ++ callbackObject = (*environment)->NewLocalRef(environment, globalObj); + if (propdict_foreach_mid == 0) + return; + +@@ -173,12 +176,13 @@ + + void run_java_callback_result_void(xmmsc_result_t *res, jmethodID mid, void *user_data){ + jlong jresult = 0; ++ jobject callbackObject; + JNIEnv *environment = checkEnv(); + + if (environment == NULL) + return; + +- jobject callbackObject = (*environment)->NewLocalRef(environment, globalObj); ++ callbackObject = (*environment)->NewLocalRef(environment, globalObj); + if (mid == 0) + return; + +@@ -188,10 +192,11 @@ + + void run_java_callback_void(void *v, jmethodID mid){ + JNIEnv *environment = checkEnv(); ++ jobject callbackObject; + if (environment == NULL) + return; + +- jobject callbackObject = (*environment)->NewLocalRef(environment, globalObj); ++ callbackObject = (*environment)->NewLocalRef(environment, globalObj); + if (mid == 0) + return; + diff --git a/audio/xmms2/files/patch-src_clients_lib_java_include_callbacks.h b/audio/xmms2/files/patch-src_clients_lib_java_include_callbacks.h new file mode 100644 index 000000000000..6e99a0969211 --- /dev/null +++ b/audio/xmms2/files/patch-src_clients_lib_java_include_callbacks.h @@ -0,0 +1,25 @@ +--- src/clients/lib/java/include/callbacks.h.orig Mon Mar 27 11:34:45 2006 ++++ src/clients/lib/java/include/callbacks.h Sat Apr 8 00:27:56 2006 +@@ -14,6 +14,13 @@ + * Lesser General Public License for more details. + */ + ++#ifndef __CALLBACKS_H__ ++#define __CALLBACKS_H__ ++ ++#ifdef __cplusplus ++{ ++#endif ++ + #include <xmmsclient/xmmsclient.h> + #include <jni.h> + +@@ -67,3 +74,8 @@ + extern void callback_dict_foreach_function(const void *key, xmmsc_result_value_type_t type, const void *value, void *user_data); + extern void callback_propdict_foreach_function(const void *key, xmmsc_result_value_type_t type, const void *value, const char *source, void *user_data); + ++#ifdef __cplusplus ++} ++#endif ++ ++#endif diff --git a/audio/xmms2/files/patch-src_clients_lib_java_include_misc.h b/audio/xmms2/files/patch-src_clients_lib_java_include_misc.h new file mode 100644 index 000000000000..8996a7f9474d --- /dev/null +++ b/audio/xmms2/files/patch-src_clients_lib_java_include_misc.h @@ -0,0 +1,24 @@ +--- src/clients/lib/java/include/misc.h.orig Mon Mar 27 11:34:45 2006 ++++ src/clients/lib/java/include/misc.h Sat Apr 8 00:27:56 2006 +@@ -14,8 +14,21 @@ + * Lesser General Public License for more details. + */ + ++#ifndef __MISC_H__ ++#define __MISC_H__ ++ ++#ifdef __cplusplus ++{ ++#endif ++ + #include <xmmsclient/xmmsclient.h> + #include <jni.h> + + extern xmmsc_result_t* getResultFromPointer(jlong val); + extern jlong getPointerToConnection(xmmsc_connection_t *c); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif diff --git a/audio/xmms2/files/patch-src_clients_lib_java_misc.c b/audio/xmms2/files/patch-src_clients_lib_java_misc.c new file mode 100644 index 000000000000..aab30d4ebe64 --- /dev/null +++ b/audio/xmms2/files/patch-src_clients_lib_java_misc.c @@ -0,0 +1,32 @@ +--- src/clients/lib/java/misc.c.orig Mon Mar 27 11:34:45 2006 ++++ src/clients/lib/java/misc.c Sat Apr 8 00:27:56 2006 +@@ -37,11 +37,12 @@ + } + + JNIEXPORT void JNICALL Java_org_xmms2_SpecialJNI_setENV(JNIEnv *jenv, jclass cls, jobject myobject){ ++ jclass clazz; + globalObj = (*jenv)->NewGlobalRef(jenv, myobject); + if (jvm == NULL) + (*jenv)->GetJavaVM(jenv,&jvm); + +- jclass clazz = (*jenv)->GetObjectClass(jenv, myobject); ++ clazz = (*jenv)->GetObjectClass(jenv, myobject); + disconnect_mid = get_method_id("callbackDisconnect", "(I)V", jenv, clazz); + lock_mid = get_method_id("lockFunction", "(I)V", jenv, clazz); + unlock_mid = get_method_id("unlockFunction", "(I)V", jenv, clazz); +@@ -71,13 +72,14 @@ + + JNIEXPORT void JNICALL Java_org_xmms2_SpecialJNI_setupMainloop(JNIEnv *jenv, jclass cls, jobject myobject, jlong jarg1){ + xmmsc_connection_t *conn_ptr = (xmmsc_connection_t *) 0; ++ jclass clazz; + conn_ptr = *(xmmsc_connection_t **)(void *)&jarg1; + globalMainloopObj = (*jenv)->NewGlobalRef(jenv, myobject); + + if (jvm == NULL) + (*jenv)->GetJavaVM(jenv,&jvm); + +- jclass clazz = (*jenv)->GetObjectClass(jenv, myobject); ++ clazz = (*jenv)->GetObjectClass(jenv, myobject); + io_want_out_mid = get_method_id("callbackIOWantOut", "(II)V", jenv, clazz); + + //xmmsc_io_need_out_callback_set(conn_ptr, io_want_out_callback, 0); |