diff --git a/.gitignore b/.gitignore index d5ae75fc..cdfab436 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ libvips-scan.c Makefile.in TAGS *.o +Vips-8.0.gir +Vips-8.0.typelib .*.swp *.lo *.la diff --git a/Makefile.am b/Makefile.am index fc8502ce..08264ed0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -55,4 +55,6 @@ uninstall-hook: -chmod -R u+w ${DESTDIR}$(datadir)/doc/vips -rm -rf ${DESTDIR}$(datadir)/doc/vips -DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc +ACLOCAL_AMFLAGS = -I m4 + +DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-introspection diff --git a/TODO b/TODO index ad3f0ebf..cfdacbea 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,8 @@ +- look at libpeas for plugin support + + http://live.gnome.org/Libpeas + + - revisit orc conv diff --git a/bootstrap.sh b/bootstrap.sh index fb81b48e..547924fb 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -26,6 +26,7 @@ cp $ACDIR/iconv.m4 m4 cp $ACDIR/isc-posix.m4 m4 cp $ACDIR/lcmessage.m4 m4 cp $ACDIR/progtest.m4 m4 +cp $ACDIR/introspection.m4 m4 gtkdocize --copy --docdir doc/reference --flavour no-tmpl || exit 1 diff --git a/configure.in b/configure.in index 7303e3b3..d57c3d44 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,14 @@ # Process this file with autoconf to produce a configure script. -AC_INIT(libvips/include/vips/colour.h) + +# also update the version number in the m4 macros below + +AC_INIT(vips, 7.25.0, vipsip@jiscmail.ac.uk) +# required for gobject-introspection +AC_PREREQ(2.62) + +# gobject-introspection recommends this +AM_INIT_AUTOMAKE([-Wno-portability]) + AM_CONFIG_HEADER(config.h) AC_CONFIG_MACRO_DIR(m4) @@ -10,14 +19,38 @@ m4_define([vips_micro_version], [0]) m4_define([vips_version], [vips_major_version.vips_minor_version.vips_micro_version]) -VIPS_MAJOR_VERSION=vips_major_version -VIPS_MINOR_VERSION=vips_minor_version -VIPS_MICRO_VERSION=vips_micro_version +VIPS_MAJOR_VERSION=vips_major_version() +VIPS_MINOR_VERSION=vips_minor_version() +VIPS_MICRO_VERSION=vips_micro_version() VIPS_VERSION=vips_version() VIPS_VERSION_STRING=$VIPS_VERSION-`date` -VERSION=$VIPS_VERSION -PACKAGE=vips +# init introspection supoport +GOBJECT_INTROSPECTION_CHECK([0.6.7]) + +# gir needs a list of source files to scan for introspection +# build with a glob and a list of files to exclude from scanning +# see also IGNORE_HFILES in doc/reference/Makefile.am +# the only header we include is the main vips.h one, it'll pull in everythiung +# else in the public API +introspection_sources=`cd libvips ; find . -name "*.c"` +filter_list="deprecated" + +introspection_sources2= +for name in $introspection_sources; do + found=0 + for filter in $filter_list; do + if [[[ $name == *${filter}* ]]]; then + found=1 + fi + done + + if [[ $found -eq 0 ]]; then + introspection_sources2="$introspection_sources2 $name" + fi +done +vips_introspection_sources="$introspection_sources2 include/vips/vips.h" +AC_SUBST(vips_introspection_sources) # libtool library versioning ... not user-visible (except as part of the # library file name) and does not correspond to major/minor/micro above @@ -32,8 +65,6 @@ LIBRARY_CURRENT=30 LIBRARY_REVISION=0 LIBRARY_AGE=15 -AM_INIT_AUTOMAKE($PACKAGE,$VERSION) - # patched into include/vips/version.h AC_SUBST(VIPS_VERSION) AC_SUBST(VIPS_VERSION_STRING) diff --git a/libvips/Makefile.am b/libvips/Makefile.am index 3b5eb417..f8491cd2 100644 --- a/libvips/Makefile.am +++ b/libvips/Makefile.am @@ -72,3 +72,32 @@ libvips_la_LDFLAGS = \ EXTRA_DIST = \ $(C_DIST_DIR) + +CLEANFILES = + +-include $(INTROSPECTION_MAKEFILE) +INTROSPECTION_GIRS = +INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) +INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) + +if HAVE_INTROSPECTION +# we can't get the _SOURCES lists from the subdirs directly, we get passed it +# by configure instead +introspection_sources = @vips_introspection_sources@ + +# we make the vips8 API +Vips-8.0.gir: libvips.la +Vips_8_0_gir_INCLUDES = GObject-2.0 +Vips_8_0_gir_CFLAGS = $(INCLUDES) -I${top_srcdir}/libvips/include +Vips_8_0_gir_LIBS = libvips.la +Vips_8_0_gir_FILES = $(introspection_sources) +INTROSPECTION_GIRS += Vips-8.0.gir + +girdir = $(datadir)/gir-1.0 +gir_DATA = $(INTROSPECTION_GIRS) + +typelibdir = $(libdir)/girepository-1.0 +typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) + +CLEANFILES += $(gir_DATA) $(typelib_DATA) +endif diff --git a/libvips/deprecated/dispatch_types.c b/libvips/deprecated/dispatch_types.c index d00faac6..fc14c4ca 100644 --- a/libvips/deprecated/dispatch_types.c +++ b/libvips/deprecated/dispatch_types.c @@ -737,9 +737,8 @@ im__dmsprint( im_object obj ) /* Print statistics band stats eg: 2 bands:b 0,1 */ - printf( "\ -band minimum maximum sum sum^2 mean deviation\ -\n" ); + printf( "band minimum maximum sum " + "sum^2 mean deviation\n" ); for( j = 0; j < mask->ysize; j++ ) { row = mask->coeff + j * 6; if( j == 0 ) diff --git a/libvips/include/vips/header.h b/libvips/include/vips/header.h index 3ab9f554..0fa4f226 100644 --- a/libvips/include/vips/header.h +++ b/libvips/include/vips/header.h @@ -84,7 +84,7 @@ int vips_image_get_xoffset( VipsImage *image ); int vips_image_get_yoffset( VipsImage *image ); const char *vips_image_get_filename( VipsImage *image ); const char *vips_image_get_mode( VipsImage *image ); -void *vips_image_get_data( VipsImage *image );; +void *vips_image_get_data( VipsImage *image ); void vips_image_init_fields( VipsImage *image, int xsize, int ysize, int bands,