diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-12-26 18:30:11 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-12-26 18:30:11 +0000 |
commit | c48985d546b53c3147b3e612ad68e7cf2296dba5 (patch) | |
tree | 69cd79cd115b34a22ae0c6132aaeaa0510be3e22 /net-misc | |
parent | Wishfully remove 3.3 version. (diff) | |
download | gentoo-2-c48985d546b53c3147b3e612ad68e7cf2296dba5.tar.gz gentoo-2-c48985d546b53c3147b3e612ad68e7cf2296dba5.tar.bz2 gentoo-2-c48985d546b53c3147b3e612ad68e7cf2296dba5.zip |
Add patch to allow building against modern pcsc-lite (bug #349813 by me).
(Portage version: 2.2.0_alpha10/cvs/Linux x86_64)
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/rdesktop/ChangeLog | 6 | ||||
-rw-r--r-- | net-misc/rdesktop/files/rdesktop-1.6.0+pcsc-lite-1.6.6.patch | 206 | ||||
-rw-r--r-- | net-misc/rdesktop/rdesktop-1.6.0-r4.ebuild | 4 |
3 files changed, 214 insertions, 2 deletions
diff --git a/net-misc/rdesktop/ChangeLog b/net-misc/rdesktop/ChangeLog index 0a295e8efb7a..9d3214692cfe 100644 --- a/net-misc/rdesktop/ChangeLog +++ b/net-misc/rdesktop/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-misc/rdesktop # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/rdesktop/ChangeLog,v 1.114 2010/03/09 10:21:43 voyageur Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/rdesktop/ChangeLog,v 1.115 2010/12/26 18:30:11 flameeyes Exp $ + + 26 Dec 2010; Diego E. Pettenò <flameeyes@gentoo.org> + rdesktop-1.6.0-r4.ebuild, +files/rdesktop-1.6.0+pcsc-lite-1.6.6.patch: + Add patch to allow building against modern pcsc-lite (bug #349813 by me). *rdesktop-1.6.0-r4 (09 Mar 2010) diff --git a/net-misc/rdesktop/files/rdesktop-1.6.0+pcsc-lite-1.6.6.patch b/net-misc/rdesktop/files/rdesktop-1.6.0+pcsc-lite-1.6.6.patch new file mode 100644 index 000000000000..963a870a314b --- /dev/null +++ b/net-misc/rdesktop/files/rdesktop-1.6.0+pcsc-lite-1.6.6.patch @@ -0,0 +1,206 @@ +Index: rdesktop-1.6.0/scard.c +=================================================================== +--- rdesktop-1.6.0.orig/scard.c ++++ rdesktop-1.6.0/scard.c +@@ -935,12 +935,12 @@ TS_SCardDisconnect(STREAM in, STREAM out + } + + static int +-needStatusRecheck(MYPCSC_DWORD rv, MYPCSC_LPSCARD_READERSTATE_A rsArray, SERVER_DWORD dwCount) ++needStatusRecheck(MYPCSC_DWORD rv, MYPCSC_LPSCARD_READERSTATE rsArray, SERVER_DWORD dwCount) + { + int i, recall = 0; + if (rv == SCARD_S_SUCCESS) + { +- MYPCSC_LPSCARD_READERSTATE_A cur; ++ MYPCSC_LPSCARD_READERSTATE cur; + for (i = 0, cur = rsArray; i < dwCount; i++, cur++) + { + if (cur->dwEventState & SCARD_STATE_UNKNOWN) +@@ -977,11 +977,11 @@ incStatus(MYPCSC_DWORD code, RD_BOOL map + } + + static void +-copyReaderState_MyPCSCToServer(MYPCSC_LPSCARD_READERSTATE_A src, SERVER_LPSCARD_READERSTATE_A dst, ++copyReaderState_MyPCSCToServer(MYPCSC_LPSCARD_READERSTATE src, SERVER_LPSCARD_READERSTATE dst, + MYPCSC_DWORD readerCount) + { +- MYPCSC_LPSCARD_READERSTATE_A srcIter; +- SERVER_LPSCARD_READERSTATE_A dstIter; ++ MYPCSC_LPSCARD_READERSTATE srcIter; ++ SERVER_LPSCARD_READERSTATE dstIter; + MYPCSC_DWORD i; + + for (i = 0, srcIter = src, dstIter = dst; i < readerCount; i++, srcIter++, dstIter++) +@@ -996,11 +996,11 @@ copyReaderState_MyPCSCToServer(MYPCSC_LP + } + + static void +-copyReaderState_ServerToMyPCSC(SERVER_LPSCARD_READERSTATE_A src, MYPCSC_LPSCARD_READERSTATE_A dst, ++copyReaderState_ServerToMyPCSC(SERVER_LPSCARD_READERSTATE src, MYPCSC_LPSCARD_READERSTATE dst, + SERVER_DWORD readerCount) + { +- SERVER_LPSCARD_READERSTATE_A srcIter; +- MYPCSC_LPSCARD_READERSTATE_A dstIter; ++ SERVER_LPSCARD_READERSTATE srcIter; ++ MYPCSC_LPSCARD_READERSTATE dstIter; + SERVER_DWORD i; + + for (i = 0, srcIter = src, dstIter = dst; i < readerCount; i++, srcIter++, dstIter++) +@@ -1022,9 +1022,9 @@ TS_SCardGetStatusChange(STREAM in, STREA + SERVER_SCARDCONTEXT hContext; + SERVER_DWORD dwTimeout; + SERVER_DWORD dwCount; +- SERVER_LPSCARD_READERSTATE_A rsArray, cur; ++ SERVER_LPSCARD_READERSTATE rsArray, cur; + SERVER_DWORD *stateArray = NULL, *curState; +- MYPCSC_LPSCARD_READERSTATE_A myRsArray; ++ MYPCSC_LPSCARD_READERSTATE myRsArray; + long i; + PMEM_HANDLE lcHandle = NULL; + #if 0 +@@ -1043,15 +1043,15 @@ TS_SCardGetStatusChange(STREAM in, STREA + + if (dwCount > 0) + { +- rsArray = SC_xmalloc(&lcHandle, dwCount * sizeof(SERVER_SCARD_READERSTATE_A)); ++ rsArray = SC_xmalloc(&lcHandle, dwCount * sizeof(SERVER_SCARD_READERSTATE)); + if (!rsArray) + return SC_returnNoMemoryError(&lcHandle, in, out); +- memset(rsArray, 0, dwCount * sizeof(SERVER_SCARD_READERSTATE_A)); ++ memset(rsArray, 0, dwCount * sizeof(SERVER_SCARD_READERSTATE)); + stateArray = SC_xmalloc(&lcHandle, dwCount * sizeof(MYPCSC_DWORD)); + if (!stateArray) + return SC_returnNoMemoryError(&lcHandle, in, out); + /* skip two pointers at beginning of struct */ +- for (i = 0, cur = (SERVER_LPSCARD_READERSTATE_A) ((unsigned char **) rsArray + 2); ++ for (i = 0, cur = (SERVER_LPSCARD_READERSTATE) ((unsigned char **) rsArray + 2); + i < dwCount; i++, cur++) + { + in->p += 0x04; +@@ -1116,10 +1116,10 @@ TS_SCardGetStatusChange(STREAM in, STREA + stateArray = NULL; + } + +- myRsArray = SC_xmalloc(&lcHandle, dwCount * sizeof(MYPCSC_SCARD_READERSTATE_A)); ++ myRsArray = SC_xmalloc(&lcHandle, dwCount * sizeof(MYPCSC_SCARD_READERSTATE)); + if (!rsArray) + return SC_returnNoMemoryError(&lcHandle, in, out); +- memset(myRsArray, 0, dwCount * sizeof(SERVER_SCARD_READERSTATE_A)); ++ memset(myRsArray, 0, dwCount * sizeof(SERVER_SCARD_READERSTATE)); + copyReaderState_ServerToMyPCSC(rsArray, myRsArray, (SERVER_DWORD) dwCount); + + rv = SCardGetStatusChange((MYPCSC_SCARDCONTEXT) hContext, (MYPCSC_DWORD) dwTimeout, +@@ -1181,7 +1181,7 @@ TS_SCardGetStatusChange(STREAM in, STREA + cur->cbAtr = swap32(cur->cbAtr); + + out_uint8p(out, (void *) ((unsigned char **) cur + 2), +- sizeof(SERVER_SCARD_READERSTATE_A) - 2 * sizeof(unsigned char *)); ++ sizeof(SERVER_SCARD_READERSTATE) - 2 * sizeof(unsigned char *)); + } + outForceAlignment(out, 8); + SC_xfreeallmemory(&lcHandle); +@@ -1222,8 +1222,8 @@ TS_SCardLocateCardsByATR(STREAM in, STRE + LPSCARD_ATRMASK_L pAtrMasks, cur; + SERVER_DWORD atrMaskCount = 0; + SERVER_DWORD readerCount = 0; +- SERVER_LPSCARD_READERSTATE_A rsArray, ResArray, rsCur; +- MYPCSC_LPSCARD_READERSTATE_A myRsArray; ++ SERVER_LPSCARD_READERSTATE rsArray, ResArray, rsCur; ++ MYPCSC_LPSCARD_READERSTATE myRsArray; + PMEM_HANDLE lcHandle = NULL; + + in->p += 0x2C; +@@ -1235,10 +1235,10 @@ TS_SCardLocateCardsByATR(STREAM in, STRE + in_uint8a(in, pAtrMasks, atrMaskCount * sizeof(SCARD_ATRMASK_L)); + + in_uint32_le(in, readerCount); +- rsArray = SC_xmalloc(&lcHandle, readerCount * sizeof(SCARD_READERSTATE_A)); ++ rsArray = SC_xmalloc(&lcHandle, readerCount * sizeof(SCARD_READERSTATE)); + if (!rsArray) + return SC_returnNoMemoryError(&lcHandle, in, out); +- memset(rsArray, 0, readerCount * sizeof(SCARD_READERSTATE_A)); ++ memset(rsArray, 0, readerCount * sizeof(SCARD_READERSTATE)); + + DEBUG_SCARD(("SCARD: SCardLocateCardsByATR(context: 0x%08x, atrs: %d, readers: %d)\n", + (unsigned) hContext, (int) atrMaskCount, (int) readerCount)); +@@ -1263,14 +1263,14 @@ TS_SCardLocateCardsByATR(STREAM in, STRE + DEBUG_SCARD(("\n")); + } + +- for (i = 0, rsCur = (SERVER_LPSCARD_READERSTATE_A) ((unsigned char **) rsArray + 2); ++ for (i = 0, rsCur = (SERVER_LPSCARD_READERSTATE) ((unsigned char **) rsArray + 2); + i < readerCount; i++, rsCur++) + { + in_uint8s(in, 4); + in_uint8a(in, rsCur, SERVER_SCARDSTATESIZE); + } + +- ResArray = SC_xmalloc(&lcHandle, readerCount * sizeof(SERVER_SCARD_READERSTATE_A)); ++ ResArray = SC_xmalloc(&lcHandle, readerCount * sizeof(SERVER_SCARD_READERSTATE)); + if (!ResArray) + return SC_returnNoMemoryError(&lcHandle, in, out); + +@@ -1287,10 +1287,10 @@ TS_SCardLocateCardsByATR(STREAM in, STRE + (unsigned) rsCur->pvUserData, (unsigned) rsCur->dwCurrentState, + (unsigned) rsCur->dwEventState)); + } +- memcpy(ResArray, rsArray, readerCount * sizeof(SERVER_SCARD_READERSTATE_A)); ++ memcpy(ResArray, rsArray, readerCount * sizeof(SERVER_SCARD_READERSTATE)); + + /* FIXME segfault here. */ +- myRsArray = SC_xmalloc(&lcHandle, readerCount * sizeof(MYPCSC_SCARD_READERSTATE_A)); ++ myRsArray = SC_xmalloc(&lcHandle, readerCount * sizeof(MYPCSC_SCARD_READERSTATE)); + if (!myRsArray) + return SC_returnNoMemoryError(&lcHandle, in, out); + copyReaderState_ServerToMyPCSC(rsArray, myRsArray, readerCount); +@@ -1323,7 +1323,7 @@ TS_SCardLocateCardsByATR(STREAM in, STRE + if (equal) + { + rsCur->dwEventState |= 0x00000040; /* SCARD_STATE_ATRMATCH 0x00000040 */ +- memcpy(ResArray + j, rsCur, sizeof(SCARD_READERSTATE_A)); ++ memcpy(ResArray + j, rsCur, sizeof(SCARD_READERSTATE)); + DEBUG_SCARD(("SCARD: \"%s\"\n", + rsCur->szReader ? rsCur->szReader : "NULL")); + DEBUG_SCARD(("SCARD: user: 0x%08x, state: 0x%08x, event: 0x%08x\n", (unsigned) rsCur->pvUserData, (unsigned) rsCur->dwCurrentState, (unsigned) rsCur->dwEventState)); +@@ -1344,7 +1344,7 @@ TS_SCardLocateCardsByATR(STREAM in, STRE + rsCur->cbAtr = swap32(rsCur->cbAtr); + + out_uint8p(out, (void *) ((unsigned char **) rsCur + 2), +- sizeof(SCARD_READERSTATE_A) - 2 * sizeof(unsigned char *)); ++ sizeof(SCARD_READERSTATE) - 2 * sizeof(unsigned char *)); + } + + outForceAlignment(out, 8); +Index: rdesktop-1.6.0/scard.h +=================================================================== +--- rdesktop-1.6.0.orig/scard.h ++++ rdesktop-1.6.0/scard.h +@@ -51,8 +51,8 @@ typedef SCARDHANDLE MYPCSC_SCARDHANDLE; + typedef uint32_t SERVER_SCARDCONTEXT; + typedef uint32_t SERVER_SCARDHANDLE; + +-typedef SCARD_READERSTATE_A MYPCSC_SCARD_READERSTATE_A; +-typedef LPSCARD_READERSTATE_A MYPCSC_LPSCARD_READERSTATE_A; ++typedef SCARD_READERSTATE MYPCSC_SCARD_READERSTATE; ++typedef SCARD_READERSTATE *MYPCSC_LPSCARD_READERSTATE; + + typedef struct + { +@@ -63,12 +63,12 @@ typedef struct + SERVER_DWORD cbAtr; + unsigned char rgbAtr[MAX_ATR_SIZE]; + } +-SERVER_SCARD_READERSTATE_A; ++SERVER_SCARD_READERSTATE; + +-typedef SERVER_SCARD_READERSTATE_A *SERVER_LPSCARD_READERSTATE_A; ++typedef SERVER_SCARD_READERSTATE *SERVER_LPSCARD_READERSTATE; + +-#define SERVER_SCARDSTATESIZE (sizeof(SERVER_SCARD_READERSTATE_A) - sizeof(const char *) - sizeof(void *)) +-#define MYPCSC_SCARDSTATESIZE (sizeof(MYPCSC_SCARD_READERSTATE_A) - sizeof(const char *) - sizeof(void *)) ++#define SERVER_SCARDSTATESIZE (sizeof(SERVER_SCARD_READERSTATE) - sizeof(const char *) - sizeof(void *)) ++#define MYPCSC_SCARDSTATESIZE (sizeof(MYPCSC_SCARD_READERSTATE) - sizeof(const char *) - sizeof(void *)) + + typedef struct _SERVER_SCARD_IO_REQUEST + { diff --git a/net-misc/rdesktop/rdesktop-1.6.0-r4.ebuild b/net-misc/rdesktop/rdesktop-1.6.0-r4.ebuild index d866eb04f73b..75bf5786b4f7 100644 --- a/net-misc/rdesktop/rdesktop-1.6.0-r4.ebuild +++ b/net-misc/rdesktop/rdesktop-1.6.0-r4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/rdesktop/rdesktop-1.6.0-r4.ebuild,v 1.1 2010/03/09 10:21:43 voyageur Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/rdesktop/rdesktop-1.6.0-r4.ebuild,v 1.2 2010/12/26 18:30:11 flameeyes Exp $ EAPI=2 @@ -44,6 +44,8 @@ src_prepare() { epatch "${FILESDIR}"/${P}-smartcard_configure.patch # USB redirection support from virtualbox use rdpusb && epatch "${WORKDIR}"/${P}-rdpusb.patch + # bug #349813 + epatch "${FILESDIR}"/${P}+pcsc-lite-1.6.6.patch eautoreconf } |