diff options
author | schmonz <schmonz@pkgsrc.org> | 2004-08-16 01:56:03 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2004-08-16 01:56:03 +0000 |
commit | 082fba6ece26a7d6fd1c9f2840a89b1f0079b1f3 (patch) | |
tree | 85dab48165db2a294b306f7a60d86eae81a5c5a6 | |
parent | 37360b4e1a8626faf1f33d80a5bfda31c510462c (diff) | |
download | pkgsrc-082fba6ece26a7d6fd1c9f2840a89b1f0079b1f3.tar.gz |
If patching fails and either of PKG_OPTIONS and LOCALPATCHES are
defined, note thatthe patch failure may be due to incompatible
build options and/or local patches, and suggest building with fewer.
-rw-r--r-- | mk/bsd.pkg.mk | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index a2a3d05a99d..bb80c8b23df 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1488 2004/08/07 15:58:59 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1489 2004/08/16 01:56:03 schmonz Exp $ # # This file is in the public domain. # @@ -571,6 +571,16 @@ PATCH_DIST_CAT?= { case $$patchfile in \ PATCH_DIST_CAT.${i:S/=/--/}?= { patchfile=${i}; ${PATCH_DIST_CAT}; } .endfor +PKG_PATCH_FAIL= \ +if [ -n "${PKG_OPTIONS}" ] || [ -n "${_LOCALPATCHFILES}" ]; then \ + ${ECHO} "=========================================================================="; \ + ${ECHO}; \ + ${ECHO} "Some of the selected build options and/or local patches may be incompatible."; \ + ${ECHO} "Please try building with fewer options or patches."; \ + ${ECHO}; \ + ${ECHO} "=========================================================================="; \ +fi; exit 1 + EXTRACT_SUFX?= .tar.gz # We need bzip2 for PATCHFILES with .bz2 suffix. @@ -2070,7 +2080,7 @@ do-patch: uptodate-digest fi; \ ${PATCH_DIST_CAT.${i:S/=/--/}} | \ ${PATCH} ${PATCH_DIST_ARGS.${i:S/=/--/}} \ - || { ${ECHO} "Patch ${i} failed"; exit 1; } + || { ${ECHO} "Patch ${i} failed"; ${PKG_PATCH_FAIL}; } . endfor . endif ${_PKG_SILENT}${_PKG_DEBUG} \ @@ -2147,11 +2157,11 @@ do-patch: uptodate-digest fuzz=""; \ ${PATCH} -v > /dev/null 2>&1 && fuzz="${PATCH_FUZZ_FACTOR}"; \ ${PATCH} $$fuzz ${PATCH_ARGS} < $$i || \ - { ${ECHO} Patch $$i failed ; exit 1; }; \ + { ${ECHO} Patch $$i failed ; ${PKG_PATCH_FAIL}; }; \ done; \ if [ "X$$fail" != "X" ]; then \ ${ECHO_MSG} "Patching failed due to modified patch file(s): $$fail"; \ - exit 1; \ + ${PKG_PATCH_FAIL}; \ fi; \ fi .endif |