Hi,

This is the last diff from my pcsc-lite/ccid work.

The diff below enables pcsclite support for security/gnupg2.

Ok?

P.S.: native speakers, please tell me if README is good enough...

Ciao,
David

Index: Makefile
===================================================================
RCS file: /cvs/ports/security/gnupg2/Makefile,v
retrieving revision 1.19
diff -u -p -r1.19 Makefile
--- Makefile    14 May 2012 08:49:54 -0000      1.19
+++ Makefile    7 Aug 2012 12:02:51 -0000
@@ -3,7 +3,7 @@
 COMMENT =      gnu privacy guard - a free PGP replacement
 
 DISTNAME =     gnupg-2.0.19
-REVISION =     0
+REVISION =     1
 CATEGORIES =   security
 
 MASTER_SITES =         ftp://ftp.gnupg.org/gcrypt/gnupg/ \
@@ -62,7 +62,7 @@ USE_GROFF =           Yes
 
 CONFIGURE_STYLE =      gnu
 CONFIGURE_ENV =        CPPFLAGS="-I${LOCALBASE}/include" \
-                       LDFLAGS="-L${LOCALBASE}/lib -pthread"
+                       LDFLAGS="-L${LOCALBASE}/lib"
 CONFIGURE_ARGS =       docdir=${LOCALBASE}/share/doc/gnupg2 \
                        --enable-gpgtar
 
Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure     7 Aug 2012 12:02:51 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- configure.orig     Tue Mar 27 10:22:50 2012
++++ configure  Tue Aug  7 13:10:12 2012
+@@ -7851,7 +7851,7 @@ if ${ac_cv_lib_usb_usb_bulk_write+:} false; then :
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lusb  $LIBS"
++LIBS="-lusb -pthread $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+@@ -7882,7 +7882,7 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$ac_cv_lib_usb_usb_bulk_write" >&5
+ $as_echo "$ac_cv_lib_usb_usb_bulk_write" >&6; }
+ if test "x$ac_cv_lib_usb_usb_bulk_write" = xyes; then :
+-   LIBUSB_LIBS="$LIBUSB_LIBS -lusb"
++   LIBUSB_LIBS="$LIBUSB_LIBS -lusb -pthread"
+ 
+ $as_echo "#define HAVE_LIBUSB 1" >>confdefs.h
+ 
Index: patches/patch-scd_Makefile_in
===================================================================
RCS file: /cvs/ports/security/gnupg2/patches/patch-scd_Makefile_in,v
retrieving revision 1.1
diff -u -p -r1.1 patch-scd_Makefile_in
--- patches/patch-scd_Makefile_in       14 May 2012 08:49:54 -0000      1.1
+++ patches/patch-scd_Makefile_in       7 Aug 2012 12:02:51 -0000
@@ -1,15 +1,12 @@
 $OpenBSD: patch-scd_Makefile_in,v 1.1 2012/05/14 08:49:54 dcoppa Exp $
-
-No PC/SC-Lite (pcsc-lite) support for now
-
 --- scd/Makefile.in.orig       Tue Mar 27 10:22:48 2012
-+++ scd/Makefile.in    Sun May 13 18:23:49 2012
-@@ -70,7 +70,7 @@ POST_UNINSTALL = :
- build_triplet = @build@
- host_triplet = @host@
- bin_PROGRAMS = scdaemon$(EXEEXT)
--@HAVE_W32_SYSTEM_FALSE@libexec_PROGRAMS = gnupg-pcsc-wrapper$(EXEEXT)
-+@HAVE_W32_SYSTEM_FALSE@libexec_PROGRAMS =
- DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(top_srcdir)/am/cmacros.am
- @HAVE_DOSISH_SYSTEM_FALSE@am__append_1 = -DGNUPG_BINDIR="\"$(bindir)\""       
     \
++++ scd/Makefile.in    Tue Aug  7 12:40:15 2012
+@@ -227,7 +227,7 @@ KSBA_CONFIG = @KSBA_CONFIG@
+ KSBA_LIBS = @KSBA_LIBS@
+ LDAPLIBS = @LDAPLIBS@
+ LDAP_CPPFLAGS = @LDAP_CPPFLAGS@
+-LDFLAGS = @LDFLAGS@
++LDFLAGS = @LDFLAGS@ -pthread -Wl,--export-dynamic
+ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
+ LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
+ LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
Index: patches/patch-scd_apdu_c
===================================================================
RCS file: patches/patch-scd_apdu_c
diff -N patches/patch-scd_apdu_c
--- patches/patch-scd_apdu_c    14 May 2012 08:49:54 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-$OpenBSD: patch-scd_apdu_c,v 1.3 2012/05/14 08:49:54 dcoppa Exp $
-
-No PC/SC-Lite (pcsc-lite) support for now
-
---- scd/apdu.c.orig    Tue Mar 27 10:00:38 2012
-+++ scd/apdu.c Sun May 13 18:41:37 2012
-@@ -66,7 +66,7 @@
- /* Due to conflicting use of threading libraries we usually can't link
-    against libpcsclite.   Instead we use a wrapper program.  */
- #ifdef USE_GNU_PTH
--#if !defined(HAVE_W32_SYSTEM) && !defined(__CYGWIN__)
-+#if !defined(HAVE_W32_SYSTEM) && !defined(__CYGWIN__) && !defined(__OpenBSD__)
- #define NEED_PCSC_WRAPPER 1
- #endif
- #endif
-@@ -2389,6 +2389,9 @@ apdu_open_reader (const char *portstr, int *r_no_servi
-   /* No ctAPI configured, so lets try the PC/SC API */
-   if (!pcsc_api_loaded)
-     {
-+#ifdef __OpenBSD__
-+      return -1;
-+#endif
- #ifndef NEED_PCSC_WRAPPER
-       void *handle;
- 
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/security/gnupg2/pkg/PLIST,v
retrieving revision 1.7
diff -u -p -r1.7 PLIST
--- pkg/PLIST   14 May 2012 08:49:54 -0000      1.7
+++ pkg/PLIST   7 Aug 2012 12:02:51 -0000
@@ -15,6 +15,7 @@ bin/gpgsm-gencert.sh
 @bin bin/scdaemon
 @bin bin/watchgnupg
 @info info/gnupg.info
+@bin libexec/gnupg-pcsc-wrapper
 @bin libexec/gpg-check-pattern
 @bin libexec/gpg-preset-passphrase
 @bin libexec/gpg-protect-tool
@@ -52,6 +53,7 @@ share/doc/gnupg2/examples/gpgconf.conf
 share/doc/gnupg2/examples/pwpattern.list
 share/doc/gnupg2/examples/scd-event
 share/doc/gnupg2/examples/trustlist.txt
+share/doc/pkg-readmes/${FULLPKGNAME}
 share/gnupg/
 share/gnupg/com-certs.pem
 share/gnupg/gpg-conf.skel
Index: pkg/README
===================================================================
RCS file: pkg/README
diff -N pkg/README
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/README  7 Aug 2012 12:02:51 -0000
@@ -0,0 +1,9 @@
+$OpenBSD$
+
++-----------------------------------------------------------------------
+| Running ${FULLPKGNAME} on OpenBSD
++-----------------------------------------------------------------------
+
+In order to use a card reader other than the few ones supported by
+GnuPG's internal CCID driver, ccid from security/ccid needs to be
+installed.

Reply via email to