forked from pool/perl-NetPacket
		
	Accepting request 202119 from home:k0da:ppc
- USB is little endian, so we need to convert it on BigEndian platforms (perl-NetPacket-bigendian.patch) upstream commit fc0563f746c44387d77e70792628fe2a03628751 OBS-URL: https://build.opensuse.org/request/show/202119 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-NetPacket?expand=0&rev=11
This commit is contained in:
		
				
					committed by
					
						
						Git OBS Bridge
					
				
			
			
				
	
			
			
			
						parent
						
							810139f313
						
					
				
				
					commit
					8ef6092460
				
			
							
								
								
									
										40
									
								
								perl-NetPacket-bigendian.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								perl-NetPacket-bigendian.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
				
			|||||||
 | 
					Index: NetPacket-1.4.1/lib/NetPacket/USBMon.pm
 | 
				
			||||||
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- NetPacket-1.4.1.orig/lib/NetPacket/USBMon.pm
 | 
				
			||||||
 | 
					+++ NetPacket-1.4.1/lib/NetPacket/USBMon.pm
 | 
				
			||||||
 | 
					@@ -65,14 +65,14 @@ sub decode
 | 
				
			||||||
 | 
					     my($id, $type, $xfer_type, $epnum, $devnum, $busnum, $flag_setup,
 | 
				
			||||||
 | 
					         $flag_data, $ts_sec, $ts_usec, $status, $length, $len_cap,
 | 
				
			||||||
 | 
					         $s, $interval, $start_frame, $xfer_flags, $ndesc, $rest) =
 | 
				
			||||||
 | 
					-        unpack('a8CCCCSCCa8liIIa8llLLa*', $packet);
 | 
				
			||||||
 | 
					+        unpack('a8CCCCS<CCa8l<i<I<I<a8l<l<L<L<a*', $packet);
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					     # Try to grok quads. We may loose some address information with 32-bit
 | 
				
			||||||
 | 
					     # Perl parsing 64-bit captures, or timestamp after 2038. Still the best
 | 
				
			||||||
 | 
					     # we can do.
 | 
				
			||||||
 | 
					     eval {
 | 
				
			||||||
 | 
					-      $id = unpack ('Q', $id);
 | 
				
			||||||
 | 
					-      $ts_sec = unpack ('Q', $ts_sec);
 | 
				
			||||||
 | 
					+      $id = unpack ('Q<', $id);
 | 
				
			||||||
 | 
					+      $ts_sec = unpack ('Q<', $ts_sec);
 | 
				
			||||||
 | 
					     };
 | 
				
			||||||
 | 
					     if ($@) {
 | 
				
			||||||
 | 
					       ($id) = unpack ('LL', $id);
 | 
				
			||||||
 | 
					@@ -115,7 +115,7 @@ sub decode
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					         if ($setup->{bmRequestType} & USB_TYPE_VENDOR) {
 | 
				
			||||||
 | 
					            ($setup->{wValue}, $setup->{wIndex},
 | 
				
			||||||
 | 
					-                $setup->{wLength}) = unpack('S3', $rest);
 | 
				
			||||||
 | 
					+                $setup->{wLength}) = unpack('S<3', $rest);
 | 
				
			||||||
 | 
					         } else {
 | 
				
			||||||
 | 
					             # Unknown setup request;
 | 
				
			||||||
 | 
					             $setup->{data} = $rest;
 | 
				
			||||||
 | 
					@@ -127,7 +127,7 @@ sub decode
 | 
				
			||||||
 | 
					     # Isochronous descriptors
 | 
				
			||||||
 | 
					     if ($self->{xfer_type} == USB_XFER_TYPE_ISO) {
 | 
				
			||||||
 | 
					         my $iso = {};
 | 
				
			||||||
 | 
					-       ($iso->{error_count}, $iso->{numdesc}) = unpack('ii', $s);
 | 
				
			||||||
 | 
					+       ($iso->{error_count}, $iso->{numdesc}) = unpack('i<i<', $s);
 | 
				
			||||||
 | 
					         $self->{iso} = $iso;
 | 
				
			||||||
 | 
					     }
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
@@ -1,3 +1,10 @@
 | 
				
			|||||||
 | 
					-------------------------------------------------------------------
 | 
				
			||||||
 | 
					Thu Oct  3 13:48:17 UTC 2013 - dvaleev@suse.com
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- USB is little endian, so we need to convert it on BigEndian
 | 
				
			||||||
 | 
					  platforms (perl-NetPacket-bigendian.patch)
 | 
				
			||||||
 | 
					  upstream commit fc0563f746c44387d77e70792628fe2a03628751 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-------------------------------------------------------------------
 | 
					-------------------------------------------------------------------
 | 
				
			||||||
Fri Sep  6 19:35:34 UTC 2013 - Greg.Freemyer@gmail.com
 | 
					Fri Sep  6 19:35:34 UTC 2013 - Greg.Freemyer@gmail.com
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,6 +24,7 @@ License:        Artistic-2.0
 | 
				
			|||||||
Group:          Development/Libraries/Perl
 | 
					Group:          Development/Libraries/Perl
 | 
				
			||||||
Source:         http://search.cpan.org/CPAN/authors/id/Y/YA/YANICK/NetPacket-%{version}.tar.gz
 | 
					Source:         http://search.cpan.org/CPAN/authors/id/Y/YA/YANICK/NetPacket-%{version}.tar.gz
 | 
				
			||||||
Patch1:         perl-NetPacket-backport.patch
 | 
					Patch1:         perl-NetPacket-backport.patch
 | 
				
			||||||
 | 
					Patch2:         perl-NetPacket-bigendian.patch
 | 
				
			||||||
Url:            http://search.cpan.org/dist/NetPacket
 | 
					Url:            http://search.cpan.org/dist/NetPacket
 | 
				
			||||||
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 | 
					BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 | 
				
			||||||
%{perl_requires}
 | 
					%{perl_requires}
 | 
				
			||||||
@@ -57,6 +58,7 @@ unusual situations difficult.
 | 
				
			|||||||
%prep
 | 
					%prep
 | 
				
			||||||
%setup -q -n "NetPacket-%{version}"
 | 
					%setup -q -n "NetPacket-%{version}"
 | 
				
			||||||
%patch1
 | 
					%patch1
 | 
				
			||||||
 | 
					%patch2 -p1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%build
 | 
					%build
 | 
				
			||||||
%__perl ./Build.PL
 | 
					%__perl ./Build.PL
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user