package/libblockdev: add support for swap plugin
authorAdam Duskett <Aduskett@gmail.com>
Sat, 25 Jul 2020 23:06:15 +0000 (16:06 -0700)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 29 Aug 2020 19:57:13 +0000 (21:57 +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 d15e624091dcddd001649282be4064b3da11cf92..3c501b7871350420c643771590d90346a0362608 100644 (file)
@@ -57,6 +57,11 @@ config BR2_PACKAGE_LIBBLOCKDEV_PART
 comment "part plugin needs a toolchain w/ locale"
        depends on !BR2_ENABLE_LOCALE
 
+config BR2_PACKAGE_LIBBLOCKDEV_SWAP
+       bool "swap"
+       select BR2_PACKAGE_UTIL_LINUX
+       select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+
 endif
 
 comment "libblockdev needs udev /dev management and a toolchain w/ wchar, threads, dynamic library"
index d7ae03e359f2db30dc04060a1a338b6d19401f64..1b094555d2c3ac90a5a9655b6875154db9614035 100644 (file)
@@ -28,7 +28,6 @@ LIBBLOCKDEV_CONF_OPTS = \
        --without-python2 \
        --without-python3 \
        --without-s390 \
-       --without-swap \
        --without-tools \
        --without-vdo
 
@@ -73,4 +72,11 @@ else
 LIBBLOCKDEV_CONF_OPTS += --without-part
 endif
 
+ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_SWAP),y)
+LIBBLOCKDEV_DEPENDENCIES += util-linux
+LIBBLOCKDEV_CONF_OPTS += --with-swap
+else
+LIBBLOCKDEV_CONF_OPTS += --without-swap
+endif
+
 $(eval $(autotools-package))