[perl-Net-CUPS] Fix FTBFS due to bad version check in Makefile.PL (#1154078)

Paul Howarth pghmcfc at fedoraproject.org
Fri Oct 17 14:56:47 UTC 2014


commit 31041ee3a817de2353290afef04bca54ebc556ef
Author: Paul Howarth <paul at city-fan.org>
Date:   Fri Oct 17 15:55:26 2014 +0100

    Fix FTBFS due to bad version check in Makefile.PL (#1154078)

 Net-CUPS-0.61-cups2.patch |   13 +++++++++++++
 perl-Net-CUPS.spec        |    8 ++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/Net-CUPS-0.61-cups2.patch b/Net-CUPS-0.61-cups2.patch
new file mode 100644
index 0000000..cf27b3f
--- /dev/null
+++ b/Net-CUPS-0.61-cups2.patch
@@ -0,0 +1,13 @@
+--- Makefile.PL
++++ Makefile.PL
+@@ -31,8 +31,8 @@
+ 
+ my @version_parts = split( /\./, $version );
+ 
+-if( ( $version_parts[1] < 2 ) ||
+-	( ( $version_parts[1] == 2 ) && ( $version_parts[2] < 2 ) ) )
++if( $version_parts[0] < 2 && ( ( $version_parts[1] < 2 ) ||
++	( ( $version_parts[1] == 2 ) && ( $version_parts[2] < 2 ) ) ) )
+ {
+ 	print "The version of the Common Unix Printing System installed\n";
+ 	print "on your system is too old for this module to work properly.\n";
diff --git a/perl-Net-CUPS.spec b/perl-Net-CUPS.spec
index bc0fe0c..690f59a 100644
--- a/perl-Net-CUPS.spec
+++ b/perl-Net-CUPS.spec
@@ -1,15 +1,15 @@
 Name:           perl-Net-CUPS
 Version:        0.61
-Release:        18%{?dist}
+Release:        19%{?dist}
 Summary:        Perl bindings to the CUPS C API Interface
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Net-CUPS/
 Source0:        http://search.cpan.org/CPAN/authors/id/D/DH/DHAGEMAN/Net-CUPS-%{version}.tar.gz
 Patch0:         perl-Net-CUPS-0.61-cups16.patch
+Patch1:         Net-CUPS-0.61-cups2.patch
 Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 BuildRequires:  cups-devel
-# Uncomment once cups1.6 lands in rawhide (#832130)
 BuildRequires:  cups-filters-devel
 BuildRequires:  perl(AutoLoader)
 BuildRequires:  perl(Carp)
@@ -26,6 +26,7 @@ an urge to control CUPS servers via Perl, this is a good way to do it :)
 %setup -q -n Net-CUPS-%{version}
 find . -type f -exec chmod -c -x {} +
 %patch0 -p1 -b .cups16
+%patch1
 
 %build
 perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
@@ -48,6 +49,9 @@ make test
 %{_mandir}/man3/*
 
 %changelog
+* Fri Oct 17 2014 Paul Howarth <paul at city-fan.org> - 0.61-19
+- Fix FTBFS due to bad version check in Makefile.PL (#1154078)
+
 * Wed Aug 27 2014 Jitka Plesnikova <jplesnik at redhat.com> - 0.61-18
 - Perl 5.20 rebuild
 


More information about the scm-commits mailing list