X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/5b3d59f1da9acb0b12c708169f241bb96d28ec02..032445afeec0a2729bd2859138a1d3ef7a0958f4:/include/package-ipkg.mk diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index f75c0a23f..c5d4916c2 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -22,8 +22,14 @@ define BuildIPKGVariable $(1)_COMMANDS += var2file "$(call shvar,Package/$(1)/$(2))" $(2); endef +dep_split=$(subst :,$(space),$(1)) +dep_confvar=CONFIG_$(word 1,$(call dep_split,$(1))) +dep_val=$(word 2,$(call dep_split,$(1))) +strip_deps=$(strip $(subst +,,$(filter-out @%,$(1)))) +filter_deps=$(foreach dep,$(call strip_deps,$(1)),$(if $(findstring :,$(dep)),$(if $($(call dep_confvar,$(dep))),$(call dep_val,$(dep))),$(dep))) + ifeq ($(DUMP),) - define BuildIPKG + define BuildTarget/ipkg IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1) INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list @@ -42,7 +48,7 @@ ifeq ($(DUMP),) endif endif - IDEPEND_$(1):=$$(strip $$(DEPENDS)) + IDEPEND_$(1):=$$(call filter_deps,$$(DEPENDS)) $(eval $(call BuildIPKGVariable,$(1),conffiles)) $(eval $(call BuildIPKGVariable,$(1),preinst)) @@ -92,9 +98,6 @@ ifeq ($(DUMP),) $(PKG_BUILD_DIR)/.version-$(1)_$(VERSION)_$(PKGARCH): $(STAMP_PREPARED) -@rm -f $(PKG_BUILD_DIR)/.version-$(1)_* 2>/dev/null @touch $$@ - - $$(eval $$(call Build/DefaultTargets,$(1))) - endef $(STAGING_DIR)/etc/ipkg.conf: