pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Add the *cat tools needed by the patch phase to out...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f708444bd665
branches:  trunk
changeset: 493784:f708444bd665
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat May 14 22:31:04 2005 +0000

description:
Add the *cat tools needed by the patch phase to output the contents of
distribution patches to stdout.

diffstat:

 mk/bsd.pkg.patch.mk |  36 +++++++++++++++++++++---------------
 1 files changed, 21 insertions(+), 15 deletions(-)

diffs (57 lines):

diff -r 54d1acef736b -r f708444bd665 mk/bsd.pkg.patch.mk
--- a/mk/bsd.pkg.patch.mk       Sat May 14 22:19:07 2005 +0000
+++ b/mk/bsd.pkg.patch.mk       Sat May 14 22:31:04 2005 +0000
@@ -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 @@
 .  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 @@
 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



Home | Main Index | Thread Index | Old Index