diff options
author | manu <manu@pkgsrc.org> | 2012-10-24 08:33:51 +0000 |
---|---|---|
committer | manu <manu@pkgsrc.org> | 2012-10-24 08:33:51 +0000 |
commit | 7edb0c3452784c3bb416919855a38ee64c60cd6b (patch) | |
tree | 5f91b6c50611716144d22bbc11367feb75339b8b /security | |
parent | e38b4719264065d47ee074cc6b61652d65c15093 (diff) | |
download | pkgsrc-7edb0c3452784c3bb416919855a38ee64c60cd6b.tar.gz |
Restore opensc-pkcs11.so functionnality on NetBSD-6.0. libpthread shall
not be loaded by dlopen(), therefore we remove the useless dependency on
-lpthread
Diffstat (limited to 'security')
-rw-r--r-- | security/opensc/Makefile | 4 | ||||
-rw-r--r-- | security/opensc/Makefile.common | 4 | ||||
-rw-r--r-- | security/opensc/distinfo | 4 | ||||
-rw-r--r-- | security/opensc/patches/patch-configure | 28 | ||||
-rw-r--r-- | security/opensc/patches/patch-src_pkcs11_pkcs11-global.c | 13 |
5 files changed, 49 insertions, 4 deletions
diff --git a/security/opensc/Makefile b/security/opensc/Makefile index 6c73cd78128..f72fff498d9 100644 --- a/security/opensc/Makefile +++ b/security/opensc/Makefile @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.10 2012/10/23 18:16:38 asau Exp $ +# $NetBSD: Makefile,v 1.11 2012/10/24 08:33:51 manu Exp $ COMMENT= Smart Card drivers and middleware LICENSE= gnu-lgpl-v2.1 .include "../../security/opensc/Makefile.common" -PKGREVISION= 3 +PKGREVISION= 4 CONFIGURE_ARGS+= --disable-nsplugin diff --git a/security/opensc/Makefile.common b/security/opensc/Makefile.common index a97f1420809..00cf0039038 100644 --- a/security/opensc/Makefile.common +++ b/security/opensc/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.7 2012/10/23 18:16:38 asau Exp $ +# $NetBSD: Makefile.common,v 1.8 2012/10/24 08:33:51 manu Exp $ # # used by security/opensc/Makefile # used by security/opensc-signer/Makefile @@ -23,3 +23,5 @@ USE_TOOLS+= gmake pkg-config CONFIGURE_ARGS+= --with-openssl=${SSLBASE:Q} CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} CONFIGURE_ARGS+= --disable-sensitive-logging +CONFIGURE_ENV+= PCSC_CFLAGS=-I${PREFIX}/include/PCSC + diff --git a/security/opensc/distinfo b/security/opensc/distinfo index b3c728b670f..e3a51b6c525 100644 --- a/security/opensc/distinfo +++ b/security/opensc/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.8 2011/05/27 10:05:52 kivinen Exp $ +$NetBSD: distinfo,v 1.9 2012/10/24 08:33:51 manu Exp $ SHA1 (opensc-0.11.13.tar.gz) = 408b374286004c3df15ec17856f69fd4c2a1aceb RMD160 (opensc-0.11.13.tar.gz) = cd900866e51cd64fa7c5a3287cd58193dec26528 @@ -11,5 +11,7 @@ SHA1 (patch-ae) = 94ca059a2e9bf5689f4193587247e443213df9a4 SHA1 (patch-af) = 3b8db1b680c833940973f11b8abb47e34fa5ecd0 SHA1 (patch-ag) = 1d2de187008d4ce9aac1f97f829aafd035324082 SHA1 (patch-ah) = e9a8e3aa06af5a7ce47015f8eba41fd2bb12b32d +SHA1 (patch-configure) = 65af2389d4a3b875ea206542ac94446e0bfc4796 SHA1 (patch-src_libopensc_card-setcos.c) = 209bf0a92f9872635ea06d5ea9a7742c7874d61d SHA1 (patch-src_libopensc_cards.h) = ebc1db10feda1b2f6a666842120772908c778db7 +SHA1 (patch-src_pkcs11_pkcs11-global.c) = 06c93969a04c930a87a607f6d48a13197c1307bf diff --git a/security/opensc/patches/patch-configure b/security/opensc/patches/patch-configure new file mode 100644 index 00000000000..98a8dfabdcf --- /dev/null +++ b/security/opensc/patches/patch-configure @@ -0,0 +1,28 @@ +$NetBSD: patch-configure,v 1.1 2012/10/24 08:33:51 manu Exp $ + +Make sure we do not link against -lpthread, as we only need mutexes +that can be found in libc. + +Linking with -lpthread hurst with opensc-pkcs11.so since NetBSD-6.0 +libpthread cannot be loaded by dlopen() + +--- configure.orig 2012-10-19 11:29:36.000000000 +0200 ++++ configure 2012-10-19 14:57:03.000000000 +0200 +@@ -12821,8 +12821,17 @@ + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + acx_pthread_ok=no + ++case "${host_cpu}-${host_os}" in ++ *netbsd*) ++ acx_pthread_ok=yes ++ PTHREAD_CFLAGS="" ++ PTHREAD_LIBS="" ++ LIBS="$LIBS -lltdl" ++ ;; ++esac ++ + # We used to check for pthread.h first, but this fails if pthread.h + # requires special compiler flags (e.g. on True64 or Sequent). + # It gets checked for in the link test anyway. + diff --git a/security/opensc/patches/patch-src_pkcs11_pkcs11-global.c b/security/opensc/patches/patch-src_pkcs11_pkcs11-global.c new file mode 100644 index 00000000000..e05d6c28e15 --- /dev/null +++ b/security/opensc/patches/patch-src_pkcs11_pkcs11-global.c @@ -0,0 +1,13 @@ +--- src/pkcs11/pkcs11-global.c.orig 2012-10-22 09:11:56.000000000 +0200 ++++ src/pkcs11/pkcs11-global.c 2012-10-22 09:12:14.000000000 +0200 +@@ -43,9 +43,9 @@ + #if defined(HAVE_PTHREAD) && defined(PKCS11_THREAD_LOCKING) + #include <pthread.h> + CK_RV mutex_create(void **mutex) + { +- pthread_mutex_t *m = (pthread_mutex_t *) malloc(sizeof(*mutex)); ++ pthread_mutex_t *m = (pthread_mutex_t *) malloc(sizeof(*m)); + if (m == NULL) + return CKR_GENERAL_ERROR;; + pthread_mutex_init(m, NULL); + *mutex = m; |