diff options
author | jlam <jlam@pkgsrc.org> | 2005-05-14 22:31:04 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2005-05-14 22:31:04 +0000 |
commit | 3d3f88a72eae56baa9fd04ab23b2d5cf5a812821 (patch) | |
tree | 0347d262903d9000dbf15fee41599360ecb117a9 /mk | |
parent | af901ae040c219ab81ce15503476ce9826f30a2e (diff) | |
download | pkgsrc-3d3f88a72eae56baa9fd04ab23b2d5cf5a812821.tar.gz |
Add the *cat tools needed by the patch phase to output the contents of
distribution patches to stdout.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.patch.mk | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/mk/bsd.pkg.patch.mk b/mk/bsd.pkg.patch.mk index 4b9d67d17f0..3038968f54d 100644 --- a/mk/bsd.pkg.patch.mk +++ b/mk/bsd.pkg.patch.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.patch.mk,v 1.2 2005/05/14 22:12:01 jlam Exp $ +# $NetBSD: bsd.pkg.patch.mk,v 1.3 2005/05/14 22:31:04 jlam Exp $ # # This Makefile fragment is included by bsd.pkg.mk and defines the # relevant variables and targets for the "patch" phase. @@ -69,6 +69,26 @@ PKGSRC_USE_TOOLS+= patch . endif .endif +# These tools are used to output the contents of the distribution patches +# to stdout. +# +.if defined(PATCHFILES) +PKGSRC_USE_TOOLS+= cat +. if !empty(PATCHFILES:M*.Z) || !empty(PATCHFILES:M*.gz) +PKGSRC_USE_TOOLS+= gzcat +. endif +. if !empty(PATCHFILES:M*.bz2) +. if !empty(_USE_NEW_TOOLS:M[yY][eE][sS]) +PKGSRC_USE_TOOLS+= bzcat +. elif exists(/usr/bin/bzcat) +BZCAT= /usr/bin/bzcat +. else +BZCAT= ${LOCALBASE}/bin/bzcat +BUILD_DEPENDS+= bzip2>=0.9.0b:../../archivers/bzip2 +. endif +. endif +.endif + .if defined(PATCH_DEBUG) || defined(PKG_VERBOSE) PATCH_DEBUG_TMP= yes .else @@ -146,20 +166,6 @@ if [ -n "${PKG_OPTIONS}" ] || [ -n "${_LOCALPATCHFILES}" ]; then \ fi; exit 1 .endif -# We need bzip2 for PATCHFILES with .bz2 suffix. -.if defined(PATCHFILES) -. if !empty(PATCHFILES:M*.bz2) -. if !empty(_USE_NEW_TOOLS:M[yY][eE][sS]) -PKGSRC_USE_TOOLS+= bzcat -. elif exists(/usr/bin/bzcat) -BZCAT= /usr/bin/bzcat -. else -BZCAT= ${LOCALBASE}/bin/bzcat -BUILD_DEPENDS+= bzip2>=0.9.0b:../../archivers/bzip2 -. endif # !exists bzcat -. endif -.endif # defined(PATCHFILES) - # Patch # LOCALPATCHES contains the location of local patches to packages |