Ticket #52478: p11kit.patch

File p11kit.patch, 2.0 KB (added by lbschenkel (Leonardo Brondani Schenkel), 8 years ago)
  • opensc/Portfile

    diff --git a/opensc/Portfile b/opensc/Portfile
    a b  
    4343configure.args-append   --disable-static
    4444configure.args-append   --enable-pcsc
    4545configure.args-append   --enable-sm
    46 configure.args-append   --with-pkcs11-provider=${prefix}/lib/opensc-pkcs11.so
     46
     47variant doc description {Build documentation} {
     48    configure.args-replace  --disable-doc --enable-doc
     49}
     50variant p11kit description {Use p11-kit as default PKCS#11 module} {
     51    depends_run             port:p11-kit
     52}
     53variant readline description {Enable readline support} {
     54    depends_lib-append      port:readline
     55    configure.args-replace  --disable-readline --enable-readline
     56}
    4757
    4858pre-configure {
    4959    reinplace -W ${worksrcpath} \
    5060        "s|No Git revision info available|OpenSC-${version} (MacPorts)|g" \
    5161        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}
    5268}
    5369post-destroot {
    5470    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
    5576}
    5677
    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 }
  • new file opensc/files/p11kit-opensc.module

    diff --git a/opensc/files/p11kit-opensc.module b/opensc/files/p11kit-opensc.module
    new file mode 100644
    - +  
     1module: opensc-pkcs11.so
     2