Solved Port Makefile uses=tar:xz

Most all ports seem to use a standard analogy in a ports Makefile.
uses= libBSD libstd tar:xz

Why does tar use a colon for the xz component?
Is tar really made up of several modules, or perhaps this is done for size considerations with only xz needed?
What does the colon do here?
 
That is just to indicate the source code is packed using xz. The default version is gz (when you don't need to set tar). You will also find ports using tar:bzip2 instance. The new Qt (and many others things) USES also use colon like this: qt:4, qt:5.

The best way to learn those things of the ports system is reading the *.mk files on /usr/ports/Mk.

[EDIT]

/usr/ports/Mk/Uses/tar.mk
Code:
.if !defined(_INCLUDE_USES_TAR_MK)
_INCLUDE_USES_TAR_MK=   yes

.if ${tar_ARGS} == xz
EXTRACT_SUFX?=  .tar.xz
.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
 
Back
Top