Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

7
security/opensc/DESCR Normal file
View File

@@ -0,0 +1,7 @@
OpenSC provides a set of libraries and utilities to access smart cards.
Its main focus is on cards that support cryptographic operations, and
facilitate their use in security applications such as mail encryption,
authentication, and digital signature. OpenSC implements the PKCS#11 API
so applications supporting this API such as Mozilla Firefox and Thunderbird
can use it. OpenSC implements the PKCS#15 standard and aims to be compatible
with every software that does so, too.

51
security/opensc/Makefile Normal file
View File

@@ -0,0 +1,51 @@
# $NetBSD: Makefile,v 1.15 2013/02/06 23:23:40 jperkin Exp $
OPENSC_PKG_VERSION= 0.12.2
DISTNAME= opensc-${OPENSC_PKG_VERSION}
PKGREVISION= 2
CATEGORIES= security
MASTER_SITES= http://www.opensc-project.org/files/opensc/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.opensc-project.org/opensc/
COMMENT= Smart Card drivers and middleware
LICENSE= gnu-lgpl-v2.1
GNU_CONFIGURE= YES
USE_LIBTOOL= YES
USE_OLD_DES_API= YES
USE_TOOLS+= gmake pkg-config
.include "options.mk"
# Previous versions needed these, but 0.12.2 configure does not
# recognize them.
#CONFIGURE_ARGS+= --with-openssl=${SSLBASE:Q}
#CONFIGURE_ARGS+= --disable-sensitive-logging
# Is this necessary (and non-default)?
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
# This is perhaps an upstream bug.
CONFIGURE_ENV+= PCSC_CFLAGS=-I${PREFIX}/include/PCSC
# The stylesheets are not found without this.
CONFIGURE_ARGS+= --with-xsl-stylesheetsdir=${BUILDLINK_PREFIX.docbook-xsl}/share/xsl/docbook
EGDIR= ${PREFIX}/share/examples/opensc
CONF_FILES+= ${EGDIR}/opensc.conf ${PKG_SYSCONFDIR}/opensc.conf
INSTALLATION_DIRS= ${EGDIR}
post-install:
${INSTALL_DATA} ${WRKSRC}/etc/opensc.conf ${DESTDIR}${EGDIR}
# build tools for doc; should be TOOLS
.include "../../textproc/libxslt/buildlink3.mk"
.include "../../textproc/docbook-xsl/buildlink3.mk"
.include "../../devel/libltdl/buildlink3.mk"
.include "../../devel/readline/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
BUILDLINK_API_DEPENDS.openssl+= openssl>=0.9.7
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

61
security/opensc/PLIST Normal file
View File

@@ -0,0 +1,61 @@
@comment $NetBSD: PLIST,v 1.6 2012/11/30 14:44:34 gdt Exp $
bin/cardos-tool
bin/cryptoflex-tool
bin/eidenv
bin/netkey-tool
bin/opensc-explorer
bin/opensc-tool
bin/piv-tool
bin/pkcs11-tool
bin/pkcs15-crypt
bin/pkcs15-init
bin/pkcs15-tool
bin/westcos-tool
lib/libopensc.la
lib/onepin-opensc-pkcs11.la
lib/opensc-pkcs11.la
lib/pkcs11-spy.la
lib/pkcs11/onepin-opensc-pkcs11.so
lib/pkcs11/opensc-pkcs11.so
lib/pkcs11/pkcs11-spy.so
man/man1/cardos-tool.1
man/man1/cryptoflex-tool.1
man/man1/eidenv.1
man/man1/netkey-tool.1
man/man1/opensc-explorer.1
man/man1/opensc-tool.1
man/man1/piv-tool.1
man/man1/pkcs11-tool.1
man/man1/pkcs15-crypt.1
man/man1/pkcs15-init.1
man/man1/pkcs15-tool.1
man/man1/westcos-tool.1
man/man5/pkcs15-profile.5
share/doc/opensc/NEWS
share/examples/opensc/opensc.conf
share/opensc/asepcos.profile
share/opensc/authentic.profile
share/opensc/cardos.profile
share/opensc/cyberflex.profile
share/opensc/entersafe.profile
share/opensc/flex.profile
share/opensc/gpk.profile
share/opensc/ias_adele_admin1.profile
share/opensc/ias_adele_admin2.profile
share/opensc/ias_adele_common.profile
share/opensc/iasecc.profile
share/opensc/iasecc_admin_eid.profile
share/opensc/iasecc_generic_oberthur.profile
share/opensc/iasecc_generic_pki.profile
share/opensc/incrypto34.profile
share/opensc/jcop.profile
share/opensc/miocos.profile
share/opensc/muscle.profile
share/opensc/myeid.profile
share/opensc/oberthur.profile
share/opensc/pkcs15.profile
share/opensc/rutoken.profile
share/opensc/rutoken_ecp.profile
share/opensc/setcos.profile
share/opensc/starcos.profile
share/opensc/westcos.profile

