From 29db5b3aed2c49ca6eb5fcfde9ff7cbf224dc428 Mon Sep 17 00:00:00 2001 From: Adam Duskett Date: Sat, 25 Jul 2020 16:06:15 -0700 Subject: [PATCH] package/libblockdev: add support for swap plugin Signed-off-by: Adam Duskett Signed-off-by: Thomas Petazzoni --- package/libblockdev/Config.in | 5 +++++ package/libblockdev/libblockdev.mk | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/package/libblockdev/Config.in b/package/libblockdev/Config.in index d15e624091..3c501b7871 100644 --- a/package/libblockdev/Config.in +++ b/package/libblockdev/Config.in @@ -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" diff --git a/package/libblockdev/libblockdev.mk b/package/libblockdev/libblockdev.mk index d7ae03e359..1b094555d2 100644 --- a/package/libblockdev/libblockdev.mk +++ b/package/libblockdev/libblockdev.mk @@ -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)) -- 2.30.2