[Pcsclite-git-commit] [CCID] 01/01: MacOSX/configure: use /usr/local/libexec/... on El Capitan

Ludovic Rousseau rousseau at moszumanska.debian.org
Mon Jul 27 21:16:25 UTC 2015


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository CCID.

commit fc2789652b77d9fa8dc1154c6b5ff0f3e1fb8456
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Mon Jul 27 23:13:24 2015 +0200

    MacOSX/configure: use /usr/local/libexec/... on El Capitan
    
    For Mac OS X El Capitan 10.11 it is no more possible to add files in
    /usr/libexec/SmartCardServices/drivers/.
    
    Third party smart card drivers must use
    /usr/local/libexec/SmartCardServices/drivers/ instead.
---
 MacOSX/configure | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/MacOSX/configure b/MacOSX/configure
index 1ba7b30..8447c3b 100755
--- a/MacOSX/configure
+++ b/MacOSX/configure
@@ -79,6 +79,18 @@ then
 	CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-syslog"
 fi
 
+# get the Mac OS X major version. Example: El Capitan 10.11 -> 10011
+MAC_VERSION=$(sw_vers -productVersion | awk -F '.' '{print $1 * 1000 + $2}')
+
+if [ 10011 -gt $MAC_VERSION ]
+then
+	# Mac OS X < 10.11
+	DROPDIR="/usr/libexec/SmartCardServices/drivers"
+else
+	# Mac OS X >= 10.11 (El Capitan)
+	DROPDIR="/usr/local/libexec/SmartCardServices/drivers"
+fi
+
 # do not build a static driver
 # (building fails when linking statically with libusb)
 CONFIGURE_ARGS="$CONFIGURE_ARGS --disable-static"
@@ -111,7 +123,7 @@ set -x
 	LIBUSB_CFLAGS="$LIBUSB_CFLAGS" \
 	LIBUSB_LIBS="$LIBUSB_LIBS" \
 	LDFLAGS="$LDFLAGS" \
-	--enable-usbdropdir=/usr/libexec/SmartCardServices/drivers \
+	--enable-usbdropdir="$DROPDIR" \
 	$CONFIGURE_ARGS \
 	"$@"
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/CCID.git



More information about the Pcsclite-cvs-commit mailing list