aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2010-06-04 08:09:20 +0000
committerPav Lucistnik <pav@FreeBSD.org>2010-06-04 08:09:20 +0000
commitfe337e0489fb342b58496062c54ae6212a329967 (patch)
treed3094812eca54bac307e299d09b2fbf2f18d0c91 /Mk
parent4646ec77a5734753007ea85ae36528778fe0d44c (diff)
downloadports-fe337e0489fb342b58496062c54ae6212a329967.tar.gz
ports-fe337e0489fb342b58496062c54ae6212a329967.zip
Notes
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.commands.mk6
-rw-r--r--Mk/bsd.port.mk12
2 files changed, 17 insertions, 1 deletions
diff --git a/Mk/bsd.commands.mk b/Mk/bsd.commands.mk
index 2320597ee130..60095228516f 100644
--- a/Mk/bsd.commands.mk
+++ b/Mk/bsd.commands.mk
@@ -93,6 +93,12 @@ XARGS?= /usr/bin/xargs
XMKMF?= ${LOCALBASE}/bin/xmkmf -a
YACC?= /usr/bin/yacc
+.if exists(/usr/bin/xz)
+XZ_CMD?= /usr/bin/xz
+.else
+XZ_CMD?= ${LOCALBASE}/bin/xz
+.endif
+
.if exists(/sbin/md5)
MD5?= /sbin/md5
.else
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 0cdfd8c3ad94..6735b933403e 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -94,7 +94,8 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# EXTRACT_SUFX - Suffix for archive names
# You never have to set both DISTFILES and EXTRACT_SUFX.
# Default: .tar.bz2 if USE_BZIP2 is set, .zip if USE_ZIP is
-# set, .run if USE_MAKESELF is set, .tar.gz otherwise).
+# set, .tar.xz if USE_XZ is set, .run if USE_MAKESELF is set,
+# .tar.gz otherwise).
# MASTER_SITES - Primary location(s) for distribution files if not found
# locally. See bsd.sites.mk for common choices for
# MASTER_SITES.
@@ -296,6 +297,8 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
#
# USE_BZIP2 - If set, this port tarballs use bzip2, not gzip, for
# compression.
+# USE_XZ - If set, this port tarballs use xz (or lzma)
+# for compression
# USE_ZIP - If set, this port distfile uses zip, not tar w/[bg]zip
# for compression.
# USE_MAKESELF - If set, this port distfile uses makeself, not tar w/[bg]zip
@@ -1413,6 +1416,8 @@ IGNORE= cannot be installed: bad X_WINDOW_SYSTEM setting; valid value is 'xorg'
EXTRACT_SUFX?= .tar.bz2
.elif defined(USE_ZIP)
EXTRACT_SUFX?= .zip
+.elif defined(USE_XZ)
+EXTRACT_SUFX?= .tar.xz
.elif defined(USE_MAKESELF)
EXTRACT_SUFX?= .run
.else
@@ -1731,6 +1736,9 @@ PLIST_SUB+= LIB32DIR=${LIB32DIR}
.if defined(USE_ZIP)
EXTRACT_DEPENDS+= ${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
.endif
+.if defined(USE_XZ) && ( (${OSVERSION} >= 900000 && ${OSVERSION} < 900012) || ${OSVERSION} < 800505 )
+EXTRACT_DEPENDS+= ${LOCALBASE}/bin/xz:${PORTSDIR}/archivers/xz
+.endif
.if defined(USE_MAKESELF)
EXTRACT_DEPENDS+= unmakeself:${PORTSDIR}/archivers/unmakeself
.endif
@@ -2370,6 +2378,8 @@ EXTRACT_AFTER_ARGS?= | ${TAR} -xf - --no-same-owner --no-same-permissions
.endif
.if defined(USE_BZIP2)
EXTRACT_CMD?= ${BZIP2_CMD}
+.elif defined(USE_XZ)
+EXTRACT_CMD?= ${XZ_CMD}
.else
EXTRACT_CMD?= ${GZIP_CMD}
.endif