forked from pool/perl-GDGraph
Accepting request 957987 from home:pmonrealgonzalez:branches:devel:languages:perl
- Fix line endings in samples/sample64.pl - Update the spec file with spec-cleaner - Fix logo_xbm_noext test * Upstream PR: https://github.com/mgjv/GDGraph/pull/1 * Add perl-GDGraph-XBM-Magic.patch OBS-URL: https://build.opensuse.org/request/show/957987 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-GDGraph?expand=0&rev=23
This commit is contained in:
10
cpanspec.yml
10
cpanspec.yml
@@ -4,14 +4,12 @@
|
|||||||
#sources:
|
#sources:
|
||||||
# - source1
|
# - source1
|
||||||
# - source2
|
# - source2
|
||||||
#patches:
|
patches:
|
||||||
# foo.patch: -p1
|
perl-GDGraph-XBM-Magic.patch: -p1
|
||||||
# bar.patch:
|
|
||||||
#preamble: |-
|
#preamble: |-
|
||||||
# BuildRequires: gcc-c++
|
# BuildRequires: gcc-c++
|
||||||
#post_prep: |-
|
post_prep: |-
|
||||||
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
|
perl -pi -e 's/\r\n/\n/' samples/sample64.pl
|
||||||
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
|
|
||||||
#post_install: |-
|
#post_install: |-
|
||||||
# sed on %{name}.files
|
# sed on %{name}.files
|
||||||
# Dustismo font is GPL-2.0+ licensed
|
# Dustismo font is GPL-2.0+ licensed
|
||||||
|
51
perl-GDGraph-XBM-Magic.patch
Normal file
51
perl-GDGraph-XBM-Magic.patch
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
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
|
||||||
|
@@ -347,7 +347,8 @@ sub _read_logo_file
|
||||||
|
pack("H8",'ffd8ffe0') => "jpeg",
|
||||||
|
'GIF8' => "gif",
|
||||||
|
'.PNG' => "png",
|
||||||
|
- '/* X'=> "xpm", # technically '/* XPM */', but I'm hashing, here
|
||||||
|
+ '/* X' => "xpm", # technically '/* XPM */', but I'm hashing, here
|
||||||
|
+ '#def' => "xbm",
|
||||||
|
);
|
||||||
|
if (my $match = $magic{ substr $logodata, 0, 4 }) {
|
||||||
|
push @tried, $match;
|
||||||
|
@@ -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);
|
||||||
|
+}
|
@@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 28 09:34:18 UTC 2022 - Pedro Monreal <pmonreal@suse.com>
|
||||||
|
|
||||||
|
- Fix line endings in samples/sample64.pl
|
||||||
|
- Update the spec file with spec-cleaner
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 28 09:24:11 UTC 2022 - Pedro Monreal <pmonreal@suse.com>
|
||||||
|
|
||||||
|
- Fix logo_xbm_noext test
|
||||||
|
* Upstream PR: https://github.com/mgjv/GDGraph/pull/1
|
||||||
|
* Add perl-GDGraph-XBM-Magic.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 5 14:17:02 UTC 2017 - mcaj@suse.com
|
Wed Apr 5 14:17:02 UTC 2017 - mcaj@suse.com
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package perl-GDGraph
|
# spec file for package perl-GDGraph
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -12,32 +12,32 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define cpan_name GDGraph
|
||||||
Name: perl-GDGraph
|
Name: perl-GDGraph
|
||||||
Version: 1.54
|
Version: 1.54
|
||||||
Release: 0
|
Release: 0
|
||||||
%define cpan_name GDGraph
|
|
||||||
Summary: Produces charts with GD
|
Summary: Produces charts with GD
|
||||||
License: (Artistic-1.0 or GPL-1.0+) and GPL-2.0+
|
License: (Artistic-1.0 OR GPL-1.0-or-later) AND GPL-2.0-or-later
|
||||||
Group: Development/Libraries/Perl
|
Group: Development/Libraries/Perl
|
||||||
Url: http://search.cpan.org/dist/GDGraph/
|
URL: https://metacpan.org/release/GDGraph
|
||||||
Source0: http://www.cpan.org/authors/id/R/RU/RUZ/%{cpan_name}-%{version}.tar.gz
|
Source0: https://cpan.metacpan.org/modules/by-module/GD/GDGraph-%{version}.tar.gz
|
||||||
Source1: cpanspec.yml
|
Source1: cpanspec.yml
|
||||||
BuildArch: noarch
|
Patch0: perl-GDGraph-XBM-Magic.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: perl-ExtUtils-MakeMaker >= 6.76
|
BuildRequires: perl-ExtUtils-MakeMaker >= 6.76
|
||||||
BuildRequires: perl-macros
|
BuildRequires: perl-macros
|
||||||
BuildRequires: perl(Capture::Tiny) >= 0.30
|
BuildRequires: perl(Capture::Tiny) >= 0.30
|
||||||
BuildRequires: perl(GD) >= 1.18
|
BuildRequires: perl(GD) >= 1.23
|
||||||
BuildRequires: perl(GD::Text) >= 0.80
|
BuildRequires: perl(GD::Text) >= 0.80
|
||||||
BuildRequires: perl(Test::Exception) >= 0.400000
|
BuildRequires: perl(Test::Exception) >= 0.400000
|
||||||
BuildRequires: perl(Test::More) >= 0.88
|
BuildRequires: perl(Test::More) >= 0.88
|
||||||
Requires: perl(GD) >= 1.18
|
Requires: perl(GD) >= 1.23
|
||||||
Requires: perl(GD::Text) >= 0.80
|
Requires: perl(GD::Text) >= 0.80
|
||||||
|
BuildArch: noarch
|
||||||
%{perl_requires}
|
%{perl_requires}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -45,13 +45,15 @@ Produces charts with GD
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{cpan_name}-%{version}
|
%setup -q -n %{cpan_name}-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
perl -pi -e 's/\r\n/\n/' samples/sample64.pl
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
perl Makefile.PL INSTALLDIRS=vendor
|
||||||
%{__make} %{?_smp_mflags}
|
%make_build
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{__make} test
|
%make_build test
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%perl_make_install
|
%perl_make_install
|
||||||
@@ -60,6 +62,7 @@ Produces charts with GD
|
|||||||
|
|
||||||
%files -f %{name}.files
|
%files -f %{name}.files
|
||||||
%defattr(-,root,root,755)
|
%defattr(-,root,root,755)
|
||||||
%doc CHANGES Dustismo.LICENSE Dustismo_Sans.ttf README samples
|
%license Dustismo.LICENSE
|
||||||
|
%doc CHANGES Dustismo_Sans.ttf README samples
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user