# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup compiler_blacklist_versions 1.0 PortGroup github 1.0 PortGroup legacysupport 1.1 PortGroup openssl 1.0 # Needed for strnlen legacysupport.newest_darwin_requires_legacy 10 name opensc github.setup OpenSC OpenSC 0.23.0 revision 2 checksums rmd160 17ca6962955588a7a6c8aec0c20af7f2a93eb25c \ sha256 80b9b1c84bb740b0a69109744dbbe0c1f49ab918bbd9500c7f898167b8847fb9 \ size 1965242 categories security license LGPL-2.1 maintainers nomaintainer description Tools and libraries for smart cards long_description OpenSC provides a set of libraries and utilities to \ work with smart cards. Its main focus is on cards that \ support cryptographic operations, and facilitate their \ use in security applications such as authentication, \ mail encryption and digital signatures. \ OpenSC implements the PKCS#11 API so applications \ supporting this API (such as Mozilla Firefox and \ Thunderbird) can use it. \ On the card OpenSC implements the PKCS#15 standard and \ aims to be compatible with every software/card that \ does so, too. distname opensc-${version} # Upstream tested against 1.1, so use it as default. # (Overriding in variants not working as of 2021-11-13, hence the guard.) if {![variant_isset openssl3]} { openssl.branch 1.1 } patch.pre_args -p1 patchfiles-append patch-winscard.diff patchfiles-append patch-pgp-and-tools.diff # https://trac.macports.org/ticket/65709 compiler.blacklist-append *gcc-4.* {clang < 421} *clang-3.* compiler.c_standard 1999 configure.cflags-append \ -std=c99 # Needed to enable C extensions, specifically memset_s configure.cflags-append \ -D__STDC_WANT_LIB_EXT1__=1 configure.checks.implicit_function_declaration.whitelist-append \ strchr depends_build-append \ port:docbook-xsl-nons \ port:gengetopt \ port:help2man \ port:libxslt \ port:pkgconfig depends_lib-append \ port:zlib use_autoreconf yes configure.args-append \ --disable-openpace \ --disable-readline \ --disable-silent-rules \ --disable-static \ --disable-strict \ --enable-doc \ --enable-pcsc \ --enable-sm \ --with-xsl-stylesheetsdir=${prefix}/share/xsl/docbook-xsl-nons pre-configure { reinplace -W ${worksrcpath} \ "s|No Git revision info available|OpenSC-${version} (MacPorts)|g" \ configure.ac set pkcs11_provider opensc-pkcs11.so if {[variant_isset p11kit]} { set pkcs11_provider p11-kit-proxy.dylib } 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" # 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 eac description {Enable Extended Access Control (EAC) v2 support} { depends_lib-append port:openpace configure.args-replace --disable-openpace --enable-openpace } variant openssl3 description {Build against OpenSSL 3 (experimental)} { openssl.branch 3 # There will be warnings due to use of deprecated methods so they must not be fatal: configure.args-append --disable-strict } 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 } default_variants +readline # Skip -rc and other pre-release tags github.livecheck.regex {([\d.]+)}