[Pcsclite-cvs-commit] r2752 - in /trunk/Drivers/ccid/MacOSX: ./ configure convert_reader_h.pl debuglog.h ifdhandler.h pcsclite.h reader.h.in winscard.h wintypes.h
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Tue Jan 22 10:19:04 UTC 2008
Author: rousseau
Date: Tue Jan 22 10:19:04 2008
New Revision: 2752
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=2752
Log:
build infrastructure for Apple Mac OS X Leopard
Added:
trunk/Drivers/ccid/MacOSX/
trunk/Drivers/ccid/MacOSX/configure (with props)
trunk/Drivers/ccid/MacOSX/convert_reader_h.pl (with props)
trunk/Drivers/ccid/MacOSX/debuglog.h (with props)
trunk/Drivers/ccid/MacOSX/ifdhandler.h (with props)
trunk/Drivers/ccid/MacOSX/pcsclite.h
trunk/Drivers/ccid/MacOSX/reader.h.in (with props)
trunk/Drivers/ccid/MacOSX/winscard.h
trunk/Drivers/ccid/MacOSX/wintypes.h
Added: trunk/Drivers/ccid/MacOSX/configure
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/MacOSX/configure?rev=2752&op=file
==============================================================================
--- trunk/Drivers/ccid/MacOSX/configure (added)
+++ trunk/Drivers/ccid/MacOSX/configure Tue Jan 22 10:19:04 2008
@@ -1,0 +1,81 @@
+#! /bin/bash
+
+# Copyright (C) 2007-2008 Ludovic Rousseau <ludovic.rousseau at free.fr>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# to use
+# ./MacOSX/configure
+# make
+# make install
+# the driver is installed in /usr/libexec/SmartCardServices/drivers
+
+# Colors
+RED="\033[31m"
+NORMAL="\033[0m"
+
+# run this script as ./MacOSX/configure to configure for Mac OS X
+if [ ! -d MacOSX ]
+then
+ echo -e $RED
+ echo "ERROR!"
+ echo "run ./MacOSX/configure from the source top directory"
+ echo -e $NORMAL
+ exit;
+fi
+
+./MacOSX/convert_reader_h.pl MacOSX/reader.h.in > MacOSX/reader.h
+
+# we define PKG_CONFIG so that pkg-config is not used and PCSC_CFLAGS
+# and PCSC_LIBS are used instead
+PKG_CONFIG="foobar"
+
+# find pcsc-lite header files in MacOSX/
+PCSC_CFLAGS="-I$(pwd)/MacOSX"
+PCSC_LIBS="-framework PCSC"
+
+# use libusb from OpenSC (universal binary)
+LIBUSB_CFLAGS="-I/Library/OpenSC/include"
+LIBUSB_LIBS="-L/Library/OpenSC/lib -lusb"
+
+# RESPONSECODE is already defined by PCSC/wintypes.h
+# define needed here to compile examples/scardcontrol.c since config.h is
+# not included
+CFLAGS="$CFLAGS -DRESPONSECODE_DEFINED_IN_WINTYPES_H"
+
+# Build a Universal Binary
+CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386 -arch ppc"
+LDFLAGS="-arch i386 -arch ppc"
+CONFIGURE_ARGS="--disable-dependency-tracking"
+
+# do not use pcscd debug feature
+CONFIGURE_ARGS="$CONFIGURE_ARGS --disable-pcsclite"
+
+set -x
+./configure \
+ PKG_CONFIG="$PKG_CONFIG" \
+ CFLAGS="$CFLAGS" \
+ PCSC_CFLAGS="$PCSC_CFLAGS" \
+ PCSC_LIBS="$PCSC_LIBS" \
+ LIBUSB_CFLAGS="$LIBUSB_CFLAGS" \
+ LIBUSB_LIBS="$LIBUSB_LIBS" \
+ LDFLAGS="$LDFLAGS" \
+ --enable-usbdropdir=/usr/libexec/SmartCardServices/drivers \
+ $CONFIGURE_ARGS \
+ "$@"
+
+# force a regeneration of Info.plist
+rm -f src/Info.plist
+
Propchange: trunk/Drivers/ccid/MacOSX/configure
------------------------------------------------------------------------------
svn:executable = *
Added: trunk/Drivers/ccid/MacOSX/convert_reader_h.pl
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/MacOSX/convert_reader_h.pl?rev=2752&op=file
==============================================================================
--- trunk/Drivers/ccid/MacOSX/convert_reader_h.pl (added)
+++ trunk/Drivers/ccid/MacOSX/convert_reader_h.pl Tue Jan 22 10:19:04 2008
@@ -1,0 +1,43 @@
+#!/usr/bin/env perl
+
+# convert_reader_h.pl: convert reader.h.in in reader.h with
+#
+# Copyright (C) 2008 Ludovic Rousseau <ludovic.rousseau at free.fr>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+use warnings;
+use strict;
+
+my $text =
+"#ifdef __BIG_ENDIAN__
+#define HOST_TO_CCID_16(x) ((((x) >> 8) & 0xFF) + ((x & 0xFF) << 8))
+#define HOST_TO_CCID_32(x) ((((x) >> 24) & 0xFF) + (((x) >> 8) & 0xFF00) + ((x & 0xFF00) << 8) + (((x) & 0xFF) << 24))
+#else
+#define HOST_TO_CCID_16(x) (x)
+#define HOST_TO_CCID_32(x) (x)
+#endif
+";
+
+while (<>)
+{
+ if (m/host_to_ccid_16/)
+ {
+ print $text;
+ <>;
+ next;
+ }
+ print;
+}
Propchange: trunk/Drivers/ccid/MacOSX/convert_reader_h.pl
------------------------------------------------------------------------------
svn:executable = *
Added: trunk/Drivers/ccid/MacOSX/debuglog.h
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/MacOSX/debuglog.h?rev=2752&op=file
==============================================================================
--- trunk/Drivers/ccid/MacOSX/debuglog.h (added)
+++ trunk/Drivers/ccid/MacOSX/debuglog.h Tue Jan 22 10:19:04 2008
@@ -1,0 +1,1 @@
+link ../../../PCSC/src/PCSC/debuglog.h
Propchange: trunk/Drivers/ccid/MacOSX/debuglog.h
------------------------------------------------------------------------------
svn:special = *
Added: trunk/Drivers/ccid/MacOSX/ifdhandler.h
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/MacOSX/ifdhandler.h?rev=2752&op=file
==============================================================================
--- trunk/Drivers/ccid/MacOSX/ifdhandler.h (added)
+++ trunk/Drivers/ccid/MacOSX/ifdhandler.h Tue Jan 22 10:19:04 2008
@@ -1,0 +1,1 @@
+link ../../../PCSC/src/PCSC/ifdhandler.h
Propchange: trunk/Drivers/ccid/MacOSX/ifdhandler.h
------------------------------------------------------------------------------
svn:special = *
Added: trunk/Drivers/ccid/MacOSX/pcsclite.h
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/MacOSX/pcsclite.h?rev=2752&op=file
==============================================================================
--- trunk/Drivers/ccid/MacOSX/pcsclite.h (added)
+++ trunk/Drivers/ccid/MacOSX/pcsclite.h Tue Jan 22 10:19:04 2008
@@ -1,0 +1,2 @@
+#include <PCSC/pcsclite.h>
+#include <PCSC/wintypes.h>
Added: trunk/Drivers/ccid/MacOSX/reader.h.in
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/MacOSX/reader.h.in?rev=2752&op=file
==============================================================================
--- trunk/Drivers/ccid/MacOSX/reader.h.in (added)
+++ trunk/Drivers/ccid/MacOSX/reader.h.in Tue Jan 22 10:19:04 2008
@@ -1,0 +1,1 @@
+link ../../../PCSC/src/PCSC/reader.h.in
Propchange: trunk/Drivers/ccid/MacOSX/reader.h.in
------------------------------------------------------------------------------
svn:special = *
Added: trunk/Drivers/ccid/MacOSX/winscard.h
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/MacOSX/winscard.h?rev=2752&op=file
==============================================================================
--- trunk/Drivers/ccid/MacOSX/winscard.h (added)
+++ trunk/Drivers/ccid/MacOSX/winscard.h Tue Jan 22 10:19:04 2008
@@ -1,0 +1,2 @@
+#include <PCSC/winscard.h>
+#include <PCSC/wintypes.h>
Added: trunk/Drivers/ccid/MacOSX/wintypes.h
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/MacOSX/wintypes.h?rev=2752&op=file
==============================================================================
--- trunk/Drivers/ccid/MacOSX/wintypes.h (added)
+++ trunk/Drivers/ccid/MacOSX/wintypes.h Tue Jan 22 10:19:04 2008
@@ -1,0 +1,1 @@
+#include <PCSC/wintypes.h>
More information about the Pcsclite-cvs-commit
mailing list