pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/security/opensc Restore opensc-pkcs11.so functionnalit...
details: https://anonhg.NetBSD.org/pkgsrc/rev/8c7812f1dae2
branches: trunk
changeset: 610418:8c7812f1dae2
user: manu <manu%pkgsrc.org@localhost>
date: Wed Oct 24 08:33:51 2012 +0000
description:
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:
security/opensc/Makefile | 4 +-
security/opensc/Makefile.common | 4 +-
security/opensc/distinfo | 4 +-
security/opensc/patches/patch-configure | 28 ++++++++++++++++
security/opensc/patches/patch-src_pkcs11_pkcs11-global.c | 13 +++++++
5 files changed, 49 insertions(+), 4 deletions(-)
diffs (98 lines):
diff -r ee7fd001f9b1 -r 8c7812f1dae2 security/opensc/Makefile
--- a/security/opensc/Makefile Wed Oct 24 05:49:25 2012 +0000
+++ b/security/opensc/Makefile Wed Oct 24 08:33:51 2012 +0000
@@ -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 -r ee7fd001f9b1 -r 8c7812f1dae2 security/opensc/Makefile.common
--- a/security/opensc/Makefile.common Wed Oct 24 05:49:25 2012 +0000
+++ b/security/opensc/Makefile.common Wed Oct 24 08:33:51 2012 +0000
@@ -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 @@
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 -r ee7fd001f9b1 -r 8c7812f1dae2 security/opensc/distinfo
--- a/security/opensc/distinfo Wed Oct 24 05:49:25 2012 +0000
+++ b/security/opensc/distinfo Wed Oct 24 08:33:51 2012 +0000
@@ -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-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 -r ee7fd001f9b1 -r 8c7812f1dae2 security/opensc/patches/patch-configure
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/opensc/patches/patch-configure Wed Oct 24 08:33:51 2012 +0000
@@ -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 -r ee7fd001f9b1 -r 8c7812f1dae2 security/opensc/patches/patch-src_pkcs11_pkcs11-global.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/opensc/patches/patch-src_pkcs11_pkcs11-global.c Wed Oct 24 08:33:51 2012 +0000
@@ -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;
Home |
Main Index |
Thread Index |
Old Index