[cairo-commit] cairo-perl ChangeLog, 1.11, 1.12 MakeHelper.pm, 1.2, 1.3 Makefile.PL, 1.8, 1.9

Torsten Schoenfeld commit at pdx.freedesktop.org
Wed Aug 31 15:00:17 PDT 2005


Committed by: tsch

Update of /cvs/cairo/cairo-perl
In directory gabe:/tmp/cvs-serv5892

Modified Files:
	ChangeLog MakeHelper.pm Makefile.PL 
Log Message:
	* MakeHelper.pm, Makefile.PL: Surround our _noinc typedefs for the
	PS and PDF backends with appropriate ifdefs to fix compilation
	when these backends were not installed with cairo.


Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-perl/ChangeLog,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ChangeLog	18 Aug 2005 11:22:55 -0000	1.11
+++ ChangeLog	31 Aug 2005 22:00:15 -0000	1.12
@@ -1,3 +1,9 @@
+2005/08/31	tsch
+
+	* MakeHelper.pm, Makefile.PL: Surround our _noinc typedefs for the
+	PS and PDF backends with appropriate ifdefs to fix compilation
+	when these backends were not installed with cairo.
+
 2005/08/18	tsch
 
 	* Cairo.pm: Fix incorrect package line that read GStreamer instead

Index: MakeHelper.pm
===================================================================
RCS file: /cvs/cairo/cairo-perl/MakeHelper.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- MakeHelper.pm	12 Jul 2005 20:29:47 -0000	1.2
+++ MakeHelper.pm	31 Aug 2005 22:00:15 -0000	1.3
@@ -67,6 +67,7 @@
 	my %objects = %{shift ()};
 	my %structs = %{shift ()};
 	my %enums = %{shift ()};
+	my %backend_macros = %{shift()};
 
 	my $cairo_perl = File::Spec->catfile ($autogen_dir,
 					      'cairo-perl-auto.typemap');
@@ -198,7 +199,13 @@
 	foreach (keys %objects)
 	{
 		/^(.*) \*/;
+		if (exists $backend_macros{$1}) {
+			print HEADER "#ifdef $backend_macros{$1}\n";
+		}
 		print HEADER "typedef $1 ${1}_noinc;\n";
+		if (exists $backend_macros{$1}) {
+			print HEADER "#endif\n";
+		}
 	}
 
 	close HEADER;

Index: Makefile.PL
===================================================================
RCS file: /cvs/cairo/cairo-perl/Makefile.PL,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- Makefile.PL	15 Aug 2005 18:59:17 -0000	1.8
+++ Makefile.PL	31 Aug 2005 22:00:15 -0000	1.9
@@ -25,6 +25,11 @@
 
 my %cairo_cfg = ExtUtils::PkgConfig->find ('cairo >= 0.9.0');
 
+my %backend_macros = (
+	'cairo_ps_surface_t' => 'CAIRO_HAS_PS_SURFACE',
+	'cairo_pdf_surface_t' => 'CAIRO_HAS_PDF_SURFACE',
+);
+
 my %objects = (
 	'cairo_t *' => 'Cairo::Context',
 	'cairo_surface_t *' => 'Cairo::Surface',
@@ -119,6 +124,7 @@
 			CAIRO_STATUS_INVALID_FORMAT
 			CAIRO_STATUS_INVALID_VISUAL
 			CAIRO_STATUS_FILE_NOT_FOUND
+			CAIRO_STATUS_INVALID_DASH
 	/],
 	cairo_filter_t => [qw/
 			CAIRO_FILTER_
@@ -188,7 +194,8 @@
 	ignore => '^Cairo$',
 );
 
-my @typemaps = MakeHelper::do_typemaps (\%objects, \%structs, \%enums);
+my @typemaps = MakeHelper::do_typemaps (\%objects, \%structs, \%enums,
+                                        \%backend_macros);
 push @typemaps, 'cairo-perl.typemap';
 
 my $dep = ExtUtils::Depends->new ('Cairo');



More information about the cairo-commit mailing list