Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-GD for openSUSE:Factory checked in at 2023-07-11 15:57:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-GD (Old) and /work/SRC/openSUSE:Factory/.perl-GD.new.8922 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-GD" Tue Jul 11 15:57:21 2023 rev:37 rq:1098071 version:2.78 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-GD/perl-GD.changes 2023-05-12 20:40:26.470907338 +0200 +++ /work/SRC/openSUSE:Factory/.perl-GD.new.8922/perl-GD.changes 2023-07-11 15:57:45.621330895 +0200 @@ -1,0 +2,19 @@ +Fri Jul 7 19:32:15 UTC 2023 - Tina Müller <[email protected]> + +- Updated GD-cflags.patch + +------------------------------------------------------------------- +Wed Jul 5 03:07:11 UTC 2023 - Tina Müller <[email protected]> + +- updated to 2.78 + see /usr/share/doc/packages/perl-GD/ChangeLog + + 2.78 * Fix Use of uninitialized value $pkg in concatenation warning + (RT #148899 and GH #47). Thanks to ppisar for the analysis. + Adds a new hard Test::NoWarnings test requirement. + 2.77 * add BMP support with libgd 2.1.0, PR #49 by PeterCJ + * don't link to -lXPM without XPM nor X11, GH #45 + * rename ANIMGIF feature to GIFANIM + * fix unused variable failure in GH CI, RT #141125 by PhilterPaper + +------------------------------------------------------------------- Old: ---- GD-2.76.tar.gz New: ---- GD-2.78.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-GD.spec ++++++ --- /var/tmp/diff_new_pack.4XgPlc/_old 2023-07-11 15:57:46.401335432 +0200 +++ /var/tmp/diff_new_pack.4XgPlc/_new 2023-07-11 15:57:46.409335479 +0200 @@ -18,10 +18,10 @@ %define cpan_name GD Name: perl-GD -Version: 2.76 +Version: 2.78 Release: 0 License: Artistic-1.0 OR GPL-1.0-or-later -Summary: Perl interface to the gd2 graphics library +Summary: Perl interface to the libgd graphics library URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/R/RU/RURBAN/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml @@ -32,10 +32,7 @@ BuildRequires: perl(ExtUtils::PkgConfig) BuildRequires: perl(Test::Fork) >= 0.02 BuildRequires: perl(Test::More) >= 0.88 -Recommends: perl(ExtUtils::Constant) >= 0.23 -Recommends: perl(ExtUtils::PkgConfig) -Recommends: perl(Test::Fork) >= 0.02 -Recommends: perl(Test::More) >= 0.88 +BuildRequires: perl(Test::NoWarnings) >= 1.00 %{perl_requires} # MANUAL BEGIN BuildRequires: gd-devel >= 2.0.28 @@ -51,7 +48,7 @@ %prep %autosetup -n %{cpan_name}-%{version} -p1 -find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644 +find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644 %build perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" ++++++ GD-2.76.tar.gz -> GD-2.78.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GD-2.76/ChangeLog new/GD-2.78/ChangeLog --- old/GD-2.76/ChangeLog 2022-02-01 15:50:31.000000000 +0100 +++ new/GD-2.78/ChangeLog 2023-07-04 11:12:02.000000000 +0200 @@ -1,3 +1,10 @@ +2.78 * Fix Use of uninitialized value $pkg in concatenation warning + (RT #148899 and GH #47). Thanks to ppisar for the analysis. + Adds a new hard Test::NoWarnings test requirement. +2.77 * add BMP support with libgd 2.1.0, PR #49 by PeterCJ + * don't link to -lXPM without XPM nor X11, GH #45 + * rename ANIMGIF feature to GIFANIM + * fix unused variable failure in GH CI, RT #141125 by PhilterPaper 2.76 * fix broken TIFF and AVIF support, PR #43 by Paul Howarth * re-enable XBM support (always on) * provide xbm magic support (a hack, for GD::Graph) @@ -15,7 +22,7 @@ * added Github actions (for PR's) * fix poly->transform documentation RT #140043 * fix GD,GD2 detection and tests RT #139399 (since libgd 2.3.3) - fixed tests by Håkon Hægland. + fixed tests by HÃ¥kon Hægland. * POD: Remove indirect object constructors from example code snippet (PR #39) * patch from Ben Crowell that fixes incorrect behaviour of GD::Simple->fontMetrics * fix cross-compilation if gdlib.pc has no cflags by Fabrice Fontaine @@ -157,7 +164,7 @@ 2.18 This version needs libgd 2.0.28 or higher. Fixed documentation bug in synopsis of GD::Simple. Updated Polyline to version 0.20 -2.17 Added animated GIF patches from Jaakko Hyvätti. +2.17 Added animated GIF patches from Jaakko Hyvätti. Added dynamic bitmapped font loading support. Added fontconfig support. Added a simplified API called GD::Simple. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GD-2.76/GD.xs new/GD-2.78/GD.xs --- old/GD-2.76/GD.xs 2022-01-26 20:30:47.000000000 +0100 +++ new/GD-2.78/GD.xs 2023-05-29 09:07:19.000000000 +0200 @@ -118,6 +118,7 @@ #define GDIMAGECREATEFROMJPEG(x) gdImageCreateFromJpeg((FILE*)x) #define GDIMAGECREATEFROMGIF(x) gdImageCreateFromGif((FILE*)x) #define GDIMAGECREATEFROMWBMP(x) gdImageCreateFromWBMP((FILE*)x) +#define GDIMAGECREATEFROMBMP(x) gdImageCreateFromBmp((FILE*)x) #define GDIMAGECREATEFROMTIFF(x) gdImageCreateFromTiff((FILE*)x) #define GDIMAGECREATEFROMGD(x) gdImageCreateFromGd((FILE*)x) #define GDIMAGECREATEFROMGD2(x) gdImageCreateFromGd2((FILE*)x) @@ -133,6 +134,7 @@ #define GDIMAGECREATEFROMJPEG(x) gdImageCreateFromJpeg(PerlIO_findFILE(x)) #define GDIMAGECREATEFROMGIF(x) gdImageCreateFromGif(PerlIO_findFILE(x)) #define GDIMAGECREATEFROMWBMP(x) gdImageCreateFromWBMP(PerlIO_findFILE(x)) +#define GDIMAGECREATEFROMBMP(x) gdImageCreateFromBmp(PerlIO_findFILE(x)) #define GDIMAGECREATEFROMTIFF(x) gdImageCreateFromTiff(PerlIO_findFILE(x)) #define GDIMAGECREATEFROMGD(x) gdImageCreateFromGd(PerlIO_findFILE(x)) #define GDIMAGECREATEFROMGD2(x) gdImageCreateFromGd2(PerlIO_findFILE(x)) @@ -146,6 +148,7 @@ #define GDIMAGECREATEFROMJPEG(x) gdImageCreateFromJpeg(x) #define GDIMAGECREATEFROMGIF(x) gdImageCreateFromGif(x) #define GDIMAGECREATEFROMWBMP(x) gdImageCreateFromWBMP(x) +#define GDIMAGECREATEFROMBMP(x) gdImageCreateFromBmp(x) #define GDIMAGECREATEFROMTIFF(x) gdImageCreateFromTiff(x) #define GDIMAGECREATEFROMGD(x) gdImageCreateFromGd(x) #define GDIMAGECREATEFROMGD2(x) gdImageCreateFromGd2(x) @@ -523,6 +526,33 @@ #endif +#ifdef HAVE_BMP +GD::Image +gdnewFromBmpData(packname="GD::Image", imageData, ...) + char * packname + SV * imageData + PROTOTYPE: $$;$ + PREINIT: + gdIOCtx* ctx; + char* data; + STRLEN len; + dMY_CXT; + int truecolor = truecolor_default; + CODE: + PERL_UNUSED_ARG(packname); + data = SvPV(imageData,len); + ctx = newDynamicCtx(data,len); + RETVAL = (GD__Image) gdImageCreateFromBmpCtx(ctx); + (ctx->gd_free)(ctx); + if (!RETVAL) + croak("gdImageCreateFromBmpCtx error"); + if (items > 2) truecolor = (int)SvIV(ST(2)); + gd_chkimagefmt(RETVAL, truecolor); + OUTPUT: + RETVAL + +#endif + GD::Image gdnewFromWBMPData(packname="GD::Image", imageData, ...) char * packname @@ -648,6 +678,32 @@ #endif +#ifdef HAVE_BMP +GD::Image +gd_newFromBmp(packname="GD::Image", filehandle) + char * packname + InputStream filehandle + PROTOTYPE: $$ + PREINIT: + gdImagePtr img; + SV* errormsg; + CODE: + PERL_UNUSED_ARG(packname); + img = GDIMAGECREATEFROMBMP(filehandle); + if (img == NULL) { + errormsg = perl_get_sv("@",0); + if (errormsg != NULL) + sv_setpv(errormsg,"libgd was not built with BMP support\n"); + else + croak("gdImageCreateFromBmp error"); + XSRETURN_EMPTY; + } + RETVAL = img; + OUTPUT: + RETVAL + +#endif + GD::Image gd_newFromWBMP(packname="GD::Image", filehandle) char * packname @@ -695,6 +751,7 @@ } RETVAL = img; #else + PERL_UNUSED_ARG(filename); errormsg = perl_get_sv("@",0); sv_setpv(errormsg,"libgd was not built with xpm support\n"); XSRETURN_EMPTY; @@ -956,13 +1013,18 @@ void* data; int size; CODE: -#ifdef HAVE_ANIMGIF +#ifdef HAVE_GIFANIM data = (void *) gdImageGifAnimBeginPtr(image,&size,globalcm,loops); if (!data) croak("gdImageGifAnimBeginPtr error"); RETVAL = newSVpvn((char*) data,size); gdFree(data); #else + PERL_UNUSED_ARG(data); + PERL_UNUSED_ARG(size); + PERL_UNUSED_ARG(image); + PERL_UNUSED_ARG(globalcm); + PERL_UNUSED_ARG(loops); die("libgd 2.0.33 or higher required for animated GIF support"); #endif OUTPUT: @@ -982,7 +1044,7 @@ void* data; int size; CODE: -#ifdef HAVE_ANIMGIF +#ifdef HAVE_GIFANIM data = (void *) gdImageGifAnimAddPtr(image,&size,localcm,leftofs,topofs, delay,disposal,previm); if (!data) @@ -990,6 +1052,15 @@ RETVAL = newSVpvn((char*) data,size); gdFree(data); #else + PERL_UNUSED_ARG(data); + PERL_UNUSED_ARG(size); + PERL_UNUSED_ARG(image); + PERL_UNUSED_ARG(localcm); + PERL_UNUSED_ARG(leftofs); + PERL_UNUSED_ARG(topofs); + PERL_UNUSED_ARG(delay); + PERL_UNUSED_ARG(disposal); + PERL_UNUSED_ARG(previm); die("libgd 2.0.33 or higher required for animated GIF support"); #endif OUTPUT: @@ -1004,18 +1075,47 @@ int size; CODE: PERL_UNUSED_ARG(image); -#ifdef HAVE_ANIMGIF +#ifdef HAVE_GIFANIM data = (void *) gdImageGifAnimEndPtr(&size); if (!data) croak("gdImageGifAnimEndPtr error"); RETVAL = newSVpvn((char*) data,size); gdFree(data); #else + PERL_UNUSED_ARG(data); + PERL_UNUSED_ARG(size); die("libgd 2.0.33 or higher required for animated GIF support"); #endif OUTPUT: RETVAL +#ifdef HAVE_BMP +SV* +gdbmp(image,compression=0) + GD::Image image + int compression + PROTOTYPE: $ + PREINIT: + SV* errormsg; + void* data; + int size; + CODE: + data = (void *) gdImageBmpPtr(image,&size,compression); + if (data == NULL) { + errormsg = perl_get_sv("@",0); + if (errormsg != NULL) + sv_setpv(errormsg,"libgd was not built with WBMP support\n"); + else + croak("gdImageBmpPtr error"); + XSRETURN_EMPTY; + } + RETVAL = newSVpvn((char*) data,size); + gdFree(data); + OUTPUT: + RETVAL + +#endif + SV* gdwbmp(image,fg) GD::Image image @@ -1535,6 +1635,15 @@ #ifdef VERSION_33 gdImageCopyRotated(dst,src,dstX,dstY,srcX,srcY,srcW,srcH,angle); #else + PERL_UNUSED_ARG(dst); + PERL_UNUSED_ARG(src); + PERL_UNUSED_ARG(dstX); + PERL_UNUSED_ARG(dstY); + PERL_UNUSED_ARG(srcX); + PERL_UNUSED_ARG(srcY); + PERL_UNUSED_ARG(srcW); + PERL_UNUSED_ARG(srcH); + PERL_UNUSED_ARG(angle); die("libgd 2.0.33 or higher required for copyRotated support"); #endif } @@ -2316,11 +2425,35 @@ RETVAL = 1; } #else + /* if we have FT but not FTCIRCLE, this is all that's compiled */ + PERL_UNUSED_ARG(image); + PERL_UNUSED_ARG(cx); + PERL_UNUSED_ARG(cy); + PERL_UNUSED_ARG(radius); + PERL_UNUSED_ARG(textRadius); + PERL_UNUSED_ARG(fillPortion); + PERL_UNUSED_ARG(fontname); + PERL_UNUSED_ARG(points); + PERL_UNUSED_ARG(top); + PERL_UNUSED_ARG(bottom); + PERL_UNUSED_ARG(fgcolor); errormsg = perl_get_sv("@",0); sv_setpv(errormsg,"libgd must be version 2.0.33 or higher to use this function\n"); XSRETURN_EMPTY; #endif #else + /* if we don't have FT, this is all that's compiled */ + PERL_UNUSED_ARG(image); + PERL_UNUSED_ARG(cx); + PERL_UNUSED_ARG(cy); + PERL_UNUSED_ARG(radius); + PERL_UNUSED_ARG(textRadius); + PERL_UNUSED_ARG(fillPortion); + PERL_UNUSED_ARG(fontname); + PERL_UNUSED_ARG(points); + PERL_UNUSED_ARG(top); + PERL_UNUSED_ARG(bottom); + PERL_UNUSED_ARG(fgcolor); errormsg = perl_get_sv("@",0); sv_setpv(errormsg,"libgd was not built with FreeType support\n"); XSRETURN_EMPTY; @@ -2336,12 +2469,12 @@ PROTOTYPE: $$ CODE: { -#ifdef HAVE_FONTCONFIG PERL_UNUSED_ARG(image); +#ifdef HAVE_FONTCONFIG RETVAL = gdFTUseFontConfig(flag); #else SV* errormsg; - PERL_UNUSED_ARG(image); + PERL_UNUSED_ARG(flag); errormsg = perl_get_sv("@",0); sv_setpv(errormsg,"libgd was not built with fontconfig support\n"); XSRETURN_EMPTY; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GD-2.76/MANIFEST new/GD-2.78/MANIFEST --- old/GD-2.76/MANIFEST 2022-02-01 15:50:35.000000000 +0100 +++ new/GD-2.78/MANIFEST 2023-07-04 11:12:40.000000000 +0200 @@ -36,6 +36,7 @@ t/GD.t t/HSV.t t/Polyline.t +t/caller.t t/fork.t t/test_data/Generic.ttf t/test_data/frog.jpg @@ -83,7 +84,9 @@ t/test_data/tile.gif t/test_data/tile.jpeg t/test_data/tile.png +t/test_data/windows.bmp t/transp.t +t/windows_bmp.t t/z_kwalitee.t t/z_manifest.t t/z_pod-spell-mistakes.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GD-2.76/META.json new/GD-2.78/META.json --- old/GD-2.76/META.json 2022-02-01 15:50:35.000000000 +0100 +++ new/GD-2.78/META.json 2023-07-04 11:12:40.000000000 +0200 @@ -1,10 +1,10 @@ { - "abstract" : "Perl interface to the gd2 graphics library", + "abstract" : "Perl interface to the libgd graphics library", "author" : [ "Lincoln Stein <[email protected]>" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 7.38, CPAN::Meta::Converter version 2.150010", + "generated_by" : "ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -31,14 +31,19 @@ "ExtUtils::PkgConfig" : "0" } }, + "develop" : { + "requires" : { + "Algorithm::Diff" : "0", + "Class::XSAccessor" : "0", + "List::MoreUtils" : "0", + "Pod::Spell::CommonMistakes" : "0", + "Test::Kwalitee" : "0", + "Test::NoWarnings" : "1.00", + "Test::Pod" : "1.00", + "Text::CSV_XS" : "0" + } + }, "runtime" : { - "recommends" : { - "ExtUtils::Constant" : "0.23", - "ExtUtils::PkgConfig" : "0", - "Math::Trig" : "0", - "Test::Fork" : "0.02", - "Test::More" : "0.88" - }, "requires" : { "Math::Trig" : "0" } @@ -46,19 +51,22 @@ "test" : { "requires" : { "Test::Fork" : "0.02", - "Test::More" : "0.88" + "Test::More" : "0.88", + "Test::NoWarnings" : "1.00" } } }, "release_status" : "stable", "resources" : { "license" : [ - "http://dev.perl.org/licenses/" + "https://dev.perl.org/licenses/" ], "repository" : { - "url" : "http://github.com/lstein/Perl-GD" + "type" : "git", + "url" : "git://github.com/lstein/Perl-GD.git", + "web" : "https://github.com/lstein/Perl-GD" } }, - "version" : "2.76", - "x_serialization_backend" : "JSON::PP version 2.97001" + "version" : "2.78", + "x_serialization_backend" : "JSON::PP version 4.16" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GD-2.76/META.yml new/GD-2.78/META.yml --- old/GD-2.76/META.yml 2022-02-01 15:50:35.000000000 +0100 +++ new/GD-2.78/META.yml 2023-07-04 11:12:40.000000000 +0200 @@ -1,16 +1,17 @@ --- -abstract: 'Perl interface to the gd2 graphics library' +abstract: 'Perl interface to the libgd graphics library' author: - 'Lincoln Stein <[email protected]>' build_requires: ExtUtils::MakeMaker: '0' Test::Fork: '0.02' Test::More: '0.88' + Test::NoWarnings: '1.00' configure_requires: ExtUtils::Constant: '0.22' ExtUtils::PkgConfig: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 7.38, CPAN::Meta::Converter version 2.150010' +generated_by: 'ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -20,16 +21,10 @@ directory: - t - inc -recommends: - ExtUtils::Constant: '0.23' - ExtUtils::PkgConfig: '0' - Math::Trig: '0' - Test::Fork: '0.02' - Test::More: '0.88' requires: Math::Trig: '0' resources: - license: http://dev.perl.org/licenses/ - repository: http://github.com/lstein/Perl-GD -version: '2.76' + license: https://dev.perl.org/licenses/ + repository: git://github.com/lstein/Perl-GD.git +version: '2.78' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GD-2.76/Makefile.PL new/GD-2.78/Makefile.PL --- old/GD-2.76/Makefile.PL 2022-02-01 14:38:25.000000000 +0100 +++ new/GD-2.78/Makefile.PL 2023-07-04 11:12:02.000000000 +0200 @@ -72,7 +72,7 @@ Configure GD module. Options: - --options "JPEG,GD2,FT,PNG,WEBP,GIF,XPM,ANIMGIF" feature options, separated by commas + --options "JPEG,GD2,FT,PNG,WEBP,GIF,XPM,GIFANIM,WBMP,BMP" feature options, separated by commas --lib_gd_path path path to libgd (/usr/lib) --lib_ft_path path path to Freetype library (/usr) --lib_png_path path path to libpng (/usr) @@ -110,29 +110,29 @@ @INC = ("-I$lib_ft_path/include", @INC); @LIBPATH = ("-L$lib_ft_path/lib", @LIBPATH); } -if( defined($lib_png_path) ) +if( defined($lib_png_path) ) { print "PNG library used from: $lib_png_path\n"; @INC = ("-I$lib_png_path/include", @INC); - @LIBPATH = ("-L$lib_png_path/lib", @LIBPATH); + @LIBPATH = ("-L$lib_png_path/lib", @LIBPATH); } -if( defined($lib_jpeg_path) ) +if( defined($lib_jpeg_path) ) { print "JPEG library used from: $lib_jpeg_path\n"; @INC = ("-I$lib_jpeg_path/include", @INC); - @LIBPATH = ("-L$lib_jpeg_path/lib", @LIBPATH); + @LIBPATH = ("-L$lib_jpeg_path/lib", @LIBPATH); } -if( defined($lib_xpm_path) ) +if( defined($lib_xpm_path) ) { print "XPM library used from: $lib_xpm_path\n"; @INC = ("-I$lib_xpm_path/include", @INC); - @LIBPATH = ("-L$lib_xpm_path/lib", @LIBPATH); + @LIBPATH = ("-L$lib_xpm_path/lib", @LIBPATH); } -if( defined($lib_zlib_path) ) +if( defined($lib_zlib_path) ) { print "Zlib library used from: $lib_zlib_path\n"; @INC = ("-I$lib_zlib_path/include", @INC); - @LIBPATH = ("-L$lib_zlib_path/lib", @LIBPATH); + @LIBPATH = ("-L$lib_zlib_path/lib", @LIBPATH); } if( defined($lib_tiff_path) ) { @@ -150,25 +150,25 @@ { print "WEBP library used from: $lib_webp_path\n"; @INC = ("-I$lib_webp_path/include", @INC); - @LIBPATH = ("-L$lib_webp_path/lib", @LIBPATH); + @LIBPATH = ("-L$lib_webp_path/lib", @LIBPATH); } if( defined($lib_raqm_path) ) { print "RAQM library used from: $lib_raqm_path\n"; @INC = ("-I$lib_raqm_path/include", @INC); - @LIBPATH = ("-L$lib_raqm_path/lib", @LIBPATH); + @LIBPATH = ("-L$lib_raqm_path/lib", @LIBPATH); } if( defined($lib_heif_path) ) { print "HEIF library used from: $lib_heif_path\n"; @INC = ("-I$lib_heif_path/include", @INC); - @LIBPATH = ("-L$lib_heif_path/lib", @LIBPATH); + @LIBPATH = ("-L$lib_heif_path/lib", @LIBPATH); } if( defined($lib_avif_path) ) { print "AVIF library used from: $lib_avif_path\n"; @INC = ("-I$lib_avif_path/include", @INC); - @LIBPATH = ("-L$lib_avif_path/lib", @LIBPATH); + @LIBPATH = ("-L$lib_avif_path/lib", @LIBPATH); } if( defined($gdlib_config_path) ) { @@ -230,8 +230,8 @@ ################################################################################################################## # If build options have not been passed in then prompt for settings ################################################################################################################## -my ($JPEG, $GD2, $FT, $XPM, $GIF,$ANIMGIF,$UNCLOSEDPOLY,$FONTCONFIG,$PNG,$TIFF, - $WEBP,$RAQM,$WBMP,$FTCIRCLE,$VERSION_33, $HEIF, $AVIF); +my ($JPEG, $GD2, $FT, $XPM, $GIF,$GIFANIM,$UNCLOSEDPOLY,$FONTCONFIG,$PNG,$TIFF, + $WEBP,$RAQM,$WBMP,$BMP,$FTCIRCLE,$VERSION_33, $HEIF, $AVIF); if( defined($options) ) { # WBMP is builtin since at least 1.8.0 @@ -241,7 +241,12 @@ $JPEG = $options =~ m/JPEG/i; $GD2 = $options =~ m/GD2/i; $FT = $options =~ m/FT|FREETYPE/i; - $XPM = $options =~ m/XPM/i; + $XPM = $options =~ m/XPM/i && join(' ',@LIBS) =~ m/X11/; + # strawberry has -lXpm without -lX11 + if (!$XPM && join(' ',@LIBS) =~ m/-lXpm/) { + print "Remove -lXpm and XPM feature without -lX11\n" if $options =~ m/XPM/i; + @LIBS = grep { $_ ne '-lXpm' } @LIBS; + } $GIF = $options =~ m/GIF/i; $PNG = $options =~ m/PNG/i; $TIFF = $options =~ m/TIFF/i; @@ -249,7 +254,8 @@ $RAQM = $options =~ m/RAQM/i; $HEIF = $options =~ m/HEIF/i; $AVIF = $options =~ m/AVIF/i; - $ANIMGIF = $GIF && $options =~ m/ANIMGIF/i; + $BMP = $options =~ m/WINDOWS_BMP/i; + $GIFANIM = $GIF && $options =~ m/GIFANIM/i; $VERSION_33= $options =~ m/VERSION_33/i; # i.e. 2.0.33 or higher $UNCLOSEDPOLY = $options =~ m/UNCLOSEDPOLY/i; $FONTCONFIG = $options =~ m/FONTCONFIG/i; @@ -257,24 +263,25 @@ } else { - warn "\nPlease choose the features that match how libgd was built:\n"; - $WBMP = 1; - $JPEG = lc prompt('Build JPEG support?','y') eq 'y'; - $PNG = lc prompt('Build PNG support?','y') eq 'y'; - $GD2 = lc prompt('Build GD2 support?','y') eq 'y'; - $TIFF = lc prompt('Build TIFF support?','y') eq 'y'; - $WEBP = lc prompt('Build WEBP support?','y') eq 'y'; - $RAQM = lc prompt('Build RAQM support?','y') eq 'y'; - $HEIF = lc prompt('Build HEIF support?','y') eq 'y'; - $AVIF = lc prompt('Build AVIF support?','y') eq 'y'; - $FT = lc prompt('Build FreeType support?','y') eq 'y'; - if ($FT) { - $FONTCONFIG = lc prompt('Build fontconfig support?','y') eq 'y'; - $FTCIRCLE = lc prompt('Build with FTCircle support?','y') eq 'y'; - } - $GIF = lc prompt('Build GIF support?','y') eq 'y'; - $ANIMGIF = $GIF && lc prompt('Build support for animated GIFs?','y') eq 'y'; - $XPM = $^O !~ /^freebsd|MSWin32$/ && lc prompt('Build XPM support?','y') eq 'y'; + warn "\nPlease choose the features that match how libgd was built:\n"; + $WBMP = 1; + $JPEG = lc prompt('Build JPEG support?','y') eq 'y'; + $PNG = lc prompt('Build PNG support?','y') eq 'y'; + $GD2 = lc prompt('Build GD2 support?','y') eq 'y'; + $TIFF = lc prompt('Build TIFF support?','y') eq 'y'; + $WEBP = lc prompt('Build WEBP support?','y') eq 'y'; + $RAQM = lc prompt('Build RAQM support?','y') eq 'y'; + $HEIF = lc prompt('Build HEIF support?','y') eq 'y'; + $AVIF = lc prompt('Build AVIF support?','y') eq 'y'; + $FT = lc prompt('Build FreeType support?','y') eq 'y'; + if ($FT) { + $FONTCONFIG = lc prompt('Build fontconfig support?','y') eq 'y'; + $FTCIRCLE = lc prompt('Build with FTCircle support?','y') eq 'y'; + } + $GIF = lc prompt('Build GIF support?','y') eq 'y'; + $GIFANIM = $GIF && lc prompt('Build support for animated GIFs?','y') eq 'y'; + $XPM = $^O !~ /^freebsd|MSWin32$/ && lc prompt('Build XPM support?','y') eq 'y'; + $BMP = lc prompt('Build BMP support?','y') eq 'y'; } ################################################################################################################## @@ -297,10 +304,12 @@ push @INC, '-I/lib_root/ft2/include/freetype' if ($FT && $^O eq 'VMS'); push @INC, '-I/X11' if ($XPM && $^O eq 'VMS'); - # FreeBSD 3.3 with libgd built from ports croaks if -lXpm is specified - if ($^O ne 'freebsd' && $^O ne 'MSWin32') { - push @LIBS,'-lX11','-lXpm' if $XPM; + # FreeBSD 3.3 with libgd built from ports croaks if -lXpm is specified + if ($^O ne 'freebsd' && $^O ne 'MSWin32') { + push @LIBS,'-lX11','-lXpm' if $XPM; } +} else { + print "External LIBS: ", join(' ',$ENV{'GD_LIBS'},@LIBPATH,@LIBS),"\n"; } my $CAPI = defined $ExtUtils::MakeMaker::CAPI_support; @@ -314,7 +323,7 @@ $DEFINES .= ' -DHAVE_PNG' if $PNG; $DEFINES .= ' -DHAVE_TIFF' if $TIFF; $DEFINES .= ' -DFCGI' if $FCGI; -$DEFINES .= ' -DHAVE_ANIMGIF' if $ANIMGIF; +$DEFINES .= ' -DHAVE_GIFANIM' if $GIFANIM; $DEFINES .= ' -DVERSION_33' if $VERSION_33; $DEFINES .= ' -DHAVE_UNCLOSEDPOLY' if $UNCLOSEDPOLY; $DEFINES .= ' -DHAVE_FONTCONFIG' if $FONTCONFIG; @@ -323,6 +332,7 @@ $DEFINES .= ' -DHAVE_RAQM' if $RAQM; $DEFINES .= ' -DHAVE_HEIF' if $HEIF; $DEFINES .= ' -DHAVE_AVIF' if $AVIF; +$DEFINES .= ' -DHAVE_BMP' if $BMP; # since 2.1.0 $DEFINES .= " -DLIBGD_VERSION=\"$LIBGD_VERSION\"" if defined($LIBGD_VERSION); open F,">.config.cache"; print F $DEFINES,"\n"; @@ -332,10 +342,17 @@ $CCFLAGS .= " -Wall -Wextra -Wformat=1" if $Config{gccversion} and $] > 5.020; # hardened CFLAGS for testing #$CCFLAGS .= ' -D_GNU_SOURCE -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches'; +my $LDDLFLAGS = $Config{lddlflags}; +# fixup mingw linker problems with empty weak symbols +$LDDLFLAGS .= " -Wl,--verbose" if $Config{gccversion} and $^O eq 'MSWin32'; +my $LD = $Config{ld}; +if ($LD eq 'g++' and $^O eq 'MSWin32') { + $LD = 'gcc'; +} my %WriteMakefileArgs = ( 'NAME' => 'GD', - 'ABSTRACT' => 'Perl interface to the gd2 graphics library', + 'ABSTRACT' => 'Perl interface to the libgd graphics library', 'VERSION_FROM' => 'lib/GD.pm', 'PREREQ_PM' => { 'Math::Trig' => 0, @@ -347,35 +364,44 @@ 'TEST_REQUIRES' => { 'Test::More' => 0.88, 'Test::Fork' => 0.02, + 'Test::NoWarnings' => '1.00', }, 'PL_FILES' => {'bdf_scripts/bdf2gdfont_pl.PL' => 'bdf_scripts/bdf2gdfont.pl', 'lib/GD/Image_pm.PL' => 'lib/GD/Image.pm'}, 'LIBS' => [join(' ',$ENV{'GD_LIBS'},@LIBPATH,@LIBS)], 'INC' => join(' ',$ENV{'GD_INC'},@INC), + 'LD' => $LD, 'CCFLAGS' => $CCFLAGS, + 'LDDLFLAGS' => $LDDLFLAGS, 'EXE_FILES' => ['bdf_scripts/bdf2gdfont.pl'], 'AUTHOR' => 'Lincoln Stein <[email protected]>', # Maintained by Reini Urban now $CAPI ? ('CAPI' => 'TRUE') : (), 'DEFINE' => $DEFINES, - 'clean' => { + 'clean' => { FILES => '.config.cache cover_db MANIFEST.git *.gcov GD.gcda GD.gcno' .' META.yml META.json' }, 'LICENSE' => 'perl_5', 'META_MERGE' => { + "meta-spec" => { version => 2 }, recommends => { 'ExtUtils::PkgConfig' => 0, 'Math::Trig' => 0, 'ExtUtils::Constant'=> '0.23', 'Test::More' => '0.88', 'Test::Fork' => '0.02', + 'Test::NoWarnings' => '1.00', }, resources => { - repository => 'http://github.com/lstein/Perl-GD', - license => 'http://dev.perl.org/licenses/', + repository => { + web => "https://github.com/lstein/Perl-GD", + url => "git://github.com/lstein/Perl-GD.git", + type => 'git', + }, + license => "https://dev.perl.org/licenses/", }, prereqs => { develop => { @@ -387,6 +413,7 @@ 'Pod::Spell::CommonMistakes' => 0, 'Test::Pod' => '1.00', 'Algorithm::Diff' => 0, + 'Test::NoWarnings' => '1.00', }, }, }, @@ -598,11 +625,15 @@ $options = $features; my ($release, $major, $minor) = $version =~ /^(\d+)\.(\d+)\.(\d+)/; - $options .= " GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33" + $options .= " GD_UNCLOSEDPOLY GD_FTCIRCLE VERSION_33" if defined($minor) && ($release > 2 || ($release == 2 && $major > 0) || ($release == 2 && $major == 0 && $minor >= 33)); + $options .= " WINDOWS_BMP" + if defined($minor) + && ($release > 2 + || ($release == 2 && $major > 0)); if (defined($minor) && ($release > 2 || ($release == 2 && $major > 3) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GD-2.76/README new/GD-2.78/README --- old/GD-2.76/README 2019-02-12 12:01:02.000000000 +0100 +++ new/GD-2.78/README 2023-05-29 09:07:19.000000000 +0200 @@ -17,7 +17,7 @@ h. support for spline curves, via GD::Polyline i. support for symbolic font names, such as "helvetica:italic" j. support for symbolic color names, such as "green", via GD::Simple -k. produces output in png, gif, jpeg and xbm format +k. produces output in png, gif, jpeg, xbm and other formats supported by libgd l. produces output in svg format via GD::SVG. For full information on usage, see the accompanying man and html @@ -178,7 +178,7 @@ GD::SVG, which is available separately on CPAN, provides a subset of GD method calls. For this subset, you can create images in SVG -(scaleable vector graphics) format. +(scalable vector graphics) format. THE QUICKDRAW LIBRARY @@ -264,7 +264,7 @@ The latest ActiveState binaries for Win32 systems come with GD already compiled in and ready to go. I don't own any Win32 systems, and cannot provide you with help in compiling GD from scratch on such - systems. + systems. Github actions and appveyor are used to test the windows builds. 9. GD won't compile on system XX. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GD-2.76/SIGNATURE new/GD-2.78/SIGNATURE --- old/GD-2.76/SIGNATURE 2022-02-01 15:50:36.000000000 +0100 +++ new/GD-2.78/SIGNATURE 2023-07-04 11:12:41.000000000 +0200 @@ -1,5 +1,5 @@ This file contains message digests of all files listed in MANIFEST, -signed via the Module::Signature module, version 0.87. +signed via the Module::Signature module, version 0.88. To verify the content in this distribution, first make sure you have Module::Signature installed, then type: @@ -14,15 +14,15 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 -SHA256 59820e4846652a040650fab629ef441d6216f4f70e60e054942d7a712423d4a2 ChangeLog -SHA256 2efcf17f9117611e16de1f53deda8231307dd843e806b3eb9ce75b3541057bef GD.xs +SHA256 dbb094246b77cc9efe1933d3bd222d5cdaef1108facdfec54f9ca11b54be7255 ChangeLog +SHA256 0b8b34e17c938acaf2c686bd45d3b34feddc9dc7baac119c4103778064ab233c GD.xs SHA256 1e2250289d6df4ba1c24f7550982d7ffaff2c97cd02e847659406e1afd28e83f LICENSE -SHA256 c88c6bc156d41e3caa2cf4f9521f56903feeb43793a375a170f871111ac3ef1f MANIFEST +SHA256 76cc90e4a381e2ff22e1e871def956e28ba3d65d9ff49bfd5234895c8c88b953 MANIFEST SHA256 51cf5b6389b11ec8ec1d097acca1a21b19fcfb7f628b6955e78040388bcde56e MANIFEST.SKIP -SHA256 7b08ec572a198e566bfacd5b14dfd43a67b29a9f772074d79348e78e1baa1622 META.json -SHA256 1145de241c5348b08845b1c30aef32e83533b390be41fabe60bfe6df8cc675b3 META.yml -SHA256 42e3c38d7b4c3b81e3cb764ce720108bcd55b5c2a6d9510917897dcb4c05bcf4 Makefile.PL -SHA256 817323f9893727cee009cf383426982e00bcb13e84f25dcab039a77c9077e025 README +SHA256 05f6ab2d750252b8bf65a7533f215163f7b1854f6ac624e2b5c73290d9978193 META.json +SHA256 c431da110702fa0acab96a575166e939e236c79801db65554a346b4cc80b0b39 META.yml +SHA256 9d65af42c76b870890bf835dca096022e5bfef4e3b45788b9491262aa1bfdcd4 Makefile.PL +SHA256 8ca417a6dc173c495e6f740ed0b58f439d8ac67875c6ea93ced9d7fb6234e559 README SHA256 fd15127ae2613fa8a6ea308371cf256a89654c64aa39d2cd4da6fa445b4bf094 README.QUICKDRAW SHA256 2be4d75aad4a18cfa9da42c3f2ac46c22f7c1798d9be5b09d591ea8dd3c6c94a bdf_scripts/README SHA256 4d92f1e9396b93ccb5349d6cff5cbbb362905bfd8186013c1b40d341ea6fc5f3 bdf_scripts/bdf2gdfont_pl.PL @@ -44,16 +44,17 @@ SHA256 e91060fff5e229f72f0499f40b67a4e842b9c6f817f152e26fe301027521f4e6 demos/transform.pl SHA256 855052638bff1622bad600fe5bdad5fd4c92321eceefd18b4cee1dcb336cab38 demos/truetype_test SHA256 278cf272eb8a93a1e850fa54e815e450c48a3e2c25c57ecc54034cb398dd5646 demos/ttf.pl -SHA256 687ed090605a2580d4a956db15a9babb758b26238a20ff4234f088862e7be863 lib/GD.pm +SHA256 e351911ac23e42b6c0470ce25f9836cc92c6bd90f897b1c1e1770d83f3051fa0 lib/GD.pm SHA256 a5c8d2674d72cc5fccb54aedf6665b524a52ce86b3852e6767fbde74141274fc lib/GD/Group.pm -SHA256 faabca355f4a8181bc02967026045aa7456ae55921ef06fad6160babe0755f2a lib/GD/Image.pm -SHA256 98f01346b50b131d61bf3dc1da7d7aef580d99ce3c3d62a54907215a1eda5cc5 lib/GD/Image_pm.PL -SHA256 3144437f39c3b1b8cb1d266d0370bd51c260a9d5e14824619ef6889f34ee7935 lib/GD/Polygon.pm +SHA256 960849a0bc1663f4bf2e1dc926f0f50d87f04f93e8adb8a9ec2b10c5e0fa0213 lib/GD/Image.pm +SHA256 0e3b26c5f58642aa2fff3a419718ce3d159613c96cd3fcf3b9dfadd7f5cadf00 lib/GD/Image_pm.PL +SHA256 4ed3a88e7b9c2e709f86c3599a45163239d36b62b341fb11769e70a8cb96c048 lib/GD/Polygon.pm SHA256 3ebe1c4f9224d59a632186445f127729debcf2d36833c0a2a6ea7c22d6e83802 lib/GD/Polyline.pm SHA256 19cf8d16f8f430eef4b22af0d1deeed9ed0ae31b10dc82dd2bf628d058378a7a lib/GD/Simple.pm SHA256 357ed3cad3c6efc3937d544f21ea275e9e14f200fb5bc8606f47e11f7aba980c t/GD.t SHA256 0444099f93e5564e7aed93a99037d5a2d8b0179107efe670c3c4ef59a58b5691 t/HSV.t SHA256 f2d7cc77efeaa1af76d10e5aee57447ada1d0ddcb3e037877e3dd4918d7b0290 t/Polyline.t +SHA256 88a8bc61ab6e6d7dbde28668e51bbf12714cf93654110e8539951bbfcbd47691 t/caller.t SHA256 72230075340aaa8c56e0b4d9605a05b90d34a26923d149e9ec24342a38940aaa t/fork.t SHA256 053128eeff24a4357fd0cd2ff272ffdf6bce8f387699c6d3c8400948b063f833 t/test_data/Generic.ttf SHA256 45c0fa1761b9d4303209aee4719b93c7e8032fbf473e134dccab0adc0af78b31 t/test_data/frog.jpg @@ -101,22 +102,24 @@ SHA256 f3dcf8c35db5a8efb91fa3b6343ed877dd9a097cf5bc8fb59ea26e57e764a51b t/test_data/tile.gif SHA256 7fc4cabf75a1265bdbdb490b19843813f3c092949bf24502a80cce014b9187ab t/test_data/tile.jpeg SHA256 d1d9bb1fbcf22a008f7daff62f0c02d9983ff3ace2d504363c7aa73db8da863e t/test_data/tile.png +SHA256 bd19cb90fc148fff24a75c312c9761e28471d6156dd642a810e5394177ed46dd t/test_data/windows.bmp SHA256 5d56264c29e72427573cb329360b4c91937638dcb98d460f64c3ce142836677b t/transp.t +SHA256 10dd4cc144a109c4c33a761454e2ad76df3dd6d080c88768a5ae6c88b49d289c t/windows_bmp.t SHA256 04df534e56f8031e065153e3c80f5c7ae93f83aba8d5df58e3449e2fbe324d98 t/z_kwalitee.t -SHA256 67f785a86f4a20c8512e294a30441fae93246a6c0ace0a925fafa31f765339ca t/z_manifest.t +SHA256 89445d163e2a24a2229ab9e6fca0d96f4f01a5ba051388d9b864a4e41c277589 t/z_manifest.t SHA256 f60c3190f3d4a3f79cd000071ce34cc6de122abaac9649ccc6371385366fca52 t/z_pod-spell-mistakes.t SHA256 20745a3f76d051aed139c90e33416e116b7a6d76b840151545c23cbfe5581528 t/z_pod.t -SHA256 a32349bfd3e37c8cff1ece90b6ebfa4871a2ab36aef838cf44d31be050fb66b7 testcpan.sh +SHA256 747c066bfdc7f458de8ea00574d1433161dfa49f0a81eceea70003196b9e5ece testcpan.sh SHA256 c686a6e1baa8214bdd64ece68263ad96d335eb964b7202eb040003e83da96c60 testlibs.sh SHA256 15513754e6de8f9d0d297935e78568953431754ac3d735cf95092afb55955532 typemap -----BEGIN PGP SIGNATURE----- -iQEzBAEBAwAdFiEEKJWogdNCcPq/6PdHtPYzOeZdZBQFAmH5SLwACgkQtPYzOeZd -ZBS2dwgAjTIhGLLbSbG1o8qh5sl3Apg1UNcSFwZSA86Kqqu9kZ1lulQxjtNHsRaY -DDpHMt9/X8by2/OLqNvelUM8iqdqRYNZ+ZRYTU056TcIirpWG8SUjU2TdbZ9E2hD -+SbWlN+x7/p2Xztq6b8GTx2qHSHc5RfR1lxTSppI+f9YpdycNsFxFnIhbFhCn6SR -oBDudheYtMCsOuSNO0bimBqk/X96HurmVTdgHwm70sqgdFz4KZRkk9fg4TyFP18r -KnN1j05meBk/z9UKwF4JkzvJjB0RBYITlXG1Q4/7HbduNrpapo7n+D0WF8nOSPNT -/JS2vrvdpByd5irqkb8HLiFDjANdkA== -=dkVA +iQEzBAEBAwAdFiEEKJWogdNCcPq/6PdHtPYzOeZdZBQFAmSj4okACgkQtPYzOeZd +ZBTN0gf/SybYJS+hEnjABI9Y9qjYKLDMjyvTf5dtzVpKZt0oV99CsMPqh0WTNVwD +DeraIfOUz3Fbffx/UtlCQrd7RWi1noyKEV3HuxPrP15s/lBO4ycJWdj8kj4rcmi0 +Y6+nWgSnDqcfuFcT5MUuXI1qxyrXgA/1Gt9lfwN/MjVl33zH29leYoJmm/qTOrXj +h08G92HhBm0ZFZ5WlwZ1S2uPYV5O4W0yJexpvXj4PSsPyCJbSOh9gW5pjMX6ESRw +3HdlfmkweGTL8aLrGan+4HBhpDQQ/SIgSwjrKsC0XNHy53EV670q1FxmUKq3Dusw +0z/L9fcwPYTzicTBVDgTIrd2Ddw6yQ== +=rZDu -----END PGP SIGNATURE----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GD-2.76/lib/GD/Image.pm new/GD-2.78/lib/GD/Image.pm --- old/GD-2.76/lib/GD/Image.pm 2022-02-01 15:50:31.000000000 +0100 +++ new/GD-2.78/lib/GD/Image.pm 2023-07-04 11:12:02.000000000 +0200 @@ -5,7 +5,7 @@ use GD; use Symbol 'gensym','qualify_to_ref'; use vars '$VERSION'; -$VERSION = '2.75'; +$VERSION = '2.77'; =head1 NAME @@ -29,18 +29,16 @@ =item Tiff -=item Xpm - =item WBMP -=item GifAnim - =item Webp =item Heif =item Avif +=item BMP + =back Unsupported Image formats: @@ -51,6 +49,10 @@ =item Gd2 +=item Xpm + +=item GifAnim + =back See L<GD> @@ -90,7 +92,8 @@ my $fh; { local $^W = 0; # to avoid uninitialized variable warning from Symbol.pm - $fh = qualify_to_ref($thing,caller(2)); + my $pkg = caller(2) ? caller(2) : "main"; + $fh = qualify_to_ref($thing,$pkg); } return $fh if defined(fileno $fh); @@ -270,6 +273,15 @@ $class->_newFromWBMP($fh,@_); } +sub newFromBmp { + croak("Usage: newFromBmp(class,filehandle)") unless @_==2; + my($class) = shift; + my($f) = shift; + my $fh = $class->_make_filehandle($f); + binmode($fh); + $class->_newFromBmp($fh,@_); +} + # Autoload methods go after __END__, and are processed by the autosplit program. 1; __END__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GD-2.76/lib/GD/Image_pm.PL new/GD-2.78/lib/GD/Image_pm.PL --- old/GD-2.76/lib/GD/Image_pm.PL 2022-02-01 15:50:31.000000000 +0100 +++ new/GD-2.78/lib/GD/Image_pm.PL 2023-07-04 11:12:02.000000000 +0200 @@ -29,7 +29,7 @@ use GD; use Symbol 'gensym','qualify_to_ref'; use vars '$VERSION'; -$VERSION = '2.75'; +$VERSION = '2.77'; =head1 NAME @@ -54,10 +54,11 @@ print OUT "=item Tiff\n\n" if $DEFINES =~ /HAVE_TIFF/; print OUT "=item Xpm\n\n" if $DEFINES =~ /HAVE_XPM/; print OUT "=item WBMP\n\n" if 1 or $DEFINES =~ /HAVE_WBMP/; -print OUT "=item GifAnim\n\n" if $DEFINES =~ /HAVE_ANIMGIF/; +print OUT "=item GifAnim\n\n" if $DEFINES =~ /HAVE_GIFANIM/; print OUT "=item Webp\n\n" if $DEFINES =~ /HAVE_WEBP/; print OUT "=item Heif\n\n" if $DEFINES =~ /HAVE_HEIF/; print OUT "=item Avif\n\n" if $DEFINES =~ /HAVE_AVIF/; +print OUT "=item BMP\n\n" if $DEFINES =~ /HAVE_BMP/; print OUT << '!NO!SUBS!'; =back @@ -74,10 +75,11 @@ print OUT "=item Jpeg\n\n" if $DEFINES !~ /HAVE_JPEG/; print OUT "=item Tiff\n\n" if $DEFINES !~ /HAVE_TIFF/; print OUT "=item Xpm\n\n" if $DEFINES !~ /HAVE_XPM/; -print OUT "=item GifAnim\n\n" if $DEFINES !~ /HAVE_ANIMGIF/; +print OUT "=item GifAnim\n\n" if $DEFINES !~ /HAVE_GIFANIM/; print OUT "=item Webp\n\n" if $DEFINES !~ /HAVE_WEBP/; print OUT "=item Heif\n\n" if $DEFINES !~ /HAVE_HEIF/; print OUT "=item Avif\n\n" if $DEFINES !~ /HAVE_AVIF/; +print OUT "=item BMP\n\n" if $DEFINES !~ /HAVE_BMP/; print OUT << '!NO!SUBS!'; =back @@ -119,7 +121,8 @@ my $fh; { local $^W = 0; # to avoid uninitialized variable warning from Symbol.pm - $fh = qualify_to_ref($thing,caller(2)); + my $pkg = caller(2) ? caller(2) : "main"; + $fh = qualify_to_ref($thing,$pkg); } return $fh if defined(fileno $fh); @@ -370,6 +373,20 @@ } !NO!SUBS! +} + +if ($DEFINES =~ /HAVE_BMP/) { + print OUT <<'!NO!SUBS!'; +sub newFromBmp { + croak("Usage: newFromBmp(class,filehandle)") unless @_==2; + my($class) = shift; + my($f) = shift; + my $fh = $class->_make_filehandle($f); + binmode($fh); + $class->_newFromBmp($fh,@_); +} + +!NO!SUBS! } print OUT <<'!NO!SUBS!'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GD-2.76/lib/GD/Polygon.pm new/GD-2.78/lib/GD/Polygon.pm --- old/GD-2.76/lib/GD/Polygon.pm 2022-02-01 15:50:31.000000000 +0100 +++ new/GD-2.78/lib/GD/Polygon.pm 2023-05-29 09:07:20.000000000 +0200 @@ -4,7 +4,7 @@ use Carp 'carp'; use GD; use vars '$VERSION'; -$VERSION = '2.76'; +$VERSION = '2.77'; # old documentation error *GD::Polygon::delete = \&deletePt; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GD-2.76/lib/GD.pm new/GD-2.78/lib/GD.pm --- old/GD-2.76/lib/GD.pm 2022-02-01 15:50:31.000000000 +0100 +++ new/GD-2.78/lib/GD.pm 2023-07-04 11:12:02.000000000 +0200 @@ -16,7 +16,7 @@ use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD); -$VERSION = '2.76'; +$VERSION = '2.78'; our $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -300,7 +300,7 @@ Alternatively, you may create a GD::Image object based on an existing image by providing an open filehandle, a filename, or the image data itself. The image formats automatically recognized and accepted are: -GIF, PNG, JPEG, XBM, XPM, GD2, TIFF, WEBP, HEIF or AVIF. Other formats, +GIF, PNG, JPEG, XBM, XPM, BMP, GD2, TIFF, WEBP, HEIF or AVIF. Other formats, including WBMP, and GD version 1, cannot be recognized automatically at this time. @@ -407,16 +407,28 @@ There is no newFromXbmData() function, because there is no corresponding function in the gd library. -=item B<$image = GD::Image-E<gt>newFromWBMP($file, [$truecolor])> +=item B<$image = GD::Image-E<gt>newFromWBMP($file)> This works in exactly the same way as C<newFromPng>, but reads the -contents of an Windows BMP Bitmap file: +contents of a Wireless Application Protocol Bitmap (WBMP) file: + + open (WBMP,"coredump.wbmp") || die; + $myImage = GD::Image->newFromWBMP(\*WBMP) || die; + close WBMP; + +There is no newFromWBMPData() function, because there is no +corresponding function in the gd library. + +=item B<$image = GD::Image-E<gt>newFromBmp($file)> + +This works in exactly the same way as C<newFromPng>, but reads the +contents of a Windows Bitmap (BMP) file: open (BMP,"coredump.bmp") || die; - $myImage = GD::Image->newFromWBMP(\*BMP) || die; + $myImage = GD::Image->newFromBmp(\*BMP) || die; close BMP; -There is no newFromWBMPData() function, because there is no +There is no newFromBmpData() function, because there is no corresponding function in the gd library. =item B<$image = GD::Image-E<gt>newFromGd($file)> @@ -616,6 +628,13 @@ Same as gd(), except that it returns the data in compressed GD2 format. +=item B<$bmpdata = $image-E<gt>bmp([$compression])> + +This returns the image data in BMP format, which is a Windows Bitmap. +If compression is set to 1, it will use RLE compression on the pixel +data; otherwise, setting it to 0 (the default) will leave the BMP +pixel data uncompressed. + =item B<$wbmpdata = $image-E<gt>wbmp([$foreground])> This returns the image data in WBMP format, which is a black-and-white diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GD-2.76/t/caller.t new/GD-2.78/t/caller.t --- old/GD-2.76/t/caller.t 1970-01-01 01:00:00.000000000 +0100 +++ new/GD-2.78/t/caller.t 2023-07-04 11:12:02.000000000 +0200 @@ -0,0 +1,14 @@ +# GH #47 +use strict; +use GD; +use Test::More 'no_plan'; +use Test::NoWarnings; + +# Use of uninitialized value $pkg +my $image = GD::Image->newFromPng('t/test_data/tile.png'); + +f(); +sub f +{ + my $image = GD::Image->newFromPng('t/test_data/tile.png'); +} Binary files old/GD-2.76/t/test_data/windows.bmp and new/GD-2.78/t/test_data/windows.bmp differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GD-2.76/t/windows_bmp.t new/GD-2.78/t/windows_bmp.t --- old/GD-2.76/t/windows_bmp.t 1970-01-01 01:00:00.000000000 +0100 +++ new/GD-2.78/t/windows_bmp.t 2023-05-28 20:42:27.000000000 +0200 @@ -0,0 +1,15 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use Test::More tests => 4; + +use_ok('GD'); + +my $winbmp = "t/test_data/windows.bmp"; + +my $im = GD::Image->newFromBmp($winbmp); + +ok defined($im), "windows bmp does not return undef"; +is $im->width, 2, "windows bmp has width 2"; +is $im->height, 2, "windows bmp has height 2"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GD-2.76/t/z_manifest.t new/GD-2.78/t/z_manifest.t --- old/GD-2.76/t/z_manifest.t 2022-01-26 20:30:47.000000000 +0100 +++ new/GD-2.78/t/z_manifest.t 2023-05-29 09:07:20.000000000 +0200 @@ -6,7 +6,7 @@ plan tests => 1; system("git ls-tree -r --name-only HEAD |" - ." egrep -v '(.gitignore|.appveyor.yml|.whitesource|.github|.travis.yml)' >MANIFEST.git"); + ." grep -E -v '(.gitignore|.appveyor.yml|.whitesource|.github|.travis.yml)' >MANIFEST.git"); if (-e "MANIFEST.git") { #diag "MANIFEST.git created with git ls-tree"; is(`diff -bu MANIFEST.git MANIFEST`, "", "MANIFEST.git compared to MANIFEST") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GD-2.76/testcpan.sh new/GD-2.78/testcpan.sh --- old/GD-2.76/testcpan.sh 2022-01-26 20:30:47.000000000 +0100 +++ new/GD-2.78/testcpan.sh 2023-05-29 09:07:20.000000000 +0200 @@ -7,4 +7,5 @@ GD::Tiler GD::Wbmp GD::Window GD::Image::AnimatedGif GD::Image::Orientation \ GD::Image::Scale2x GD::Image::Thumbnail GD::Map GD::Map::Mercator \ GD::Chart GD::Barcode GD::Arrow GD::3DBarGrapher GD::Dashboard +# wrong tests, assuming stable png ppan GD::OrgChart ++++++ GD-cflags.patch ++++++ --- /var/tmp/diff_new_pack.4XgPlc/_old 2023-07-11 15:57:46.621336712 +0200 +++ /var/tmp/diff_new_pack.4XgPlc/_new 2023-07-11 15:57:46.625336736 +0200 @@ -10,5 +10,5 @@ +$CCFLAGS .= " -Wall -Wextra" if $Config{gccversion} and $] > 5.020; # hardened CFLAGS for testing #$CCFLAGS .= ' -D_GNU_SOURCE -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches'; - + my $LDDLFLAGS = $Config{lddlflags};
