pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk add GNU gnu patch(1), to override patch(1) on some ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c69d201cd9fe
branches: trunk
changeset: 467330:c69d201cd9fe
user: grant <grant%pkgsrc.org@localhost>
date: Thu Jan 29 09:38:10 2004 +0000
description:
add GNU gnu patch(1), to override patch(1) on some platforms.
diffstat:
mk/bsd.pkg.mk | 4 ++--
mk/tools.mk | 24 ++++++++++++++++++++++--
2 files changed, 24 insertions(+), 4 deletions(-)
diffs (77 lines):
diff -r c8114cf442a6 -r c69d201cd9fe mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Thu Jan 29 08:03:55 2004 +0000
+++ b/mk/bsd.pkg.mk Thu Jan 29 09:38:10 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1363 2004/01/28 20:29:46 jschauma Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1364 2004/01/29 09:38:10 grant Exp $
#
# This file is in the public domain.
#
@@ -470,7 +470,7 @@
.endif
.if ${_NEED_PATCH} == "YES" && !exists(${PATCH:C|-.*||}) && empty(PKGPATH:Mdevel/patch)
-BUILD_DEPENDS+= patch>=2.2:../../devel/patch
+USE_GNU_TOOLS+= patch
.endif
PATCH_STRIP?= -p0
diff -r c8114cf442a6 -r c69d201cd9fe mk/tools.mk
--- a/mk/tools.mk Thu Jan 29 08:03:55 2004 +0000
+++ b/mk/tools.mk Thu Jan 29 09:38:10 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tools.mk,v 1.19 2004/01/07 00:12:19 wiz Exp $
+# $NetBSD: tools.mk,v 1.20 2004/01/29 09:38:10 grant Exp $
#
# This Makefile creates a ${TOOLS_DIR} directory and populates the bin
# subdir with tools that hide the ones outside of ${TOOLS_DIR}.
@@ -115,7 +115,7 @@
# defining e.g. USE_GNU_TOOLS+="awk sed". Version numbers are not
# considered.
-_TOOLS= awk grep m4 make sed
+_TOOLS= awk grep m4 make patch sed
.if defined(_IGNORE_USE_GNU_TOOLS)
USE_GNU_TOOLS:= # empty
@@ -132,6 +132,8 @@
_TOOLS_OPSYS_HAS_GNU.grep+= NetBSD-*-* OpenBSD-*-*
_TOOLS_OPSYS_HAS_GNU.m4+= # empty
_TOOLS_OPSYS_HAS_GNU.make+= Darwin-*-*
+_TOOLS_OPSYS_HAS_GNU.patch+= Darwin-*-* FreeBSD-*-* Linux-*-* NetBSD-*-*
+_TOOLS_OPSYS_HAS_GNU.patch+= OpenBSD-*-*
_TOOLS_OPSYS_HAS_GNU.sed+= Linux-*-* NetBSD-*-*
# These platforms have GNUish versions of the tools available in the base
@@ -143,6 +145,7 @@
_TOOLS_REPLACE_OPSYS.grep+= SunOS-*-*
_TOOLS_REPLACE_OPSYS.m4+= # empty
_TOOLS_REPLACE_OPSYS.make+= # empty
+_TOOLS_REPLACE_OPSYS.patch+= SunOS-*-*
_TOOLS_REPLACE_OPSYS.sed+= SunOS-*-*
# These platforms have completely unusable versions of these tools, and
@@ -260,6 +263,23 @@
MAKEFLAGS+= _IGNORE_USE_GNU_TOOLS=
.endif
+.if ${_TOOLS_REPLACE.patch} == "YES"
+_TOOLS_OVERRIDE.patch= YES
+_TOOLS_PROGNAME.patch= ${GPATCH}
+.endif
+.if (${_TOOLS_NEED_GNU.patch} == "YES") && empty(PKGPATH:Mdevel/patch)
+BUILD_DEPENDS+= patch>=2.2:../../devel/patch
+_TOOLS_OVERRIDE.patch= YES
+_TOOLS_PROGNAME.patch= ${LOCALBASE}/bin/gpatch # "gpatch" always exists
+. if exists(${_TOOLS_PROGNAME.patch})
+GPATCH:= ${_TOOLS_PROGNAME.patch}
+. endif
+.endif
+.if !empty(PKGPATH:Mdevel/patch)
+_TOOLS_OVERRIDE.patch= NO
+MAKEFLAGS+= _IGNORE_USE_GNU_TOOLS=
+.endif
+
.if ${_TOOLS_REPLACE.sed} == "YES"
_TOOLS_OVERRIDE.sed= YES
_TOOLS_PROGNAME.sed= ${SED}
Home |
Main Index |
Thread Index |
Old Index