[perl-Barcode-Code128] Initial import (#700346).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 414638fb91e5800a455734943a09ce7903dab255
Author: Nicholas van Oudtshoorn <vanoudt@xxxxxxxxx>
Date:   Fri Jul 15 08:40:35 2011 +0800

    Initial import (#700346).

 .gitignore                         |    1 +
 perl-Barcode-Code128-testfix.patch |   33 +++++++++++++++++++++
 perl-Barcode-Code128.spec          |   55 ++++++++++++++++++++++++++++++++++++
 sources                            |    1 +
 4 files changed, 90 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..4b4d6e3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/Barcode-Code128-2.01.tar.gz
diff --git a/perl-Barcode-Code128-testfix.patch b/perl-Barcode-Code128-testfix.patch
new file mode 100644
index 0000000..08c4fb5
--- /dev/null
+++ b/perl-Barcode-Code128-testfix.patch
@@ -0,0 +1,33 @@
+--- t/png.t.orig	2011-04-28 16:53:40.149925007 +0800
++++ t/png.t	2011-04-28 16:55:24.229044665 +0800
+@@ -19,13 +19,21 @@
+ use strict;
+ my $code = new Barcode::Code128;
+ my $file = "t/code128.png";
+-my $good;
+-{
+-    open IM, $file or die "Can't read $file: $!";
+-    binmode IM;
+-    read IM, $good, -s $file;
+-    close IM;
+-}
++my $expected_image = GD::Image->new($file);
++
+ my $test = $code->png("CODE 128");
+-print "not " unless $test eq $good;
++my $got_image = GD::Image->new($test);
++
++my $cmp = $expected_image->compare($got_image);
++print "not " if $cmp != 0;
+ print "ok 2\n";
++
++if ($cmp & &GD::GD_CMP_IMAGE) { warn "The two images look different\n" }
++if ($cmp & &GD::GD_CMP_NUM_COLORS) { warn "The two images have different numbers of colors\n"}
++if ($cmp & &GD::GD_CMP_COLOR) { warn "The two images' palettes differ\n"}
++if ($cmp & &GD::GD_CMP_SIZE_X) { warn "The two images differ in the horizontal dimension\n"}
++if ($cmp & &GD::GD_CMP_SIZE_Y) { warn "The two images differ in the vertical dimension\n"}
++if ($cmp & &GD::GD_CMP_TRANSPARENT) { warn "The two images have different transparency\n"}
++if ($cmp & &GD::GD_CMP_BACKGROUND) { warn "The two images have different background colors\n"}
++if ($cmp & &GD::GD_CMP_INTERLACE) { warn "The two images differ in their interlace\n"}
++if ($cmp & &GD::GD_CMP_TRUECOLOR) { warn "The two images are not both true color\n"}
+
diff --git a/perl-Barcode-Code128.spec b/perl-Barcode-Code128.spec
new file mode 100644
index 0000000..61395c8
--- /dev/null
+++ b/perl-Barcode-Code128.spec
@@ -0,0 +1,55 @@
+name:           perl-Barcode-Code128
+Version:        2.01
+Release:        3%{?dist}
+Summary:        Generate CODE 128 bar codes
+License:        Public Domain
+Group:          Development/Libraries
+URL:            http://search.cpan.org/dist/Barcode-Code128/
+Source0:        http://www.cpan.org/authors/id/W/WR/WRW/Barcode-Code128-%{version}.tar.gz
+Patch0:         perl-Barcode-Code128-testfix.patch
+BuildArch:      noarch
+BuildRequires:  perl(ExtUtils::MakeMaker)
+BuildRequires:  perl(GD)
+Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires:       perl(GD)
+
+%description
+Barcode::Code128 generates bar codes using the CODE 128 symbology. It can
+generate images in PNG or GIF format using the GD package, or it can
+generate a text string representing the barcode that you can render using
+some other technology if desired.
+
+%prep
+%setup -q -n Barcode-Code128-%{version}
+%patch0
+rm t/gif.t
+
+%build
+%{__perl} Makefile.PL INSTALLDIRS=vendor
+make %{?_smp_mflags}
+
+%install
+make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
+
+find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
+find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
+
+%{_fixperms} $RPM_BUILD_ROOT/*
+
+%check
+make test
+
+%files
+%doc Changes README
+%{perl_vendorlib}/*
+%{_mandir}/man3/*
+
+%changelog
+* Tue May 24 2011 Nicholas van Oudtshoorn <vanoudt@xxxxxxxxx> 2.01-3
+- Simplified the spec file to conform to Fedora guidelines
+* Tue May 24 2011 Nicholas van Oudtshoorn <vanoudt@xxxxxxxxx> 2.01-2
+- Added build and run-time dependency on perl(GD)
+* Thu Apr 28 2011 Nicholas van Oudtshoorn <vanoudt@xxxxxxxxx> 2.01-1
+- Specfile autogenerated by cpanspec 1.78.
+- Disable tests since they are broken
+
diff --git a/sources b/sources
index e69de29..cbf601a 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a0aa077b26926c30659471d14515d907  Barcode-Code128-2.01.tar.gz
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel


[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux