Revision: 4016
Author: mart.raudsepp
Date: Thu Mar 21 04:26:54 2013
Log: Fix compatibility with gcc-4.7
Many C++ headers don't pollute the namespace anymore with an implicit
unistd.h inclusion,
so we need to include it ourselves in CardBase.cpp for sleep() prototype.
my_getopt prototypes don't match up with something else and cause an error,
but
we really don't want to use my_getopt anyways - we were simply missing a
HAVE_GETOPT_H check with cmake for when system getopt.h is present.
Hardcode that setting for now - ideally cmake would make a check for it and
handle it automatically.
http://code.google.com/p/esteid/source/detail?r=4016
Added:
/packages/gentoo/trunk/dev-libs/smartcardpp/files
/packages/gentoo/trunk/dev-libs/smartcardpp/files/sleep-header.patch
Modified:
/packages/gentoo/trunk/dev-libs/smartcardpp/Manifest
/packages/gentoo/trunk/dev-libs/smartcardpp/smartcardpp-0.3.0.ebuild
=======================================
--- /dev/null
+++ /packages/gentoo/trunk/dev-libs/smartcardpp/files/sleep-header.patch
Thu Mar 21 04:26:54 2013
@@ -0,0 +1,11 @@
+--- CardBase.cpp.orig 2013-03-21 10:35:43.908827524 +0100
++++ CardBase.cpp 2013-03-21 10:36:38.344825538 +0100
+@@ -20,6 +20,8 @@
+ #include <Windows.h>
+ #include <WinNT.h>
+ #include <Psapi.h>
++#else
++ #include <unistd.h>
+ #endif
+
+ #define NULLWSTR(a) (a == NULL ? L"<NULL>" : a)
=======================================
--- /packages/gentoo/trunk/dev-libs/smartcardpp/Manifest Fri May 11
23:30:36 2012
+++ /packages/gentoo/trunk/dev-libs/smartcardpp/Manifest Thu Mar 21
04:26:54 2013
@@ -1,3 +1,4 @@
-DIST smartcardpp-0.3.0.tar.bz2 52262 RMD160
43734b60568e97dc8ea1a9d4145755217fe795fb SHA1
d2f7202b135434407754e355e3f5ed774fe96aa9 SHA256
5e163e8a328c49f6c7dddc90675914ce9909acff9fd79509d70726c7e8f0f14a
-EBUILD smartcardpp-0.3.0.ebuild 437 RMD160
c691b34bf61744fd96cdb20ce17768a16fb2b500 SHA1
11138afb7215007ac7db0b3fe4d045741e9b316d SHA256
57d77ca1407baf6799e85fd35be52c5a39c5f9570044ce2e725d77017c523682
-EBUILD smartcardpp-9999.ebuild 458 RMD160
f8f0c8da1475609b6b4efc4990af55eecaba28d9 SHA1
5e53631043527fa83cbe891d0c82d9b8fcc1e4ed SHA256
16e4a8a33b0259555494f2e957dc55ce88e6296a305d4ffd9265e5056436cb7a
+AUX sleep-header.patch 282 SHA256
b39a3c3580ead348c9c5afecca0fe9d82b92ed16624196e521dfee5ac5ca3a68 SHA512
db275c08e122b35a3c2a3fe3c4b2d40bab3541bc4acd93d55e44e31d20727ae1707e9cc57b05214474bfbee26ee6bce7e12595acf2ee079bdecd7f350fe01738
WHIRLPOOL
210accfd52663b9737932ff35c88624fb47123acad7202c3e8fb1d3f448420abf9fd4302aa7368b4a8a0272b944e06990ab4be4efe1f9771dcd556de6087157f
+DIST smartcardpp-0.3.0.tar.bz2 52262 SHA256
5e163e8a328c49f6c7dddc90675914ce9909acff9fd79509d70726c7e8f0f14a SHA512
52a474afebc8f13c8032ff0a0a5764ec990fb3c3d19c0f28ff3452eb9e88e95c44f33bfa36e0188a5f6ca46df1c8922dcf0f9c5b012581c117738520bbf959a0
WHIRLPOOL
abd22a090d3a90924d32474d0ac5d5f7a4b869d5a18bfb3588738a239681c59198ebf5bfd2f2d9926338d322c77ae08a376fef0711bfccd3d15d3254a7fab186
+EBUILD smartcardpp-0.3.0.ebuild 608 SHA256
0c02179bedfa7e1a3f427131f79720a4d512fd9916f6eb0232f6b3fe9b5c4f84 SHA512
23a3221fdd622198ba0c3bf5893fdc972cdcf70baec6b1f8060b65677b1c17bad612730bc08678a2f693606c828daa4128c41af962bdbb5d24b751d1992972cb
WHIRLPOOL
0f5104dce5220cf292d81254d0935c0b433edf0e3c9bad5b2b10624b5be4a2e7d32aa7d3f7c5047dbee411485c1ab8fc3ef1a5060046a7ed2a7848a1c825afa7
+EBUILD smartcardpp-9999.ebuild 458 SHA256
16e4a8a33b0259555494f2e957dc55ce88e6296a305d4ffd9265e5056436cb7a SHA512
525cdacd9cf6b717d017c6c196705c7a2aaa7a3a4d34e033acb312d8c5cbde26713c6688a04c86522d99816a9e5a52e9b71d554ea017f1ab4742979dd74ec11b
WHIRLPOOL
476c7cf5b5472705fc3ed5f579f777122323b584d18f99adeb4ec579a725b69fab7d4119ca6f81b7cd1273fff1a16ba4d111d985d610e4abca2dd57099d48307
=======================================
--- /packages/gentoo/trunk/dev-libs/smartcardpp/smartcardpp-0.3.0.ebuild
Wed Nov 2 10:24:16 2011
+++ /packages/gentoo/trunk/dev-libs/smartcardpp/smartcardpp-0.3.0.ebuild
Thu Mar 21 04:26:54 2013
@@ -3,7 +3,7 @@
# $Header: $
EAPI=3
-inherit cmake-utils
+inherit eutils cmake-utils
DESCRIPTION="Library for accessing smart cards"
HOMEPAGE="
http://code.google.com/p/esteid/"
@@ -19,3 +19,13 @@
dev-util/pkgconfig"
DOCS="NEWS"
+
+src_prepare() {
+ cmake-utils_src_prepare
+ epatch "$FILESDIR"/sleep-header.patch
+}
+
+src_configure() {
+ append-cppflags -DHAVE_GETOPT_H
+ cmake-utils_src_configure
+}