package/gnupg2: add optional support for libusb-compat
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sun, 21 Feb 2016 17:34:52 +0000 (18:34 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 21 Feb 2016 20:26:51 +0000 (21:26 +0100)
When libusb-compat was compiled before, gnupg2 will use it as optional
dependency:

$ output/host/usr/bin/x86_64-linux-readelf -a output/target/usr/libexec/scdaemon | grep NEEDED
[...]
 0x0000000000000001 (NEEDED)             Shared library: [libusb-0.1.so.4]
[...]

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/gnupg2/gnupg2.mk

index 2e1f067b94bfd47efaa8daa30c8ab7e65fef0aff..8d4f3737e9f3fb9c874c81bfa190a14b61c8408f 100644 (file)
@@ -38,6 +38,13 @@ else
 GNUPG2_CONF_OPTS += --disable-bzip2
 endif
 
+ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y)
+GNUPG2_CONF_OPTS += --enable-ccid-driver
+GNUPG2_DEPENDENCIES += libusb-compat
+else
+GNUPG2_CONF_OPTS += --disable-ccid-driver
+endif
+
 ifeq ($(BR2_PACKAGE_READLINE),y)
 GNUPG2_CONF_OPTS += --with-readline=$(STAGING_DIR)
 GNUPG2_DEPENDENCIES += readline