Wed Mar 9 22:27:29 2016 UTC ()
Add special handling for Debian derived systems as they do not have GNU awk
in /usr/bin/awk but mawk. Use /usr/bin/gawk if it exists, otherwise
depend on gawk from pkgsrc when required.


(tnn)
diff -r1.59 -r1.60 pkgsrc/mk/tools/tools.Linux.mk

cvs diff -r1.59 -r1.60 pkgsrc/mk/tools/tools.Linux.mk (expand / switch to context diff)
--- pkgsrc/mk/tools/tools.Linux.mk 2015/02/16 11:01:40 1.59
+++ pkgsrc/mk/tools/tools.Linux.mk 2016/03/09 22:27:29 1.60
@@ -1,9 +1,13 @@
-# $NetBSD: tools.Linux.mk,v 1.59 2015/02/16 11:01:40 jperkin Exp $
+# $NetBSD: tools.Linux.mk,v 1.60 2016/03/09 22:27:29 tnn Exp $
 #
 # System-supplied tools for the Linux operating system.
 
 TOOLS_PLATFORM.[?=		[			# shell builtin
+.if exists(/etc/debian_version)
+TOOLS_PLATFORM.awk?=		/usr/bin/awk
+.else
 TOOLS_PLATFORM.awk?=		${TOOLS_PLATFORM.gawk}
+.endif
 .if exists(/usr/bin/autopoint)
 TOOLS_PLATFORM.autopoint?=	/usr/bin/autopoint
 .endif
@@ -90,10 +94,16 @@
 .endif
 TOOLS_PLATFORM.file?=		/usr/bin/file
 TOOLS_PLATFORM.find?=		/usr/bin/find
-.if exists(/bin/awk)
-TOOLS_PLATFORM.gawk?=		/bin/awk
+.if exists(/etc/debian_version)
+.  if exists(/usr/bin/gawk)
+TOOLS_PLATFORM.gawk?=		/usr/bin/gawk
+.  endif
 .else
+.  if exists(/bin/awk)
+TOOLS_PLATFORM.gawk?=		/bin/awk
+.  else
 TOOLS_PLATFORM.gawk?=		/usr/bin/awk
+.  endif
 .endif
 .if exists(/usr/bin/gettext)
 TOOLS_PLATFORM.gettext?=	/usr/bin/gettext