diff options
Diffstat (limited to 'dev-perl')
-rw-r--r-- | dev-perl/GD/ChangeLog | 8 | ||||
-rw-r--r-- | dev-perl/GD/GD-2.12.ebuild | 52 | ||||
-rw-r--r-- | dev-perl/GD/Manifest | 11 | ||||
-rw-r--r-- | dev-perl/GD/files/2.12-gif-support.patch | 544 | ||||
-rw-r--r-- | dev-perl/GD/files/2.12-makefile-opts.patch | 40 | ||||
-rw-r--r-- | dev-perl/GD/files/digest-GD-2.12 | 1 |
6 files changed, 651 insertions, 5 deletions
diff --git a/dev-perl/GD/ChangeLog b/dev-perl/GD/ChangeLog index 6f571e1f913e..ca9e19efa993 100644 --- a/dev-perl/GD/ChangeLog +++ b/dev-perl/GD/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-perl/GD # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-perl/GD/ChangeLog,v 1.21 2004/03/25 09:19:08 kumba Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-perl/GD/ChangeLog,v 1.22 2004/05/09 20:02:00 esammer Exp $ + +*GD-2.12 (09 May 2004) + + 09 May 2004; Eric Sammer <esammer@gentoo.org> +files/2.12-gif-support.patch, + +files/2.12-makefile-opts.patch, +GD-2.12.ebuild: + Revision bump. Fixed makefile patch for new version. Closes bug #50303. 25 Mar 2004; Joshua Kinard <kumba@gentoo.org> GD-2.07.ebuild: Added ~mips to KEYWORDS. diff --git a/dev-perl/GD/GD-2.12.ebuild b/dev-perl/GD/GD-2.12.ebuild new file mode 100644 index 000000000000..7b2ebadf5733 --- /dev/null +++ b/dev-perl/GD/GD-2.12.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-perl/GD/GD-2.12.ebuild,v 1.1 2004/05/09 20:02:00 esammer Exp $ + +inherit eutils perl-module + +DESCRIPTION="interface to Thomas Boutell's gd library" +HOMEPAGE="http://www.cpan.org/modules/by-module/GD/${P}.readme" +SRC_URI="http://www.cpan.org/modules/by-module/GD/${P}.tar.gz" + +LICENSE="Artistic | GPL-2" +SLOT="0" +KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~ia64 ~amd64 ~mips" +IUSE="jpeg truetype X gif" + +DEPEND=">=media-libs/libgd-2.0.5 + media-libs/libpng + sys-libs/zlib + jpeg? ( media-libs/jpeg ) + truetype? ( =media-libs/freetype-2* ) + X? ( virtual/x11 ) + gif? ( media-libs/giflib )" + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${PV}-makefile-opts.patch + use gif && epatch ${FILESDIR}/${PV}-gif-support.patch + + use jpeg \ + && jpeg=1 \ + || jpeg=0 + + use truetype \ + && freetype=1 \ + || freetype=0 + + use X \ + && x=1 \ + || x=0 + + cp Makefile.PL{,.orig} + sed \ + -e "s:GENTOO_JPEG:${jpeg}:" \ + -e "s:GENTOO_FREETYPE:${freetype}:" \ + -e "s:GENTOO_XPM:${x}:" \ + Makefile.PL.orig > Makefile.PL + + perl-module_src_prep +} + +mydoc="GD.html" diff --git a/dev-perl/GD/Manifest b/dev-perl/GD/Manifest index b5f2df68aa1a..e25d77ab44d5 100644 --- a/dev-perl/GD/Manifest +++ b/dev-perl/GD/Manifest @@ -1,9 +1,12 @@ -MD5 814506250c5082a84150e8604a490c2f ChangeLog 2849 -MD5 41d3a8936eb856f105d88837d7422794 GD-1.41.ebuild 1180 +MD5 5c5bfb4dd0a6edf6bfa9e55482970ce9 GD-2.12.ebuild 1200 MD5 822f49c15811bdb65dd7f5f1752c4289 GD-2.07.ebuild 1194 +MD5 41d3a8936eb856f105d88837d7422794 GD-1.41.ebuild 1180 +MD5 814506250c5082a84150e8604a490c2f ChangeLog 2849 MD5 e2d8f1bf77722def1dd432e26455c818 metadata.xml 305 MD5 065c81a3514e7e1cfd94bac1db4549bb files/1.41-makefile-opts.patch 706 -MD5 b51ab87c113e42bd5560824fc63bc2bc files/2.07-gif-support.patch 21921 -MD5 e6903f48f6e8261afb3b2e964b400c0b files/2.07-makefile-opts.patch 1746 +MD5 d3ec1d86076b989f9b63c3f04270a3f6 files/2.12-makefile-opts.patch 1743 MD5 411e0281d6e0bf68ac6d1b61a71bd863 files/digest-GD-1.41 59 +MD5 e6903f48f6e8261afb3b2e964b400c0b files/2.07-makefile-opts.patch 1746 +MD5 7eb7412d4e5148d2fda9df7bb29eae59 files/digest-GD-2.12 59 MD5 cf9127479253ccf83984029239c00ea1 files/digest-GD-2.07 59 +MD5 b51ab87c113e42bd5560824fc63bc2bc files/2.07-gif-support.patch 21921 diff --git a/dev-perl/GD/files/2.12-gif-support.patch b/dev-perl/GD/files/2.12-gif-support.patch new file mode 100644 index 000000000000..279840357a6a --- /dev/null +++ b/dev-perl/GD/files/2.12-gif-support.patch @@ -0,0 +1,544 @@ +diff -Naurp GD-2.05.orig/GD.pm GD-2.05/GD.pm +--- GD-2.05.orig/GD.pm 2002-11-24 20:27:31.000000000 -0500 ++++ GD-2.05/GD.pm 2003-01-06 17:07:02.000000000 -0500 +@@ -166,6 +166,15 @@ sub GD::Image::newFromPng { + $class->_newFromPng($fh,@_); + } + ++sub GD::Image::newFromGif { ++ croak("Usage: newFromGid(class,filehandle)") unless @_==2; ++ my($class) = shift; ++ my($f) = shift; ++ my $fh = $class->_make_filehandle($f); ++ binmode($fh); ++ $class->_newFromGif($fh); ++} ++ + sub GD::Image::newFromJpeg { + croak("Usage: newFromJpeg(class,filehandle,[truecolor])") unless @_>=2; + my($class) = shift; +@@ -211,6 +220,7 @@ sub _image_type { + my $data = shift; + my $magic = substr($data,0,4); + return 'Png' if $magic eq "\x89PNG"; ++ return 'Gif' if $magic eq "GIF8"; + return 'Jpeg' if $magic eq "\377\330\377\340"; + return 'Jpeg' if $magic eq "\377\330\377\356"; + return 'Gd2' if $magic eq "gd2\000"; +@@ -617,6 +627,14 @@ you can call the image query methods des + The newFromPngData() method will create a new GD::Image initialized + with the PNG format B<data> contained in C<$data>. + ++=item B<$image = GD::Image-E<gt>newFromGif($file)> ++ ++=item B<$image = GD::Image-E<gt>newFromGifData($data)> ++ ++These methods will create an image from a GIF file. They work just ++like newFromPng() and newFromPngData(), and will accept the same ++filehandle and pathname arguments. ++ + =item B<$image = GD::Image-E<gt>newFromJpeg($file, [$truecolor])> + + =item B<$image = GD::Image-E<gt>newFromJpegData($data, [$truecolor])> +@@ -745,6 +763,10 @@ pipe it to a display program, or write i + Same as gd(), except that it returns the data in compressed GD2 + format. + ++=item B<$gifdata = $image-E<gt>gif> ++ ++Same as gd(), except that it returns the data in GIF format. ++ + =item B<$wbmpdata = $image-E<gt>wbmp([$foreground])> + + This returns the image data in WBMP format, which is a black-and-white +diff -Naurp GD-2.05.orig/GD.xs GD-2.05/GD.xs +--- GD-2.05.orig/GD.xs 2002-11-22 14:20:54.000000000 -0500 ++++ GD-2.05/GD.xs 2003-01-06 17:07:02.000000000 -0500 +@@ -251,6 +251,7 @@ extern gdFontPtr gdFontTiny; + #ifdef PERL_OBJECT + # ifdef WIN32 + #define GDIMAGECREATEFROMPNG(x) gdImageCreateFromPng((FILE*)x) ++#define GDIMAGECREATEFROMGIF(x) gdImageCreateFromGif((FILE*)x) + #define GDIMAGECREATEFROMXBM(x) gdImageCreateFromXbm((FILE*)x) + #define GDIMAGECREATEFROMJPEG(x) gdImageCreateFromJpeg((FILE*)x) + #define GDIMAGECREATEFROMWBMP(x) gdImageCreateFromWBMP((FILE*)x) +@@ -261,6 +262,7 @@ extern gdFontPtr gdFontTiny; + #else + # ifdef USE_PERLIO + #define GDIMAGECREATEFROMPNG(x) gdImageCreateFromPng(PerlIO_findFILE(x)) ++#define GDIMAGECREATEFROMGIF(x) gdImageCreateFromGif(PerlIO_findFILE(x)) + #define GDIMAGECREATEFROMXBM(x) gdImageCreateFromXbm(PerlIO_findFILE(x)) + #define GDIMAGECREATEFROMJPEG(x) gdImageCreateFromJpeg(PerlIO_findFILE(x)) + #define GDIMAGECREATEFROMWBMP(x) gdImageCreateFromWBMP(PerlIO_findFILE(x)) +@@ -269,6 +271,7 @@ extern gdFontPtr gdFontTiny; + #define GDIMAGECREATEFROMGD2PART(x,a,b,c,d) gdImageCreateFromGd2Part(PerlIO_findFILE(x),a,b,c,d) + # else + #define GDIMAGECREATEFROMPNG(x) gdImageCreateFromPng(x) ++#define GDIMAGECREATEFROMGIF(x) gdImageCreateFromGif(x) + #define GDIMAGECREATEFROMXBM(x) gdImageCreateFromXbm(x) + #define GDIMAGECREATEFROMJPEG(x) gdImageCreateFromJpeg(x) + #define GDIMAGECREATEFROMWBMP(x) gdImageCreateFromWBMP(x) +@@ -503,6 +506,23 @@ gdnewFromPngData(packname="GD::Image", i + RETVAL + + GD::Image ++gdnewFromGifData(packname="GD::Image", imageData, ...) ++ char * packname ++ SV * imageData ++ PROTOTYPE: $$;$ ++ PREINIT: ++ gdIOCtx* ctx; ++ char* data; ++ STRLEN len; ++ CODE: ++ data = SvPV(imageData,len); ++ ctx = newDynamicCtx(data,len); ++ RETVAL = (GD__Image) gdImageCreateFromGifCtx(ctx); ++ (ctx->gd_free)(ctx); ++ OUTPUT: ++ RETVAL ++ ++GD::Image + gdnewFromGdData(packname="GD::Image", imageData) + char * packname + SV * imageData +@@ -604,6 +624,16 @@ gd_newFromGd(packname="GD::Image", fileh + RETVAL + + GD::Image ++gd_newFromGif(packname="GD::Image", filehandle) ++ char * packname ++ InputStream filehandle ++ PROTOTYPE: $$ ++ CODE: ++ RETVAL = GDIMAGECREATEFROMGIF(filehandle); ++ OUTPUT: ++ RETVAL ++ ++GD::Image + gd_newFromGd2(packname="GD::Image", filehandle) + char * packname + InputStream filehandle +@@ -810,6 +840,21 @@ gdgd2(image) + OUTPUT: + RETVAL + ++SV* ++gdgif(image) ++ GD::Image image ++ PROTOTYPE: $ ++ CODE: ++ { ++ void* data; ++ int size; ++ data = gdImageGifPtr(image,&size); ++ RETVAL = newSVpv((char*) data,size); ++ gdFree(data); ++ } ++ OUTPUT: ++ RETVAL ++ + int + gdtransparent(image, ...) + GD::Image image +diff -Naurp GD-2.05.orig/t/GD.t GD-2.05/t/GD.t +--- GD-2.05.orig/t/GD.t 2002-11-22 15:30:06.000000000 -0500 ++++ GD-2.05/t/GD.t 2003-01-06 17:07:02.000000000 -0500 +@@ -7,7 +7,7 @@ use constant FONT=>"$Bin/Generic.ttf"; + use constant SKIP_TEST_8 => 1; + + my $loaded; +-BEGIN {$| = 1; $loaded = 0; print "1..10\n"; } ++BEGIN {$| = 1; $loaded = 0; print "1..11\n"; } + END {print "not ok 1\n" unless $loaded;} + + use GD qw(:DEFAULT GD_CMP_IMAGE); +@@ -29,6 +29,7 @@ if (defined $arg && $arg eq '--write') { + compare(&test8,8,'write'); + compare(&test9('frog.xpm'),9,'write'); + compare(&test10('frog.jpg'),10,'write'); ++ compare(&test11('frog.gif'),11,'write'); + } + + compare(test2(),2); +@@ -65,6 +66,14 @@ if (GD::Image->newFromJpeg('frog.jpg')) + print "not ok ",10,"\n"; + } + ++if (GD::Image->newFromGif('frog.gif')) { ++ compare(test11('frog.gif'),11); ++} elsif ($@ =~/not built with gif support/) { ++ print "ok ",11," # Skip, no GIF support\n"; ++} else { ++ print "not ok ",11,"\n"; ++} ++ + sub compare { + my($imageData,$testNo,$fht) = @_; + local($/); +@@ -298,6 +307,6 @@ sub test10 { + sub test11 { + my $fn = shift; + my $im = GD::Image->newFromGif($fn); +- $im->gif; ++ $im->png; + } + +diff -Naurp GD-2.05.orig/t/GD.t~ GD-2.05/t/GD.t~ +--- GD-2.05.orig/t/GD.t~ 1969-12-31 19:00:00.000000000 -0500 ++++ GD-2.05/t/GD.t~ 2002-11-22 15:30:06.000000000 -0500 +@@ -0,0 +1,303 @@ ++#!/usr/bin/perl -w ++ ++use lib './blib/lib','./blib/arch','../blib/lib','../blib/arch'; ++use FileHandle; ++use FindBin qw($Bin); ++use constant FONT=>"$Bin/Generic.ttf"; ++use constant SKIP_TEST_8 => 1; ++ ++my $loaded; ++BEGIN {$| = 1; $loaded = 0; print "1..10\n"; } ++END {print "not ok 1\n" unless $loaded;} ++ ++use GD qw(:DEFAULT GD_CMP_IMAGE); ++$loaded++; ++print "ok 1\n"; ++ ++chdir 't' || die "Couldn't change to 't' directory: $!"; ++ ++$arg = shift; ++ ++if (defined $arg && $arg eq '--write') { ++ warn "Writing regression files..."; ++ compare(&test2,2,'write'); ++ compare(&test3,3,'write'); ++ compare(&test4,4,'write'); ++ compare(&test5,5,'write'); ++ compare(&test6,6,'write'); ++ compare(&test7,7,'write'); ++ compare(&test8,8,'write'); ++ compare(&test9('frog.xpm'),9,'write'); ++ compare(&test10('frog.jpg'),10,'write'); ++} ++ ++compare(test2(),2); ++compare(test3(),3); ++compare(test4(),4); ++compare(test5(),5); ++compare(test6(),6); ++compare(test7(),7); ++ ++if (SKIP_TEST_8) { ++ print "ok 8 # Skip, FreeType changes too frequently to be testable\n"; ++} ++elsif (GD::Image->stringTTF(0,FONT,12.0,0.0,20,20,"Hello world!")) { ++ multicompare(test8(),8,undef); ++} elsif ($@ =~/not built with .+Type font support/) { ++ print "ok ",8," # Skip, no FreeType font support\n"; ++} else { ++ print "not ok ",8,"\n"; ++} ++ ++if (GD::Image->newFromXpm('frog.xpm')) { ++ compare(test9('frog.xpm'),9); ++} elsif ($@ =~/not built with xpm support/) { ++ print "ok ",9," # Skip, no XPM support\n"; ++} else { ++ print "not ok ",9,"\n"; ++} ++ ++if (GD::Image->newFromJpeg('frog.jpg')) { ++ compare(test10('frog.jpg'),10); ++} elsif ($@ =~/not built with jpeg support/) { ++ print "ok ",10," # Skip, no JPEG support\n"; ++} else { ++ print "not ok ",10,"\n"; ++} ++ ++sub compare { ++ my($imageData,$testNo,$fht) = @_; ++ local($/); ++ undef $/; ++ my $ok = $testNo; ++ my $regressdata; ++ my $file = ($^O eq 'VMS')? "test.out_".$testNo."_png" : "./test.out.$testNo.png"; ++ if (defined $fht and $fht eq 'write') { ++ open (REGRESSFILE,">$file") ++ || die "Can't open regression file '$file': $!\n"; ++ binmode REGRESSFILE; ++ print REGRESSFILE $imageData; ++ close REGRESSFILE; ++ } else { ++ open (REGRESSFILE,"./$file") ++ || die "Can't open regression file './t/$file': $!\n"; ++ binmode REGRESSFILE; ++ $regressdata = <REGRESSFILE>; ++ close REGRESSFILE; ++ print $imageData eq $regressdata ? "ok $ok" : "not ok $ok","\n"; ++ } ++} ++ ++sub multicompare { ++ my($imageData,$testNo,$fht,@alt) = @_; ++ local $/ = undef; ++ my $ok = $testNo; ++ my $regressdata; ++ my $file = ($^O eq 'VMS')? "test.out_".$testNo."_png" : "test.out.$testNo.png"; ++ if (defined $fht and $fht eq 'write') { ++ die "Not implemented with multicompare"; ++ } else { ++ my $equal; ++ opendir(DIR,'.'); ++ ENTRY: ++ while (my $entry =readdir(DIR)) { ++ next unless $entry =~ /^$file(-\d+)?/; ++ open (REGRESSFILE,$entry) ++ || die "Can't open regression file './t/$entry': $!\n"; ++ binmode REGRESSFILE; ++ $regressdata = <REGRESSFILE>; ++ close REGRESSFILE; ++ if ($imageData eq $regressdata) { ++ $equal = 1; ++ last ENTRY; ++ } ++ } ++ closedir DIR; ++ print $equal ? "ok $ok" : "not ok $ok","\n"; ++ } ++} ++ ++sub test2 { ++ my($im) = new GD::Image(300,300); ++ my($white) = $im->colorAllocate(255, 255, 255); ++ my($black) = $im->colorAllocate(0, 0, 0); ++ my($red) = $im->colorAllocate(255, 0, 0); ++ my($green) = $im->colorAllocate(0,255,0); ++ my($yellow) = $im->colorAllocate(255,250,205); ++ open (TILE,"./tile.png") || die "Can't open tile file: $!"; ++ my($tile) = newFromPng GD::Image(TILE); ++ close TILE; ++ $im->setBrush($tile); ++ $im->arc(100,100,100,150,0,360,gdBrushed); ++ $im->setTile($tile); ++ $im->filledRectangle(150,150,250,250,gdTiled); ++ $im->rectangle(150,150,250,250,$black); ++ $im->setStyle($green,$green,$green,gdTransparent,$red,$red,$red,gdTransparent); ++ $im->line(0,280,300,280,gdStyled); ++ return $im->png; ++} ++ ++sub test3 { ++ my($im) = new GD::Image(300,300); ++ my($white,$black,$red,$blue,$yellow) = ( ++ $im->colorAllocate(255, 255, 255), ++ $im->colorAllocate(0, 0, 0), ++ $im->colorAllocate(255, 0, 0), ++ $im->colorAllocate(0,0,255), ++ $im->colorAllocate(255,250,205) ++ ); ++ my($brush) = new GD::Image(10,10); ++ $brush->colorAllocate(255,255,255); # white ++ $brush->colorAllocate(0,0,0); # black ++ $brush->transparent($white); # white is transparent ++ $brush->filledRectangle(0,0,5,2,$black); # a black rectangle ++ $im->setBrush($brush); ++ $im->arc(100,100,100,150,0,360,gdBrushed); ++ my($poly) = new GD::Polygon; ++ $poly->addPt(30,30); ++ $poly->addPt(100,10); ++ $poly->addPt(190,290); ++ $poly->addPt(30,290); ++ $im->polygon($poly,gdBrushed); ++ $im->fill(132,62,$blue); ++ $im->fill(100,70,$red); ++ $im->fill(40,40,$yellow); ++ $im->interlaced(1); ++ $im->copy($im,150,150,20,20,50,50); ++ $im->copyResized($im,10,200,20,20,100,100,50,50); ++ return $im->png; ++} ++ ++sub test4 { ++ my($im) = new GD::Image(100,50); ++ my($black,$white,$red,$blue) = ++ ( ++ $im->colorAllocate(0, 0, 0), ++ $im->colorAllocate(255, 255, 255), ++ $im->colorAllocate(255, 0, 0), ++ $im->colorAllocate(0,0,255) ++ ); ++ $im->arc(50, 25, 98, 48, 0, 360, $white); ++ $im->fill(50, 21, $red); ++ return $im->png; ++} ++ ++sub test5 { ++ my($im) = new GD::Image(225,180); ++ my($black,$white,$red,$blue,$yellow) = ++ ($im->colorAllocate(0, 0, 0), ++ $im->colorAllocate(255, 255, 255), ++ $im->colorAllocate(255, 0, 0), ++ $im->colorAllocate(0,0,255), ++ $im->colorAllocate(255,250,205) ++ ); ++ my($poly) = new GD::Polygon; ++ $poly->addPt(0,50); ++ $poly->addPt(25,25); ++ $poly->addPt(50,50); ++ $im->filledPolygon($poly,$blue); ++ $poly->offset(100,100); ++ $im->filledPolygon($poly,$red); ++ $poly->map(50,50,100,100,10,10,110,60); ++ $im->filledPolygon($poly,$yellow); ++ $poly->map($poly->bounds,50,20,80,160); ++ $im->filledPolygon($poly,$white); ++ return $im->png; ++} ++ ++sub test6 { ++ my($im) = new GD::Image(300,300); ++ my($white,$black,$red,$blue,$yellow) = ++ ( ++ $im->colorAllocate(255, 255, 255), ++ $im->colorAllocate(0, 0, 0), ++ $im->colorAllocate(255, 0, 0), ++ $im->colorAllocate(0,0,255), ++ $im->colorAllocate(255,250,205) ++ ); ++ $im->transparent($white); ++ $im->interlaced(1); ++ my($brush) = new GD::Image(10,10); ++ $brush->colorAllocate(255,255,255); ++ $brush->colorAllocate(0,0,0); ++ $brush->transparent($white); ++ $brush->filledRectangle(0,0,5,2,$black); ++ $im->string(gdLargeFont,150,10,"Hello world!",$red); ++ $im->string(gdSmallFont,150,28,"Goodbye cruel world!",$blue); ++ $im->stringUp(gdTinyFont,280,250,"I'm climbing the wall!",$black); ++ $im->charUp(gdMediumBoldFont,280,280,"Q",$black); ++ $im->setBrush($brush); ++ $im->arc(100,100,100,150,0,360,gdBrushed); ++ $poly = new GD::Polygon; ++ $poly->addPt(30,30); ++ $poly->addPt(100,10); ++ $poly->addPt(190,290); ++ $poly->addPt(30,290); ++ $im->polygon($poly,gdBrushed); ++ $im->fill(132,62,$blue); ++ $im->fill(100,70,$red); ++ $im->fill(40,40,$yellow); ++ return $im->png; ++} ++ ++sub test7 { ++ my $dtor = 0.0174533; ++ my $pi = 3.141592654; ++ my $xsize = 500; my $ysize = 500; my $scale = 1; ++ my $x_offset = $xsize/2; my $y_offset = $ysize/2; ++ my $im = new GD::Image($xsize,$ysize); ++ my $poly = new GD::Polygon; ++ my $col_bg = $im->colorAllocate(0,0,0); ++ my $col_fg = $im->colorAllocate(255,255,0); ++ my $col_fill = $im->colorAllocate(255,0,0); ++ my $r_0 = 100; my $theta_0 = 20; my $spring_factor = 30; ++ for($theta=0;$theta<=360;$theta++) { ++ my $r = $r_0 + $spring_factor*sin(2*$pi*$theta/$theta_0); ++ my $x = int($r * cos($theta*$dtor))*$scale+$x_offset; ++ my $y = int($r * sin($theta*$dtor))*$scale+$y_offset; ++ $poly->addPt($x,$y); ++ } ++ ++ $im->filledPolygon($poly,$col_fill); # Call gdImageFilledPolygon() ++ ++ return $im->png; ++} ++ ++sub test8 { ++ my $im = GD::Image->new(400,250); ++ if (!$im) { printf("Test7: no image");}; ++ my($white,$black,$red,$blue,$yellow) = ++ ( ++ $im->colorAllocate(255, 255, 255), ++ $im->colorAllocate(0, 0, 0), ++ $im->colorAllocate(255, 0, 0), ++ $im->colorAllocate(0,0,255), ++ $im->colorAllocate(255,250,205) ++ ); ++ ++ # Some TTFs ++ $im->stringFT($black,FONT,12.0,0.0,20,20,"Hello world!") || warn $@; ++ $im->stringFT($red,FONT,14.0,0.0,20,80,"Hello world!") || warn $@; ++ $im->stringFT($blue,FONT,30.0,-0.5,60,100,"Goodbye cruel world!") || warn $@; ++ $im->png; ++} ++ ++sub test9 { ++ my $fn = shift; ++ my $im = GD::Image->newFromXpm($fn); ++ $im->png; ++} ++ ++sub test10 { ++ my $fn = shift; ++ my $im = GD::Image->newFromJpeg($fn); ++ $im->png; ++} ++ ++# not used ++sub test11 { ++ my $fn = shift; ++ my $im = GD::Image->newFromGif($fn); ++ $im->gif; ++} ++ +diff -Naurp GD-2.05.orig/t/frog.gif GD-2.05/t/frog.gif +--- GD-2.05.orig/t/frog.gif 1969-12-31 19:00:00.000000000 -0500 ++++ GD-2.05/t/frog.gif 2003-01-06 17:07:02.000000000 -0500 +@@ -0,0 +1,28 @@ ++GIF89a0 ++-Lz_R`qseB'pb=&L"@^FHr&`Jwf+Ñ'tGYxS
=H#C?
Y`7^x|z@7uxcp0`,
8DC6S$^cH<dYp̰C7Cb6C!PEry>$>O p~\:44DCC=B< ++`35VP3E ++1NC> ++i6;\A
*L?#@> ++303 9`L$PrI$M4$C3NQ3(S20DHp-<b ++a_8qc#x)]'[9;Ol n4L((@ ++]b@2pHN2.! ++PHPc JD2|ZHs# ++ ++Xb ++ZD"ш"@9'AH :8Ax ++3t<qAp`;F(]|P.|qמ`.XF<BOܛ~`z7G_b/|V .`̡X_%!:!NM1 ++ rWrMݤW7 ++ W ++@ ++`}"( ++ ++~ ++M ++sp ++ ++ y`8 ++ ++ؗ}`kvks ++kv@7x{8h ++ ++v +\ No newline at end of file +diff -Naurp GD-2.05.orig/t/test.out.11.png GD-2.05/t/test.out.11.png +--- GD-2.05.orig/t/test.out.11.png 1969-12-31 19:00:00.000000000 -0500 ++++ GD-2.05/t/test.out.11.png 2003-01-06 17:07:02.000000000 -0500 +@@ -0,0 +1,13 @@ ++PNG
++ ++ ++;".1= ++$}t؉'N:qT3dXF~ɔSL9n:2.w,:'C&-%C P8>m3 6bzs锈oD!Ylɉ|b0OmkזXٽswkuJh}>$e8"\pdpIO:|.m! S. 8X?6B+LM`(;:hU
6nn*={w|52Go3,.6?28o;霝CcGw]vz@P 8zsâ_k
`sG#՛\>C`rݹp<ha͟Yts,-,6xgK ++ܿI ++ޙwIS)ӺG^v˥yccyʞ|%7z/TpmC~jNcF (bEG#YA}@- ^2PA ++6Q-L*ޚ#1iEmQ;1}m۷
?7[2A`SOcÛ{qԽIt:̘8F> I_^ ++שSAb%Z*ъJ(t:XR1lSi_=S~Rن!ᶮ|:pD!Я#9S謨W>UÀ^fwnk' ++USrwq_)И@ݻ`rg}r=ŶvtD.-8x(=Uw;159 ++IT*hk_?tF;@OkR%y5zxc~z#Fh!xiC ++8Ypr|Xk^N N.Ojax+EZA.nUSLǗZ[zxxuOO_+q]YP&-O"'[7&2.\(IݘIՎP&)~uꖟZnUWxY<.+I`(:1^kU~P-W^VSs?ZafxYYY\nDiix ǽjjqbO-V ª*HOrFDZ.^,ff".EpoCANNFdepK2r;Û!=-"6W467"/2BPY)l97r y923-U˛7U- Hf~_,uIxW,uWtf] ++jkjj@n֥_-t)/]?_`rѝ2ѿARO58@FqcsUeZQ&XV$YYyF@ͽZA@PS+(s@ +\ No newline at end of file diff --git a/dev-perl/GD/files/2.12-makefile-opts.patch b/dev-perl/GD/files/2.12-makefile-opts.patch new file mode 100644 index 000000000000..4fe42f0196e8 --- /dev/null +++ b/dev-perl/GD/files/2.12-makefile-opts.patch @@ -0,0 +1,40 @@ +--- Makefile.PL.orig 2003-06-26 11:09:51.000000000 -0400 ++++ Makefile.PL 2003-06-26 11:12:50.000000000 -0400 +@@ -94,12 +94,7 @@ + ################################################################### + # path to libgd, skip prompt if passed in from above + ################################################################### +-my $PREFIX = $lib_gd_path; +-if( ! defined($lib_gd_path) ) +-{ +- warn "\n"; +- $PREFIX = prompt('Where is libgd installed?','/usr/lib'); +-} ++my $PREFIX = '/usr/lib'; + + unless ($PREFIX eq '/usr/lib') { + $PREFIX =~ s!/lib$!!; +@@ -112,20 +107,9 @@ + ################################################################################################################## + # If build options have not been passed in then prompt for settings + ################################################################################################################## +-my ($JPEG, $FT, $XPM) = (undef, undef, undef); +-if( defined($options) ) +-{ +- if( $options =~ m/JPEG/i ) { $JPEG = 1; } else { $JPEG = 0; } +- if( $options =~ m/FT/i ) { $FT = 1; } else { $FT = 0; } +- if( $options =~ m/XPM/i ) { $XPM = 1; } else { $XPM = 0; } +-} +-else +-{ +- warn "\nPlease choose the features that match how libgd was built:\n"; +- $JPEG = lc prompt('Build JPEG support?','y') eq 'y'; +- $FT = lc prompt('Build FreeType support?','y') eq 'y'; +- $XPM = $^O !~ /^freebsd|MSWin32$/ && lc prompt('Build XPM support?','y') eq 'y'; +-} ++my $JPEG = 'GENTOO_JPEG'; ++my $FT = 'GENTOO_FREETYPE'; ++my $XPM = 'GENTOO_XPM'; + ################################################################################################################## + + my $FCGI = 0; # set to 1 to build compatability with fastCGI diff --git a/dev-perl/GD/files/digest-GD-2.12 b/dev-perl/GD/files/digest-GD-2.12 new file mode 100644 index 000000000000..d9a3ea15a3b5 --- /dev/null +++ b/dev-perl/GD/files/digest-GD-2.12 @@ -0,0 +1 @@ +MD5 84de3734fb32947d08c0d3d1e68201a6 GD-2.12.tar.gz 155680 |