[java-atk-wrapper] Fix distcheck errors
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper] Fix distcheck errors
- Date: Wed, 12 Sep 2018 11:55:48 +0000 (UTC)
commit 77624ed593821e9073453192370f06fab2d120f4
Author: Fridrich Štrba <fridrich strba bluewin ch>
Date: Wed Nov 8 10:54:24 2017 +0100
Fix distcheck errors
Makefile.am | 3 +++
configure.ac | 13 +++++++++++--
jni/src/AtkWrapper.c | 31 -------------------------------
jni/src/jawcomponent.c | 22 ----------------------
jni/src/jawutil.c | 42 ++++++++++++++++++++++--------------------
wrapper/Makefile.am | 5 +++++
6 files changed, 41 insertions(+), 75 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 1c05026..f182774 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,3 +3,6 @@ SUBDIRS=jni wrapper
EXTRA_DIST = JavaInfo.java
ACLOCAL_AMFLAGS=-I m4 ${ACLOCAL_FLAGS}
+
+clean-local:
+ $(RM) *.class
diff --git a/configure.ac b/configure.ac
index 4bc94b6..537d038 100644
--- a/configure.ac
+++ b/configure.ac
@@ -118,6 +118,7 @@ GNOME_COMPILE_WARNINGS([error])
case "$WARN_CFLAGS" in
*-Werror*)
WARN_CFLAGS="$WARN_CFLAGS -Wno-error=deprecated-declarations"
+ WARN_CFLAGS="$WARN_CFLAGS -Wno-error=strict-prototypes"
;;
esac
AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS"
@@ -155,7 +156,11 @@ AC_SUBST(XPROP)
AC_ARG_WITH(jardir, AS_HELP_STRING([--with-jardir=[dirname]],[Directory for installing the
java-atk-wrapper.jar file]))
if test -z "$with_jardir" ; then
- JARDIR=${JAVA_HOME}/lib
+ if test -d ${JAVA_HOME}/lib/ext ; then
+ JARDIR=${libdir}/jvm/$(basename ${JAVA_HOME})/lib/ext
+ else
+ JARDIR=${libdir}/jvm/$(basename ${JAVA_HOME})/lib
+ fi
else
JARDIR=$with_jardir
fi
@@ -163,7 +168,11 @@ AC_SUBST(JARDIR)
AC_ARG_WITH(propertiesdir, AS_HELP_STRING([--with-propertiesdir=[dirname]],[Directory for installing the
accessibility.properties file]))
if test -z "$with_propertiesdir" ; then
- PROPERTIESDIR=${JAVA_HOME}/conf
+ if test -d ${JAVA_HOME}/conf ; then
+ PROPERTIESDIR=${libdir}/jvm/$(basename ${JAVA_HOME})/conf
+ else
+ PROPERTIESDIR=${libdir}/jvm/$(basename ${JAVA_HOME})/lib
+ fi
else
PROPERTIESDIR=$with_propertiesdir
fi
diff --git a/jni/src/AtkWrapper.c b/jni/src/AtkWrapper.c
index e33088e..cb2bc35 100644
--- a/jni/src/AtkWrapper.c
+++ b/jni/src/AtkWrapper.c
@@ -714,30 +714,6 @@ JNICALL Java_org_GNOME_Accessibility_AtkWrapper_windowStateChange(JNIEnv *jniEnv
gdk_threads_add_idle(window_state_change_handler, para);
}
-static gchar
-get_char_value (JNIEnv *jniEnv, jobject o)
-{
- jclass classByte = (*jniEnv)->FindClass(jniEnv, "java/lang/Byte");
- jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv, classByte, "byteValue", "()B");
- return (gchar)(*jniEnv)->CallByteMethod(jniEnv, o, jmid);
-}
-
-static gdouble
-get_double_value (JNIEnv *jniEnv, jobject o)
-{
- jclass classDouble = (*jniEnv)->FindClass(jniEnv, "java/lang/Double");
- jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv, classDouble, "doubleValue", "()D");
- return (gdouble)(*jniEnv)->CallDoubleMethod(jniEnv, o, jmid);
-}
-
-static gfloat
-get_float_value (JNIEnv *jniEnv, jobject o)
-{
- jclass classFloat = (*jniEnv)->FindClass(jniEnv, "java/lang/Float");
- jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv, classFloat, "floatValue", "()F");
- return (gfloat)(*jniEnv)->CallFloatMethod(jniEnv, o, jmid);
-}
-
static gint
get_int_value (JNIEnv *jniEnv, jobject o)
{
@@ -745,13 +721,6 @@ get_int_value (JNIEnv *jniEnv, jobject o)
jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv, classInteger, "intValue", "()I");
return (gint)(*jniEnv)->CallIntMethod(jniEnv, o, jmid);
}
-static gint64
-get_int64_value (JNIEnv *jniEnv, jobject o)
-{
- jclass classLong = (*jniEnv)->FindClass(jniEnv, "java/lang/Long");
- jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv, classLong, "longValue", "()J");
- return (gint64)(*jniEnv)->CallLongMethod(jniEnv, o, jmid);
-}
static gboolean
signal_emit_handler (gpointer p)
diff --git a/jni/src/jawcomponent.c b/jni/src/jawcomponent.c
index d0a4086..e5318bc 100644
--- a/jni/src/jawcomponent.c
+++ b/jni/src/jawcomponent.c
@@ -104,28 +104,6 @@ jaw_component_data_finalize (gpointer p)
}
}
-static void
-coord_screen_to_local (JNIEnv *jniEnv, jobject jobj, gint *x, gint *y)
-{
- jclass classAccessibleComponent = (*jniEnv)->FindClass(jniEnv,
- "javax/accessibility/AccessibleComponent");
- jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv,
- classAccessibleComponent,
- "getLocationOnScreen",
- "()Ljava/awt/Point;");
-
- jobject jpoint = (*jniEnv)->CallObjectMethod(jniEnv, jobj, jmid);
-
- jclass classPoint = (*jniEnv)->FindClass(jniEnv, "java/awt/Point");
- jfieldID jfidX = (*jniEnv)->GetFieldID(jniEnv, classPoint, "x", "I");
- jfieldID jfidY = (*jniEnv)->GetFieldID(jniEnv, classPoint, "y", "I");
- jint jx = (*jniEnv)->GetIntField(jniEnv, jpoint, jfidX);
- jint jy = (*jniEnv)->GetIntField(jniEnv, jpoint, jfidY);
-
- (*x) = (*x) - (gint)jx;
- (*y) = (*y) - (gint)jy;
-}
-
static gboolean
jaw_component_contains (AtkComponent *component, gint x, gint y, AtkCoordType coord_type)
{
diff --git a/jni/src/jawutil.c b/jni/src/jawutil.c
index bb44f12..48974f0 100644
--- a/jni/src/jawutil.c
+++ b/jni/src/jawutil.c
@@ -351,29 +351,31 @@ jaw_util_get_jni_env(void)
if (env != NULL)
return env;
- switch (res)
- {
- case JNI_EDETACHED:
- args.version = JNI_VERSION_1_6;
- args.name = g_strdup_printf("NativeThread %d", i++);
- res = (*cachedJVM)->AttachCurrentThread(cachedJVM, &ptr, NULL);
- env = (JNIEnv*) ptr;
- if ((res == JNI_OK) && (env != NULL))
- {
- g_free(args.name);
- return env;
- }
- g_printerr("\n *** Attach failed. *** JNIEnv thread is detached.\n");
- break;
- case JNI_EVERSION:
- g_printerr(" *** Version error *** \n");
- break;
- }
- fflush(stderr);
- exit(2);
+ switch (res)
+ {
+ case JNI_EDETACHED:
+ args.version = JNI_VERSION_1_6;
+ args.name = g_strdup_printf("NativeThread %d", i++);
+ res = (*cachedJVM)->AttachCurrentThread(cachedJVM, &ptr, NULL);
+ env = (JNIEnv*) ptr;
+ if ((res == JNI_OK) && (env != NULL))
+ {
+ g_free(args.name);
+ return env;
+ }
+ g_printerr("\n *** Attach failed. *** JNIEnv thread is detached.\n");
+ break;
+ case JNI_EVERSION:
+ g_printerr(" *** Version error *** \n");
+ break;
+ }
+
+ fflush(stderr);
+ exit(2);
return NULL;
}
+void jaw_util_detach(void);
void
jaw_util_detach(void)
{
diff --git a/wrapper/Makefile.am b/wrapper/Makefile.am
index 66a2114..42f3ff2 100644
--- a/wrapper/Makefile.am
+++ b/wrapper/Makefile.am
@@ -14,6 +14,11 @@ EXTRA_DIST = $(properties_DATA) \
$(JARFILES) : $(DEP_CLASSES)
$(JAR) cfm $(JARFILES) manifest.txt org/GNOME/Accessibility/*.class
+install-data-local : all-local
+ $(mkinstalldirs) $(DESTDIR)$(propertiesdir) $(DESTDIR)$(java_atk_wrapperdir)
+ $(INSTALL_DATA) $(srcdir)/$(properties_DATA) $(DESTDIR)$(propertiesdir)/
+ $(INSTALL_DATA) $(java_atk_wrapper_DATA) $(DESTDIR)$(java_atk_wrapperdir)/
+
all-local : $(DATA) $(JARFILES)
clean-local:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]