head 1.35; access; symbols rel-1-060:1.32 rel-1-053:1.31 rel-1-052:1.31 rel-1-045:1.28.2.1 rel-1-051:1.31 rel-1-044:1.28.2.1 stable-1-04:1.28.0.2 stable-1-02:1.20.0.4 rel-1-050:1.30 rel-1-043:1.28 rel-1-042:1.25 rel-1-041:1.24 rel-1-040:1.23 rel-1-023:1.20 rel-1-031:1.22 rel-1-022:1.20 rel-1-030:1.22 rel-1-021:1.20 stable-1-0:1.20.0.2 rel-1-02:1.20 rel-1-01:1.20 rel-1-00:1.20 rel-0-92:1.18 rel-0-91:1.18 rel-0-90:1.17 rel-0-04:1.15 rel-0-03:1.12 rel-0-02:1.10 rel-0-01:1.8; locks; strict; comment @# @; 1.35 date 2008.10.05.19.59.40; author tsch; state Exp; branches; next 1.34; commitid jap73dqgVgT1Atlt; 1.34 date 2008.09.07.18.09.38; author tsch; state Exp; branches; next 1.33; commitid kd7G38J5lHn6SRht; 1.33 date 2008.09.06.18.42.47; author tsch; state Exp; branches; next 1.32; commitid g8AvqfrXW1bu5Kht; 1.32 date 2008.03.22.18.34.58; author tsch; state Exp; branches; next 1.31; commitid T6641I5t7NqAr9Ws; 1.31 date 2008.01.07.17.34.54; author tsch; state Exp; branches; next 1.30; commitid PKbUdk2OMjwqwvMs; 1.30 date 2007.11.20.19.10.32; author tsch; state Exp; branches; next 1.29; commitid mpH4SCk3qGXUAlGs; 1.29 date 2007.10.24.16.32.05; author tsch; state Exp; branches; next 1.28; commitid n4jyLFAXsD0mARCs; 1.28 date 2007.10.13.21.23.16; author tsch; state Exp; branches 1.28.2.1; next 1.27; commitid HNHsZaR17qW9ytBs; 1.27 date 2007.10.07.19.03.00; author tsch; state Exp; branches; next 1.26; commitid 8W8htx004tm1YGAs; 1.26 date 2007.10.06.11.58.38; author tsch; state Exp; branches; next 1.25; commitid Bh8TFpM5EHqmEwAs; 1.25 date 2007.09.27.20.23.40; author tsch; state Exp; branches; next 1.24; commitid wBLUAylKIxSCJpzs; 1.24 date 2007.05.13.10.58.05; author tsch; state Exp; branches; next 1.23; 1.23 date 2007.05.06.11.28.37; author tsch; state Exp; branches; next 1.22; 1.22 date 2006.11.23.19.09.12; author tsch; state Exp; branches; next 1.21; 1.21 date 2006.11.09.19.43.43; author tsch; state Exp; branches; next 1.20; 1.20 date 2006.08.27.12.42.32; author tsch; state Exp; branches; next 1.19; 1.19 date 2006.08.20.18.09.47; author tsch; state Exp; branches; next 1.18; 1.18 date 2006.08.10.17.34.40; author tsch; state Exp; branches; next 1.17; 1.17 date 2006.07.15.14.41.11; author tsch; state Exp; branches; next 1.16; 1.16 date 2006.07.02.13.10.44; author tsch; state Exp; branches; next 1.15; 1.15 date 2006.06.14.18.20.23; author tsch; state Exp; branches; next 1.14; 1.14 date 2006.06.03.14.21.09; author tsch; state Exp; branches; next 1.13; 1.13 date 2006.05.07.14.17.39; author tsch; state Exp; branches; next 1.12; 1.12 date 2006.01.29.19.27.21; author tsch; state Exp; branches; next 1.11; commitid c9b43dd17164567; 1.11 date 2006.01.08.17.06.29; author tsch; state Exp; branches; next 1.10; commitid 64a343c146924567; 1.10 date 2005.08.31.22.32.09; author tsch; state Exp; branches; next 1.9; commitid 289d43162fe14567; 1.9 date 2005.08.31.22.00.15; author tsch; state Exp; branches; next 1.8; commitid 1704431628664567; 1.8 date 2005.08.15.18.59.17; author tsch; state Exp; branches; next 1.7; commitid 1ef4300e6004567; 1.7 date 2005.08.10.17.01.54; author tsch; state Exp; branches; next 1.6; commitid 55d042fa32fe4567; 1.6 date 2005.07.29.17.19.55; author tsch; state Exp; branches; next 1.5; commitid 3b1e42ea65374567; 1.5 date 2005.07.12.20.29.47; author tsch; state Exp; branches; next 1.4; commitid 758542d428324567; 1.4 date 2004.11.28.18.27.10; author rwmcfa1; state Exp; branches; next 1.3; 1.3 date 2004.11.11.02.20.32; author rwmcfa1; state Exp; branches; next 1.2; 1.2 date 2004.11.09.02.59.43; author rwmcfa1; state Exp; branches; next 1.1; 1.1 date 2004.11.05.01.34.04; author rwmcfa1; state Exp; branches; next ; 1.28.2.1 date 2007.11.20.20.01.07; author tsch; state Exp; branches; next ; commitid aezRK0InoZjgSlGs; desc @@ 1.35 log @In preparation of the move to SVN, use the Id keyword in place of Header. @ text @# # Copyright (c) 2004-2006 by the cairo perl team (see the file README) # # Licensed under the LGPL, see LICENSE file for more information. # # $Id: /cvs/cairo/cairo-perl/Makefile.PL,v 1.34 2008-09-07 18:09:38 tsch Exp $ # BEGIN { require 5.006; } use strict; use warnings; use ExtUtils::MakeMaker; use MakeHelper; my %extreqs = ( 'cairo' => '1.0.0', ); # Unfortunately we already need these prereqs for writing the Makefile ... my %prereqs = ( 'ExtUtils::Depends' => 0.2, 'ExtUtils::PkgConfig' => 1.0, ); # ... thus we have to make sure they are installed. while ((my $module, my $version) = each(%prereqs)) { unless (eval "use $module $version; 1" ) { print "This module requires $module to install itself.\n"; my $yn = ExtUtils::MakeMaker::prompt(" Install $module from CPAN?", 'n'); unless ($yn =~ /^y/i) { die " *** Cannot install without $module. Exiting ...\n"; } require Cwd; require File::Spec; require CPAN; # Save this 'cause CPAN will chdir all over the place. my $cwd = Cwd::cwd(); my $makefile = File::Spec->rel2abs($0); CPAN::Shell->install($module); chdir $cwd or die "Cannot chdir() back to $cwd: $!"; } eval "use $module $version; 1" or die $@@; } # Add this now since it's not required to generate a Makefile. $prereqs{'Test::Number::Delta'} = 1.00; my $autogen_dir = 'build'; mkdir $autogen_dir unless (-d $autogen_dir); $MakeHelper::autogen_dir = $autogen_dir; my %cairo_cfg; eval { %cairo_cfg = ExtUtils::PkgConfig->find ("cairo >= $extreqs{cairo}"); }; if ($@@ ne '') { warn $@@; exit 0; } my %backend_guards = ( 'cairo_pdf_surface_t' => 'CAIRO_HAS_PDF_SURFACE', 'cairo_ps_surface_t' => 'CAIRO_HAS_PS_SURFACE', 'cairo_svg_surface_t' => 'CAIRO_HAS_SVG_SURFACE', ); my %objects = ( 'cairo_t *' => 'Cairo::Context', 'cairo_font_face_t *' => 'Cairo::FontFace', 'cairo_pattern_t *' => 'Cairo::Pattern', 'cairo_scaled_font_t *' => 'Cairo::ScaledFont', 'cairo_surface_t *' => 'Cairo::Surface', ); my %structs = ( 'cairo_font_options_t *' => 'Cairo::FontOptions', 'cairo_matrix_t *' => 'Cairo::Matrix', ); my %enums = ( cairo_antialias_t => [qw/ CAIRO_ANTIALIAS_ CAIRO_ANTIALIAS_DEFAULT CAIRO_ANTIALIAS_NONE CAIRO_ANTIALIAS_GRAY CAIRO_ANTIALIAS_SUBPIXEL /], cairo_content_t => [qw/ CAIRO_CONTENT_ CAIRO_CONTENT_COLOR CAIRO_CONTENT_ALPHA CAIRO_CONTENT_COLOR_ALPHA /], cairo_extend_t => [qw/ CAIRO_EXTEND_ CAIRO_EXTEND_NONE CAIRO_EXTEND_REPEAT CAIRO_EXTEND_REFLECT /], cairo_fill_rule_t => [qw/ CAIRO_FILL_RULE_ CAIRO_FILL_RULE_WINDING CAIRO_FILL_RULE_EVEN_ODD /], cairo_filter_t => [qw/ CAIRO_FILTER_ CAIRO_FILTER_FAST CAIRO_FILTER_GOOD CAIRO_FILTER_BEST CAIRO_FILTER_NEAREST CAIRO_FILTER_BILINEAR CAIRO_FILTER_GAUSSIAN /], cairo_font_slant_t => [qw/ CAIRO_FONT_SLANT_ CAIRO_FONT_SLANT_NORMAL CAIRO_FONT_SLANT_ITALIC CAIRO_FONT_SLANT_OBLIQUE /], cairo_font_weight_t => [qw/ CAIRO_FONT_WEIGHT_ CAIRO_FONT_WEIGHT_NORMAL CAIRO_FONT_WEIGHT_BOLD /], cairo_format_t => [qw/ CAIRO_FORMAT_ CAIRO_FORMAT_ARGB32 CAIRO_FORMAT_RGB24 CAIRO_FORMAT_A8 CAIRO_FORMAT_A1 /], cairo_hint_metrics_t => [qw/ CAIRO_HINT_METRICS_ CAIRO_HINT_METRICS_DEFAULT CAIRO_HINT_METRICS_OFF CAIRO_HINT_METRICS_ON /], cairo_hint_style_t => [qw/ CAIRO_HINT_STYLE_ CAIRO_HINT_STYLE_DEFAULT CAIRO_HINT_STYLE_NONE CAIRO_HINT_STYLE_SLIGHT CAIRO_HINT_STYLE_MEDIUM CAIRO_HINT_STYLE_FULL /], cairo_line_cap_t => [qw/ CAIRO_LINE_CAP_ CAIRO_LINE_CAP_BUTT CAIRO_LINE_CAP_ROUND CAIRO_LINE_CAP_SQUARE /], cairo_line_join_t => [qw/ CAIRO_LINE_JOIN_ CAIRO_LINE_JOIN_MITER CAIRO_LINE_JOIN_ROUND CAIRO_LINE_JOIN_BEVEL /], cairo_operator_t => [qw/ CAIRO_OPERATOR_ CAIRO_OPERATOR_CLEAR CAIRO_OPERATOR_SOURCE CAIRO_OPERATOR_OVER CAIRO_OPERATOR_IN CAIRO_OPERATOR_OUT CAIRO_OPERATOR_ATOP CAIRO_OPERATOR_DEST CAIRO_OPERATOR_DEST_OVER CAIRO_OPERATOR_DEST_IN CAIRO_OPERATOR_DEST_OUT CAIRO_OPERATOR_DEST_ATOP CAIRO_OPERATOR_XOR CAIRO_OPERATOR_ADD CAIRO_OPERATOR_SATURATE /], cairo_path_data_type_t => [qw/ CAIRO_PATH_ CAIRO_PATH_MOVE_TO CAIRO_PATH_LINE_TO CAIRO_PATH_CURVE_TO CAIRO_PATH_CLOSE_PATH /], cairo_status_t => [qw/ CAIRO_STATUS_ CAIRO_STATUS_SUCCESS CAIRO_STATUS_NO_MEMORY CAIRO_STATUS_INVALID_RESTORE CAIRO_STATUS_INVALID_POP_GROUP CAIRO_STATUS_NO_CURRENT_POINT CAIRO_STATUS_INVALID_MATRIX CAIRO_STATUS_INVALID_STATUS CAIRO_STATUS_NULL_POINTER CAIRO_STATUS_INVALID_STRING CAIRO_STATUS_INVALID_PATH_DATA CAIRO_STATUS_READ_ERROR CAIRO_STATUS_WRITE_ERROR CAIRO_STATUS_SURFACE_FINISHED CAIRO_STATUS_SURFACE_TYPE_MISMATCH CAIRO_STATUS_PATTERN_TYPE_MISMATCH CAIRO_STATUS_INVALID_CONTENT CAIRO_STATUS_INVALID_FORMAT CAIRO_STATUS_INVALID_VISUAL CAIRO_STATUS_FILE_NOT_FOUND CAIRO_STATUS_INVALID_DASH /], cairo_subpixel_order_t => [qw/ CAIRO_SUBPIXEL_ORDER_ CAIRO_SUBPIXEL_ORDER_DEFAULT CAIRO_SUBPIXEL_ORDER_RGB CAIRO_SUBPIXEL_ORDER_BGR CAIRO_SUBPIXEL_ORDER_VRGB CAIRO_SUBPIXEL_ORDER_VBGR /], ); # --------------------------------------------------------------------------- # my $have_cairo_1_2 = ExtUtils::PkgConfig->atleast_version("cairo", "1.2.0"); my $have_cairo_1_4 = ExtUtils::PkgConfig->atleast_version("cairo", "1.4.0"); my $have_cairo_1_6 = ExtUtils::PkgConfig->atleast_version("cairo", "1.5.0"); # FIXME: 1.6 if ($have_cairo_1_2) { my %new = ( cairo_extend_t => [qw/CAIRO_EXTEND_PAD/], cairo_format_t => [qw/CAIRO_FORMAT_RGB16_565/], cairo_status_t => [qw/CAIRO_STATUS_INVALID_DSC_COMMENT/], ); foreach my $enum (keys %new) { foreach my $value (@@{$new{$enum}}) { push @@{$enums{$enum}}, $value; } } $enums{cairo_font_type_t} = [qw/ CAIRO_FONT_TYPE_ CAIRO_FONT_TYPE_TOY CAIRO_FONT_TYPE_FT CAIRO_FONT_TYPE_WIN32 CAIRO_FONT_TYPE_ATSUI /]; $enums{cairo_pattern_type_t} = [qw/ CAIRO_PATTERN_TYPE_ CAIRO_PATTERN_TYPE_SOLID CAIRO_PATTERN_TYPE_SURFACE CAIRO_PATTERN_TYPE_LINEAR CAIRO_PATTERN_TYPE_RADIAL /]; $enums{cairo_surface_type_t} = [qw/ CAIRO_SURFACE_TYPE_ CAIRO_SURFACE_TYPE_IMAGE CAIRO_SURFACE_TYPE_PDF CAIRO_SURFACE_TYPE_PS CAIRO_SURFACE_TYPE_XLIB CAIRO_SURFACE_TYPE_XCB CAIRO_SURFACE_TYPE_GLITZ CAIRO_SURFACE_TYPE_QUARTZ CAIRO_SURFACE_TYPE_WIN32 CAIRO_SURFACE_TYPE_BEOS CAIRO_SURFACE_TYPE_DIRECTFB CAIRO_SURFACE_TYPE_SVG /]; $enums{cairo_svg_version_t} = [qw/ CAIRO_SVG_VERSION_ CAIRO_SVG_VERSION_1_1 CAIRO_SVG_VERSION_1_2 /]; } else { # We need to create empty enum entries for new types so that typemaps # are generated for them. xsubpp demands typemaps even if the code is # #if'd out. $enums{cairo_font_type_t} = []; $enums{cairo_pattern_type_t} = []; $enums{cairo_surface_type_t} = []; $enums{cairo_svg_version_t} = []; } if ($have_cairo_1_4) { my %new = ( cairo_status_t => [qw/CAIRO_STATUS_INVALID_INDEX CAIRO_STATUS_CLIP_NOT_REPRESENTABLE/], cairo_font_type_t => [qw/CAIRO_FONT_TYPE_QUARTZ/], ); foreach my $enum (keys %new) { foreach my $value (@@{$new{$enum}}) { push @@{$enums{$enum}}, $value; } } } if ($have_cairo_1_6) { $enums{cairo_ps_level_t} = [qw/ CAIRO_PS_LEVEL_ CAIRO_PS_LEVEL_2 CAIRO_PS_LEVEL_3 /]; } else { $enums{cairo_ps_level_t} = []; } # --------------------------------------------------------------------------- # my %enum_guards = ( cairo_svg_version_t => $backend_guards{cairo_svg_surface_t}, ); MakeHelper::do_enums (\%enums, \%enum_guards); my @@xs_files = qw( Cairo.xs CairoFont.xs CairoMatrix.xs CairoPath.xs CairoPattern.xs CairoSurface.xs ); my $have_cairo_ft = !system qw(pkg-config --exists --silence-errors cairo-ft); if ($have_cairo_ft) { print "Compiling Cairo with FreeType support\n"; push @@xs_files, 'CairoFt.xs'; my %ft_cfg = ExtUtils::PkgConfig->find ('cairo-ft'); $cairo_cfg{cflags} .= ' '.$ft_cfg{cflags}; $cairo_cfg{libs} .= ' '.$ft_cfg{libs}; } MakeHelper::write_boot ( xs_files => \@@xs_files, ignore => '^Cairo$', ); my @@typemaps = MakeHelper::do_typemaps (\%objects, \%structs, \%enums, \%backend_guards, \%enum_guards); push @@typemaps, 'cairo-perl.typemap'; my $dep = ExtUtils::Depends->new ('Cairo'); $dep->set_inc ('-I. -I'.$autogen_dir.' '.$cairo_cfg{cflags}); $dep->set_libs ($cairo_cfg{libs}); $dep->add_xs (@@xs_files); $dep->add_c ('cairo-perl-enums.c'); $dep->add_pm ('Cairo.pm' => '$(INST_LIBDIR)/Cairo.pm'); $dep->add_typemaps (@@typemaps); $dep->install (qw(cairo-perl.h cairo-perl.typemap doctypes build/cairo-perl-auto.h build/cairo-perl-auto.typemap)); $dep->save_config ('build/IFiles.pm'); my @@exports = qw( cairo_font_type_from_sv cairo_font_type_to_sv cairo_object_from_sv cairo_object_to_sv cairo_pattern_to_sv cairo_struct_from_sv cairo_struct_to_sv cairo_surface_to_sv newSVCairoFontExtents newSVCairoGlyph newSVCairoPath newSVCairoTextExtents SvCairoGlyph SvCairoPath ); WriteMakefile ( NAME => 'Cairo', VERSION_FROM => 'Cairo.pm', ABSTRACT_FROM => 'Cairo.pm', PREREQ_PM => \%prereqs, XSPROTOARG => '-noprototypes', FUNCLIST => \@@exports, DL_FUNCS => { Cairo=> [] }, $dep->get_makefile_vars, EXTRA_META => qq( configure_requires: ExtUtils::Depends: $prereqs{'ExtUtils::Depends'} ExtUtils::PkgConfig: $prereqs{'ExtUtils::PkgConfig'} build_requires: Test::Number::Delta: $prereqs{'Test::Number::Delta'} no_index: file: - MakeHelper.pm ), ); sub MY::postamble { my $autogen_dir = $MakeHelper::autogen_dir; "realclean :: -\$(RM_RF) $autogen_dir cairo-perl-enums.*"; } @ 1.34 log @ * Makefile.PL: When prompting for auto-installing dependencies, default to 'no' so that automatic testers with CPANPLUS.pm don't end up invoking CPAN.pm. (RT #38286) @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.33 2008-09-06 18:42:47 tsch Exp $ @ 1.33 log @ * Makefile.PL: Support the enum value CAIRO_FONT_TYPE_QUARTZ. (RT #34681) @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.32 2008-03-22 18:34:58 tsch Exp $ d30 1 a30 1 my $yn = ExtUtils::MakeMaker::prompt(" Install $module from CPAN?", 'y'); @ 1.32 log @ * Makefile.PL: Trap exceptions thrown by EU::PkgConfig->find. When one occurs, exit with status 0 to indicate to CPAN testers that their system isn't supported. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.31 2008-01-07 17:34:54 tsch Exp $ d289 2 @ 1.31 log @Forgot the Makefile.PL changes. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.30 2007-11-20 19:10:32 tsch Exp $ d59 6 a64 1 my %cairo_cfg = ExtUtils::PkgConfig->find ("cairo >= $extreqs{cairo}"); @ 1.30 log @ * Makefile.PL: Update the list of exported symbols. (Reported by spicy jack) @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.29 2007-10-24 16:32:05 tsch Exp $ d219 1 d293 10 @ 1.29 log @ * Cairo.pm * Cairo.xs * CairoFt.xs * Makefile.PL * cairo-perl.h * cairo-perl.typemap * examples/freetype-font.pl * t/CairoFt.t: Add support for part of cairo's FreeType integration API. Currently, that's just Cairo::FtFontFace::create, which lets you create a cairo font face from a FreeType font face. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.28 2007-10-13 21:23:16 tsch Exp $ d343 2 d347 1 d350 1 d352 2 a354 1 newSVCairoGlyph a355 1 newSVCairoPath a356 2 cairo_surface_to_sv cairo_pattern_to_sv @ 1.28 log @ * Makefile.PL: Use BEGIN { require 5.006; } instead of require v5.6.0. Make missing Test::Number::Delta non-fatal; add it to the build_requires META.yml field. * t/Cairo.t * t/CairoPattern.t: Copy with Test::Number::Delta being unavailable. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.27 2007-10-07 19:03:00 tsch Exp $ d300 17 a316 1 my @@xs_files = <*.xs>; @ 1.28.2.1 log @ * Cairo.pm: Add entries for the various surfaces to the API listing. * Makefile.PL: Update the list of exported symbols. (Reported by spicy jack) * t/Cairo.t * t/CairoPattern.t: When Test::Number::Delta is not available, skip the relevant tests instead of faking passes. (Suggested by Aristotle Pagaltzis) * t/Cairo.t * t/CairoFont.t * t/CairoPath.t * t/CairoPattern.t * t/CairoSurface.t: Don't use the hash-ref variant of the constant pragma. It's not supported by the version that ships with perl 5.6. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.28 2007-10-13 21:23:16 tsch Exp $ a326 2 cairo_font_type_from_sv cairo_font_type_to_sv a328 1 cairo_pattern_to_sv a330 1 cairo_surface_to_sv d332 1 d334 1 a335 2 newSVCairoTextExtents SvCairoGlyph d337 2 @ 1.27 log @ * Makefile.PL: Make EU::MM output configure_requires and no_index information when generating META.yml. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.26 2007-10-06 11:58:38 tsch Exp $ d9 1 a9 1 require v5.6.0; a345 1 PREREQ_FATAL => 1, d357 3 @ 1.26 log @ * Makefile.PL: Require perl >= 5.6.0 for some features we use, like `our“. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.25 2007-09-27 20:23:40 tsch Exp $ d350 1 d352 10 @ 1.25 log @ * Makefile.PL: Make missing prerequisites fatal. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.24 2007/05/13 10:58:05 tsch Exp $ d9 2 @ 1.24 log @ * Makefile.PL, README, t/Cairo.t, t/CairoPattern.t: Use Test::Number::Delta to make floating point number comparisons more reliable. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.23 2007/05/06 11:28:37 tsch Exp $ d344 1 @ 1.23 log @ * Cairo.xs * CairoPattern.xs * Makefile.PL * cairo-perl.h * t/Cairo.t * t/CairoPattern.t: Use 1.4.0 in version checks. * Cairo.xs: If CAIRO_PERL_DEBUG is true, call cairo_debug_reset_static_data at exit. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.22 2006/11/23 19:09:12 tsch Exp $ d50 3 @ 1.22 log @ * CairoSurface.xs, t/CairoSurface.t: Make Cairo::ImageSurface::get_data usable by specifying the buffer length. * MANIFEST, Makefile.PL, doctypes: Describe our types. * NEWS: Merge from stable-1-0. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.21 2006/11/09 19:43:43 tsch Exp $ d213 1 a213 1 my $have_cairo_1_4 = ExtUtils::PkgConfig->atleast_version("cairo", "1.3.0"); # FIXME: 1.4 @ 1.21 log @ * Cairo.xs, cairo-perl-private.h: Export cairo_perl_alloc_temp privately. * Cairo.xs: Remove the DOUBLES_ macros and inline them. They were used only in one place. * Cairo.xs, t/Cairo.t: Wrap cairo_get_dash. * CairoPattern.xs, cairo-perl-private.h, t/CairoPattern.t: Wrap cairo_pattern_get_rgba, cairo_pattern_get_surface, cairo_pattern_get_color_stop_rgba, cairo_pattern_get_points, and cairo_pattern_get_circles. * Makefile.PL: Support new cairo_status_t values. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.20 2006/08/27 12:42:32 tsch Exp $ d316 1 @ 1.20 log @ * Makefile.PL: Make EU::MM export our symbols on Win32. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.19 2006/08/20 18:09:47 tsch Exp $ d210 2 d213 1 d274 15 @ 1.19 log @ * MakeHelper.pm: Add the infrastructure necessary to support protecting the enum related things with #ifdef, if needed. Also use the real enum types for the enum converters, instead of just int. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.18 2006/08/10 17:34:40 tsch Exp $ d302 15 d323 2 @ 1.18 log @ * Cairo.xs, CairoFont.xs, CairoPattern.xs, CairoSurface.xs, MakeHelper.pm, Makefile.PL, cairo-perl-private.h, t/Cairo.t, t/CairoFont.t, t/CairoPattern.t, t/CairoSurface.t: Make it possible to compile and run the bindings against cairo 1.0.x. Use a package lookup table for patterns and surfaces to work around the lack of type accessors. Add version guards around things that were introduced in 1.2.0. * CairoSurface.xs: Use OUTLIST for cairo_surface_get_device_offset. * CairoPattern.xs, CairoSurface.xs, cairo-perl-private.h: Rename cair_perl_set_isa to cairo_perl_set_isa. Doh! * t/CairoSurface.t: Explicitly clear the image surface on cairo 1.0.x before writing it out since 1.0.x doesn't do it for us. Use lexical surface variables to make sure they get destroyed before execution ends which in turn makes sure all tests inside callbacks are run before Test::More checks if reality matches the test plan. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.17 2006/07/15 14:41:11 tsch Exp $ d56 1 a56 1 my %backend_macros = ( d271 5 a275 1 MakeHelper::do_enums (\%enums); d285 1 a285 1 \%backend_macros); @ 1.17 log @ * Cairo.pm, Cairo.xs, CairoPattern.xs, CairoSurface.xs, cairo-perl-private.h: Add cairo_perl_set_isa and use it for surfaces and patterns. * CairoSurface.xs, Makefile.PL, cairo-perl.h, t/CairoSurface.t: Add support for svg surfaces if available. * t/CairoSurface.t: Remove TODO block and revert workaround related to the weird unknown surface types. It's been fixed upstream: https://bugs.freedesktop.org/show_bug.cgi?id=7322 @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.16 2006/07/02 13:10:44 tsch Exp $ d15 1 a15 1 'cairo' => '1.2.0', d54 1 a54 6 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"; } a93 1 CAIRO_EXTEND_PAD a114 7 cairo_font_type_t => [qw/ CAIRO_FONT_TYPE_ CAIRO_FONT_TYPE_TOY CAIRO_FONT_TYPE_FT CAIRO_FONT_TYPE_WIN32 CAIRO_FONT_TYPE_ATSUI /], a125 1 CAIRO_FORMAT_RGB16_565 a176 7 cairo_pattern_type_t => [qw/ CAIRO_PATTERN_TYPE_ CAIRO_PATTERN_TYPE_SOLID CAIRO_PATTERN_TYPE_SURFACE CAIRO_PATTERN_TYPE_LINEAR CAIRO_PATTERN_TYPE_RADIAL /], a198 1 CAIRO_STATUS_INVALID_DSC_COMMENT d208 34 a241 1 cairo_surface_type_t => [qw/ d254 3 a256 2 /], cairo_svg_version_t => [qw/ d260 10 a269 2 /], ); @ 1.16 log @ * 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. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.15 2006/06/14 18:20:23 tsch Exp $ d64 1 d82 5 a86 5 CAIRO_ANTIALIAS_ CAIRO_ANTIALIAS_DEFAULT CAIRO_ANTIALIAS_NONE CAIRO_ANTIALIAS_GRAY CAIRO_ANTIALIAS_SUBPIXEL d89 4 a92 4 CAIRO_CONTENT_ CAIRO_CONTENT_COLOR CAIRO_CONTENT_ALPHA CAIRO_CONTENT_COLOR_ALPHA d95 5 a99 5 CAIRO_EXTEND_ CAIRO_EXTEND_NONE CAIRO_EXTEND_REPEAT CAIRO_EXTEND_REFLECT CAIRO_EXTEND_PAD d102 3 a104 3 CAIRO_FILL_RULE_ CAIRO_FILL_RULE_WINDING CAIRO_FILL_RULE_EVEN_ODD d107 7 a113 7 CAIRO_FILTER_ CAIRO_FILTER_FAST CAIRO_FILTER_GOOD CAIRO_FILTER_BEST CAIRO_FILTER_NEAREST CAIRO_FILTER_BILINEAR CAIRO_FILTER_GAUSSIAN d116 4 a119 4 CAIRO_FONT_SLANT_ CAIRO_FONT_SLANT_NORMAL CAIRO_FONT_SLANT_ITALIC CAIRO_FONT_SLANT_OBLIQUE d122 5 a126 5 CAIRO_FONT_TYPE_ CAIRO_FONT_TYPE_TOY CAIRO_FONT_TYPE_FT CAIRO_FONT_TYPE_WIN32 CAIRO_FONT_TYPE_ATSUI d129 3 a131 3 CAIRO_FONT_WEIGHT_ CAIRO_FONT_WEIGHT_NORMAL CAIRO_FONT_WEIGHT_BOLD d134 6 a139 6 CAIRO_FORMAT_ CAIRO_FORMAT_ARGB32 CAIRO_FORMAT_RGB24 CAIRO_FORMAT_A8 CAIRO_FORMAT_A1 CAIRO_FORMAT_RGB16_565 d142 4 a145 4 CAIRO_HINT_METRICS_ CAIRO_HINT_METRICS_DEFAULT CAIRO_HINT_METRICS_OFF CAIRO_HINT_METRICS_ON d148 6 a153 6 CAIRO_HINT_STYLE_ CAIRO_HINT_STYLE_DEFAULT CAIRO_HINT_STYLE_NONE CAIRO_HINT_STYLE_SLIGHT CAIRO_HINT_STYLE_MEDIUM CAIRO_HINT_STYLE_FULL d156 4 a159 4 CAIRO_LINE_CAP_ CAIRO_LINE_CAP_BUTT CAIRO_LINE_CAP_ROUND CAIRO_LINE_CAP_SQUARE d162 4 a165 4 CAIRO_LINE_JOIN_ CAIRO_LINE_JOIN_MITER CAIRO_LINE_JOIN_ROUND CAIRO_LINE_JOIN_BEVEL d168 15 a182 15 CAIRO_OPERATOR_ CAIRO_OPERATOR_CLEAR CAIRO_OPERATOR_SOURCE CAIRO_OPERATOR_OVER CAIRO_OPERATOR_IN CAIRO_OPERATOR_OUT CAIRO_OPERATOR_ATOP CAIRO_OPERATOR_DEST CAIRO_OPERATOR_DEST_OVER CAIRO_OPERATOR_DEST_IN CAIRO_OPERATOR_DEST_OUT CAIRO_OPERATOR_DEST_ATOP CAIRO_OPERATOR_XOR CAIRO_OPERATOR_ADD CAIRO_OPERATOR_SATURATE d185 5 a189 5 CAIRO_PATH_ CAIRO_PATH_MOVE_TO CAIRO_PATH_LINE_TO CAIRO_PATH_CURVE_TO CAIRO_PATH_CLOSE_PATH d192 5 a196 5 CAIRO_PATTERN_TYPE_ CAIRO_PATTERN_TYPE_SOLID CAIRO_PATTERN_TYPE_SURFACE CAIRO_PATTERN_TYPE_LINEAR CAIRO_PATTERN_TYPE_RADIAL d199 22 a220 22 CAIRO_STATUS_ CAIRO_STATUS_SUCCESS CAIRO_STATUS_NO_MEMORY CAIRO_STATUS_INVALID_RESTORE CAIRO_STATUS_INVALID_POP_GROUP CAIRO_STATUS_NO_CURRENT_POINT CAIRO_STATUS_INVALID_MATRIX CAIRO_STATUS_INVALID_STATUS CAIRO_STATUS_NULL_POINTER CAIRO_STATUS_INVALID_STRING CAIRO_STATUS_INVALID_PATH_DATA CAIRO_STATUS_READ_ERROR CAIRO_STATUS_WRITE_ERROR CAIRO_STATUS_SURFACE_FINISHED CAIRO_STATUS_SURFACE_TYPE_MISMATCH CAIRO_STATUS_PATTERN_TYPE_MISMATCH CAIRO_STATUS_INVALID_CONTENT CAIRO_STATUS_INVALID_FORMAT CAIRO_STATUS_INVALID_VISUAL CAIRO_STATUS_FILE_NOT_FOUND CAIRO_STATUS_INVALID_DASH CAIRO_STATUS_INVALID_DSC_COMMENT d223 6 a228 6 CAIRO_SUBPIXEL_ORDER_ CAIRO_SUBPIXEL_ORDER_DEFAULT CAIRO_SUBPIXEL_ORDER_RGB CAIRO_SUBPIXEL_ORDER_BGR CAIRO_SUBPIXEL_ORDER_VRGB CAIRO_SUBPIXEL_ORDER_VBGR d231 17 a247 12 CAIRO_SURFACE_TYPE_ CAIRO_SURFACE_TYPE_IMAGE CAIRO_SURFACE_TYPE_PDF CAIRO_SURFACE_TYPE_PS CAIRO_SURFACE_TYPE_XLIB CAIRO_SURFACE_TYPE_XCB CAIRO_SURFACE_TYPE_GLITZ CAIRO_SURFACE_TYPE_QUARTZ CAIRO_SURFACE_TYPE_WIN32 CAIRO_SURFACE_TYPE_BEOS CAIRO_SURFACE_TYPE_DIRECTFB CAIRO_SURFACE_TYPE_SVG d279 2 a280 2 NAME => 'Cairo', VERSION_FROM => 'Cairo.pm', d282 2 a283 2 PREREQ_PM => \%prereqs, XSPROTOARG => '-noprototypes', @ 1.15 log @ * Makefile.PL: Require cairo >= 1.1.8. * CairoSurface.xs, t/CairoSurface.t: Wrap and test cairo_surface_set_fallback_resolution, cairo_image_surface_get_data, cairo_image_surface_get_format, and cairo_image_surface_get_stride. Remove the wrappers and tests for cairo_pdf_surface_set_dpi and cairo_ps_surface_set_dpi. * t/CairoSurface.t: Test Cairo::ImageSurface::get_width and get_height. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.14 2006/06/03 14:21:09 tsch Exp $ d14 4 d54 6 a59 1 my %cairo_cfg = ExtUtils::PkgConfig->find ('cairo >= 1.1.8'); d138 1 @ 1.14 log @ * Cairo.pm: Document Cairo::get_group_target, Cairo::new_sub_path, Cairo::Pattern::get_type, Cairo::set_scaled_font, Cairo::version, and Cairo::version_string. * t/Cairo.t, Cairo.xs: Allow Cairo::version[_string] to be called as a function and as a class method. * CairoPattern.xs, CairoSurface.xs, t/CairoSurface.t, Makefile.PL, examples/simple.pl, examples/png/caps_joins.pl, examples/png/hering.pl: Whitespace fixes. * t/CairoSurface.t, CairoSurface.xs: Wrap cairo_surface_get_content. * MakeHelper.pm: Don't add a linebreak to croaks so perl prints line information. * Makefile.PL: Require cairo 1.1.7. * examples/png/README, examples/png/bevels.pl, examples/png/spline-pipeline.pl, examples/png/text-rotate.pl, examples/png/text.pl: New example ports. @ text @d2 1 a2 1 # Copyright (c) 2004-2005 by the cairo perl team (see the file README) d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.13 2006/05/07 14:17:39 tsch Exp $ d50 1 a50 1 my %cairo_cfg = ExtUtils::PkgConfig->find ('cairo >= 1.1.7'); d58 5 a62 5 'cairo_t *' => 'Cairo::Context', 'cairo_font_face_t *' => 'Cairo::FontFace', 'cairo_pattern_t *' => 'Cairo::Pattern', 'cairo_scaled_font_t *' => 'Cairo::ScaledFont', 'cairo_surface_t *' => 'Cairo::Surface', @ 1.13 log @ * .cvsignore, MANIFEST.SKIP: Update. * Cairo.pm: Update copyright notice. * MANIFEST, cairo-perl-private.h: Add a private header file for non-public declarations that are used in more than one place. * MakeHelper.pm: Improve the enum converters to produce more useful error messages. * Makefile.PL: Incorporate a slightly modified patch from Christopher Oezbek to prompt the user if he wants to install EU::Depends and EU::PkgConfig if they can't be found. Require cairo >= 1.1.6. Update and rearrange enums. * cairo-perl.h, Cairo.xs: Move CAIRO_PERL_CALL_BOOT to Cairo.xs. * cairo-perl.h, CairoSurface.xs, CairoPattern.xs, Makefile.PL: Use cairo_surface_get_type and cairo_pattern_get_type to redo the sub-type handling for surfaces and patterns. * cairo-perl-private.h, Cairo.xs, CairoMatrix.xs, CairoPattern.xs: Add pcairo_copy_matrix and use it all over the place to make matrix handling more robust. * Cairo.xs, t/Cairo.t: Wrap cairo_version, cairo_version_string, cairo_push_group, cairo_push_group_with_content, cairo_pop_group, cairo_pop_group_to_source, cairo_new_sub_path, cairo_set_scaled_font, and cairo_get_group_target. * CairoFont.xs, t/CairoFont.t: Wrap cairo_font_face_get_type, cairo_scaled_font_get_type, cairo_scaled_font_text_extents, cairo_scaled_font_get_font_face, cairo_scaled_font_get_font_matrix, cairo_scaled_font_get_ctm, and cairo_scaled_font_get_font_options. * CairoPattern.xs, t/CairoPattern.t: Wrap cairo_pattern_get_type. * CairoSurface.xs, t/CairoSurface.t: Wrap cairo_surface_get_device_offset, cairo_surface_get_type, cairo_pdf_surface_set_size, cairo_ps_surface_set_dpi, cairo_ps_surface_set_size, cairo_ps_surface_dsc_comment, cairo_ps_surface_dsc_begin_setup, and cairo_ps_surface_dsc_begin_setup. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.12 2006/01/29 19:27:21 tsch Exp $ d25 1 a25 1 d40 1 a40 1 chdir $cwd d50 1 a50 1 my %cairo_cfg = ExtUtils::PkgConfig->find ('cairo >= 1.1.6'); @ 1.12 log @ * Cairo.pm, CairoPattern.xs, Makefile.PL, cairo-perl.h, t/CairoPattern.t: Add Cairo::SolidPattern::create_rgb and create_rgba. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.11 2006/01/08 17:06:29 tsch Exp $ a10 2 use ExtUtils::Depends; use ExtUtils::PkgConfig; d12 7 d20 25 a44 1 use MakeHelper; d50 1 a50 6 our %prereqs = ( 'ExtUtils::Depends' => 0.2, 'ExtUtils::PkgConfig' => 1.0, ); my %cairo_cfg = ExtUtils::PkgConfig->find ('cairo >= 1.0.0'); d53 1 a54 1 'cairo_pdf_surface_t' => 'CAIRO_HAS_PDF_SURFACE', d59 1 a59 4 'cairo_surface_t *' => 'Cairo::Surface', 'cairo_image_surface_t *' => 'Cairo::ImageSurface', 'cairo_pdf_surface_t *' => 'Cairo::PdfSurface', 'cairo_ps_surface_t *' => 'Cairo::PsSurface', a60 6 'cairo_solid_pattern_t *' => 'Cairo::SolidPattern', 'cairo_surface_pattern_t *' => 'Cairo::SurfacePattern', 'cairo_gradient_t *' => 'Cairo::Gradient', 'cairo_linear_gradient_t *' => 'Cairo::LinearGradient', 'cairo_radial_gradient_t *' => 'Cairo::RadialGradient', 'cairo_font_face_t *' => 'Cairo::FontFace', d62 1 a65 1 'cairo_matrix_t *' => 'Cairo::Matrix', d67 1 d71 52 d130 26 d173 6 a178 16 cairo_fill_rule_t => [qw/ CAIRO_FILL_RULE_ CAIRO_FILL_RULE_WINDING CAIRO_FILL_RULE_EVEN_ODD /], cairo_line_cap_t => [qw/ CAIRO_LINE_CAP_ CAIRO_LINE_CAP_BUTT CAIRO_LINE_CAP_ROUND CAIRO_LINE_CAP_SQUARE /], cairo_line_join_t => [qw/ CAIRO_LINE_JOIN_ CAIRO_LINE_JOIN_MITER CAIRO_LINE_JOIN_ROUND CAIRO_LINE_JOIN_BEVEL d180 6 a185 10 cairo_font_slant_t => [qw/ CAIRO_FONT_SLANT_ CAIRO_FONT_SLANT_NORMAL CAIRO_FONT_SLANT_ITALIC CAIRO_FONT_SLANT_OBLIQUE /], cairo_font_weight_t => [qw/ CAIRO_FONT_WEIGHT_ CAIRO_FONT_WEIGHT_NORMAL CAIRO_FONT_WEIGHT_BOLD d209 1 a209 35 /], cairo_filter_t => [qw/ CAIRO_FILTER_ CAIRO_FILTER_FAST CAIRO_FILTER_GOOD CAIRO_FILTER_BEST CAIRO_FILTER_NEAREST CAIRO_FILTER_BILINEAR CAIRO_FILTER_GAUSSIAN /], cairo_extend_t => [qw/ CAIRO_EXTEND_ CAIRO_EXTEND_NONE CAIRO_EXTEND_REPEAT CAIRO_EXTEND_REFLECT /], cairo_path_data_type_t => [qw/ CAIRO_PATH_ CAIRO_PATH_MOVE_TO CAIRO_PATH_LINE_TO CAIRO_PATH_CURVE_TO CAIRO_PATH_CLOSE_PATH /], cairo_content_t => [qw/ CAIRO_CONTENT_ CAIRO_CONTENT_COLOR CAIRO_CONTENT_ALPHA CAIRO_CONTENT_COLOR_ALPHA /], cairo_antialias_t => [qw/ CAIRO_ANTIALIAS_ CAIRO_ANTIALIAS_DEFAULT CAIRO_ANTIALIAS_NONE CAIRO_ANTIALIAS_GRAY CAIRO_ANTIALIAS_SUBPIXEL d219 13 a231 13 cairo_hint_style_t => [qw/ CAIRO_HINT_STYLE_ CAIRO_HINT_STYLE_DEFAULT CAIRO_HINT_STYLE_NONE CAIRO_HINT_STYLE_SLIGHT CAIRO_HINT_STYLE_MEDIUM CAIRO_HINT_STYLE_FULL /], cairo_hint_metrics_t => [qw/ CAIRO_HINT_METRICS_ CAIRO_HINT_METRICS_DEFAULT CAIRO_HINT_METRICS_OFF CAIRO_HINT_METRICS_ON d271 1 a271 3 package MY; sub postamble d276 1 a276 1 -\$(RM_RF) $autogen_dir cairo-perl-enums.c"; @ 1.11 log @ * Cairo.pm: Make DynaLoader export all our symbols. * Cairo.xs, MakeHelper.pm, Makefile.PL, cairo-perl.h: Revamp the type conversion API. Instead of implementing everything in the typemap, we now have macros like newSVCairoPattern SvCairoPattern. These get exported, so other modules can make use of them. * cairo-perl.h: Remove the DBG macro. * cairo-perl.typemap: Use T_UV instead of T_IV for cairo_bool_t. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.10 2005/08/31 22:32:09 tsch Exp $ d29 1 a29 1 'cairo_ps_surface_t' => 'CAIRO_HAS_PS_SURFACE', d34 7 a40 6 'cairo_t *' => 'Cairo::Context', 'cairo_surface_t *' => 'Cairo::Surface', 'cairo_image_surface_t *' => 'Cairo::ImageSurface', 'cairo_pdf_surface_t *' => 'Cairo::PdfSurface', 'cairo_ps_surface_t *' => 'Cairo::PsSurface', 'cairo_pattern_t *' => 'Cairo::Pattern', d42 1 a42 1 'cairo_gradient_t *' => 'Cairo::Gradient', d45 2 a46 2 'cairo_font_face_t *' => 'Cairo::FontFace', 'cairo_scaled_font_t *' => 'Cairo::ScaledFont', @ 1.10 log @ * Cairo.pm, MANIFEST, Makefile.PL, NEWS, README: Release 0.02. Require cairo 1.0.0. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.9 2005/08/31 22:00:15 tsch Exp $ a210 1 build/cairo-perl-enums.h @ 1.9 log @ * 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. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.8 2005/08/15 18:59:17 tsch Exp $ d26 1 a26 1 my %cairo_cfg = ExtUtils::PkgConfig->find ('cairo >= 0.9.0'); @ 1.8 log @ * Cairo.pm, README: Release 0.01. Also add stub documentation. * MANIFEST.SKIP: Remove CairoEnums.xs. * Makefile.PL: Add ABSTRACT_FROM to the WriteMakefile call. * TODO: Update to reflect the present situation. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.7 2005/08/10 17:01:54 tsch Exp $ d28 5 d127 1 d197 2 a198 1 my @@typemaps = MakeHelper::do_typemaps (\%objects, \%structs, \%enums); @ 1.7 log @ * t/Cairo.t, Cairo.xs: Bind cairo_set_antialias and cairo_get_antialias. * t/CairoSurface.t, CairoSurface.xs: Bind cairo_surface_flush, cairo_surface_mark_dirty, cairo_surface_mark_dirty_rectangle. * MANIFEST, META.yml: Remove META.yml; let EU::MakeMaker generate it on "make dist". * Makefile.PL: Require cairo 0.9.0. Add our prerequisites to the WriteMakefile call so that they appear in the generated META.yml. Support CAIRO_STATUS_FILE_NOT_FOUND. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.6 2005/07/29 17:19:55 tsch Exp $ d212 1 @ 1.6 log @ * t/Cairo.t, xs/Cairo.xs: Wrap cairo_get_font_options. * t/CairoFont.t, xs/CairoFont.xs: Wrap cairo_font_face_status, cairo_scaled_font_status, cairo_font_options_*. Update cairo_scaled_font_create. * t/CairoSurface.t, CairoSurface.xs: Wrap cairo_surface_status, cairo_surface_get_font_options. * Makefile.PL: Wrap the new cairo_font_options_t stuff. * Makefile.PL: Require cairo 0.6.0. Add new and update the old enums. Install all files necessary for other modules to use Cairo. * cairo-perl.typemap: Add a cairo_bool_t typemap. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.5 2005/07/12 20:29:47 tsch Exp $ d21 6 a26 1 my %cairo_cfg = ExtUtils::PkgConfig->find ('cairo >= 0.6.0'); d121 1 d212 1 @ 1.5 log @ * Cairo.pm, Cairo.xs, t/Cairo.t: Replace the %backends hash with Cairo::HAS_PS_SURFACE, HAS_PDF_SURFACE, HAS_XLIB_SURFACE, HAS_FT_FONT and HAS_PNG_FUNCTIONS. * Cairo.pm, CairoPattern.xs, CairoSurface.xs, Makefile.PL: Implement the pattern and surface hierarchy suggested by the language bindings guidelines. * Cairo.xs: Use Cairo::Context for the namespace of cairo_t, instead of just Cairo, as suggested by the guidelines. * Cairo.xs, CairoFont.xs, CairoMatrix.xs, CairoPattern.xs, CairoSurface.xs, cairo-perl.h: Add new, remove old API. Shuffle some things around. * Cairo.xs: Convert font and text extents and glyphs to and from native Perl data structures. * Cairo.xs, cairo-perl.h, cairo-perl.typemap: Remove everything that cannot be used from Perl, like the XLib and Glitz stuff. * CairoPath.xs, t/CairoPath.t: Add support for cairo_path_t, including a nice tied interface that lets you iterate over paths as if they were normal array references. * MakeHelper.pm: Extend the typemap generator to support "const" and "_noinc" types. Change the enum handling to use the Glib convention, i.e. lowercase and hyphen instead of underscore. * Makefile.PL, README: Use ExtUtils::Depends. * examples/simple.pl, examples/png/caps_join.pl, examples/png/hering.pl, examples/png/outline.pl, examples/png/spiral.pl, examples/png/splines_tolerance.pl, examples/png/stars.pl: Update the examples to make them work again after all those API changes. * t/Cairo.t, t/CairoFont.t, CairoMatrix.t, CairoPattern.t, CairoSurface.t: Redo and/or expand the whole test suite. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.4 2004/11/28 18:27:10 rwmcfa1 Exp $ d21 1 a21 1 my %cairo_cfg = ExtUtils::PkgConfig->find ('cairo'); d40 1 d113 3 d145 29 d196 5 a200 1 $dep->install (qw(cairo-perl.h)); @ 1.4 log @ * Makefile.PL, MakeHelper.pm: initial import of MakeHelper, mess of code moved out of Makefile.PL into it. beginning of cleaning all that up. File::Spec now used. * examples/png/*: initial import of port of cairo-demo/png examples, except text. * META.yml: unknown version * MANIFEST, MANIFEST.SKIP: updates @ text @d2 1 a2 1 # Copyright (c) 2004 by the cairo perl team (see the file README) d6 1 a6 4 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.3 2004/11/11 02:20:32 rwmcfa1 Exp $ # # TODO: # - man this is horribly ulgy, stream-of-cons. even. d11 1 d24 1 a24 1 'cairo_t *' => 'Cairo', d26 3 d30 6 a35 1 'cairo_font_t *' => 'Cairo::Font', a39 4 'cairo_glyph_t *' => 'Cairo::Glyph', 'cairo_font_extents_t *' => 'Cairo::Font::Extents', 'cairo_text_extents_t *' => 'Cairo::Text::Extents', 'glitz_surface_t *' => 'Glitz::Surface', d53 1 a53 2 CAIRO_OPERATOR_SRC CAIRO_OPERATOR_DST a54 1 CAIRO_OPERATOR_OVER_REVERSE a55 1 CAIRO_OPERATOR_IN_REVERSE a56 1 CAIRO_OPERATOR_OUT_REVERSE d58 5 a62 1 CAIRO_OPERATOR_ATOP_REVERSE d103 1 a103 1 CAIRO_STATUS_NO_TARGET_SURFACE d105 7 d128 13 d143 2 a145 2 my %xs = map { /^(.*)\.xs$/; $_ => "$1.c"; } @@xs_files, MakeHelper::do_enums (\%enums); d149 1 a149 1 ignore => '(^Cairo$|Enums)', d155 10 a164 3 my %pm = ( 'Cairo.pm' => '$(INST_LIBDIR)/Cairo.pm', ); a168 5 INC => '-I. -I'.$autogen_dir.' '.$cairo_cfg{cflags}, LIBS => $cairo_cfg{libs}, XS => \%xs, PM => \%pm, OBJECT => q/$(O_FILES)/, d170 1 a170 1 TYPEMAPS => \@@typemaps, d173 1 a174 2 package MY; d180 1 a180 1 -\$(RM_RF) $autogen_dir CairoEnums.xs"; a181 1 @ 1.3 log @ * TODO: initial import * Cairo.pm, Cairo.xs: added %backends facility * Cario.xs, CairoSurface.xs: stuff moved out of Cairo.xs that belonged here * Cairo.xs: fixed some OUTLIST stuff (IN_OUTLIST.) cairo_current_matrix fixed. * CairoPattern.xs: added class param to create_for_surface * Makefile.PL: seperated structs out of objects. add refs to object typemaps OUTPUT sections. don't return full strings for OUTPUT enum types. * cairo-perl.h: don't need stdio.h * t/Cairo.t: test most all of cairo type. 90% done. @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.2 2004/11/09 02:59:43 rwmcfa1 Exp $ a8 2 # - file spec # - pull a lot of this out into a helper pm or something a13 1 use Data::Dumper; a15 1 use IO::File; d17 3 a19 1 our $autogen_dir = 'build'; d21 1 a23 1 #print Dumper (\%cairo_cfg); d25 1 a25 1 our %objects = ( d32 1 a32 1 our %structs = ( d40 1 a40 1 our %enums = ( d122 2 a123 1 my %xs = map { /^(.*)\.xs$/; $_ => "$1.c"; } @@xs_files, do_enums (); d125 1 a125 1 write_boot ( d130 1 a130 1 my @@typemaps = do_typemaps (); d133 4 d140 1 a140 1 INC => '-I. -I./'.$autogen_dir.' '.$cairo_cfg{cflags}, d143 1 d154 2 a159 272 package main; # copied/borrowed from Gtk2-Perl's CodeGen sub write_boot { my %opts = ( ignore => '^[^:]+$', # ignore package with no colons in it filename => $autogen_dir.'/cairo-perl-boot.xsh', 'glob' => 'xs/*.xs', @@_, ); my $ignore = $opts{ignore}; my $file = IO::File->new (">$opts{filename}") or die "Cannot write $opts{filename}: $!"; print $file "\n\n/* This file is automatically generated, any changes made here will be lost! */\n\n"; my %boot=(); my @@xs_files = 'ARRAY' eq ref $opts{xs_files} ? @@{ $opts{xs_files} } : glob $opts{'glob'}; foreach my $xsfile (@@xs_files) { my $in = IO::File->new ($xsfile) or die "can't open $xsfile: $!\n"; while (<$in>) { next unless m/^MODULE\s*=\s*(\S+)/; #warn "found $1 in $&\n"; my $package = $1; next if $package =~ m/$ignore/; $package =~ s/:/_/g; my $sym = "boot_$package"; print $file "CAIRO_PERL_CALL_BOOT ($sym);\n" unless $boot{$sym}; $boot{$sym}++; } close $in; } close $file; } sub do_typemaps { my $cairo_perl = $autogen_dir.'/cairo-perl-auto.typemap'; open TYPEMAP, '>'.$cairo_perl or die "unable to open ($cairo_perl) for output"; print TYPEMAP "#\n#\n#\n\nTYPEMAP\n\n"; sub type_id { my $ret = shift; $ret =~ s/ \*//; uc ($ret); } sub func_name { $_[0] =~ /cairo_(\w+)_t/; $1; } foreach (keys %objects, keys %structs, keys %enums) { print TYPEMAP $_."\t".type_id ($_)."\n"; } print TYPEMAP "\nINPUT\n\n"; foreach (keys %objects) { print TYPEMAP type_id ($_).' if (sv_derived_from($arg, \"'.$objects{$_}.'\")) { IV tmp = SvIV((SV*)SvRV($arg)); $var = INT2PTR($type,tmp); } else Perl_croak(aTHX_ \"$var is not of type '.$objects{$_}.'\") '; } foreach (keys %structs) { print TYPEMAP type_id ($_).' if (sv_derived_from($arg, \"'.$structs{$_}.'\")) { IV tmp = SvIV((SV*)SvRV($arg)); $var = INT2PTR($type,tmp); } else Perl_croak(aTHX_ \"$var is not of type '.$structs{$_}.'\") '; } foreach (keys %enums) { print TYPEMAP type_id ($_).' $var = cairo_'.func_name ($_).'_from_sv ($arg); '; } print TYPEMAP "\nOUTPUT\n\n"; my $ref; foreach (keys %objects) { /^(.*)_t \*/; $ref = $1.'_reference'; print TYPEMAP type_id ($_)." $ref (".'$var); sv_setref_pv($arg, \"'.$objects{$_}.'\", (void*)$var); '; } foreach (keys %structs) { print TYPEMAP type_id ($_).' sv_setref_pv($arg, \"'.$structs{$_}.'\", (void*)$var); '; } foreach (keys %enums) { print TYPEMAP type_id ($_).' $arg = cairo_'.func_name ($_).'_to_sv ($var); '; } close TYPEMAP; return ($cairo_perl); } sub do_enums { my $cairo_enums = 'CairoEnums.xs'; open ENUMS, '>'.$cairo_enums or die "unable to open ($cairo_enums) for output"; sub name { $_[0] =~ /cairo_(\w+)_t/; $1; } print ENUMS " /* * */ #include "; sub if_tree_from { my @@enums = @@_; my $prefix = shift @@enums; my $full = shift @@enums; my $name = $full; $name =~ s/$prefix//; my $len = length ($name); my $str = " if (strncmp (str, \"$name\", $len) == 0) return $full; "; foreach $full (@@enums) { $name = $full; $name =~ s/$prefix//; $len = length ($name); $str .= " else if (strncmp (str, \"$name\", $len) == 0) return $full; "; } $str; } sub if_tree_to { my @@enums = @@_; my $prefix = shift @@enums; my $full = shift @@enums; my $name = $full; $name =~ s/$prefix//; my $str = " if (val == $full) return newSVpv (\"$name\", 0); "; foreach $full (@@enums) { $name = $full; $name =~ s/$prefix//; $str .= " else if (val == $full) return newSVpv (\"$name\", 0); "; } $str; } open HDR, ">$autogen_dir/cairo-perl-enums.h"; print HDR "/* * */ #ifndef _CAIRO_PERL_ENUMS_H_ #define _CAIRO_PERL_ENUMS_H_ "; foreach (keys %enums) { my $name = name ($_); print HDR " int cairo_".$name."_from_sv (SV * $name); SV * cairo_".$name."_to_sv (int val); "; print ENUMS 'int cairo_'.$name.'_from_sv (SV * '.$name.') { char * str = SvPV_nolen ('.$name.'); '.if_tree_from (@@{$enums{$_}}).' croak ("bad value for '.$name.' (%s)\n", str); free (str); return 0; } SV * cairo_'.$name.'_to_sv (int val) { '.if_tree_to (@@{$enums{$_}}).' return newSVpv ("unknown/invalid", 0); } '; } print HDR " #endif /* _CAIRO_PERL_ENUMS_H_ */\n"; close HDR; print ENUMS "MODULE = Cairo::Enums PACKAGE = Cairo::Enums PREFIX = cairo_enums_ "; close ENUMS; return ($cairo_enums); } @ 1.2 log @ * Cairo.xs, CairoMatrix.xs, CairoPattern.xs, CairoSurface.xs: all of the create functions have been cleaned up/fixed. debug prints removed. create's alised to new's where appropriate. * MANIFEST, MANIFEST.SKIP: ChangeLog added. build and CVS skipped * Makefile.PL, cairo-perl.h, Cairo.xs: new (write_)boot code added, in progress. use build dir for most of autogen'd stuff. fixed bug in enums creation (= -> ==) @ text @d6 1 a6 1 # $Header: /cvs/cairo/cairo-perl/Makefile.PL,v 1.1 2004/11/05 01:34:04 rwmcfa1 Exp $ d11 1 d31 4 a36 1 'cairo_font_t *' => 'Cairo::Font', d224 1 a224 1 foreach (keys %objects, keys %enums) d244 13 d267 1 d270 11 d282 1 a282 1 sv_setref_pv($arg, \"'.$objects{$_}.'\", (void*)$var); d356 2 d360 1 a360 1 return newSVpv (\"$full\", 0); d365 2 d368 1 a368 1 return newSVpv (\"$full\", 0); @ 1.1 log @initial import @ text @d6 5 a10 1 # $Header:$ d18 4 d119 7 a125 2 my %xs = map { /^(.*)\.xs$/; $_ => "$1.c"; } <*.xs>, do_enums (); #print Dumper (\%xs); d133 1 a133 1 INC => '-I. '.$cairo_cfg{cflags}, d147 1 a147 1 -\$(RM_RF) CairoEnums.xs cairo-perl-enums.h cairo-perl-auto.typemap"; d152 47 d201 1 a201 1 my $cairo_perl = 'cairo-perl-auto.typemap'; d334 1 a334 1 $str .= " else if (val = $full) d342 1 a342 1 open HDR, ">cairo-perl-enums.h"; @