build: formatting fixes for per-provide ABI_VERSION suffixes
authorJo-Philipp Wich <jo@mein.io>
Thu, 24 Jan 2019 11:48:27 +0000 (12:48 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 24 Jan 2019 11:51:39 +0000 (12:51 +0100)
 - Filter out potential duplicates with the package name
   (e.g. when renaming libfoo1 w/ ABI_VERSION:=1 to libfoo)
 - Use the GetABISuffix macro to properly separate the suffix
   with a dash in case the basename ends with a number

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
include/package-ipkg.mk

index 1cb4da8e3061d281a76d63405f10300db571d756..9ca4879bfab43e27ea4c0663b0655b1be61766ec 100644 (file)
@@ -162,7 +162,7 @@ Package: $(1)$$(ABIV_$(1))
 Version: $(VERSION)
 $$(call addfield,Depends,$$(Package/$(1)/DEPENDS)
 )$$(call addfield,Conflicts,$$(call mergelist,$(CONFLICTS))
-)$$(call addfield,Provides,$$(call mergelist,$(PROVIDES)$$(if $$(ABIV_$(1)), $(1) $(foreach provide,$(PROVIDES),$(provide)$$(ABIV_$(1)))))
+)$$(call addfield,Provides,$$(call mergelist,$$(filter-out $(1)$$(ABIV_$(1)),$(PROVIDES)$$(if $$(ABIV_$(1)), $(1) $(foreach provide,$(PROVIDES),$(provide)$$(call GetABISuffix,$(provide))))))
 )$$(call addfield,Alternatives,$$(call mergelist,$(ALTERNATIVES))
 )$$(call addfield,Source,$(SOURCE)
 )$$(call addfield,SourceName,$(1)