add gobject introspection support
This commit is contained in:
parent
642305327e
commit
b9d32462ba
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,6 +3,8 @@ libvips-scan.c
|
||||
Makefile.in
|
||||
TAGS
|
||||
*.o
|
||||
Vips-8.0.gir
|
||||
Vips-8.0.typelib
|
||||
.*.swp
|
||||
*.lo
|
||||
*.la
|
||||
|
@ -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
|
||||
|
5
TODO
5
TODO
@ -1,3 +1,8 @@
|
||||
- look at libpeas for plugin support
|
||||
|
||||
http://live.gnome.org/Libpeas
|
||||
|
||||
|
||||
|
||||
- revisit orc conv
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
47
configure.in
47
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)
|
||||
|
@ -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
|
||||
|
@ -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 )
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user