package/libglib2: make util-linux an optional dependency
authorAdam Duskett <Aduskett@gmail.com>
Mon, 16 Sep 2019 19:16:05 +0000 (12:16 -0700)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 17 Sep 2019 19:44:49 +0000 (21:44 +0200)
libglib2 needs util-linux only for libmount, which is a configuration option.
Instead, check if util-linux-libmount is selected, and if so, set the option
to true.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libglib2/Config.in
package/libglib2/libglib2.mk

index ea946ba05ee95245215480dc7f9b100cf1a042ec..31f3649c7578ce522e6e31de9ea93f4b6f09e359 100644 (file)
@@ -7,8 +7,6 @@ config BR2_PACKAGE_LIBGLIB2
        select BR2_PACKAGE_LIBFFI
        select BR2_PACKAGE_PCRE
        select BR2_PACKAGE_PCRE_UCP
-       select BR2_PACKAGE_UTIL_LINUX
-       select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
        select BR2_PACKAGE_ZLIB
        help
          Low-level core library that forms the basis of GTK+ and GNOME.
index 5183331c8d34bf64c567f2c54bf32bb2105ae435..1d5562e0171b2cdc6aefcba9958447fa6b1bf070 100644 (file)
@@ -33,7 +33,7 @@ HOST_LIBGLIB2_CONF_OPTS = \
 
 LIBGLIB2_DEPENDENCIES = \
        host-pkgconf host-libglib2 \
-       libffi pcre util-linux zlib $(TARGET_NLS_DEPENDENCIES)
+       libffi pcre zlib $(TARGET_NLS_DEPENDENCIES)
 
 HOST_LIBGLIB2_DEPENDENCIES = \
        host-gettext \
@@ -80,6 +80,14 @@ define LIBGLIB2_REMOVE_GDB_FILES
 endef
 endif
 
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),y)
+LIBGLIB2_CONF_OPTS += -Dlibmount=true
+LIBGLIB2_DEPENDENCIES += util-linux
+else
+LIBGLIB2_CONF_OPTS += -Dlibmount=false
+endif
+
+
 # Purge useless binaries from target
 define LIBGLIB2_REMOVE_DEV_FILES
        rm -rf $(TARGET_DIR)/usr/lib/glib-2.0