When compiling gnupg 2.1.12 (which uses the libusb 1.0 API), the configure
scripts do not properly detect the standard FreeBSD 10.x libusb as being
compatible with the libusb 1.0 API. As a result, the built-in CCID driver gets
disabled, and CCID-compatible smartcards (including my Yubikey NEO) do not work
with scdaemon. If I attempt to force-enable the CCID driver by including
--enable-ccid-driver on the command line, the configure script dies with the
warning:
configure:
- You need libusb to build the internal ccid driver. Please
- install a libusb suitable for your system.
configure: error:
- Required libraries not found. Please consult the above messages
- and install them before running configure again.
However, it is not necessary to install an external libusb. As the attached
config.log shows, the configure script is looking for libusb-1.0 rather than
libusb. If I create a symlink from libusb-1.0.so to libusb.so and run ldconfig
-R, the package will compile properly with a working CCID driver, and my Yubikey
will work properly in OpenPGP mode.
It appears that a patch simply needs to be applied to the configure scripts. I
don't know if this affects the other *BSDs, but the problem (and workaround) can
be replicated on both FreeBSD 10-STABLE, and 11-CURRENT.