diff --git a/opensc/Portfile b/opensc/Portfile
a
|
b
|
|
43 | 43 | configure.args-append --disable-static |
44 | 44 | configure.args-append --enable-pcsc |
45 | 45 | configure.args-append --enable-sm |
46 | | configure.args-append --with-pkcs11-provider=${prefix}/lib/opensc-pkcs11.so |
| 46 | |
| 47 | variant doc description {Build documentation} { |
| 48 | configure.args-replace --disable-doc --enable-doc |
| 49 | } |
| 50 | variant p11kit description {Use p11-kit as default PKCS#11 module} { |
| 51 | depends_run port:p11-kit |
| 52 | } |
| 53 | variant readline description {Enable readline support} { |
| 54 | depends_lib-append port:readline |
| 55 | configure.args-replace --disable-readline --enable-readline |
| 56 | } |
47 | 57 | |
48 | 58 | pre-configure { |
49 | 59 | reinplace -W ${worksrcpath} \ |
50 | 60 | "s|No Git revision info available|OpenSC-${version} (MacPorts)|g" \ |
51 | 61 | configure.ac configure |
| 62 | |
| 63 | set pkcs11_provider opensc-pkcs11.so |
| 64 | if {[variant_isset p11kit]} { |
| 65 | set pkcs11_provider p11-kit-proxy.so |
| 66 | } |
| 67 | configure.args-append --with-pkcs11-provider=${prefix}/lib/${pkcs11_provider} |
52 | 68 | } |
53 | 69 | post-destroot { |
54 | 70 | system "${worksrcpath}/MacOSX/libtool-bundle ${destroot}${prefix}/lib/opensc-pkcs11.so ${destroot}${prefix}/lib" |
| 71 | |
| 72 | # Install module config so opensc will be auto-discovered by p11-kit. |
| 73 | set p11_module_configs ${prefix}/share/p11-kit/modules |
| 74 | xinstall -d ${destroot}${p11_module_configs} |
| 75 | xinstall -m 644 ${filespath}/p11kit-opensc.module ${destroot}${p11_module_configs}/opensc.module |
55 | 76 | } |
56 | 77 | |
57 | | variant doc description "Build documentation" { |
58 | | configure.args-replace --disable-doc --enable-doc |
59 | | } |
60 | | variant readline description "Enable readline support" { |
61 | | depends_lib-append port:readline |
62 | | configure.args-replace --disable-readline --enable-readline |
63 | | } |
diff --git a/opensc/files/p11kit-opensc.module b/opensc/files/p11kit-opensc.module
new file mode 100644
-
|
+
|
|
| 1 | module: opensc-pkcs11.so |
| 2 | |