aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-03-12 09:17:06 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-03-12 09:17:06 +0000
commitd17874dc5dcb4c3b59645d6bc71480b475762237 (patch)
treed6e76f5325a21119fdbe2459737f9f41582d71e1
parentf699107c2b7c0c7a0fe28c441be7b811b1e92503 (diff)
downloadports-d17874dc5dcb4c3b59645d6bc71480b475762237.tar.gz
ports-d17874dc5dcb4c3b59645d6bc71480b475762237.zip
Two new USES added to finish handling distfiles formats a consistent way:
USES=tar[:[xz|bzip2|Z|tgz]] handles distributions files in format: - plain tar - tar.xz - tar.bz2 - tar.Z - tgz USES=lha handles distributions files info LHA format
Notes
Notes: svn path=/head/; revision=347964
-rw-r--r--CHANGES14
-rw-r--r--Mk/Uses/lha.mk22
-rw-r--r--Mk/Uses/tar.mk28
-rw-r--r--Mk/bsd.sanity.mk12
4 files changed, 76 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 3237dc33e977..775711b976cd 100644
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,20 @@ in the release notes and/or placed into UPDATING.
All ports committers are allowed to commit to this file.
+20140312:
+AUTHOR: bapt@FreeBSD.org
+
+ Two new USES were added to finish handling distfiles formats a consistent way:
+
+ USES=tar[:[xz|bzip2|Z|tgz]] handles distributions files in format:
+ - plain tar
+ - tar.xz
+ - tar.bz2
+ - tar.Z
+ - tgz
+
+ USES=lha handles distributions files info LHA format
+
20140307:
AUTHOR: rene@FreeBSD.org
diff --git a/Mk/Uses/lha.mk b/Mk/Uses/lha.mk
new file mode 100644
index 000000000000..452896f754d8
--- /dev/null
+++ b/Mk/Uses/lha.mk
@@ -0,0 +1,22 @@
+# $FreeBSD$
+#
+# handle lha archives
+#
+# Feature: lha
+# Usage: USES=lha
+#
+.if !defined(_INCLUDE_USES_LHA_Mk)
+_INCLUDE_USES_LHA_MK= yes
+
+EXTRACT_SUFX?= .lzh
+
+.if defined(lha_ARGS)
+IGNORE= Incorrect 'USES+=lha:${lha_ARGS}' expecting 'USES+=lha'
+.endif
+
+EXTRACT_DEPENDS+= lha:${PORTSDIR}/archivers/lha
+EXTRACT_CMD?= ${LHA_CMD}
+EXTRACT_BEFORE_ARGS?= xfpw=${WRKDIR}
+EXTRACT_AFTER_ARGS?=
+
+.endif
diff --git a/Mk/Uses/tar.mk b/Mk/Uses/tar.mk
new file mode 100644
index 000000000000..3b4346b399f4
--- /dev/null
+++ b/Mk/Uses/tar.mk
@@ -0,0 +1,28 @@
+# $FreeBSD$
+#
+# handle tar archives
+#
+# MAINTAINER: portmgr@FreeBSD.org
+#
+# Feature: tar
+# Usage: USES=tar[:[xz|Z|bzip2|tgz]]
+#
+.if !defined(_INCLUDE_USES_TAR_Mk)
+_INCLUDE_USES_TAR_MK= yes
+
+tar_ARGS?= none
+
+.if ${tar_ARGS} == xz
+EXTRACT_SUFX?= .tar.xz
+.elif ${tar_ARGS} == bzip2
+EXTRACT_SUFX?= .tar.bz2
+.elif ${tar_ARGS} == tgz
+EXTRACT_SUFX?= .tgz
+.elif ${tar_ARGS} == Z
+EXTRACT_SUFX?= .tar.Z
+.elif ${tar_ARGS} == none
+EXTRACT_SUFX?= .tar
+.else
+IGNORE= Incorrect 'USES+=tar:${tar_ARGS}'
+.endif
+.endif
diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk
index 21268af6f93e..dbbd4af27e57 100644
--- a/Mk/bsd.sanity.mk
+++ b/Mk/bsd.sanity.mk
@@ -175,3 +175,15 @@ DEV_ERROR+= "USE_MAKESELF is unsupported, please use USES=makeself"
.if defined(USE_ZIP)
DEV_ERROR+= 'USE_ZIP is unsupported, please use USES=zip'
.endif
+
+.if defined(USE_LHA)
+DEV_WARNING+= 'USE_LHA is deprecated, please use USES=lha'
+.endif
+
+.if defined(USE_XZ)
+DEV_WARNING+= 'USE_XZ is deprecated, please use USES=tar:xz'
+.endif
+
+.if defined(USE_BZIP2)
+DEV_WARNING+= 'USE_XZ is deprecated, please use USES=tar:bzip2'
+.endif