#
# spec file for package perl-GDGraph
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%define cpan_name GDGraph
Name:           perl-GDGraph
Version:        1.54
Release:        3.9
Summary:        Produces charts with GD
License:        (Artistic-1.0 OR GPL-1.0-or-later) AND GPL-2.0-or-later
Group:          Development/Libraries/Perl
URL:            https://metacpan.org/release/GDGraph
Source0:        https://cpan.metacpan.org/modules/by-module/GD/GDGraph-%{version}.tar.gz
Source1:        cpanspec.yml
Patch0:         perl-GDGraph-XBM-Magic.patch
BuildRequires:  perl
BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires:  perl-macros
BuildRequires:  perl(Capture::Tiny) >= 0.30
BuildRequires:  perl(GD) >= 1.23
BuildRequires:  perl(GD::Text) >= 0.80
BuildRequires:  perl(Test::Exception) >= 0.400000
BuildRequires:  perl(Test::More) >= 0.88
Requires:       perl(GD) >= 1.23
Requires:       perl(GD::Text) >= 0.80
BuildArch:      noarch
%{perl_requires}

%description
Produces charts with GD

%prep
%setup -q -n %{cpan_name}-%{version}
%patch0 -p1
perl -pi -e 's/\r\n/\n/' samples/sample64.pl

%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build

%check
%make_build test

%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist

%files -f %{name}.files
%defattr(-,root,root,755)
%license Dustismo.LICENSE
%doc CHANGES Dustismo_Sans.ttf README samples

%changelog
* Mon Feb 28 2022 Pedro Monreal <pmonreal@suse.com>
- Fix line endings in samples/sample64.pl
- Update the spec file with spec-cleaner
* Mon Feb 28 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 2017 mcaj@suse.com
- added perl-ExtUtils-MakeMaker to Build requires
  that fixed build for SLE-12-SP2 and openSUSE leap 42.x
* Wed Nov 23 2016 coolo@suse.com
- remove GDGraph-trim_miter.diff as still not upstream
* Wed Nov 23 2016 coolo@suse.com
- updated to 1.54
  see /usr/share/doc/packages/perl-GDGraph/CHANGES
  1.54 21 Nov 2016
  - Disable two Y axes alignment when any y[12]_{min,max}_value is defined
    RT#62665
* Sat Jul  9 2016 coolo@suse.com
- updated to 1.53
  see /usr/share/doc/packages/perl-GDGraph/CHANGES
  1.53 08 Jul 2016
  - Fix 'Illegal division by zero' when x_min_value and x_max_value
    are defined and x_tick_number set to 'auto' RT#73185
    Thanks to Bob Rogers, https://github.com/ruz/GDGraph/pull/12
* Sun Feb  7 2016 coolo@suse.com
- updated to 1.52
  see /usr/share/doc/packages/perl-GDGraph/CHANGES
  1.52 28 Jan 2016
  - y1_min_range and y2_min_range instead of min_range_1 and min_range_2,
    niether were documented before.
  - Update documentation in regards to all *_min_range options available.
* Sat Jan  2 2016 coolo@suse.com
- updated to 1.51
  see /usr/share/doc/packages/perl-GDGraph/CHANGES
* Sat May  2 2015 coolo@suse.com
- updated to 1.49
  see /usr/share/doc/packages/perl-GDGraph/CHANGES
  1.49
  - fix to Z-axis color filling in 3D pie charts (Debian Bug #489184)
  - bump ExtUtils::MakeMaker dependency
  - tiny improvement in the code of the samples
* Tue Oct  1 2013 darin@darins.net
- update to 1.48
  * no code changes, just release enginering cleanup
  * adjust MANIFEST.SKIP file so MANIFEST can be generated
    once again
  * ship sample58.pl file, so `make samples` stop failing
  * mention the current and past maintainers in META files
    as authors
  * use newer CPAN::Meta and ExtUtils::MakeMaker, older
    versions generated META files without runtime prerequisites
* Thu Apr 28 2011 vcizek@novell.com
- license correction (same as Perl)
- added new dependencies (bnc#676080)
- spec renewal
* Wed Dec  1 2010 coolo@novell.com
- switch to perl_requires macro
* Mon Nov 29 2010 coolo@novell.com
- remove /var/adm/perl-modules
* Sun Jan 10 2010 jengelh@medozas.de
- enable parallel build
* Thu Apr 26 2007 ro@suse.de
- update to 1.44
  - Added GD::Graph::hbars, to create horizontal bar charts.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Sep 28 2005 dmueller@suse.de
- add norootforbuild
* Thu Mar  3 2005 ro@suse.de
- added trim_miter patch from Juergen
* Tue Aug 24 2004 ro@suse.de
- updated neededforbuild (needing ImageMagick in testsuite)
* Wed Jul 28 2004 ro@suse.de
- update to 1.43
* Thu Sep 25 2003 ro@suse.de
- created package version 1.39