summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam>2005-05-14 22:31:04 +0000
committerjlam <jlam>2005-05-14 22:31:04 +0000
commit93f38dd8d97a4d9db6f32c9d7121177fd0452601 (patch)
tree0347d262903d9000dbf15fee41599360ecb117a9
parentdc4340cfc841e30e632c2ac78eb37cc3d246e29f (diff)
downloadpkgsrc-93f38dd8d97a4d9db6f32c9d7121177fd0452601.tar.gz
Add the *cat tools needed by the patch phase to output the contents of
distribution patches to stdout.
-rw-r--r--mk/bsd.pkg.patch.mk36
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