diff --git a/tool/ports/mk/install.mk b/tool/ports/mk/install.mk index e3ca6a265f..8e4287059d 100644 --- a/tool/ports/mk/install.mk +++ b/tool/ports/mk/install.mk @@ -211,7 +211,8 @@ _file_name = $(call _prefer,$(NAME($1)),$(notdir $(URL($1)))) _archive_name = $(call _prefer,$(NAME($1)),$(notdir $(URL($1)))) _archive_dir = $(call _assert,$(DIR($1)),Missing definition of DIR($*) in $(PORT)) -_tar_opt = $(call _prefer,$(TAR_OPT($1)),--strip-components=1) +_tar_opt = $(call _prefer,$(TAR_OPT($1)),--strip-components=1) +_unzip_opt = $(call _prefer,$(UNZIP_OPT($1)),$(UNZIP_OPT)) # # Archive extraction functions for various archive types @@ -220,7 +221,7 @@ _extract_function(tgz) = tar xfz $(ARCHIVE) -C $(DIR) $(call _tar_opt,$1) _extract_function(tar.gz) = tar xfz $(ARCHIVE) -C $(DIR) $(call _tar_opt,$1) _extract_function(tar.xz) = tar xfJ $(ARCHIVE) -C $(DIR) $(call _tar_opt,$1) _extract_function(tar.bz2) = tar xfj $(ARCHIVE) -C $(DIR) $(call _tar_opt,$1) -_extract_function(zip) = unzip -o -q -d $(DIR) $(ARCHIVE) +_extract_function(zip) = unzip -o -q -d $(DIR) $(call _unzip_opt,$1) $(ARCHIVE) _ARCHIVE_EXTS := tar.gz tar.xz tgz tar.bz2 zip @@ -244,4 +245,3 @@ _extract_function = $(call _assert,\ $(VERBOSE)\ mkdir -p $(DIR);\ $(call _extract_function,$*) -