1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-01 10:59:55 +00:00

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
This commit is contained in:
Baptiste Daroussin 2014-03-12 09:17:06 +00:00
parent f699107c2b
commit d17874dc5d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=347964
4 changed files with 76 additions and 0 deletions

14
CHANGES
View File

@ -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

22
Mk/Uses/lha.mk Normal file
View File

@ -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

28
Mk/Uses/tar.mk Normal file
View File

@ -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

View File

@ -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