summaryrefslogtreecommitdiff
path: root/mk/patch
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-07-13 14:02:34 +0000
committerjlam <jlam@pkgsrc.org>2006-07-13 14:02:34 +0000
commit7a2c97d53fecacc96925c6584dd0b8db8ae097b9 (patch)
tree054a4952b111d37e6eb8aaa78c0125d125c86d9a /mk/patch
parent41a963b660aed13cb035a75bf5ee4bb41beaf95a (diff)
downloadpkgsrc-7a2c97d53fecacc96925c6584dd0b8db8ae097b9.tar.gz
* Add a new stage "bootstrap-depends" that happens before all other
stages, and that installs dependencies listed in BOOTSTRAP_DEPENDS. The bootstrap-depends step works just like the normal depends step and honors the value of DEPENDS_TARGET. It's now possible to add dependencies solely to facilitate fetching the distfiles, e.g. BOOTSTRAP_DEPENDS+= curl-[0-9]*:../../www/curl * Teach the tools framework about ":bootstrap" as a tools modifier which indicates the tool should be added as a dependency via BOOTSTRAP_DEPENDS. * Add "digest" to the tools framework. * Use USE_TOOLS+=digest:bootstrap to force pkgsrc to install digest before anything else. Get rid of unused "uptodate-digest" target and related digest version-checking code. * Finish the refactoring work: split checksum-related code out of bsd.pkg.mk and into pkgsrc/mk/checksum and replace the "checksum" target command list with a script that does all the real work. * Make DIGEST_ALGORITHMS and PATCH_DIGEST_ALGORITHM into private variables by prepending them with an underscore. Also, rename _PATCH_DIGEST_ALGORITHM to _PATCH_DIGEST_ALGORITHMS and adjust the makepatchsum target to allow that variable to contain a list of algorithms, all of which are used when creating the patch checksums for ${DISTINFO_FILE}.
Diffstat (limited to 'mk/patch')
-rw-r--r--mk/patch/bsd.patch-vars.mk7
-rw-r--r--mk/patch/patch.mk5
2 files changed, 8 insertions, 4 deletions
diff --git a/mk/patch/bsd.patch-vars.mk b/mk/patch/bsd.patch-vars.mk
index 418b51965da..c487713c018 100644
--- a/mk/patch/bsd.patch-vars.mk
+++ b/mk/patch/bsd.patch-vars.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.patch-vars.mk,v 1.2 2006/06/06 15:28:52 jlam Exp $
+# $NetBSD: bsd.patch-vars.mk,v 1.3 2006/07/13 14:02:34 jlam Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
@@ -31,6 +31,11 @@
USE_TOOLS+= patch
.endif
+.if (defined(PATCHDIR) && exists(${PATCHDIR})) || \
+ (defined(LOCALPATCHES) && exists(${LOCALPATCHES}/${PKGPATH}))
+USE_TOOLS+= digest:bootstrap
+.endif
+
# These tools are used to output the contents of the distribution patches
# to stdout.
#
diff --git a/mk/patch/patch.mk b/mk/patch/patch.mk
index c4e0984732b..259f1f5f153 100644
--- a/mk/patch/patch.mk
+++ b/mk/patch/patch.mk
@@ -1,4 +1,4 @@
-# $NetBSD: patch.mk,v 1.8 2006/07/07 21:24:29 jlam Exp $
+# $NetBSD: patch.mk,v 1.9 2006/07/13 14:02:34 jlam Exp $
#
# The following variables may be set in a package Makefile and control
# how pkgsrc patches are applied.
@@ -124,7 +124,6 @@ patch-cookie:
###
.PHONY: pre-patch do-patch post-patch
-_PKGSRC_PATCH_TARGETS+= uptodate-digest
.if defined(PATCHFILES)
_PKGSRC_PATCH_TARGETS+= distribution-patch-message
_PKGSRC_PATCH_TARGETS+= do-distribution-patch
@@ -295,7 +294,7 @@ do-pkgsrc-patch:
set -- $$algsum; \
alg="$$1"; \
recorded="$$2"; \
- calcsum=`${SED} -e '/\$$NetBSD.*/d' $$i | ${DIGEST} $$alg`; \
+ calcsum=`${SED} -e '/\$$NetBSD.*/d' $$i | ${TOOLS_DIGEST} $$alg`; \
${ECHO_PATCH_MSG} "Verifying $$filename (using digest algorithm $$alg)"; \
if ${TEST} "$$calcsum" != "$$recorded"; then \
patch_warning "Ignoring patch file $$i: invalid checksum"; \