diff options
-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 |