[cairo-commit] cairo-java ChangeLog, 1.90, 1.91 Makefile.am, 1.25, 1.26 autogen.sh, 1.5, 1.6 configure.ac, 1.14, 1.15

Adam Jocksch commit at pdx.freedesktop.org
Tue Feb 28 09:51:39 PST 2006


Committed by: ajocksch

Update of /cvs/cairo/cairo-java
In directory kemper:/tmp/cvs-serv18170

Modified Files:
	ChangeLog Makefile.am autogen.sh configure.ac 
Log Message:
2006-02-28  Adam Jocksch  <ajocksch at toothpaste.toronto.redhat.com>

	* src/java/org/freedesktop/cairo/Sufrace.java (cairo_surface_finish):
	Changed to return void.	
	* src/jni/org_freedesktop_cairo_FontFace.c: Ditto.
	* src/jni/org_freedesktop_cairo_FontOptions.c: Ditto.
	* src/jni/org_freedesktop_cairo_Glyph.c: Ditto.
	* src/jni/org_freedesktop_cairo_ImageSurface.c: Ditto.
	* src/jni/org_freedesktop_cairo_PDFSurface.c: Ditto.
	* src/jni/org_freedesktop_cairo_Pattern.c: Ditto.
	* src/jni/org_freedesktop_cairo_ScaledFont.c: Ditto.
	* src/jni/org_freedesktop_cairo_Status.c: Ditto.
	* src/jni/org_freedesktop_cairo_TextExtents.c: Ditto.
	* src/jni/org_freedesktop_cairo_Surface.c: Ditto, Added include for string.h.
	(Java_org_freedesktop_cairo_Surface_cairo_1surface_1write_1to_1png_1stream):
	Removed usued variables.
	* src/jni/org_freedesktop_cairo_Matrix.c: Added generated .h file.
	(Java_org_freedesktop_cairo_Matrix_getYX): Now returns a double.
	(Java_org_freedesktop_cairo_Matrix_getXY): Ditto.
	(Java_org_freedesktop_cairo_Matrix_getYY): Ditto.
	(Java_org_freedesktop_cairo_Matrix_getX0): Ditto.
	(Java_org_freedesktop_cairo_Matrix_getY0): Ditto.
	* src/jni/org_freedesktop_cairo_Context.c: Added generated .h file.
	(Java_org_freedesktop_cairo_Context_cairo_1get_1font_1options):
	Initialized fo prior to use.
	* src/jni/org_freedesktop_cairo_FontExtents.c: Added generated .h file and
	include for stdlib.h.

