summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Le Bihan <eric.le.bihan.dev@free.fr>2017-06-25 22:56:08 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-02 23:42:31 +0200
commit346e926c1506ec8bc99ce3dd653d01ebb605fc70 (patch)
tree673f30f94ed1a3ce267013d28394a68f3d1f34b8
parentd80110a635c23aac17dabf2e58b580470749a2c9 (diff)
downloadbuildroot-346e926c1506ec8bc99ce3dd653d01ebb605fc70.tar.gz
buildroot-346e926c1506ec8bc99ce3dd653d01ebb605fc70.zip
pkg-virtual: fix host dependencies handling
If $(BR2_PACKAGE_HAS_HOST_FOO) is defined, then the pkg-virtual infrastructure will check if $(BR2_PACKAGE_PROVIDES_HOST_FOO) is not empty. But later, $(BR2_PACKAGE_HOST_FOO_DEPENDENCIES) will be set from $(BR2_PACKAGE_PROVIDES_FOO), ignoring $(BR2_PACKAGE_PROVIDES_HOST_FOO). So fix this discrepancy by setting $(BR2_PACKAGE_HOST_FOO_DEPENDENCIES) from $(BR2_PACKAGE_PROVIDES_FOO) only if $(BR2_PACKAGE_PROVIDES_HOST_FOO) is empty. Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> [Thomas: add comments suggested by Arnout.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/pkg-virtual.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/package/pkg-virtual.mk b/package/pkg-virtual.mk
index 2e83e077e0..0de79d49be 100644
--- a/package/pkg-virtual.mk
+++ b/package/pkg-virtual.mk
@@ -49,7 +49,13 @@ $(2)_IS_VIRTUAL = YES
ifeq ($(4),target)
$(2)_DEPENDENCIES += $$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(2)))
else
+ifeq ($$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(2))),)
+# Inherit from target package BR2_PACKAGE_PROVIDES_FOO
$(2)_DEPENDENCIES += host-$$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(3)))
+else
+# BR2_PACKAGE_PROVIDES_HOST_<pkg> is explicitly defined
+$(2)_DEPENDENCIES += $$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(2)))
+endif
endif
# Call the generic package infrastructure to generate the necessary
OpenPOWER on IntegriCloud