Added pcsc-perl-noSCardSetTimeout.patch.
OBS-URL: https://build.opensuse.org/package/show/security:chipcard/perl-pcsc?expand=0&rev=3
This commit is contained in:
parent
f0ffeed190
commit
078a1abe34
66
pcsc-perl-noSCardSetTimeout.patch
Normal file
66
pcsc-perl-noSCardSetTimeout.patch
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
Index: pcsc-perl-1.4.10/PCSC.xs
|
||||||
|
===================================================================
|
||||||
|
--- pcsc-perl-1.4.10.orig/PCSC.xs
|
||||||
|
+++ pcsc-perl-1.4.10/PCSC.xs
|
||||||
|
@@ -369,13 +369,8 @@ _LoadPCSCLibrary ()
|
||||||
|
hConnect = (TSCardConnect) GET_FCT (ghDll, "SCardConnect");
|
||||||
|
hStatus = (TSCardStatus) GET_FCT (ghDll, "SCardStatus");
|
||||||
|
hGetStatusChange = (TSCardGetStatusChange) GET_FCT (ghDll, "SCardGetStatusChange");
|
||||||
|
- /* SetTimeout is not part of the original PCSC yet it is still important */
|
||||||
|
- hSetTimeout = (TSCardSetTimeout) GET_FCT (ghDll, "SCardSetTimeout");
|
||||||
|
#endif
|
||||||
|
if (
|
||||||
|
-#ifndef WIN32
|
||||||
|
- !hSetTimeout ||
|
||||||
|
-#endif
|
||||||
|
!hEstablishContext || !hReleaseContext || !hListReaders || !hConnect ||
|
||||||
|
!hReconnect || ! hDisconnect || !hBeginTransaction || !hEndTransaction ||
|
||||||
|
!hTransmit || !hStatus || !hGetStatusChange || !hCancel || !hControl)
|
||||||
|
@@ -1329,8 +1324,7 @@ _Cancel (hContext)
|
||||||
|
#///////////////////////////////////////////////////////////////////////////////
|
||||||
|
#// SetTimeout ()
|
||||||
|
#//
|
||||||
|
-#// This function is only defined for PCSClite that is why we build a
|
||||||
|
-#// stub after the #else processing command
|
||||||
|
+#// This function is no more defined that is why we build a stub
|
||||||
|
#//
|
||||||
|
#// INPUT :
|
||||||
|
#// - $hContext ->
|
||||||
|
@@ -1338,30 +1332,6 @@ _Cancel (hContext)
|
||||||
|
#// OUTPUT :
|
||||||
|
#// returns either true or false depending on successful completion
|
||||||
|
|
||||||
|
-#ifndef WIN32
|
||||||
|
-
|
||||||
|
-unsigned long
|
||||||
|
-_SetTimeout (hContext, dwTimeout)
|
||||||
|
- unsigned long hContext;
|
||||||
|
- unsigned long dwTimeout;
|
||||||
|
- CODE:
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- gnLastError = hSetTimeout (hContext, dwTimeout);
|
||||||
|
-
|
||||||
|
- /* Then we check for an error */
|
||||||
|
- if (gnLastError != SCARD_S_SUCCESS)
|
||||||
|
- RETVAL = FALSE;
|
||||||
|
- else
|
||||||
|
- RETVAL = TRUE;
|
||||||
|
- OUTPUT:
|
||||||
|
- RETVAL
|
||||||
|
-
|
||||||
|
-#else
|
||||||
|
-
|
||||||
|
-#// Win32 does not implement SetTimeout therefore we simply define
|
||||||
|
-#// a stub.
|
||||||
|
-
|
||||||
|
unsigned long
|
||||||
|
_SetTimeout (hContext, dwTimeout)
|
||||||
|
unsigned long hContext;
|
||||||
|
@@ -1371,6 +1341,4 @@ _SetTimeout (hContext, dwTimeout)
|
||||||
|
OUTPUT:
|
||||||
|
RETVAL
|
||||||
|
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
# End of File #
|
@ -27,6 +27,8 @@ License: GPLv2+
|
|||||||
Group: Development/Libraries/Perl
|
Group: Development/Libraries/Perl
|
||||||
Url: http://search.cpan.org/dist/pcsc-perl/
|
Url: http://search.cpan.org/dist/pcsc-perl/
|
||||||
Source: %{cpan_name}-%{version}.tar.bz2
|
Source: %{cpan_name}-%{version}.tar.bz2
|
||||||
|
# PATCH-FIX-OPENSUSE pcsc-perl-noSCardSetTimeout.patch sbrabec@suse.cz -- Fix for the latest pcsc-lite.
|
||||||
|
Patch: pcsc-perl-noSCardSetTimeout.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%{perl_requires}
|
%{perl_requires}
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
@ -41,6 +43,7 @@ readers through a standardized API.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{cpan_name}-%{version}
|
%setup -q -n %{cpan_name}-%{version}
|
||||||
|
%patch -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
|
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
|
||||||
|
Loading…
Reference in New Issue
Block a user