package/libblockdev: add support for part plugin
authorAdam Duskett <Aduskett@gmail.com>
Sat, 25 Jul 2020 23:06:14 +0000 (16:06 -0700)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 29 Aug 2020 19:51:40 +0000 (21:51 +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 26e23b3145e0a3ef8e6b4f25b6161fff5419289a..d15e624091dcddd001649282be4064b3da11cf92 100644 (file)
@@ -49,6 +49,14 @@ config BR2_PACKAGE_LIBBLOCKDEV_MDRAID
        bool "mdraid"
        select BR2_PACKAGE_LIBBYTESIZE
 
+config BR2_PACKAGE_LIBBLOCKDEV_PART
+       bool "part"
+       depends on BR2_ENABLE_LOCALE # parted
+       select BR2_PACKAGE_PARTED
+
+comment "part plugin needs a toolchain w/ locale"
+       depends on !BR2_ENABLE_LOCALE
+
 endif
 
 comment "libblockdev needs udev /dev management and a toolchain w/ wchar, threads, dynamic library"
index 3873554a4556f3d02609db3407f105909c8593cc..d7ae03e359f2db30dc04060a1a338b6d19401f64 100644 (file)
@@ -25,7 +25,6 @@ LIBBLOCKDEV_CONF_OPTS = \
        --without-lvm_dbus \
        --without-mpath \
        --without-nvdimm \
-       --without-part \
        --without-python2 \
        --without-python3 \
        --without-s390 \
@@ -67,4 +66,11 @@ else
 LIBBLOCKDEV_CONF_OPTS += --without-mdraid
 endif
 
+ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_PART),y)
+LIBBLOCKDEV_DEPENDENCIES += parted
+LIBBLOCKDEV_CONF_OPTS += --with-part
+else
+LIBBLOCKDEV_CONF_OPTS += --without-part
+endif
+
 $(eval $(autotools-package))