forked from pool/perl-GDGraph
- updated to 1.56 see /usr/share/doc/packages/perl-GDGraph/CHANGES 1.56 13 Jan 2023 - Improve the language explaining the 2023 update. Docs-only change. 1.55 11 Jan 2023 - Fix failing XBM test resulting from some upstream changes Fixes: https://rt.cpan.org/Ticket/Display.html?id=140940 - Skip samples tests if libgd has image support disabled, which is the default starting with version 2.3.3. See: https://github.com/libgd/libgd/issues/428 OBS-URL: https://build.opensuse.org/request/show/1160827 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-GDGraph?expand=0&rev=26
42 lines
1.3 KiB
Diff
42 lines
1.3 KiB
Diff
From 96862391296b235c60e0e36140f8ea498f70a74d Mon Sep 17 00:00:00 2001
|
|
From: Reini Urban <rurban@cpan.org>
|
|
Date: Tue, 1 Feb 2022 15:10:53 +0100
|
|
Subject: [PATCH] fix logo_xbm_noext test
|
|
|
|
causing t/bugfixes.t to fail with latest GD
|
|
provide xbm magic, which has no newFromXbmData method.
|
|
---
|
|
Graph.pm | 6 +++++-
|
|
t/images/main.c | 8 ++++++++
|
|
2 files changed, 13 insertions(+), 1 deletion(-)
|
|
create mode 100644 t/images/main.c
|
|
|
|
diff --git a/Graph.pm b/Graph.pm
|
|
index 816c99a..f12d588 100644
|
|
--- a/Graph.pm
|
|
+++ b/Graph.pm
|
|
@@ -362,6 +363,9 @@ sub _read_logo_file
|
|
$glogo = GD::Image->$gdimport(\*LOGO);
|
|
}
|
|
}
|
|
+ } elsif ($logo_path =~ /_xbm_/) { # no magic possible for xbm
|
|
+ push @tried, 'xbm';
|
|
+ $glogo = GD::Image->newFromXbm($logo_path);
|
|
# should this actually be "if (!$glogo), rather than an else?
|
|
} else { # Hail Mary, full of Grace! Blessed art thou among women...
|
|
push @tried, 'libgd best-guess';
|
|
diff --git a/t/images/main.c b/t/images/main.c
|
|
new file mode 100644
|
|
index 0000000..6d64b11
|
|
--- /dev/null
|
|
+++ b/t/images/main.c
|
|
@@ -0,0 +1,8 @@
|
|
+#include <stdio.h>
|
|
+#include "logo_xbm_noext.c"
|
|
+
|
|
+void main() {
|
|
+ FILE *f = fopen ("logo_xbm_noext", "w");
|
|
+ fwrite (logo_bits, sizeof(logo_bits), 1, f);
|
|
+ fclose (f);
|
|
+}
|