Commit 729a3d6b authored by Evan Nemerson's avatar Evan Nemerson Committed by Christian Persch
parent 4f0d0cdb
...@@ -61,4 +61,4 @@ tests/styles ...@@ -61,4 +61,4 @@ tests/styles
tools/test-memory tools/test-memory
Rsvg-2.0.gir Rsvg-2.0.gir
Rsvg-2.0.typelib Rsvg-2.0.typelib
librsvg-2.0.vapi
...@@ -216,7 +216,7 @@ if HAVE_INTROSPECTION ...@@ -216,7 +216,7 @@ if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE) -include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS = Rsvg-@RSVG_API_VERSION@.gir INTROSPECTION_GIRS = Rsvg-@RSVG_API_VERSION@.gir
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --symbol-prefix=rsvg --symbol-prefix=librsvg
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
Rsvg-@RSVG_API_VERSION@.gir: librsvg-@RSVG_API_MAJOR_VERSION@.la Rsvg-@RSVG_API_VERSION@.gir: librsvg-@RSVG_API_MAJOR_VERSION@.la
...@@ -250,6 +250,24 @@ nodist_typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) ...@@ -250,6 +250,24 @@ nodist_typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(nodist_gir_DATA) $(nodist_typelibs_DATA) CLEANFILES += $(nodist_gir_DATA) $(nodist_typelibs_DATA)
if ENABLE_VAPIGEN
include $(VAPIGEN_MAKEFILE)
librsvg-$(RSVG_API_VERSION).vapi: Rsvg-$(RSVG_API_VERSION).gir
VAPIGEN_VAPIS = librsvg-$(RSVG_API_VERSION).vapi
librsvg_@RSVG_API_VERSION_U@_vapi_DEPS = gio-2.0 cairo
librsvg_@RSVG_API_VERSION_U@_vapi_METADATADIRS = $(srcdir)
librsvg_@RSVG_API_VERSION_U@_vapi_FILES = Rsvg-$(RSVG_API_VERSION).gir Rsvg-$(RSVG_API_VERSION)-custom.vala
vapidir = $(datadir)/vala/vapi
vapi_DATA = $(VAPIGEN_VAPIS)
CLEANFILES += $(VAPIGEN_VAPIS)
endif # ENABLE_VAPIGEN
endif # HAVE_INTROSPECTION endif # HAVE_INTROSPECTION
# ChangeLog generation # ChangeLog generation
......
namespace Rsvg {
public class Handle : GLib.Object {
[Deprecated (since = "2.36")]
public unowned string get_desc ();
[Deprecated (replacement = "GLib.Object.unref")]
public void free ();
[Deprecated (replacement = "render_cairo")]
public void set_size_callback (owned Rsvg.SizeFunc size_func);
[Deprecated (since = "2.36")]
public unowned string get_title ();
[Deprecated (since = "2.36")]
public unowned string get_metadata ();
}
namespace Version {
[CCode (cname = "LIBRSVG_CHECK_VERSION")]
public static bool check (int major, int minor, int micro);
}
[Deprecated]
public delegate void SizeFunc (ref int width, ref int height);
[Deprecated (since = "2.36")]
public static void init ();
[Deprecated]
public static Gdk.Pixbuf pixbuf_from_file (string file_name) throws GLib.Error;
[Deprecated]
public static Gdk.Pixbuf pixbuf_from_file_at_max_size (string file_name, int max_width, int max_height) throws GLib.Error;
[Deprecated]
public static Gdk.Pixbuf pixbuf_from_file_at_size (string file_name, int width, int height) throws GLib.Error;
[Deprecated]
public static Gdk.Pixbuf pixbuf_from_file_at_zoom (string file_name, double x_zoom, double y_zoom) throws GLib.Error;
[Deprecated]
public static Gdk.Pixbuf pixbuf_from_file_at_zoom_with_max (string file_name, double x_zoom, double y_zoom, int max_width, int max_height) throws GLib.Error;
[Deprecated (since = "2.36")]
public static void term ();
}
*_VERSION parent="Rsvg.Version" name="(.+)_VERSION"
VERSION parent="Rsvg.Version" name="STRING"
...@@ -9,6 +9,7 @@ AC_INIT([RSVG],[rsvg_version],[https://bugzilla.gnome.org/enter_bug.cgi?product= ...@@ -9,6 +9,7 @@ AC_INIT([RSVG],[rsvg_version],[https://bugzilla.gnome.org/enter_bug.cgi?product=
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([rsvg.h]) AC_CONFIG_SRCDIR([rsvg.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2]) AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
...@@ -284,6 +285,9 @@ fi ...@@ -284,6 +285,9 @@ fi
GOBJECT_INTROSPECTION_CHECK([0.10.8]) GOBJECT_INTROSPECTION_CHECK([0.10.8])
# Vala bindings
VAPIGEN_CHECK([0.17.1.26],,,[no])
dnl =========================================================================== dnl ===========================================================================
m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_DEFUN],[glib_DEFUN])
...@@ -335,6 +339,7 @@ librsvg-$VERSION ...@@ -335,6 +339,7 @@ librsvg-$VERSION
compiler: ${CC} compiler: ${CC}
Build introspectable bindings: ${found_introspection} Build introspectable bindings: ${found_introspection}
Build Vala bindings: ${enable_vala}
Build GdkPixbuf loader: ${enable_pixbuf_loader} Build GdkPixbuf loader: ${enable_pixbuf_loader}
GTK 2.0: ${have_gtk_2} GTK 2.0: ${have_gtk_2}
GTK 3.0: ${have_gtk_3} GTK 3.0: ${have_gtk_3}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#endif #endif
#ifndef LIBRSVG_FEATURES_H #ifndef LIBRSVG_FEATURES_H
#define LIBRSVG_FEATURES_H 1 #define LIBRSVG_FEATURES_H
#define LIBRSVG_MAJOR_VERSION (@LIBRSVG_MAJOR_VERSION@) #define LIBRSVG_MAJOR_VERSION (@LIBRSVG_MAJOR_VERSION@)
#define LIBRSVG_MINOR_VERSION (@LIBRSVG_MINOR_VERSION@) #define LIBRSVG_MINOR_VERSION (@LIBRSVG_MINOR_VERSION@)
......
dnl vapigen.m4
dnl
dnl Copyright 2012 Evan Nemerson
dnl
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library; if not, write to the Free Software
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND-INTROSPECTION], [DEFAULT])
# --------------------------------------
# Check vapigen existence and version
#
# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation
AC_DEFUN([VAPIGEN_CHECK],
[
AC_BEFORE([GOBJECT_INTROSPECTION_CHECK],[$0])
AC_BEFORE([GOBJECT_INTROSPECTION_REQUIRE],[$0])
AC_ARG_ENABLE([vala],
[AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[
AS_IF([test "x$4" = "x"], [
enable_vala=auto
], [
enable_vala=$4
])
])
AS_CASE([$enable_vala], [no], [enable_vala=no],
[yes], [
AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
AC_MSG_ERROR([Vala bindings require GObject Introspection])
])
], [auto], [
AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
enable_vala=no
])
], [
AC_MSG_ERROR([Invalid argument passed to --enable-vala, should be one of @<:@no/auto/yes@:>@])
])
AS_IF([test "x$2" = "x"], [
vapigen_pkg_name=vapigen
], [
vapigen_pkg_name=vapigen-$2
])
AS_IF([test "x$1" = "x"], [
vapigen_pkg="$vapigen_pkg_name"
], [
vapigen_pkg="$vapigen_pkg_name >= $1"
])
PKG_PROG_PKG_CONFIG
PKG_CHECK_EXISTS([$vapigen_pkg], [
AS_IF([test "$enable_vala" = "auto"], [
enable_vala=yes
])
], [
AS_CASE([$enable_vala], [yes], [
AC_MSG_ERROR([$vapigen_pkg not found])
], [auto], [
enable_vala=no
])
])
AC_MSG_CHECKING([for vala])
AS_CASE([$enable_vala],
[yes], [
VAPIGEN=`$PKG_CONFIG --variable=vapigen vapigen`
VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir vapigen`/vala/Makefile.vapigen
AS_IF([test "x$2" = "x"], [
VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen`
], [
VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned vapigen`
])
])
AC_MSG_RESULT([$enable_vala])
AC_SUBST([VAPIGEN])
AC_SUBST([VAPIGEN_VAPIDIR])
AC_SUBST([VAPIGEN_MAKEFILE])
AM_CONDITIONAL(ENABLE_VAPIGEN, test "x$enable_vala" = "xyes")
])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment