[153518] trunk/dports/security/opensc
devans at macports.org
devans at macports.org
Tue Oct 4 00:09:41 CEST 2016
Revision: 153518
https://trac.macports.org/changeset/153518
Author: devans at macports.org
Date: 2016-10-03 15:09:40 -0700 (Mon, 03 Oct 2016)
Log Message:
-----------
opensc: maintainer enhancement, integrate with p11-kit (#52478).
Modified Paths:
--------------
trunk/dports/security/opensc/Portfile
Added Paths:
-----------
trunk/dports/security/opensc/files/p11kit-opensc.module
Modified: trunk/dports/security/opensc/Portfile
===================================================================
--- trunk/dports/security/opensc/Portfile 2016-10-03 20:55:11 UTC (rev 153517)
+++ trunk/dports/security/opensc/Portfile 2016-10-03 22:09:40 UTC (rev 153518)
@@ -43,21 +43,34 @@
configure.args-append --disable-static
configure.args-append --enable-pcsc
configure.args-append --enable-sm
-configure.args-append --with-pkcs11-provider=${prefix}/lib/opensc-pkcs11.so
+variant doc description {Build documentation} {
+ configure.args-replace --disable-doc --enable-doc
+}
+variant p11kit description {Use p11-kit as default PKCS#11 module} {
+ depends_run port:p11-kit
+}
+variant readline description {Enable readline support} {
+ depends_lib-append port:readline
+ configure.args-replace --disable-readline --enable-readline
+}
+
pre-configure {
reinplace -W ${worksrcpath} \
"s|No Git revision info available|OpenSC-${version} (MacPorts)|g" \
configure.ac configure
+
+ set pkcs11_provider opensc-pkcs11.so
+ if {[variant_isset p11kit]} {
+ set pkcs11_provider p11-kit-proxy.so
+ }
+ configure.args-append --with-pkcs11-provider=${prefix}/lib/${pkcs11_provider}
}
post-destroot {
system "${worksrcpath}/MacOSX/libtool-bundle ${destroot}${prefix}/lib/opensc-pkcs11.so ${destroot}${prefix}/lib"
-}
-variant doc description "Build documentation" {
- configure.args-replace --disable-doc --enable-doc
+ # Install module config so opensc will be auto-discovered by p11-kit.
+ set p11_module_configs ${prefix}/share/p11-kit/modules
+ xinstall -d ${destroot}${p11_module_configs}
+ xinstall -m 644 ${filespath}/p11kit-opensc.module ${destroot}${p11_module_configs}/opensc.module
}
-variant readline description "Enable readline support" {
- depends_lib-append port:readline
- configure.args-replace --disable-readline --enable-readline
-}
Added: trunk/dports/security/opensc/files/p11kit-opensc.module
===================================================================
--- trunk/dports/security/opensc/files/p11kit-opensc.module (rev 0)
+++ trunk/dports/security/opensc/files/p11kit-opensc.module 2016-10-03 22:09:40 UTC (rev 153518)
@@ -0,0 +1,2 @@
+module: opensc-pkcs11.so
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-changes/attachments/20161003/2bbe2dcd/attachment-0002.html>
More information about the macports-changes
mailing list