diff options
author | jlam <jlam@pkgsrc.org> | 2005-05-16 18:43:20 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2005-05-16 18:43:20 +0000 |
commit | 482689cdaa1181f18cc146eb01e4fd58ec6acadc (patch) | |
tree | 53730840a1fb168d490ce75beeaf4371aa2b5b60 /mk | |
parent | a77257ee11e4ede349e24cb5dd4903d689626d4d (diff) | |
download | pkgsrc-482689cdaa1181f18cc146eb01e4fd58ec6acadc.tar.gz |
NetBSD's (and bootstrap's) pax-as-tar is GNUish enough to extract most
GNU tar archives. Create a new EXTRACT_USING value "nbtar" that causes
tar/ustar archives to be extracted using pax-as-tar, which understands
most GNU tar extensions. Default to EXTRACT_USING=nbtar, as quite a
few packages are distributed in GNU tar archives.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.extract.mk | 14 | ||||
-rw-r--r-- | mk/defaults/mk.conf | 8 |
2 files changed, 14 insertions, 8 deletions
diff --git a/mk/bsd.pkg.extract.mk b/mk/bsd.pkg.extract.mk index 0fd6f6e82c8..502a39842fb 100644 --- a/mk/bsd.pkg.extract.mk +++ b/mk/bsd.pkg.extract.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.extract.mk,v 1.5 2005/05/16 04:22:40 jlam Exp $ +# $NetBSD: bsd.pkg.extract.mk,v 1.6 2005/05/16 18:43:20 jlam Exp $ # # This Makefile fragment is included to bsd.pkg.mk and defines the # relevant variables and targets for the "extract" phase. @@ -22,8 +22,8 @@ # that ends in <sufx>. # # EXTRACT_USING specifies the tool used to extract tar/ustar-format -# archives. The possible values are "pax" and "gtar". By -# default, we use the "pax" tool. +# archives. The possible values are "gtar", "nbtar", and "pax". +# By default, we use the "nbtar" tool (NetBSD's pax-as-tar). # # EXTRACT_ELEMENTS is a list of files within the distfile to extract. # This variable only takes effect for distfiles that are tarballs. @@ -38,7 +38,7 @@ EXTRACT_ONLY?= ${DISTFILES} EXTRACT_SUFX?= .tar.gz -EXTRACT_USING?= pax +EXTRACT_USING?= nbtar _EXTRACT_SUFFIXES= .tar.gz .tgz .tar.bz2 .tbz .tar.Z .tar _tar.gz _EXTRACT_SUFFIXES+= .shar.gz .shar.bz2 .shar.Z .shar @@ -55,6 +55,8 @@ _EXTRACT_SUFFIXES+= .rar !empty(EXTRACT_SUFX:M*.tbz) || !empty(EXTRACT_SUFX:M*.tgz) . if !empty(EXTRACT_USING:Mgtar) PKGSRC_USE_TOOLS+= gtar +. elif !empty(EXTRACT_USING:Mnbtar) +PKGSRC_USE_TOOLS+= tar . else PKGSRC_USE_TOOLS+= pax . endif @@ -165,6 +167,8 @@ EXTRACT_CMD${__suffix__}?= ${DECOMPRESS_CMD${__suffix__}} $${extract_file} | ${S .if !empty(EXTRACT_USING:Mgtar) _DFLT_EXTRACT_CMD?= ${DECOMPRESS_CMD} $${extract_file} | ${GTAR} -xf - ${EXTRACT_ELEMENTS} +.elif !empty(EXTRACT_USING:Mnbtar) +_DFLT_EXTRACT_CMD?= ${DECOMPRESS_CMD} $${extract_file} | ${TAR} -xf - ${EXTRACT_ELEMENTS} .else _DFLT_EXTRACT_CMD?= ${DECOMPRESS_CMD} $${extract_file} | ${PAX} -O -r ${EXTRACT_ELEMENTS} .endif @@ -173,6 +177,8 @@ _DFLT_EXTRACT_CMD?= ${DECOMPRESS_CMD} $${extract_file} | ${PAX} -O -r ${EXTRACT_ . if !defined(EXTRACT_CMD${__suffix__}) . if !empty(EXTRACT_USING:Mgtar) EXTRACT_CMD${__suffix__}?= ${DECOMPRESS_CMD${__suffix__}} $${extract_file} | ${GTAR} -xf - ${EXTRACT_ELEMENTS} +. elif !empty(EXTRACT_USING:Mnbtar) +EXTRACT_CMD${__suffix__}?= ${DECOMPRESS_CMD${__suffix__}} $${extract_file} | ${TAR} -xf - ${EXTRACT_ELEMENTS} . else EXTRACT_CMD${__suffix__}?= ${DECOMPRESS_CMD${__suffix__}} $${extract_file} | ${PAX} -O -r ${EXTRACT_ELEMENTS} . endif diff --git a/mk/defaults/mk.conf b/mk/defaults/mk.conf index 446f6350d12..fc68d8dd7e9 100644 --- a/mk/defaults/mk.conf +++ b/mk/defaults/mk.conf @@ -1,4 +1,4 @@ -# $NetBSD: mk.conf,v 1.41 2005/05/16 03:07:38 jlam Exp $ +# $NetBSD: mk.conf,v 1.42 2005/05/16 18:43:20 jlam Exp $ # # A file providing defaults for pkgsrc and the packages collection. @@ -507,10 +507,10 @@ PATCH_FUZZ_FACTOR?= -F0 # Possible: any combination of packages # Default: not set -EXTRACT_USING?= pax +EXTRACT_USING?= nbtar # Use the specified tool to extract tar/ustar archives. -# Possible: pax, gtar -# Default: pax +# Possible: gtar, nbtar, pax +# Default: nbtar #FAILOVER_FETCH= # Perform a checksum at "make fetch" time. If the checksum doesn't |