diff options
author | jkh <jkh@FreeBSD.org> | 1995-03-23 05:28:31 +0800 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-03-23 05:28:31 +0800 |
commit | 9671f51d8516d4f39693b3a86997709b9ec707b4 (patch) | |
tree | 06cd2cd1f5b07c8b404657e363d0ff18e6d5aec4 /Mk | |
parent | e894423f04dae378524668d51278a5b5ca509722 (diff) | |
download | freebsd-ports-gnome-9671f51d8516d4f39693b3a86997709b9ec707b4.tar.gz freebsd-ports-gnome-9671f51d8516d4f39693b3a86997709b9ec707b4.tar.zst freebsd-ports-gnome-9671f51d8516d4f39693b3a86997709b9ec707b4.zip |
Add new EXTRACT_BEFORE_FLAGS and EXTRACT_AFTER_FLAGS variables to make
complex extraction rules easier.
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.port.mk | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index bdc706137943..f44c73d318ce 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -3,7 +3,7 @@ # bsd.port.mk - 940820 Jordan K. Hubbard. # This file is in the public domain. # -# $Id: bsd.port.mk,v 1.121 1995/03/21 03:59:11 jkh Exp $ +# $Id: bsd.port.mk,v 1.122 1995/03/21 22:43:36 jkh Exp $ # # Please view me with 4 column tabs! @@ -92,7 +92,12 @@ # the above two categories. # EXTRACT_CMD - Command for extracting archive (default: tar). # EXTRACT_SUFX - Suffix for archive names (default: .tar.gz). -# EXTRACT_ARGS - Arguments to ${EXTRACT_CMD} (default: -C ${WRKDIR} -xzf). +# EXTRACT_BEFORE_ARGS - +# Arguments to ${EXTRACT_CMD} before filename +# (default: -C ${WRKDIR} -xzf). +# EXTRACT_AFTER_ARGS - +# Arguments to ${EXTRACT_CMD} following filename +# (default: none). # # NCFTP - Full path to ncftp command if not in $PATH (default: ncftp). # NCFTPFLAGS - Arguments to ${NCFTP} (default: -N). @@ -193,7 +198,12 @@ PATCH_ARGS?= -d ${WRKSRC} --forward --quiet -E ${PATCH_STRIP} EXTRACT_CMD?= tar EXTRACT_SUFX?= .tar.gz -EXTRACT_ARGS?= -xzf +# Backwards compatability. +.if defined(EXTRACT_ARGS) +EXTRACT_BEFORE_ARGS?= ${EXTRACT_ARGS} +.else +EXTRACT_BEFORE_ARGS?= -xzf +.endif PKG_CMD?= pkg_create PKG_ARGS?= -v -c ${PKGDIR}/COMMENT -d ${PKGDIR}/DESCR -f ${PKGDIR}/PLIST -p ${PREFIX} @@ -660,14 +670,14 @@ ${EXTRACT_COOKIE}: @mkdir -p ${WRKDIR} .if defined(EXTRACT_ONLY) @for file in ${EXTRACT_ONLY}; do \ - if ! (cd ${WRKDIR};${EXTRACT_CMD} ${EXTRACT_ARGS} ${DISTDIR}/$$file);\ + if ! (cd ${WRKDIR};${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ then \ exit 1; \ fi \ done .else @for file in ${DISTFILES}; do \ - if ! (cd ${WRKDIR};${EXTRACT_CMD} ${EXTRACT_ARGS} ${DISTDIR}/$$file);\ + if ! (cd ${WRKDIR};${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ then \ exit 1; \ fi \ |