packages: perl-Device-USB-PCSensor-HidTEMPer/perl-Device-USB-PCSensor-HidTE...

glen glen at pld-linux.org
Thu Apr 14 08:37:07 CEST 2011


Author: glen                         Date: Thu Apr 14 06:37:07 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- perl 5.8 compat fix for ac

---- Files affected:
packages/perl-Device-USB-PCSensor-HidTEMPer:
   perl-Device-USB-PCSensor-HidTEMPer.spec (1.1 -> 1.2) , perl5.8.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/perl-Device-USB-PCSensor-HidTEMPer/perl-Device-USB-PCSensor-HidTEMPer.spec
diff -u packages/perl-Device-USB-PCSensor-HidTEMPer/perl-Device-USB-PCSensor-HidTEMPer.spec:1.1 packages/perl-Device-USB-PCSensor-HidTEMPer/perl-Device-USB-PCSensor-HidTEMPer.spec:1.2
--- packages/perl-Device-USB-PCSensor-HidTEMPer/perl-Device-USB-PCSensor-HidTEMPer.spec:1.1	Mon Feb 14 15:54:13 2011
+++ packages/perl-Device-USB-PCSensor-HidTEMPer/perl-Device-USB-PCSensor-HidTEMPer.spec	Thu Apr 14 08:37:01 2011
@@ -9,18 +9,19 @@
 Summary:	Device::USB::PCSensor::HidTEMPer - Device overview
 Name:		perl-Device-USB-PCSensor-HidTEMPer
 Version:	0.03
-Release:	1
+Release:	2
 # same as perl
 License:	GPL v1+ or Artistic
 Group:		Development/Languages/Perl
 Source0:	http://www.cpan.org/modules/by-authors/id/M/MS/MSULLAND/Device-USB-PCSensor-HidTEMPer-%{version}.tar.gz
 # Source0-md5:	fbb21e800581be5aab4b8893bcde3393
+Patch0:		perl5.8.patch
 URL:		http://search.cpan.org/dist/Device-USB-PCSensor-HidTEMPer/
 BuildRequires:	perl-devel >= 1:5.8.0
 BuildRequires:	rpm-perlprov >= 4.1-13
 %if %{with tests}
-BuildRequires:	perl-Device-USB >= 0.31
 BuildRequires:	perl(Device::USB::Device) >= 0.29
+BuildRequires:	perl-Device-USB >= 0.31
 %endif
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -32,6 +33,7 @@
 
 %prep
 %setup -q -n %{pdir}-%{pnam}-%{version}
+%patch0 -p1
 
 %build
 %{__perl} Makefile.PL \
@@ -63,5 +65,8 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2011/04/14 06:37:01  glen
+- perl 5.8 compat fix for ac
+
 Revision 1.1  2011/02/14 14:54:13  glen
 - created with pldcpan

================================================================
Index: packages/perl-Device-USB-PCSensor-HidTEMPer/perl5.8.patch
diff -u /dev/null packages/perl-Device-USB-PCSensor-HidTEMPer/perl5.8.patch:1.1
--- /dev/null	Thu Apr 14 08:37:07 2011
+++ packages/perl-Device-USB-PCSensor-HidTEMPer/perl5.8.patch	Thu Apr 14 08:37:01 2011
@@ -0,0 +1,23 @@
+--- Device-USB-PCSensor-HidTEMPer-0.03/lib/Device/USB/PCSensor/HidTEMPer/Sensor.pm~	2011-01-30 16:52:28.000000000 +0200
++++ Device-USB-PCSensor-HidTEMPer-0.03/lib/Device/USB/PCSensor/HidTEMPer/Sensor.pm	2011-04-14 09:07:08.806385834 +0300
+@@ -90,7 +90,8 @@
+ sub fahrenheit
+ {
+     my $self    = shift;
+-    my $celsius = $self->celsius() // 0;
++    my $celsius = $self->celsius();
++    $celsius = 0 unless defined $celsius;
+     
+     # Calculate and return the newly created degrees
+     return ( ( $celsius * 9 ) / 5 ) + 32;
+--- Device-USB-PCSensor-HidTEMPer-0.03/lib/Device/USB/PCSensor/HidTEMPer.pm~	2011-01-30 16:52:28.000000000 +0200
++++ Device-USB-PCSensor-HidTEMPer-0.03/lib/Device/USB/PCSensor/HidTEMPer.pm	2011-04-14 09:34:57.959524597 +0300
+@@ -160,7 +160,7 @@
+ sub _init_device
+ {
+     my $prototype   = Device::USB::PCSensor::HidTEMPer::Device->new( $_[0] );
+-    my $parameters  = (SUPPORTED_DEVICES)[0]{$prototype->identifier()};
++    my $parameters  = SUPPORTED_DEVICES->{$prototype->identifier()};
+     
+     return undef unless defined $parameters;
+     
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/perl-Device-USB-PCSensor-HidTEMPer/perl-Device-USB-PCSensor-HidTEMPer.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list