opensc: use built-in PCSC provider on darwin

This commit is contained in:
Andrew Childs 2019-05-03 17:08:40 +09:00
parent 9dd83eb657
commit 4ad50e2cdc
2 changed files with 16 additions and 5 deletions

View file

@ -1,7 +1,8 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, zlib, readline, openssl
, libiconv, pcsclite, libassuan, libXt
, docbook_xsl, libxslt, docbook_xml_dtd_412
, Carbon
, Carbon, PCSC
, withApplePCSC ? stdenv.isDarwin
}:
stdenv.mkDerivation rec {
@ -17,9 +18,11 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
autoreconfHook zlib readline openssl pcsclite libassuan
autoreconfHook zlib readline openssl libassuan
libXt libxslt libiconv docbook_xml_dtd_412
] ++ stdenv.lib.optional stdenv.isDarwin Carbon;
]
++ stdenv.lib.optional stdenv.isDarwin Carbon
++ (if withApplePCSC then [ PCSC ] else [ pcsclite ]);
configureFlags = [
"--enable-zlib"
@ -32,9 +35,17 @@ stdenv.mkDerivation rec {
"--localstatedir=/var"
"--sysconfdir=/etc"
"--with-xsl-stylesheetsdir=${docbook_xsl}/xml/xsl/docbook"
"--with-pcsc-provider=${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so"
"--with-pcsc-provider=${
if withApplePCSC then
"${PCSC}/Library/Frameworks/PCSC.framework/PCSC"
else
"${stdenv.lib.getLib pcsclite}/lib/libpcsclite${stdenv.hostPlatform.extensions.sharedLibrary}"
}"
];
PCSC_CFLAGS = stdenv.lib.optionalString withApplePCSC
"-I${PCSC}/Library/Frameworks/PCSC.framework/Headers";
installFlags = [
"sysconfdir=$(out)/etc"
"completiondir=$(out)/etc"

View file

@ -4859,7 +4859,7 @@ in
openresolv = callPackage ../tools/networking/openresolv { };
opensc = callPackage ../tools/security/opensc {
inherit (darwin.apple_sdk.frameworks) Carbon;
inherit (darwin.apple_sdk.frameworks) Carbon PCSC;
};
opensm = callPackage ../tools/networking/opensm { };