Fri Nov 30 14:44:35 2012 UTC ()
Update to 0.12.2.

Thanks to manu@ for testing and resolving pcsc-lite ptthread leakage
problems.

Note that pcsc-lite and openct should be an options group.

Disable some obsolete CONFIGURE_ARGS.

Work around assumption that either getopt_long_only is present or
allgetopt functions must be provided.

Finnish EID patches have been applied upstream (from whence they came,
perhaps).

>From upstream NEWS:

Complete change history is available online:
http://www.opensc-project.org/opensc/timeline

New in 0.12.2; 2011-07-15
* Builds are now silent by default when OpenSC is built from source on Unix.
* Using --wait with command line tools works with 64bit Linux again.
* Greatly improved OpenPGP card support, including OpenPGP 2.0 cards
  like the one found in German Privacy Foundation CryptoStick.
* Fixed support for FINeID cards issued after 01.03.2011 with 2048bit keys.
* #256: Fixed support for TCOS cards (broken since 0.12.0).
* Added support for IDKey-cards to TCOS3 driver.
* #361: Improved PC/SC driver to fetch the maximum PIN sizes from the open
  source CCID driver. This fixes the issue for Linux/OSX with recent driver.
* WindowsInstaller now installs only static DLL-s (PKCS#11, minidriver) to
  system folder.
* Fix FINeID cards for organizations.
* Several smaller bugs and compiler warnings fixed.

New in 0.12.1; 2011-05-17
* New card driver: IAS/ECC 1.0.1
* rutoken-tool has been deprecated and removed.
* eidenv and piv-tool utilities now have manual pages.
* pkcs11-tool now requires the use of --module parameter.
* All tools can now use an ATR as an argument to --reader, to skip to the
  card with given ATR.
* opensc-tool -l with -v now shows information about the inserted cards.
* Creating files have an enforced upper size limit, 64K
* Support for multiple PKCS#15 applications with different AID-s.
  PKCS#15 applications can be listed with pkcs15-tool --list-applications.
  Binding to a specific AID with PKCS#15 tools can be done with --aid.
* Hex strings (like card ATR or APDU-s) can now be separated by space, in
  addition to colons.
* Pinpad readers known to be bogus are now ignored by OpenSC. At the moment
  only "HP USB Smart Card Keyboard" is disabled.
* Windows installer is now distributed as a statically built MSI, for both
  x86 and x64.
* Numerous compiler warnings, unused code and internal bugs have been
  eliminated.

New in 0.12.0; 2010-12-22
* OpenSC uses a single reader driver, specified at compile time.
* New card driver: Italian eID (CNS) by Emanuele Pucciarelli.
* New card driver: Portuguese eID by Jo達o Poupino.
* New card driver: westcos by Fran巽ois Leblanc.
* pkcs11-tool can use a slot based on ID, label or index in the slot list.
* PIN flags are updated from supported cards when C_GetTokenInfo is called.
* Support for CardOS 4.4 cards added.
* Fature to exclude readers from OpenSC PKCS#11 via "ignored_readers"
  configuration file entry.
* #229: Support semi-automatic fixes to cards personalized with older and
  broken OpenSC versions.
* Software keys removed from pkcs15-init and the PKCS#11 module. OpenSC
  can either generate keys on card or import plaintext keys to the card, but
  will never generate plaintext key material in software by itself.
  All traces of a software token (PKCS#15 Section 7) shall be removed.
* Updates to PC/SC driver to build with pcsc-lite >= 1.6.2
* Build script for a binary Mac OS X installer for 10.5 and 10.6 systems.
  Binary installer includes OpenSC.tokend for platform integration.
  10.6 installer includes engine_pkcs11.
* Modify Rutoken S binary interfaces by Aktiv Co.
* Support GOST R 34.10-2001 and GOST R 34.11-94 by Aktiv Co.
* CardOS driver now emulates sign on rsa keys with sign+decrypt usage
  with padding and decrypt(). This is compatible with old cards and
  card initialized by Siemens software. Removed "--split-key" option,
  as it is no longer needed.
* Improved debugging support: debug level 3 will show everything
  except of ASN1 and card matching debugging (usualy not needed).
* Massive changes to libopensc. This library is now internal, only
  used by opensc-pkcs11.so and command line tools. Header files are
  no longer installed, library should not be used by other applications.
  Please use generic PKCS#11 interface instead.
* #include file statements cleaned up: first include "config.h", then
  system headers, then additional libraries, then headers in opensc
  (but from other directories), then header files from same directory.
  Fix path to reference headers, remove src/include/ directory.
* Various source code fixes and improvements.
* OpenSC now depends on xsltproc utility and docbook-xsl to build docs and man
* Remove iconv dependency. EstEID driver now uses the commonName from the
  certificate for card label.
* Possibility to change the default behavior for card resets via
  opensc.conf.


(gdt)
diff -r1.11 -r1.12 pkgsrc/security/opensc/Makefile
diff -r1.8 -r1.9 pkgsrc/security/opensc/Makefile.common
diff -r1.5 -r1.6 pkgsrc/security/opensc/PLIST
diff -r1.9 -r1.10 pkgsrc/security/opensc/distinfo
diff -r1.1.1.1 -r1.2 pkgsrc/security/opensc/options.mk
diff -r1.2 -r1.3 pkgsrc/security/opensc/patches/patch-aa
diff -r1.2 -r1.3 pkgsrc/security/opensc/patches/patch-ab
diff -r1.1 -r0 pkgsrc/security/opensc/patches/patch-ac
diff -r1.1 -r0 pkgsrc/security/opensc/patches/patch-ad
diff -r1.1 -r0 pkgsrc/security/opensc/patches/patch-ae
diff -r1.1 -r0 pkgsrc/security/opensc/patches/patch-af
diff -r1.1 -r0 pkgsrc/security/opensc/patches/patch-ag
diff -r1.1 -r0 pkgsrc/security/opensc/patches/patch-ah
diff -r1.1 -r0 pkgsrc/security/opensc/patches/patch-src_libopensc_card-setcos.c
diff -r1.1 -r0 pkgsrc/security/opensc/patches/patch-src_libopensc_cards.h
diff -r1.1 -r1.2 pkgsrc/security/opensc/patches/patch-configure
diff -r1.1 -r1.2 pkgsrc/security/opensc/patches/patch-src_pkcs11_pkcs11-global.c
diff -r0 -r1.1 pkgsrc/security/opensc/patches/patch-src_common_compat__getopt.c
diff -r0 -r1.1 pkgsrc/security/opensc/patches/patch-src_common_compat__getopt.h
diff -r0 -r1.1 pkgsrc/security/opensc/patches/patch-src_common_compat__getopt__main.c

cvs diff -r1.11 -r1.12 pkgsrc/security/opensc/Makefile (expand / switch to unified diff)

--- pkgsrc/security/opensc/Makefile 2012/10/24 08:33:51 1.11
+++ pkgsrc/security/opensc/Makefile 2012/11/30 14:44:34 1.12
@@ -1,23 +1,25 @@ @@ -1,23 +1,25 @@
1# $NetBSD: Makefile,v 1.11 2012/10/24 08:33:51 manu Exp $ 1# $NetBSD: Makefile,v 1.12 2012/11/30 14:44:34 gdt Exp $
2 2
3COMMENT= Smart Card drivers and middleware 3COMMENT= Smart Card drivers and middleware
4LICENSE= gnu-lgpl-v2.1 4LICENSE= gnu-lgpl-v2.1
5 5
6.include "../../security/opensc/Makefile.common" 6.include "../../security/opensc/Makefile.common"
7 7
8PKGREVISION= 4 8CONFIGURE_ARGS+= --with-xsl-stylesheetsdir=${BUILDLINK_PREFIX.docbook-xsl}/share/xsl/docbook
9 
10CONFIGURE_ARGS+= --disable-nsplugin 
11 9
12EGDIR= ${PREFIX}/share/examples/opensc 10EGDIR= ${PREFIX}/share/examples/opensc
13CONF_FILES+= ${EGDIR}/opensc.conf ${PKG_SYSCONFDIR}/opensc.conf 11CONF_FILES+= ${EGDIR}/opensc.conf ${PKG_SYSCONFDIR}/opensc.conf
14 12
15INSTALLATION_DIRS= ${EGDIR} 13INSTALLATION_DIRS= ${EGDIR}
16post-install: 14post-install:
17 ${INSTALL_DATA} ${WRKSRC}/etc/opensc.conf ${DESTDIR}${EGDIR} 15 ${INSTALL_DATA} ${WRKSRC}/etc/opensc.conf ${DESTDIR}${EGDIR}
18 16
 17# build tools for doc
 18.include "../../textproc/libxslt/buildlink3.mk"
 19.include "../../textproc/docbook-xsl/buildlink3.mk"
 20
19.include "../../devel/libltdl/buildlink3.mk" 21.include "../../devel/libltdl/buildlink3.mk"
20.include "../../devel/readline/buildlink3.mk" 22.include "../../devel/readline/buildlink3.mk"
21.include "../../devel/zlib/buildlink3.mk" 23.include "../../devel/zlib/buildlink3.mk"
22.include "../../security/openssl/buildlink3.mk" 24.include "../../security/openssl/buildlink3.mk"
23.include "../../mk/bsd.pkg.mk" 25.include "../../mk/bsd.pkg.mk"

cvs diff -r1.8 -r1.9 pkgsrc/security/opensc/Attic/Makefile.common (expand / switch to unified diff)

--- pkgsrc/security/opensc/Attic/Makefile.common 2012/10/24 08:33:51 1.8
+++ pkgsrc/security/opensc/Attic/Makefile.common 2012/11/30 14:44:34 1.9
@@ -1,27 +1,29 @@ @@ -1,27 +1,29 @@
1# $NetBSD: Makefile.common,v 1.8 2012/10/24 08:33:51 manu Exp $ 1# $NetBSD: Makefile.common,v 1.9 2012/11/30 14:44:34 gdt Exp $
2# 2#
3# used by security/opensc/Makefile 3# used by security/opensc/Makefile
4# used by security/opensc-signer/Makefile 4# used by security/opensc-signer/Makefile
5 5
6OPENSC_PKG_VERSION= 0.11.13 6OPENSC_PKG_VERSION= 0.12.2
7DISTNAME= opensc-${OPENSC_PKG_VERSION} 7DISTNAME= opensc-${OPENSC_PKG_VERSION}
8CATEGORIES= security 8CATEGORIES= security
9MASTER_SITES= http://www.opensc-project.org/files/opensc/ 9MASTER_SITES= http://www.opensc-project.org/files/opensc/
10 10
11MAINTAINER= pkgsrc-users@NetBSD.org 11MAINTAINER= pkgsrc-users@NetBSD.org
12HOMEPAGE= http://www.opensc-project.org/opensc/ 12HOMEPAGE= http://www.opensc-project.org/opensc/
13 13
14BUILDLINK_API_DEPENDS.openssl+= openssl>=0.9.7 14BUILDLINK_API_DEPENDS.openssl+= openssl>=0.9.7
15 15
16GNU_CONFIGURE= YES 16GNU_CONFIGURE= YES
17USE_LIBTOOL= YES 17USE_LIBTOOL= YES
18USE_OLD_DES_API= YES 18USE_OLD_DES_API= YES
19USE_TOOLS+= gmake pkg-config 19USE_TOOLS+= gmake pkg-config
20 20
21.include "options.mk" 21.include "options.mk"
22 22
23CONFIGURE_ARGS+= --with-openssl=${SSLBASE:Q} 23# Previous versions needed these, but 0.12.2 configure does not
 24# recognize them.
 25#CONFIGURE_ARGS+= --with-openssl=${SSLBASE:Q}
 26#CONFIGURE_ARGS+= --disable-sensitive-logging
 27
24CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} 28CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
25CONFIGURE_ARGS+= --disable-sensitive-logging 
26CONFIGURE_ENV+= PCSC_CFLAGS=-I${PREFIX}/include/PCSC 29CONFIGURE_ENV+= PCSC_CFLAGS=-I${PREFIX}/include/PCSC
27 

cvs diff -r1.5 -r1.6 pkgsrc/security/opensc/PLIST (expand / switch to unified diff)

--- pkgsrc/security/opensc/PLIST 2010/09/01 15:59:22 1.5
+++ pkgsrc/security/opensc/PLIST 2012/11/30 14:44:34 1.6
@@ -1,133 +1,61 @@ @@ -1,133 +1,61 @@
1@comment $NetBSD: PLIST,v 1.5 2010/09/01 15:59:22 drochner Exp $ 1@comment $NetBSD: PLIST,v 1.6 2012/11/30 14:44:34 gdt Exp $
2bin/cardos-info 
3bin/cardos-tool 2bin/cardos-tool
4bin/cryptoflex-tool 3bin/cryptoflex-tool
5bin/eidenv 4bin/eidenv
6bin/netkey-tool 5bin/netkey-tool
7bin/opensc-config 
8bin/opensc-explorer 6bin/opensc-explorer
9bin/opensc-tool 7bin/opensc-tool
10bin/piv-tool 8bin/piv-tool
11bin/pkcs11-tool 9bin/pkcs11-tool
12bin/pkcs15-crypt 10bin/pkcs15-crypt
13bin/pkcs15-init 11bin/pkcs15-init
14bin/pkcs15-tool 12bin/pkcs15-tool
15bin/rutoken-tool 
16bin/westcos-tool 13bin/westcos-tool
17include/opensc/asn1.h 
18include/opensc/cardctl.h 
19include/opensc/compression.h 
20include/opensc/emv.h 
21include/opensc/errors.h 
22include/opensc/log.h 
23include/opensc/opensc.h 
24include/opensc/pkcs11-opensc.h 
25include/opensc/pkcs11.h 
26include/opensc/pkcs15-init.h 
27include/opensc/pkcs15.h 
28include/opensc/scconf.h 
29include/opensc/types.h 
30include/opensc/ui.h 
31lib/libopensc.la 14lib/libopensc.la
32lib/libpkcs15init.la 
33lib/libscconf.la 
34lib/onepin-opensc-pkcs11.la 15lib/onepin-opensc-pkcs11.la
35lib/opensc-pkcs11.la 16lib/opensc-pkcs11.la
36lib/pkcs11-spy.la 17lib/pkcs11-spy.la
37lib/pkcs11/onepin-opensc-pkcs11.so 18lib/pkcs11/onepin-opensc-pkcs11.so
38lib/pkcs11/opensc-pkcs11.so 19lib/pkcs11/opensc-pkcs11.so
39lib/pkcs11/pkcs11-spy.so 20lib/pkcs11/pkcs11-spy.so
40lib/pkgconfig/libopensc.pc 
41lib/pkgconfig/libpkcs15init.pc 
42lib/pkgconfig/libscconf.pc 
43man/man1/cardos-tool.1 21man/man1/cardos-tool.1
44man/man1/cryptoflex-tool.1 22man/man1/cryptoflex-tool.1
 23man/man1/eidenv.1
45man/man1/netkey-tool.1 24man/man1/netkey-tool.1
46man/man1/opensc-config.1 
47man/man1/opensc-explorer.1 25man/man1/opensc-explorer.1
48man/man1/opensc-tool.1 26man/man1/opensc-tool.1
 27man/man1/piv-tool.1
49man/man1/pkcs11-tool.1 28man/man1/pkcs11-tool.1
50man/man1/pkcs15-crypt.1 29man/man1/pkcs15-crypt.1
51man/man1/pkcs15-init.1 30man/man1/pkcs15-init.1
52man/man1/pkcs15-tool.1 31man/man1/pkcs15-tool.1
53man/man1/westcos-tool.1 32man/man1/westcos-tool.1
54man/man3/sc_app_info_t.3 
55man/man3/sc_append_record.3 
56man/man3/sc_asn1_decode.3 
57man/man3/sc_asn1_encode.3 
58man/man3/sc_asn1_entry.3 
59man/man3/sc_asn1_find_tag.3 
60man/man3/sc_asn1_print_tags.3 
61man/man3/sc_asn1_put_tag.3 
62man/man3/sc_asn1_read_tag.3 
63man/man3/sc_asn1_skip_tag.3 
64man/man3/sc_asn1_verify_tag.3 
65man/man3/sc_base64_decode.3 
66man/man3/sc_base64_encode.3 
67man/man3/sc_card_ctl.3 
68man/man3/sc_card_t.3 
69man/man3/sc_card_valid.3 
70man/man3/sc_check_sw.3 
71man/man3/sc_connect_card.3 
72man/man3/sc_copy_asn1_entry.3 
73man/man3/sc_create_file.3 
74man/man3/sc_delete_file.3 
75man/man3/sc_delete_record.3 
76man/man3/sc_der_clear.3 
77man/man3/sc_der_copy.3 
78man/man3/sc_detect_card_presence.3 
79man/man3/sc_disconnect_card.3 
80man/man3/sc_enum_apps.3 
81man/man3/sc_establish_context.3 
82man/man3/sc_file_dup.3 
83man/man3/sc_file_free.3 
84man/man3/sc_file_new.3 
85man/man3/sc_file_t.3 
86man/man3/sc_find_app_by_aid.3 
87man/man3/sc_find_pkcs15_app.3 
88man/man3/sc_format_apdu.3 
89man/man3/sc_format_asn1_entry.3 
90man/man3/sc_free_apps.3 
91man/man3/sc_get_cache_dir.3 
92man/man3/sc_get_challenge.3 
93man/man3/sc_get_data.3 
94man/man3/sc_list_files.3 
95man/man3/sc_lock.3 
96man/man3/sc_make_cache_dir.3 
97man/man3/sc_put_data.3 
98man/man3/sc_read_binary.3 
99man/man3/sc_read_record.3 
100man/man3/sc_release_context.3 
101man/man3/sc_select_file.3 
102man/man3/sc_set_card_driver.3 
103man/man3/sc_strerror.3 
104man/man3/sc_transmit_apdu.3 
105man/man3/sc_unlock.3 
106man/man3/sc_update_binary.3 
107man/man3/sc_update_dir.3 
108man/man3/sc_update_record.3 
109man/man3/sc_wait_for_event.3 
110man/man3/sc_write_binary.3 
111man/man3/sc_write_record.3 
112man/man5/pkcs15-profile.5 33man/man5/pkcs15-profile.5
113share/doc/opensc/NEWS 34share/doc/opensc/NEWS
114share/doc/opensc/README 
115share/examples/opensc/opensc.conf 35share/examples/opensc/opensc.conf
116share/opensc/asepcos.profile 36share/opensc/asepcos.profile
 37share/opensc/authentic.profile
117share/opensc/cardos.profile 38share/opensc/cardos.profile
118share/opensc/cyberflex.profile 39share/opensc/cyberflex.profile
119share/opensc/entersafe.profile 40share/opensc/entersafe.profile
120share/opensc/flex.profile 41share/opensc/flex.profile
121share/opensc/gpk.profile 42share/opensc/gpk.profile
 43share/opensc/ias_adele_admin1.profile
 44share/opensc/ias_adele_admin2.profile
 45share/opensc/ias_adele_common.profile
 46share/opensc/iasecc.profile
 47share/opensc/iasecc_admin_eid.profile
 48share/opensc/iasecc_generic_oberthur.profile
 49share/opensc/iasecc_generic_pki.profile
122share/opensc/incrypto34.profile 50share/opensc/incrypto34.profile
123share/opensc/jcop.profile 51share/opensc/jcop.profile
124share/opensc/miocos.profile 52share/opensc/miocos.profile
125share/opensc/muscle.profile 53share/opensc/muscle.profile
126share/opensc/myeid.profile 54share/opensc/myeid.profile
127share/opensc/oberthur.profile 55share/opensc/oberthur.profile
128share/opensc/pkcs15.profile 56share/opensc/pkcs15.profile
129share/opensc/rutoken.profile 57share/opensc/rutoken.profile
130share/opensc/rutoken_ecp.profile 58share/opensc/rutoken_ecp.profile
131share/opensc/setcos.profile 59share/opensc/setcos.profile
132share/opensc/starcos.profile 60share/opensc/starcos.profile
133share/opensc/westcos.profile 61share/opensc/westcos.profile

cvs diff -r1.9 -r1.10 pkgsrc/security/opensc/distinfo (expand / switch to unified diff)

--- pkgsrc/security/opensc/distinfo 2012/10/24 08:33:51 1.9
+++ pkgsrc/security/opensc/distinfo 2012/11/30 14:44:34 1.10
@@ -1,17 +1,12 @@ @@ -1,17 +1,12 @@
1$NetBSD: distinfo,v 1.9 2012/10/24 08:33:51 manu Exp $ 1$NetBSD: distinfo,v 1.10 2012/11/30 14:44:34 gdt Exp $
2 2
3SHA1 (opensc-0.11.13.tar.gz) = 408b374286004c3df15ec17856f69fd4c2a1aceb 3SHA1 (opensc-0.12.2.tar.gz) = 8c34be52eb94025eb181c02b466223901bef744c
4RMD160 (opensc-0.11.13.tar.gz) = cd900866e51cd64fa7c5a3287cd58193dec26528 4RMD160 (opensc-0.12.2.tar.gz) = 45504135db05fd404a357ebd8bea047c5c8604dc
5Size (opensc-0.11.13.tar.gz) = 1513327 bytes 5Size (opensc-0.12.2.tar.gz) = 1738553 bytes
6SHA1 (patch-aa) = ad1c02161590c43170137d1deeaf5e88e7fef1ce 6SHA1 (patch-aa) = f7993647c19d3cca3b976d66a97ee18fca12f8b2
7SHA1 (patch-ab) = 6d3d055abd1b94c7024838b9b25cc6005af0d36a 7SHA1 (patch-ab) = 4d19b0990b227aceb3ab4bf8c1f222f337ee1ff7
8SHA1 (patch-ac) = 6c77415312d1ab149a9cbae9c49f4cf31c950502 8SHA1 (patch-configure) = fcd938ec3f269642fbd577868768c8ac67270be6
9SHA1 (patch-ad) = a618df0e8bc59af9ccea3f3b423b363e09ab0a4c 9SHA1 (patch-src_common_compat__getopt.c) = a1a473a6d2690dacb968be7991e6218233b20e7f
10SHA1 (patch-ae) = 94ca059a2e9bf5689f4193587247e443213df9a4 10SHA1 (patch-src_common_compat__getopt.h) = cdd04e708f249a3969a47c4ed458d6b86a11d2f1
11SHA1 (patch-af) = 3b8db1b680c833940973f11b8abb47e34fa5ecd0 11SHA1 (patch-src_common_compat__getopt__main.c) = 0a9a608434ec8f274627b2f65f5c53a6ceb79f2a
12SHA1 (patch-ag) = 1d2de187008d4ce9aac1f97f829aafd035324082 12SHA1 (patch-src_pkcs11_pkcs11-global.c) = 5d0d23706f932f10a63d8da82ab34d3c00e470f5
13SHA1 (patch-ah) = e9a8e3aa06af5a7ce47015f8eba41fd2bb12b32d 
14SHA1 (patch-configure) = 65af2389d4a3b875ea206542ac94446e0bfc4796 
15SHA1 (patch-src_libopensc_card-setcos.c) = 209bf0a92f9872635ea06d5ea9a7742c7874d61d 
16SHA1 (patch-src_libopensc_cards.h) = ebc1db10feda1b2f6a666842120772908c778db7 
17SHA1 (patch-src_pkcs11_pkcs11-global.c) = 06c93969a04c930a87a607f6d48a13197c1307bf 

cvs diff -r1.1.1.1 -r1.2 pkgsrc/security/opensc/options.mk (expand / switch to unified diff)

--- pkgsrc/security/opensc/options.mk 2009/02/26 10:50:05 1.1.1.1
+++ pkgsrc/security/opensc/options.mk 2012/11/30 14:44:34 1.2
@@ -1,17 +1,20 @@ @@ -1,17 +1,20 @@
1# $NetBSD: options.mk,v 1.1.1.1 2009/02/26 10:50:05 hasso Exp $ 1# $NetBSD: options.mk,v 1.2 2012/11/30 14:44:34 gdt Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.opensc 3PKG_OPTIONS_VAR= PKG_OPTIONS.opensc
4PKG_SUPPORTED_OPTIONS= openct pcsc-lite 4
 5# Really this should be an options group; exactly one of openct,
 6# pcsc-lite, or ctapi must be specified.
 7PKG_SUPPORTED_OPTIONS= pcsc-lite openct
5PKG_SUGGESTED_OPTIONS= pcsc-lite 8PKG_SUGGESTED_OPTIONS= pcsc-lite
6 9
7.include "../../mk/bsd.options.mk" 10.include "../../mk/bsd.options.mk"
8 11
9.if !empty(PKG_OPTIONS:Mpcsc-lite) 12.if !empty(PKG_OPTIONS:Mpcsc-lite)
10.include "../../security/pcsc-lite/buildlink3.mk" 13.include "../../security/pcsc-lite/buildlink3.mk"
11CONFIGURE_ARGS+= --enable-pcsc 14CONFIGURE_ARGS+= --enable-pcsc
12CONFIGURE_ARGS+= --with-pcsc-provider=${BUILDLINK_PREFIX.pcsc-lite}/lib/libpcsclite.la 15CONFIGURE_ARGS+= --with-pcsc-provider=${BUILDLINK_PREFIX.pcsc-lite}/lib/libpcsclite.la
13.else 16.else
14CONFIGURE_ARGS+= --disable-pcsc 17CONFIGURE_ARGS+= --disable-pcsc
15.endif 18.endif
16 19
17.if !empty(PKG_OPTIONS:Mopenct) 20.if !empty(PKG_OPTIONS:Mopenct)

cvs diff -r1.2 -r1.3 pkgsrc/security/opensc/patches/Attic/patch-aa (expand / switch to unified diff)

--- pkgsrc/security/opensc/patches/Attic/patch-aa 2010/09/01 15:59:23 1.2
+++ pkgsrc/security/opensc/patches/Attic/patch-aa 2012/11/30 14:44:34 1.3
@@ -1,18 +1,21 @@ @@ -1,18 +1,21 @@
1$NetBSD: patch-aa,v 1.2 2010/09/01 15:59:23 drochner Exp $ 1$NetBSD: patch-aa,v 1.3 2012/11/30 14:44:34 gdt Exp $
2 2
3--- etc/Makefile.in.orig 2010-02-16 09:32:17.000000000 +0000 3Disable installation of config file, because pkgsrc installs config
 4files as examples.
 5
 6--- etc/Makefile.in.orig 2011-07-15 10:47:01.000000000 +0000
4+++ etc/Makefile.in 7+++ etc/Makefile.in
5@@ -471,12 +471,7 @@ opensc.conf: opensc.conf.in force 8@@ -466,12 +466,7 @@ opensc.conf: opensc.conf.in force
6 -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \ 9 -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
7 -e 's|@DEFAULT_PCSC_PROVIDER[@]|$(DEFAULT_PCSC_PROVIDER)|g' \ 10 -e 's|@DEFAULT_PCSC_PROVIDER[@]|$(DEFAULT_PCSC_PROVIDER)|g' \
8 < $< > $@ 11 < $< > $@
9-install-exec-hook: install-sysconfDATA opensc.conf 12-install-exec-hook: install-sysconfDATA opensc.conf
10- if [ -f "$(DESTDIR)$(sysconfdir)/opensc.conf" ]; then \ 13- if [ -f "$(DESTDIR)$(sysconfdir)/opensc.conf" ]; then \
11- $(INSTALL_DATA) opensc.conf "$(DESTDIR)$(sysconfdir)/opensc.conf.new"; \ 14- $(INSTALL_DATA) opensc.conf "$(DESTDIR)$(sysconfdir)/opensc.conf.new"; \
12- else \ 15- else \
13- $(INSTALL_DATA) opensc.conf "$(DESTDIR)$(sysconfdir)/opensc.conf"; \ 16- $(INSTALL_DATA) opensc.conf "$(DESTDIR)$(sysconfdir)/opensc.conf"; \
14- fi 17- fi
15+install-exec-hook: 18+install-exec-hook:
16  19
17 # Tell versions [3.59,3.63) of GNU make to not export all variables. 20 # Tell versions [3.59,3.63) of GNU make to not export all variables.
18 # Otherwise a system limit (for SysV at least) may be exceeded. 21 # Otherwise a system limit (for SysV at least) may be exceeded.

cvs diff -r1.2 -r1.3 pkgsrc/security/opensc/patches/Attic/patch-ab (expand / switch to unified diff)

--- pkgsrc/security/opensc/patches/Attic/patch-ab 2010/09/01 15:59:23 1.2
+++ pkgsrc/security/opensc/patches/Attic/patch-ab 2012/11/30 14:44:34 1.3
@@ -1,30 +1,15 @@ @@ -1,30 +1,15 @@
1$NetBSD: patch-ab,v 1.2 2010/09/01 15:59:23 drochner Exp $ 1$NetBSD: patch-ab,v 1.3 2012/11/30 14:44:34 gdt Exp $
2 2
3--- etc/opensc.conf.in.orig 2010-02-16 09:03:28.000000000 +0000 3This patch was added 2009-09-10 by hasso@, with comment:
 4 More userfriendly default configuration.
 5
 6--- etc/opensc.conf.in.orig 2011-07-05 11:28:53.000000000 +0000
4+++ etc/opensc.conf.in 7+++ etc/opensc.conf.in
5@@ -47,6 +47,7 @@ app default { 8@@ -309,6 +309,7 @@ app default {
6 # last entry in reader_drivers list 
7 # 
8 # reader_drivers = openct, pcsc, ctapi; 
9+ reader_drivers = pcsc, ctapi; 
10  
11 reader_driver ctapi { 
12 # module /usr/local/towitoko/lib/libtowitoko.so { 
13@@ -87,7 +88,7 @@ app default { 
14 # 
15 # Enable pinpad if detected (PC/SC v2.0.2 Part 10) 
16 # Default: false 
17- # enable_pinpad = true; 
18+ enable_pinpad = true; 
19 # 9 #
20 # Use specific pcsc provider. 
21 # Default: @DEFAULT_PCSC_PROVIDER@ 
22@@ -265,7 +266,7 @@ app default { 
23 # Prefer pkcs15 emulation code before 
24 # the normal pkcs15 processing. 
25 # Default: no 10 # Default: no
26- # try_emulation_first = yes; 11 # try_emulation_first = yes;
27+ try_emulation_first = yes; 12+ try_emulation_first = yes;
28  13
29 # Enable builtin emulators. 14 # Enable builtin emulators.
30 # Default: yes 15 # Default: yes

File Deleted: pkgsrc/security/opensc/patches/Attic/patch-ac

File Deleted: pkgsrc/security/opensc/patches/Attic/patch-ad

File Deleted: pkgsrc/security/opensc/patches/Attic/patch-ae

File Deleted: pkgsrc/security/opensc/patches/Attic/patch-af

File Deleted: pkgsrc/security/opensc/patches/Attic/patch-ag

File Deleted: pkgsrc/security/opensc/patches/Attic/patch-ah

File Deleted: pkgsrc/security/opensc/patches/Attic/patch-src_libopensc_card-setcos.c

File Deleted: pkgsrc/security/opensc/patches/Attic/patch-src_libopensc_cards.h

cvs diff -r1.1 -r1.2 pkgsrc/security/opensc/patches/Attic/patch-configure (expand / switch to unified diff)

--- pkgsrc/security/opensc/patches/Attic/patch-configure 2012/10/24 08:33:51 1.1
+++ pkgsrc/security/opensc/patches/Attic/patch-configure 2012/11/30 14:44:35 1.2
@@ -1,28 +1,26 @@ @@ -1,28 +1,26 @@
1$NetBSD: patch-configure,v 1.1 2012/10/24 08:33:51 manu Exp $ 1$NetBSD: patch-configure,v 1.2 2012/11/30 14:44:35 gdt Exp $
2 2
3Make sure we do not link against -lpthread, as we only need mutexes 3Make sure we do not link against -lpthread, as we only need mutexes
4that can be found in libc. 4that can be found in libc.
5 5
6Linking with -lpthread hurst with opensc-pkcs11.so since NetBSD-6.0 6Linking with -lpthread hurst with opensc-pkcs11.so since NetBSD-6.0
7libpthread cannot be loaded by dlopen() 7libpthread cannot be loaded by dlopen()
8 8
9--- configure.orig 2012-10-19 11:29:36.000000000 +0200 9--- configure.orig 2011-07-15 10:46:59.000000000 +0000
10+++ configure 2012-10-19 14:57:03.000000000 +0200 10+++ configure
11@@ -12821,8 +12821,17 @@ 11@@ -12903,6 +12903,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
12 ac_compiler_gnu=$ac_cv_c_compiler_gnu 
13  12
14 acx_pthread_ok=no 13 acx_pthread_ok=no
15  14
16+case "${host_cpu}-${host_os}" in 15+case "${host_cpu}-${host_os}" in
17+ *netbsd*) 16+ *netbsd*)
18+ acx_pthread_ok=yes 17+ acx_pthread_ok=yes
19+ PTHREAD_CFLAGS="" 18+ PTHREAD_CFLAGS=""
20+ PTHREAD_LIBS="" 19+ PTHREAD_LIBS=""
21+ LIBS="$LIBS -lltdl" 20+ LIBS="$LIBS -lltdl"
22+ ;; 21+ ;;
23+esac 22+esac
24+ 23+
25 # We used to check for pthread.h first, but this fails if pthread.h 24 # We used to check for pthread.h first, but this fails if pthread.h
26 # requires special compiler flags (e.g. on True64 or Sequent). 25 # requires special compiler flags (e.g. on True64 or Sequent).
27 # It gets checked for in the link test anyway. 26 # It gets checked for in the link test anyway.
28  

cvs diff -r1.1 -r1.2 pkgsrc/security/opensc/patches/Attic/patch-src_pkcs11_pkcs11-global.c (expand / switch to unified diff)

--- pkgsrc/security/opensc/patches/Attic/patch-src_pkcs11_pkcs11-global.c 2012/10/24 08:33:51 1.1
+++ pkgsrc/security/opensc/patches/Attic/patch-src_pkcs11_pkcs11-global.c 2012/11/30 14:44:35 1.2
@@ -1,13 +1,17 @@ @@ -1,13 +1,17 @@
1--- src/pkcs11/pkcs11-global.c.orig 2012-10-22 09:11:56.000000000 +0200 1$NetBSD: patch-src_pkcs11_pkcs11-global.c,v 1.2 2012/11/30 14:44:35 gdt Exp $
2+++ src/pkcs11/pkcs11-global.c 2012-10-22 09:12:14.000000000 +0200 2
3@@ -43,9 +43,9 @@ 3Use correct size for malloc.
4 #if defined(HAVE_PTHREAD) && defined(PKCS11_THREAD_LOCKING) 4
 5Not yet reported upstream.
 6
 7--- src/pkcs11/pkcs11-global.c.orig 2011-07-05 11:28:53.000000000 +0000
 8+++ src/pkcs11/pkcs11-global.c
 9@@ -42,7 +42,7 @@ extern CK_FUNCTION_LIST pkcs11_function_
5 #include <pthread.h> 10 #include <pthread.h>
6 CK_RV mutex_create(void **mutex) 11 CK_RV mutex_create(void **mutex)
7 { 12 {
8- pthread_mutex_t *m = (pthread_mutex_t *) malloc(sizeof(*mutex)); 13- pthread_mutex_t *m = malloc(sizeof(*mutex));
9+ pthread_mutex_t *m = (pthread_mutex_t *) malloc(sizeof(*m)); 14+ pthread_mutex_t *m = malloc(sizeof(*m));
10 if (m == NULL) 15 if (m == NULL)
11 return CKR_GENERAL_ERROR;; 16 return CKR_GENERAL_ERROR;;
12 pthread_mutex_init(m, NULL); 17 pthread_mutex_init(m, NULL);
13 *mutex = m; 

File Added: pkgsrc/security/opensc/patches/Attic/patch-src_common_compat__getopt.c
$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>

File Added: pkgsrc/security/opensc/patches/Attic/patch-src_common_compat__getopt.h
$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 */

File Added: pkgsrc/security/opensc/patches/Attic/patch-src_common_compat__getopt__main.c
$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)