pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/patch Reworked the way the needed tools for the "pa...
details: https://anonhg.NetBSD.org/pkgsrc/rev/bccfb17d8efe
branches: trunk
changeset: 532176:bccfb17d8efe
user: rillig <rillig%pkgsrc.org@localhost>
date: Mon Aug 13 09:22:21 2007 +0000
description:
Reworked the way the needed tools for the "patch" phase are determined.
diffstat:
mk/patch/bsd.patch-vars.mk | 29 +++++++++++------------------
1 files changed, 11 insertions(+), 18 deletions(-)
diffs (63 lines):
diff -r 0978a68210df -r bccfb17d8efe mk/patch/bsd.patch-vars.mk
--- a/mk/patch/bsd.patch-vars.mk Mon Aug 13 09:03:41 2007 +0000
+++ b/mk/patch/bsd.patch-vars.mk Mon Aug 13 09:22:21 2007 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: bsd.patch-vars.mk,v 1.4 2007/05/25 14:21:32 rillig Exp $
+# $NetBSD: bsd.patch-vars.mk,v 1.5 2007/08/13 09:22:21 rillig Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
# bsd.patch.mk is included.
#
-# The following variables may be set in a package Makefile:
+# Package-settable variables:
#
# PATCHFILES is a list of distribution patches relative to
# ${_DISTDIR} that are applied first to the package.
@@ -13,7 +13,7 @@
# This defaults to the "patches" subdirectory of the package
# directory.
#
-# The following variables may be set by the user:
+# User-settable variables:
#
# LOCALPATCHES is the location of local patches that are maintained
# in a directory tree reflecting the same hierarchy as the pkgsrc
@@ -25,29 +25,22 @@
# The default PATCHDIR is currently set in bsd.prefs.mk
#PATCHDIR?= ${.CURDIR}/patches
-.if (defined(PATCHFILES) && !empty(PATCHFILES)) || \
- (defined(PATCHDIR) && exists(${PATCHDIR})) || \
- (defined(LOCALPATCHES) && exists(${LOCALPATCHES}/${PKGPATH}))
+PATCHFILES?= # none
+
+pkgsrc_patches= ${:!echo ${PATCHDIR}/patch-*!:N*\*}
+local_patches= ${:!echo ${LOCALPATCHES}/${PKGPATH}/*!:N*/CVS:N*/\*}
+
+.if !empty(PATCHFILES) || !empty(pkgsrc_patches) || !empty(local_patches)
USE_TOOLS+= patch
.endif
-
-# Just testing whether the directories exist or not is not enough.
-# There may be directories that are empty except for the CVS metafiles.
-# This complicated test is necessary to not record pkgtools/digest
-# as a dependency for devel/bmake.
-.if (defined(PATCHDIR) && exists(${PATCHDIR})) || \
- (defined(LOCALPATCHES) && exists(${LOCALPATCHES}/${PKGPATH}))
-_patches!= echo ${PATCHDIR}/* ${LOCALPATCHES}/${PKGPATH}/*
-_patches:= ${_patches:N*/CVS:N*/\*}
-. if !empty(_patches)
+.if !empty(PATCHFILES) || !empty(pkgsrc_patches)
USE_TOOLS+= digest:bootstrap
-. endif
.endif
# These tools are used to output the contents of the distribution patches
# to stdout.
#
-.if defined(PATCHFILES)
+.if !empty(PATCHFILES)
USE_TOOLS+= cat
. if !empty(PATCHFILES:M*.Z) || !empty(PATCHFILES:M*.gz)
USE_TOOLS+= gzcat
Home |
Main Index |
Thread Index |
Old Index