mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
tool/ports: run unzip with UNZIP_OPT
The patch supports both, a download-specific UNZIP_OPT(download) and a general UNZIP_OPT that can be defined across downloads. UNZIP_OPT(download) overrides UNZIP_OPT. Note, the `--strip-components=1` argument is not required for unzip. Issue #1357
This commit is contained in:
parent
b5f1af6af0
commit
e4ac1f99ed
@ -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,$*)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user