package/libblockdev: add support for crypto plugin
authorAdam Duskett <Aduskett@gmail.com>
Sat, 25 Jul 2020 23:06:09 +0000 (16:06 -0700)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 29 Aug 2020 19:20:33 +0000 (21:20 +0200)
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libblockdev/Config.in
package/libblockdev/libblockdev.mk

index 4e85b82ce259aed00552482106063e91e3d5d560..f7a220603c30cbbfd64196c0eb68b5611d7faab5 100644 (file)
@@ -16,6 +16,17 @@ config BR2_PACKAGE_LIBBLOCKDEV
 
          https://github.com/storaged-project/libblockdev/
 
+if BR2_PACKAGE_LIBBLOCKDEV
+
+comment "plugins"
+
+config BR2_PACKAGE_LIBBLOCKDEV_CRYPTO
+       bool "crypto"
+       depends on BR2_TOOLCHAIN_HAS_SYNC_4 # cryptsetup -> json-c
+       select BR2_PACKAGE_CRYPTSETUP
+
+endif
+
 comment "libblockdev needs udev /dev management and a toolchain w/ wchar, threads, dynamic library"
        depends on BR2_USE_MMU
        depends on !BR2_PACKAGE_HAS_UDEV || BR2_STATIC_LIBS || \
index 221a6983861aabd7c07f615cc906eeec5ee3307b..67d9ab4483c6c4ffaeaac6d8d6d7057f4fd62390 100644 (file)
@@ -18,7 +18,6 @@ LIBBLOCKDEV_CONF_OPTS = \
        --with-loop \
        --without-bcache \
        --without-btrfs \
-       --without-crypto \
        --without-dm \
        --without-dmraid \
        --without-escrow \
@@ -38,4 +37,11 @@ LIBBLOCKDEV_CONF_OPTS = \
        --without-tools \
        --without-vdo
 
+ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_CRYPTO),y)
+LIBBLOCKDEV_DEPENDENCIES += cryptsetup
+LIBBLOCKDEV_CONF_OPTS += --with-crypto
+else
+LIBBLOCKDEV_CONF_OPTS += --without-crypto
+endif
+
 $(eval $(autotools-package))