pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Rename "apply-distribution-patches" and "apply-pkgs...
details: https://anonhg.NetBSD.org/pkgsrc/rev/1b82c818d954
branches: trunk
changeset: 495501:1b82c818d954
user: jlam <jlam%pkgsrc.org@localhost>
date: Sun Jun 12 03:38:04 2005 +0000
description:
Rename "apply-distribution-patches" and "apply-pkgsrc-patches" targets
to "do-distribution-patch" and "do-pkgsrc-patch", respectively, and
allow them to be overridden by the package Makefile. This allows for
more fine-grained overriding of the patch process.
diffstat:
mk/bsd.pkg.patch.mk | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diffs (62 lines):
diff -r 142526669522 -r 1b82c818d954 mk/bsd.pkg.patch.mk
--- a/mk/bsd.pkg.patch.mk Sat Jun 11 22:16:15 2005 +0000
+++ b/mk/bsd.pkg.patch.mk Sun Jun 12 03:38:04 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.patch.mk,v 1.13 2005/06/08 17:52:50 jlam Exp $
+# $NetBSD: bsd.pkg.patch.mk,v 1.14 2005/06/12 03:38:04 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and defines the
# relevant variables and targets for the "patch" phase.
@@ -146,11 +146,11 @@
_PKGSRC_PATCH_TARGETS= uptodate-digest
.if defined(PATCHFILES)
-_PKGSRC_PATCH_TARGETS+= apply-distribution-patches
+_PKGSRC_PATCH_TARGETS+= do-distribution-patch
.endif
.if (defined(PATCHDIR) && exists(${PATCHDIR})) || \
(defined(LOCALPATCHES) && exists(${LOCALPATCHES}/${PKGPATH}))
-_PKGSRC_PATCH_TARGETS+= apply-pkgsrc-patches
+_PKGSRC_PATCH_TARGETS+= do-pkgsrc-patch
.endif
.PHONY: do-patch
@@ -179,16 +179,19 @@
${TOUCH} ${TOUCH_FLAGS} ${_PATCH_COOKIE:Q}; \
fi
-apply-distribution-patches:
+.PHONY: do-distribution-patch
+.if !target(do-distribution-patch)
+do-distribution-patch:
@${ECHO_MSG} "${_PKGSRC_IN}> Applying distribution patches for ${PKGNAME}"
-.for i in ${PATCHFILES}
+. for i in ${PATCHFILES}
@${ECHO_PATCH_MSG} "${_PKGSRC_IN}> Applying distribution patch ${i}"
${_PKG_SILENT}${_PKG_DEBUG}cd ${_DISTDIR}; \
${PATCH_DIST_CAT.${i:S/=/--/}} | \
${PATCH} ${PATCH_DIST_ARGS.${i:S/=/--/}} \
|| { ${ECHO} "Patch ${i} failed"; ${_PKGSRC_PATCH_FAIL}; }
${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${i:Q} >> ${_PATCH_COOKIE_TMP:Q}
-.endfor
+. endfor
+.endif
_PKGSRC_PATCHES= # empty
.if defined(PATCHDIR) && exists(${PATCHDIR})
@@ -198,7 +201,9 @@
_PKGSRC_PATCHES+= ${LOCALPATCHES}/${PKGPATH}/patch-*
.endif
-apply-pkgsrc-patches:
+.PHONY: do-pkgsrc-patch
+.if !target(do-pkgsrc-patch)
+do-pkgsrc-patch:
@${ECHO_MSG} "${_PKGSRC_IN}> Applying pkgsrc patches for ${PKGNAME}"
${_PKG_SILENT}${_PKG_DEBUG} \
fail=; \
@@ -265,3 +270,4 @@
done; \
${_PKGSRC_PATCH_FAIL}; \
fi
+.endif
Home |
Main Index |
Thread Index |
Old Index