2006-02-27  Andrew Cagney  <cagney at redhat.com>

	* configure.ac: Use AC_CHECK_PROGS to check for JAVAH.
	* Makefile.am (CLASSPATH): Define as $(GJJAR), use.
	(BUILT_SOURCES): Add cairo$(apiversion).jar.
	(jni_cairo_source_files): Replace list with include of
	Makefile.jni.
	(java_cairo_pdf_source_files, jni_cairo_pdf_source_files): Delete.
	(AM_CLFAGS): Replace libcairojni_la_CFLAGS.
	(src/jni/org_freedesktop_cairo_PDFSurface.h)
	(src/jni/org_freedesktop_cairo_PDFSurface.lo, CLEANFILES): Add
	explicit rules for building and removing
	org_freedesktop_cairo_PDFSurface.h.
	* autogen.sh: Generate Makefile.jni.


Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-java/ChangeLog,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- ChangeLog	16 Feb 2006 15:45:08 -0000	1.90
+++ ChangeLog	28 Feb 2006 17:51:37 -0000	1.91
@@ -1,3 +1,46 @@
+2006-02-28  Adam Jocksch  <ajocksch at toothpaste.toronto.redhat.com>
+
+	* src/java/org/freedesktop/cairo/Sufrace.java (cairo_surface_finish):
+	Changed to return void.	
+	* src/jni/org_freedesktop_cairo_FontFace.c: Ditto.
+	* src/jni/org_freedesktop_cairo_FontOptions.c: Ditto.
+	* src/jni/org_freedesktop_cairo_Glyph.c: Ditto.
+	* src/jni/org_freedesktop_cairo_ImageSurface.c: Ditto.
+	* src/jni/org_freedesktop_cairo_PDFSurface.c: Ditto.
+	* src/jni/org_freedesktop_cairo_Pattern.c: Ditto.
+	* src/jni/org_freedesktop_cairo_ScaledFont.c: Ditto.
+	* src/jni/org_freedesktop_cairo_Status.c: Ditto.
+	* src/jni/org_freedesktop_cairo_TextExtents.c: Ditto.
+	* src/jni/org_freedesktop_cairo_Surface.c: Ditto, Added include for string.h.
+	(Java_org_freedesktop_cairo_Surface_cairo_1surface_1write_1to_1png_1stream):
+	Removed usued variables.
+	* src/jni/org_freedesktop_cairo_Matrix.c: Added generated .h file.
+	(Java_org_freedesktop_cairo_Matrix_getYX): Now returns a double.
+	(Java_org_freedesktop_cairo_Matrix_getXY): Ditto.
+	(Java_org_freedesktop_cairo_Matrix_getYY): Ditto.
+	(Java_org_freedesktop_cairo_Matrix_getX0): Ditto.
+	(Java_org_freedesktop_cairo_Matrix_getY0): Ditto.
+	* src/jni/org_freedesktop_cairo_Context.c: Added generated .h file.
+	(Java_org_freedesktop_cairo_Context_cairo_1get_1font_1options):
+	Initialized fo prior to use.
+	* src/jni/org_freedesktop_cairo_FontExtents.c: Added generated .h file and
+	include for stdlib.h.
+
+2006-02-27  Andrew Cagney  <cagney at redhat.com>
+
+	* configure.ac: Use AC_CHECK_PROGS to check for JAVAH.
+	* Makefile.am (CLASSPATH): Define as $(GJJAR), use.
+	(BUILT_SOURCES): Add cairo$(apiversion).jar.
+	(jni_cairo_source_files): Replace list with include of
+	Makefile.jni.
+	(java_cairo_pdf_source_files, jni_cairo_pdf_source_files): Delete.
+	(AM_CLFAGS): Replace libcairojni_la_CFLAGS.
+	(src/jni/org_freedesktop_cairo_PDFSurface.h)
+	(src/jni/org_freedesktop_cairo_PDFSurface.lo, CLEANFILES): Add
+	explicit rules for building and removing
+	org_freedesktop_cairo_PDFSurface.h.
+	* autogen.sh: Generate Makefile.jni.
+	
 2006-02-16  Igor Foox  <ifoox at redhat.com>
 
 	* cairo-java.pc.in: Added 'jnilibs=-L at libdir@ -lcairojni'.

Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/cairo-java/Makefile.am,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- Makefile.am	4 Dec 2005 04:58:38 -0000	1.25
+++ Makefile.am	28 Feb 2006 17:51:37 -0000	1.26
@@ -1,12 +1,15 @@
-if CAIRO_HAS_PDF_SURFACE
-java_cairo_pdf_source_files = 	\
-	src/java/org/freedesktop/cairo/PDFSurface.java 
-jni_cairo_pdf_source_files = 	\
-	src/jni/org_freedesktop_cairo_PDFSurface.c 
-endif
-
 AUTOMAKE_OPTIONS = subdir-objects
 
+CLEANFILES =
+BUILT_SOURCES =
+CLASSPATH = $(JGJAR)
+
+# Force all the .class files to be built very early in the process --
+# in particular before any attempt to generate .h files from those
+# classes
+
+BUILT_SOURCES += cairo$(apiversion).jar
+
 if BUILD_GCJ
 lib_LTLIBRARIES = libcairojava.la libcairojni.la
 else
@@ -48,23 +51,21 @@
 	src/java/org/freedesktop/cairo/SubpixelOrder.java \
 	src/java/org/freedesktop/cairo/Surface.java \
 	src/java/org/freedesktop/cairo/SurfacePattern.java \
-	src/java/org/freedesktop/cairo/TextExtents.java \
-	$(java_cairo_pdf_source_files)
+	src/java/org/freedesktop/cairo/TextExtents.java
+
+jni_cairo_source_files =
+include Makefile.jni
+
+if CAIRO_HAS_PDF_SURFACE
+java_cairo_source_files += 	\
+	src/java/org/freedesktop/cairo/PDFSurface.java 
+jni_cairo_source_files += src/jni/org_freedesktop_cairo_PDFSurface.c
+src/jni/org_freedesktop_cairo_PDFSurface.h: src/java/org/freedesktop/cairo/PDFSurface.class
+	$(JAVAH) -o $@ -classpath $(CLASSPATH):$(srcdir)/src/java org.freedesktop.cairo.PDFSurface
+src/jni/org_freedesktop_cairo_PDFSurface.lo: src/jni/org_freedesktop_cairo_PDFSurface.h
+CLEANFILES += src/jni/org_freedesktop_cairo_PDFSurface.h
+endif
 
