2016-09-26 16:30:24 +00:00
|
|
|
# -*- 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 github 1.0
|
2023-09-18 09:45:47 -04:00
|
|
|
PortGroup legacysupport 1.1
|
2021-11-13 11:29:55 +00:00
|
|
|
PortGroup openssl 1.0
|
2016-09-26 16:30:24 +00:00
|
|
|
|
2025-03-14 05:22:15 +03:00
|
|
|
# Needed for strnlen and MAP_ANONYMOUS
|
|
|
|
|
legacysupport.newest_darwin_requires_legacy 14
|
2023-09-18 09:45:47 -04:00
|
|
|
|
2016-09-26 16:30:24 +00:00
|
|
|
name opensc
|
2026-04-02 12:03:10 +09:00
|
|
|
github.setup OpenSC OpenSC 0.27.1
|
2025-03-08 14:23:03 -05:00
|
|
|
github.tarball_from releases
|
2026-04-02 12:03:10 +09:00
|
|
|
revision 0
|
2021-11-13 11:36:14 +00:00
|
|
|
|
2026-04-02 12:03:10 +09:00
|
|
|
checksums rmd160 cf970f85cd1c96c01aed6ff6397a061a960ae9e1 \
|
|
|
|
|
sha256 976f4a23eaf3397a1a2c3a7aac80bf971a8c3d829c9a79f06145bfaeeae5eca7 \
|
|
|
|
|
size 2470990
|
2021-11-13 11:36:14 +00:00
|
|
|
|
2016-09-26 16:30:24 +00:00
|
|
|
categories security
|
|
|
|
|
license LGPL-2.1
|
2022-06-27 17:09:07 +02:00
|
|
|
maintainers nomaintainer
|
2016-09-26 16:30:24 +00:00
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
2016-10-03 22:27:09 +00:00
|
|
|
distname opensc-${version}
|
2016-09-26 16:30:24 +00:00
|
|
|
|
2024-05-13 05:50:06 +10:00
|
|
|
patch.pre_args-replace -p0 -p1
|
2023-09-17 10:33:13 -04:00
|
|
|
patchfiles-append patch-winscard.diff
|
2025-03-08 14:23:03 -05:00
|
|
|
#patchfiles-append patch-pgp-and-tools.diff
|
2023-09-17 10:33:13 -04:00
|
|
|
|
|
|
|
|
# https://trac.macports.org/ticket/65709
|
|
|
|
|
compiler.blacklist-append *gcc-4.* {clang < 421} *clang-3.*
|
|
|
|
|
|
2025-03-08 14:23:03 -05:00
|
|
|
compiler.c_standard 2011
|
2023-09-17 10:35:31 -04:00
|
|
|
|
|
|
|
|
# Needed to enable C extensions, specifically memset_s
|
|
|
|
|
configure.cflags-append \
|
2023-09-18 09:45:47 -04:00
|
|
|
-D__STDC_WANT_LIB_EXT1__=1
|
|
|
|
|
|
|
|
|
|
configure.checks.implicit_function_declaration.whitelist-append \
|
|
|
|
|
strchr
|
2023-09-17 10:35:31 -04:00
|
|
|
|
2023-09-17 10:33:13 -04:00
|
|
|
depends_build-append \
|
|
|
|
|
port:docbook-xsl-nons \
|
2018-04-14 01:13:20 +02:00
|
|
|
port:gengetopt \
|
|
|
|
|
port:help2man \
|
|
|
|
|
port:libxslt \
|
|
|
|
|
port:pkgconfig
|
2016-09-26 16:30:24 +00:00
|
|
|
|
2023-09-17 14:42:13 -04:00
|
|
|
depends_lib-append \
|
2025-03-08 14:23:03 -05:00
|
|
|
port:openpace \
|
2023-09-17 14:42:13 -04:00
|
|
|
port:zlib
|
|
|
|
|
|
2016-09-26 16:30:24 +00:00
|
|
|
use_autoreconf yes
|
2023-09-17 10:33:13 -04:00
|
|
|
configure.args-append \
|
|
|
|
|
--disable-openpace \
|
2021-11-13 11:29:55 +00:00
|
|
|
--disable-readline \
|
2023-09-16 13:11:45 -04:00
|
|
|
--disable-silent-rules \
|
2021-11-13 11:29:55 +00:00
|
|
|
--disable-static \
|
2023-09-17 10:35:31 -04:00
|
|
|
--disable-strict \
|
2021-11-13 11:29:55 +00:00
|
|
|
--enable-doc \
|
|
|
|
|
--enable-pcsc \
|
|
|
|
|
--enable-sm \
|
|
|
|
|
--with-xsl-stylesheetsdir=${prefix}/share/xsl/docbook-xsl-nons
|
2016-10-03 22:09:40 +00:00
|
|
|
|
2016-09-26 16:30:24 +00:00
|
|
|
pre-configure {
|
|
|
|
|
reinplace -W ${worksrcpath} \
|
|
|
|
|
"s|No Git revision info available|OpenSC-${version} (MacPorts)|g" \
|
2018-04-14 01:13:20 +02:00
|
|
|
configure.ac
|
2016-10-03 22:09:40 +00:00
|
|
|
|
|
|
|
|
set pkcs11_provider opensc-pkcs11.so
|
|
|
|
|
if {[variant_isset p11kit]} {
|
2017-10-09 22:56:42 +02:00
|
|
|
set pkcs11_provider p11-kit-proxy.dylib
|
2016-10-03 22:09:40 +00:00
|
|
|
}
|
|
|
|
|
configure.args-append --with-pkcs11-provider=${prefix}/lib/${pkcs11_provider}
|
2016-09-26 16:30:24 +00:00
|
|
|
}
|
2023-09-17 10:33:13 -04:00
|
|
|
|
2016-09-26 16:30:24 +00:00
|
|
|
post-destroot {
|
|
|
|
|
system "${worksrcpath}/MacOSX/libtool-bundle ${destroot}${prefix}/lib/opensc-pkcs11.so ${destroot}${prefix}/lib"
|
|
|
|
|
|
2016-10-03 22:09:40 +00:00
|
|
|
# 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
|
2016-09-26 16:30:24 +00:00
|
|
|
}
|
2018-05-24 13:24:30 +02:00
|
|
|
|
2023-09-17 10:33:13 -04:00
|
|
|
variant eac description {Enable Extended Access Control (EAC) v2 support} {
|
|
|
|
|
depends_lib-append port:openpace
|
|
|
|
|
configure.args-replace --disable-openpace --enable-openpace
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2018-05-24 13:24:30 +02:00
|
|
|
# Skip -rc and other pre-release tags
|
2018-05-28 23:41:39 -05:00
|
|
|
github.livecheck.regex {([\d.]+)}
|