diff mbox series

[1/2] pkg-generic: Depend on host-{xz, lzip} only for fitting archives

Message ID 20190315214740.4212-1-nolange79@gmail.com
State Superseded
Headers show
Series [1/2] pkg-generic: Depend on host-{xz, lzip} only for fitting archives | expand

Commit Message

Norbert Lange March 15, 2019, 9:47 p.m. UTC
results in cleaner dependency graphs, and usually omits host-lzip
from being built.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
---
 package/pkg-generic.mk | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 4353bd3868..89da43d5e5 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -607,12 +607,16 @@  $(2)_EXTRACT_DEPENDENCIES += $$(BR2_TAR_HOST_DEPENDENCY)
 endif
 
 ifeq ($$(filter host-tar host-skeleton host-xz host-lzip host-fakedate,$(1)),)
+ifneq ($$(filter .xz .lzma,$$(suffix $$($(2)_SOURCE))),)
 $(2)_EXTRACT_DEPENDENCIES += $$(BR2_XZCAT_HOST_DEPENDENCY)
 endif
+endif
 
 ifeq ($$(filter host-tar host-skeleton host-xz host-lzip host-fakedate,$(1)),)
+ifeq ($$(suffix $$($(2)_SOURCE)),.lz)
 $(2)_EXTRACT_DEPENDENCIES += $$(BR2_LZIP_HOST_DEPENDENCY)
 endif
+endif
 
 ifeq ($$(BR2_CCACHE),y)
 ifeq ($$(filter host-tar host-skeleton host-xz host-lzip host-fakedate host-ccache,$(1)),)