1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-14 03:10:47 +00:00
freebsd-ports/Mk/Uses/tar.mk
Alexey Dokuchaev 4b300bf9b3 Add `.tar.lz' suffix support to our framework since BSD tar(1) natively
supports it.

Lzip offers better compression ratios and archival features compared to
more common .gz or .xz formats, and is being used by some software when
packaging their distfiles.

Approved by:	portmgr (rene)
Differential Revision:	https://reviews.freebsd.org/D20619
2019-06-12 09:45:25 +00:00

37 lines
759 B
Makefile

# $FreeBSD$
#
# handle tar archives
#
# Feature: tar
# Usage: USES=tar[:[xz|lz|lzma|txz|bz[ip]2|tgz|tbz|tbz2|Z]]
#
# MAINTAINER: portmgr@FreeBSD.org
.if !defined(_INCLUDE_USES_TAR_MK)
_INCLUDE_USES_TAR_MK= yes
.if ${tar_ARGS} == xz
EXTRACT_SUFX?= .tar.xz
.elif ${tar_ARGS} == lz
EXTRACT_SUFX?= .tar.lz
.elif ${tar_ARGS} == lzma
EXTRACT_SUFX?= .tar.lzma
.elif ${tar_ARGS} == txz
EXTRACT_SUFX?= .txz
.elif ${tar_ARGS} == bzip2 || ${tar_ARGS} == bz2
EXTRACT_SUFX?= .tar.bz2
.elif ${tar_ARGS} == tgz
EXTRACT_SUFX?= .tgz
.elif ${tar_ARGS} == tbz
EXTRACT_SUFX?= .tbz
.elif ${tar_ARGS} == tbz2
EXTRACT_SUFX?= .tbz2
.elif ${tar_ARGS} == Z
EXTRACT_SUFX?= .tar.Z
.elif empty(tar_ARGS)
EXTRACT_SUFX?= .tar
.else
IGNORE= Incorrect 'USES+=tar:${tar_ARGS}'
.endif
.endif