12
security/opensc/distinfo Normal file
View File

@@ -0,0 +1,12 @@
$NetBSD: distinfo,v 1.10 2012/11/30 14:44:34 gdt Exp $
SHA1 (opensc-0.12.2.tar.gz) = 8c34be52eb94025eb181c02b466223901bef744c
RMD160 (opensc-0.12.2.tar.gz) = 45504135db05fd404a357ebd8bea047c5c8604dc
Size (opensc-0.12.2.tar.gz) = 1738553 bytes
SHA1 (patch-aa) = f7993647c19d3cca3b976d66a97ee18fca12f8b2
SHA1 (patch-ab) = 4d19b0990b227aceb3ab4bf8c1f222f337ee1ff7
SHA1 (patch-configure) = fcd938ec3f269642fbd577868768c8ac67270be6
SHA1 (patch-src_common_compat__getopt.c) = a1a473a6d2690dacb968be7991e6218233b20e7f
SHA1 (patch-src_common_compat__getopt.h) = cdd04e708f249a3969a47c4ed458d6b86a11d2f1
SHA1 (patch-src_common_compat__getopt__main.c) = 0a9a608434ec8f274627b2f65f5c53a6ceb79f2a
SHA1 (patch-src_pkcs11_pkcs11-global.c) = 5d0d23706f932f10a63d8da82ab34d3c00e470f5

View File

@@ -0,0 +1,26 @@
# $NetBSD: options.mk,v 1.3 2012/12/03 20:23:15 gdt Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.opensc
# Arguably these should be selectable individually, but upstream requires
# that exactly one be chosen.
PKG_OPTIONS_REQUIRED_GROUPS= cardreader
PKG_OPTIONS_GROUP.cardreader= pcsc-lite openct
PKG_SUGGESTED_OPTIONS= pcsc-lite
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mpcsc-lite)
.include "../../security/pcsc-lite/buildlink3.mk"
CONFIGURE_ARGS+= --enable-pcsc
CONFIGURE_ARGS+= --with-pcsc-provider=${BUILDLINK_PREFIX.pcsc-lite}/lib/libpcsclite.la
.else
CONFIGURE_ARGS+= --disable-pcsc
.endif
.if !empty(PKG_OPTIONS:Mopenct)
.include "../../security/openct/buildlink3.mk"
CONFIGURE_ARGS+= --enable-openct
.else
CONFIGURE_ARGS+= --disable-openct
.endif

View File