-jni_cairo_source_files = \
-	src/jni/org_freedesktop_cairo_Context.c \
-	src/jni/org_freedesktop_cairo_FontExtents.c \
-	src/jni/org_freedesktop_cairo_FontFace.c \
-	src/jni/org_freedesktop_cairo_FontOptions.c \
-	src/jni/org_freedesktop_cairo_Glyph.c \
-	src/jni/org_freedesktop_cairo_ImageSurface.c \
-	src/jni/org_freedesktop_cairo_Matrix.c \
-	src/jni/org_freedesktop_cairo_Pattern.c \
-	src/jni/org_freedesktop_cairo_ScaledFont.c \
-	src/jni/org_freedesktop_cairo_Status.c \
-	src/jni/org_freedesktop_cairo_Surface.c \
-	src/jni/org_freedesktop_cairo_TextExtents.c \
-	$(jni_cairo_pdf_source_files)
 
 examples =
 
@@ -77,7 +78,7 @@
 endif
 
 libcairojni_la_SOURCES = $(jni_cairo_source_files)
-libcairojni_la_CFLAGS = $(CAIRO_CFLAGS) $(FONTCONFIG_CFLAGS) $(GLIB_CFLAGS) $(JGJAVA_CFLAGS) -I$(includedir) $(JNI_INCLUDES)
+AM_CFLAGS = $(CAIRO_CFLAGS) $(FONTCONFIG_CFLAGS) $(GLIB_CFLAGS) $(JGJAVA_CFLAGS) -I$(includedir) $(JNI_INCLUDES) -Wall -Wextra -Wwrite-strings -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wno-long-long -Wno-unused-parameter -Werror
 libcairojni_la_LDFLAGS = $(CAIRO_LIBS) $(FONTCONFIG_LIBS) $(JGJNI_LIBS) -release $(apiversion)
 
 # automake should support generating versioned jars
@@ -168,7 +169,7 @@
 	-rm -rf $(DESTDIR)$(datadir)/doc/cairo-java-$(VERSION)
 	-rm -f $(DESTDIR)$(cairo_jardir)/cairo$(apiversion)-$(VERSION).jar
 
-BUILT_SOURCES = \
+BUILT_SOURCES += \
 	cairo-java.pc \
 	src/java/org/freedesktop/cairo/Config.java
 
@@ -196,7 +197,7 @@
 	$(srcdir)/ltmain.sh \
 	$(srcdir)/missing
 
-CLEANFILES = \
+CLEANFILES += \
 	doc-stamp \
 	src/java/org/freedesktop/cairo/Config.class \
 	$(all_cairo_jar_class_files) \

Index: autogen.sh
===================================================================
RCS file: /cvs/cairo/cairo-java/autogen.sh,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- autogen.sh	5 Oct 2005 15:41:42 -0000	1.5
+++ autogen.sh	28 Feb 2006 17:51:37 -0000	1.6
@@ -66,6 +66,26 @@
 
 rm -rf autom4te.cache
 
+# Generate AUTOMAKE rules for all the JNI .h files; write them into
+# Makefile.jni for inclusion by Makefile.am.
+
+find src/jni \
+    -name '*PDFSurface*' -prune -o \
+    -name '[a-zA-Z]*.c' -print \
+    | while read f ; do
+    b=`basename $f .c`
+    d=`dirname $f`
+    h=$d/$b.h
+    c=`echo $b | sed -e 's,_,.,g'`
+    cat <<EOF
+jni_cairo_source_files += $f
+$h: src/java/`echo $b | sed -e 's,_,/,g'`.class
+	\$(JAVAH) -o \$@ -classpath \$(CLASSPATH):\$(srcdir)/src/java $c
+$d/$b.lo: $h
+CLEANFILES += $h
+EOF
+done > Makefile.jni
+
 libtoolize --force || exit $?
 
 JAVAGNOME_MACROS=`pkg-config --variable macro_dir glib-java`

Index: configure.ac
===================================================================
RCS file: /cvs/cairo/cairo-java/configure.ac,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- configure.ac	7 Dec 2005 04:23:42 -0000	1.14
+++ configure.ac	28 Feb 2006 17:51:37 -0000	1.15
@@ -71,8 +71,9 @@
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 
+AC_CHECK_PROGS([JAVAH], ["gcjh -jni" "javah"], [gcjh -jni])
+
 AC_CONFIG_FILES([Makefile])
 AC_CONFIG_FILES([cairo-java.pc])
 AC_CONFIG_FILES([src/java/org/freedesktop/cairo/Config.java])
 AC_OUTPUT
-



More information about the cairo-commit mailing list