summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authorgrant <grant@pkgsrc.org>2003-10-11 05:09:39 +0000
committergrant <grant@pkgsrc.org>2003-10-11 05:09:39 +0000
commitbd1a3a58f0787977e0bb7bc3736df8120d9458ac (patch)
treeddc313e9872dfff802e3d629ff97051cddde7cc2 /mk/bsd.pkg.mk
parent264f7d1b3bee553f0f8d71f2422fe5caa2f43f5c (diff)
downloadpkgsrc-bd1a3a58f0787977e0bb7bc3736df8120d9458ac.tar.gz
add a BUILD_DEPENDS on devel/patch if no suitable patch(1) is
available. fixes my PR pkg/18380, with hints from jschauma.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk20
1 files changed, 19 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index a89873387a1..936da205308 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1294 2003/10/11 03:43:14 grant Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1295 2003/10/11 05:09:39 grant Exp $
#
# This file is in the public domain.
#
@@ -460,6 +460,24 @@ FETCH_CMD?= /usr/bin/ftp
TOUCH_FLAGS?= -f
+# determine if we need GNU patch from pkgsrc.
+_NEED_PATCH!= if [ -d ${PATCHDIR} ]; then \
+ if [ "`${ECHO} ${PATCHDIR}/patch-*`" != "${PATCHDIR}/patch-*" ]; then \
+ ${ECHO} YES; \
+ else \
+ ${ECHO} NO; \
+ fi \
+ else \
+ ${ECHO} NO; \
+ fi
+.if defined(PATCHFILES)
+_NEED_PATCH= YES
+.endif
+
+.if ${_NEED_PATCH} == "YES" && !exists(${PATCH:C|-.*||}) && empty(PKGPATH:Mdevel/patch)
+BUILD_DEPENDS+= patch>=2.2:../../devel/patch
+.endif
+
PATCH_STRIP?= -p0
PATCH_DIST_STRIP?= -p0
.if defined(PATCH_DEBUG) || defined(PKG_VERBOSE)