package/hwloc: add optional dependencies to udev, libxml2, ncurses & numactl
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sun, 23 May 2021 09:43:46 +0000 (11:43 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Sun, 23 May 2021 12:13:19 +0000 (14:13 +0200)
udev:
https://github.com/open-mpi/hwloc/blob/master/config/hwloc.m4#L626

libxml2:
https://github.com/open-mpi/hwloc/blob/master/config/hwloc.m4#L1273

ncurses:
https://github.com/open-mpi/hwloc/blob/master/config/hwloc_internal.m4#L340

numactl:
https://github.com/open-mpi/hwloc/blob/master/config/hwloc_internal.m4#L419

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[yann.morin.1998@free.fr: drop unconditional --disable-libxml2]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/hwloc/hwloc.mk

index 77a25a17757b674882c3cf4685246751557d3a08..2a5a82cea41a261b4c2bf488dc33d2f5cf98d92f 100644 (file)
@@ -24,9 +24,15 @@ HWLOC_CONF_OPTS = \
        --disable-nvml \
        --disable-gl \
        --disable-cairo \
-       --disable-libxml2 \
        --disable-doxygen
 
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
+HWLOC_CONF_OPTS += --enable-libudev
+HWLOC_DEPENDENCIES += udev
+else
+HWLOC_CONF_OPTS += --disable-libudev
+endif
+
 ifeq ($(BR2_PACKAGE_LIBPCIACCESS),y)
 HWLOC_CONF_OPTS += --enable-pci
 HWLOC_DEPENDENCIES += libpciaccess
@@ -34,4 +40,19 @@ else
 HWLOC_CONF_OPTS += --disable-pci
 endif
 
+ifeq ($(BR2_PACKAGE_LIBXML2),y)
+HWLOC_CONF_OPTS += --enable-libxml2
+HWLOC_DEPENDENCIES += libxml2
+else
+HWLOC_CONF_OPTS += --disable-libxml2
+endif
+
+ifeq ($(BR2_PACKAGE_NCURSES),y)
+HWLOC_DEPENDENCIES += ncurses
+endif
+
+ifeq ($(BR2_PACKAGE_NUMACTL),y)
+HWLOC_DEPENDENCIES += numactl
+endif
+
 $(eval $(autotools-package))