build: add zstd support to pack/unpack functions
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
parent
258dc0d0fd
commit
4696112ea2
@ -50,6 +50,7 @@ endef
|
|||||||
dl_pack/bz2=bzip2 -c > $(1)
|
dl_pack/bz2=bzip2 -c > $(1)
|
||||||
dl_pack/gz=gzip -nc > $(1)
|
dl_pack/gz=gzip -nc > $(1)
|
||||||
dl_pack/xz=xz -zc -7e > $(1)
|
dl_pack/xz=xz -zc -7e > $(1)
|
||||||
|
dl_pack/zst=zstd -T0 --ultra -20 -c > $(1)
|
||||||
dl_pack/unknown=$(error ERROR: Unknown pack format for file $(1))
|
dl_pack/unknown=$(error ERROR: Unknown pack format for file $(1))
|
||||||
define dl_pack
|
define dl_pack
|
||||||
$(if $(dl_pack/$(call ext,$(1))),$(dl_pack/$(call ext,$(1))),$(dl_pack/unknown))
|
$(if $(dl_pack/$(call ext,$(1))),$(dl_pack/$(call ext,$(1))),$(dl_pack/unknown))
|
||||||
|
@ -31,6 +31,10 @@ ifeq ($(strip $(UNPACK_CMD)),)
|
|||||||
EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=))
|
EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=))
|
||||||
DECOMPRESS_CMD:=xzcat $(DL_DIR)/$(PKG_SOURCE) |
|
DECOMPRESS_CMD:=xzcat $(DL_DIR)/$(PKG_SOURCE) |
|
||||||
endif
|
endif
|
||||||
|
ifeq (zst,$(EXT))
|
||||||
|
EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=))
|
||||||
|
DECOMPRESS_CMD:=zstdcat $(DL_DIR)/$(PKG_SOURCE) |
|
||||||
|
endif
|
||||||
ifeq ($(filter tgz tbz tbz2 txz,$(EXT1)),$(EXT1))
|
ifeq ($(filter tgz tbz tbz2 txz,$(EXT1)),$(EXT1))
|
||||||
EXT:=tar
|
EXT:=tar
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user