[cairo-commit] cairo-perl Cairo.pm, 1.13, 1.14 Cairo.xs, 1.11, 1.12 ChangeLog, 1.24, 1.25 Makefile.PL, 1.15, 1.16

Torsten Schoenfeld commit at pdx.freedesktop.org
Sun Jul 2 06:10:46 PDT 2006


Committed by: tsch

Update of /cvs/cairo/cairo-perl
In directory kemper:/tmp/cvs-serv7255

Modified Files:
	Cairo.pm Cairo.xs ChangeLog Makefile.PL 
Log Message:
	* Makefile.PL: Require cairo 1.2.0.  Add CAIRO_FORMAT_RGB16_565.

	* Cairo.pm, CairoFont.xs: Cosmetical changes.

	* Cairo.xs: Add Cairo::VERSION and Cairo::VERSION_ENCODE.

	* t/CairoSurface.t: Shuffle a few tests around to avoid some
	strange singularities.


Index: Cairo.pm
===================================================================
RCS file: /cvs/cairo/cairo-perl/Cairo.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- Cairo.pm	15 Jun 2006 21:08:28 -0000	1.13
+++ Cairo.pm	2 Jul 2006 13:10:44 -0000	1.14
@@ -90,9 +90,9 @@
 =head1 ABSTRACT
 
 Cairo provides Perl bindings for the vector graphics library cairo.  It
-supports multiple output targets, including the X Window Systems, PDF, and PNG.
-Cairo produces identical output on all those targets and makes use of hardware
-acceleration wherever possible.
+supports multiple output targets, including PDF and PNG.  Cairo produces
+identical output on all those targets and makes use of hardware acceleration
+wherever possible.
 
 =head1 API DOCUMENTATION
 

Index: Cairo.xs
===================================================================
RCS file: /cvs/cairo/cairo-perl/Cairo.xs,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- Cairo.xs	3 Jun 2006 14:21:09 -0000	1.11
+++ Cairo.xs	2 Jul 2006 13:10:44 -0000	1.12
@@ -221,6 +221,32 @@
 
 MODULE = Cairo	PACKAGE = Cairo	PREFIX = cairo_
 
+int VERSION (class=NULL)
+    CODE:
+	RETVAL = CAIRO_VERSION;
+    OUTPUT:
+	RETVAL
+
+int VERSION_ENCODE (...)
+    PREINIT:
+	int major, minor, micro;
+    CODE:
+	if (items == 3) {
+		major = SvIV (ST (0));
+		minor = SvIV (ST (1));
+		micro = SvIV (ST (2));
+	} else if (items == 4) {
+		major = SvIV (ST (1));
+		minor = SvIV (ST (2));
+		micro = SvIV (ST (3));
+	} else {
+		croak ("Usage: Cairo::VERSION_ENCODE (major, minor, micro) or Cairo->VERSION_ENCODE (major, minor, micro)");
+	}
+
+	RETVAL = CAIRO_VERSION_ENCODE (major, minor, micro);
+    OUTPUT:
+	RETVAL
+
 # int cairo_version ();
 int cairo_version (class=NULL)
     C_ARGS:

Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-perl/ChangeLog,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- ChangeLog	15 Jun 2006 21:08:28 -0000	1.24
+++ ChangeLog	2 Jul 2006 13:10:44 -0000	1.25
@@ -1,3 +1,14 @@
+2006/07/02	tsch
+
+	* Makefile.PL: Require cairo 1.2.0.  Add CAIRO_FORMAT_RGB16_565.
+
+	* Cairo.pm, CairoFont.xs: Cosmetical changes.
+
+	* Cairo.xs: Add Cairo::VERSION and Cairo::VERSION_ENCODE.
+
+	* t/CairoSurface.t: Shuffle a few tests around to avoid some
+	strange singularities.
+
 2006/06/15	tsch
 
 	* Cairo.pm, MANIFEST, NEWS, README: Release 0.04.

Index: Makefile.PL
===================================================================
RCS file: /cvs/cairo/cairo-perl/Makefile.PL,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- Makefile.PL	14 Jun 2006 18:20:23 -0000	1.15
+++ Makefile.PL	2 Jul 2006 13:10:44 -0000	1.16
@@ -11,6 +11,10 @@
 use ExtUtils::MakeMaker;
 use MakeHelper;
 
+my %extreqs = (
+	'cairo' => '1.2.0',
+);
+
 # Unfortunately we already need these prereqs for writing the Makefile ...
 my %prereqs = (
 	'ExtUtils::Depends'   => 0.2,
@@ -47,7 +51,12 @@
 mkdir $autogen_dir unless (-d $autogen_dir);
 $MakeHelper::autogen_dir = $autogen_dir;
 
-my %cairo_cfg = ExtUtils::PkgConfig->find ('cairo >= 1.1.8');
+my %cairo_cfg;
+eval { %cairo_cfg = ExtUtils::PkgConfig->find ("cairo >= $extreqs{cairo}"); };
+if ($@) {
+	warn $@;
+        die "*** please use Cairo 0.03 to work with cairo 1.0.x\n";
+}
 
 my %backend_macros = (
 	'cairo_pdf_surface_t' => 'CAIRO_HAS_PDF_SURFACE',
@@ -126,6 +135,7 @@
 			CAIRO_FORMAT_RGB24
 			CAIRO_FORMAT_A8
 			CAIRO_FORMAT_A1
+			CAIRO_FORMAT_RGB16_565
 	/],
 	cairo_hint_metrics_t => [qw/
 			CAIRO_HINT_METRICS_



More information about the cairo-commit mailing list