@@ -0,0 +1,21 @@
$NetBSD: patch-aa,v 1.3 2012/11/30 14:44:34 gdt Exp $
Disable installation of config file, because pkgsrc installs config
files as examples.
--- etc/Makefile.in.orig 2011-07-15 10:47:01.000000000 +0000
+++ etc/Makefile.in
@@ -466,12 +466,7 @@ opensc.conf: opensc.conf.in force
-e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
-e 's|@DEFAULT_PCSC_PROVIDER[@]|$(DEFAULT_PCSC_PROVIDER)|g' \
< $< > $@
-install-exec-hook: install-sysconfDATA opensc.conf
- if [ -f "$(DESTDIR)$(sysconfdir)/opensc.conf" ]; then \
- $(INSTALL_DATA) opensc.conf "$(DESTDIR)$(sysconfdir)/opensc.conf.new"; \
- else \
- $(INSTALL_DATA) opensc.conf "$(DESTDIR)$(sysconfdir)/opensc.conf"; \
- fi
+install-exec-hook:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-ab,v 1.3 2012/11/30 14:44:34 gdt Exp $
This patch was added 2009-09-10 by hasso@, with comment:
More userfriendly default configuration.
--- etc/opensc.conf.in.orig 2011-07-05 11:28:53.000000000 +0000
+++ etc/opensc.conf.in
@@ -309,6 +309,7 @@ app default {
#
# Default: no
# try_emulation_first = yes;
+ try_emulation_first = yes;
# Enable builtin emulators.
# Default: yes

View File

@@ -0,0 +1,26 @@
$NetBSD: patch-configure,v 1.2 2012/11/30 14:44:35 gdt 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 2011-07-15 10:46:59.000000000 +0000
+++ configure
@@ -12903,6 +12903,15 @@ 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.

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-src_common_compat__getopt.c,v 1.1 2012/11/30 14:44:35 gdt Exp $
See comment in patch-src_common_compat__getopt.h.
--- src/common/compat_getopt.c.orig 2011-07-05 11:28:53.000000000 +0000
+++ src/common/compat_getopt.c
@@ -25,7 +25,7 @@
#include "config.h"
-#if ! ( defined(HAVE_GETOPT_H) && defined(HAVE_GETOPT_LONG) && defined(HAVE_GETOPT_LONG_ONLY) )
+#if ! ( defined(HAVE_GETOPT_H) && defined(HAVE_GETOPT_LONG) )
#include <sys/types.h>
#include <stdlib.h>

View File

@@ -0,0 +1,37 @@
$NetBSD: patch-src_common_compat__getopt.h,v 1.1 2012/11/30 14:44:35 gdt Exp $
NetBSD has getopt_long but not getopt_long_only. Replacing
getopt_long causes a type conflict with the built-in implementation.
The replacement is unnecesssary because getopt_long_only is not
actually used.
Reported upstream:
https://www.opensc-project.org/pipermail/opensc-devel/2012-November/018668.html
--- src/common/compat_getopt.h.orig 2011-07-05 11:28:53.000000000 +0000
+++ src/common/compat_getopt.h
@@ -30,7 +30,7 @@
#include "config.h"
#endif
-#if defined(HAVE_GETOPT_H) && defined(HAVE_GETOPT_LONG) && defined(HAVE_GETOPT_LONG_ONLY)
+#if defined(HAVE_GETOPT_H) && defined(HAVE_GETOPT_LONG)
#include <getopt.h>
#else
@@ -43,7 +43,6 @@ extern "C" {
#define getopt my_getopt
#define getopt_long my_getopt_long
-#define getopt_long_only my_getopt_long_only
#define _getopt_internal _my_getopt_internal
#define opterr my_opterr
#define optind my_optind
@@ -86,6 +85,6 @@ extern int _my_getopt_internal(int argc,
}
#endif
-#endif /* HAVE_GETOPT_H && HAVE_GETOPT_LONG && HAVE_GETOPT_LONG_ONLY */
+#endif /* HAVE_GETOPT_H && HAVE_GETOPT_LONG */
#endif /* MY_GETOPT_H_INCLUDED */

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-src_common_compat__getopt__main.c,v 1.1 2012/11/30 14:44:35 gdt Exp $
See comment in patch-src_common_compat__getopt.h. In addition, a
kludge is added here to get the test file to build, pending a new
release from upstream with the issue properly addressed.
--- src/common/compat_getopt_main.c.orig 2011-07-05 11:28:53.000000000 +0000
+++ src/common/compat_getopt_main.c
@@ -173,6 +173,8 @@ main(int argc, char * argv[])
progname);
}
+#define getopt_long_only getopt_long
+
/* parse all options from the command line */
while ((opt =
getopt_long_only(argc, argv, shortopts, longopts, &longind)) != -1)

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-src_pkcs11_pkcs11-global.c,v 1.2 2012/11/30 14:44:35 gdt Exp $
Use correct size for malloc.
Not yet reported upstream.
--- src/pkcs11/pkcs11-global.c.orig 2011-07-05 11:28:53.000000000 +0000
+++ src/pkcs11/pkcs11-global.c
@@ -42,7 +42,7 @@ extern CK_FUNCTION_LIST pkcs11_function_
#include <pthread.h>
CK_RV mutex_create(void **mutex)
{
- pthread_mutex_t *m = malloc(sizeof(*mutex));
+ pthread_mutex_t *m = malloc(sizeof(*m));
if (m == NULL)
return CKR_GENERAL_ERROR;;
pthread_mutex_init(m, NULL);