tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xgettext with UI files support



Hi,

From: Jonathan Perkin <jperkin%joyent.com@localhost>, Date: Mon, 15 Jun 2015 16:08:24 +0100

> * On 2015-06-15 at 16:00 BST, Ryo ONODERA wrote:
> 
>> My commit to x11/gtk3 was wrong.
>> How about the following patches?
>> If REQUIRE_XGETTEXT_WITH_UI_FILES_SUPPORT=yes, xgettext>=0.18.3 from
>> devel/gettext-tools is used.
> 
> I really don't like that variable name, it's way too long.
> 
> I'd also prefer to see a more general way of requiring specific
> versions of USE_TOOLS (e.g. USE_TOOLS+= xgettext>=0.18.3 or something)
> rather than adding special cases like this all over the place,
> especially during a freeze.
> 
> Can we go with a simpler, non-infrastructure fix for now and discuss a
> general purpose solution post-freeze?

Could you explain me your idea about USE_TOOLS+=xgettext>=0.18.3?
The version number 0.18.3 should be compared to '/usr/bin/xgettext --version'
or 'pkg_info gettext-tools'?

I have included my work-in-progress patch for latter case.
mk/replace.mk in pkgsrc current uses version numbers from
'pkg_info TOOLPACKAGE'. However for xgettext in x11/gtk3 case,
I must see '/usr/bin/xgettext --version' because if my environment has
xgettext 0.18.3 or later in base, I should use xgettext from base.

Index: replace.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/replace.mk,v
retrieving revision 1.274
diff -u -r1.274 replace.mk
--- replace.mk	1 Feb 2015 08:48:56 -0000	1.274
+++ replace.mk	21 Jun 2015 06:07:57 -0000
@@ -90,7 +90,7 @@
 # ones that are overridden by superseding ones.
 #
 .if !defined(_USE_TOOLS)
-.  for _t_ in ${USE_TOOLS:C/:.*//:O:u}
+.  for _t_ in ${USE_TOOLS:C/:.*//:C/[><=!].*//:O:u}
 _USE_TOOLS+=	${_t_}
 .  endfor
 .  if !empty(_USE_TOOLS:Mbison-yacc)	# bison-yacc > yacc
@@ -131,16 +131,62 @@
 #    TOOL_DEPENDS:	:build (default), :pkgsrc
 #    DEPENDS:		:run
 #
-.for _t_ in ${USE_TOOLS:N*\:*} ${USE_TOOLS:M*\:bootstrap}
+# Set required version number for the tool:
+#    USE_TOOLS+=	gmake>=3.81
+#    USE_TOOLS+=	gmake:run>=3.81
+#
+
+.for _t_ in ${USE_TOOLS:M*\:bootstrap*}
 _TOOLS_DEPMETHOD.${_t_:C/:.*//}=	BOOTSTRAP_DEPENDS
+# If _t_ has >=, >, <=, <, == or !=, set _TOOLS_DEPVERPATTERN.
+.  if ${_t_:C/.*[><=!].*//} == ""
+_TOOLS_DEPVERPATTERN.${_t_:C/:.*//}=	${_t_:C/:bootstrap//}
+_TOOLS_DEPVER.${_t_:C/:.*//}=		${_t_:C/${_t_:C/:.*//}:bootstrap//}
+_TOOLS_DEPVERNUM.${_t_:C/:.*//}=	${_t_:C/${_t_:C/:.*//}:bootstrap//:C/[><=!]//:C/=//}
+.  endif
+.endfor
+
+.for _t_ in ${USE_TOOLS:N*\:*}
+_TOOLS_DEPMETHOD.${_t_:C/[><=!].*//}=	TOOL_DEPENDS
+# If _t_ has >=, >, <=, <, == or !=, set _TOOLS_DEPVERPATTERN.
+.  if ${_t_:C/.*[><=!].*//} == ""
+_TOOLS_DEPVERPATTERN.${_t_:C/[><=!].*//}=	${_t_}
+_TOOLS_DEPVER.${_t_:C/[><=!].*//}=	${_t_:C/${_t_:C/[><=!].*//}//}
+_TOOLS_DEPVERNUM.${_t_:C/[><=!].*//}=	${_t_:C/${_t_:C/[><=!].*//}//:C/[><=!]//:C/=//}
+.  endif
 .endfor
-.for _t_ in ${USE_TOOLS:N*\:*} ${USE_TOOLS:M*\:build} ${USE_TOOLS:M*\:pkgsrc}
+
+.for _t_ in ${USE_TOOLS:M*\:build*}
 _TOOLS_DEPMETHOD.${_t_:C/:.*//}=	TOOL_DEPENDS
+# If _t_ has >=, >, <=, <, == or !=, set _TOOLS_DEPVERPATTERN.
+.  if ${_t_:C/.*[><=!].*//} == ""
+_TOOLS_DEPVERPATTERN.${_t_:C/:.*//}=	${_t_:C/:build//}
+_TOOLS_DEPVER.${_t_:C/:.*//}=		${_t_:C/${_t_:C/:.*//}:build//}
+_TOOLS_DEPVERNUM.${_t_:C/:.*//}=	${_t_:C/${_t_:C/:.*//}:build//:C/[><=!]//:C/=//}
+.  endif
 .endfor
-.for _t_ in ${USE_TOOLS:M*\:run}
+
+.for _t_ in ${USE_TOOLS:M*\:pkgsrc*}
+_TOOLS_DEPMETHOD.${_t_:C/:.*//}=	TOOL_DEPENDS
+# If _t_ has >=, >, <=, <, == or !=, set _TOOLS_DEPVERPATTERN.
+.  if ${_t_:C/.*[><=!].*//} == ""
+_TOOLS_DEPVERPATTERN.${_t_:C/:.*//}=	${_t_:C/:pkgsrc//}
+_TOOLS_DEPVER.${_t_:C/:.*//}=		${_t_:C/${_t_:C/:.*//}:pkgsrc//}
+_TOOLS_DEPVERNUM.${_t_:C/:.*//}=	${_t_:C/${_t_:C/:.*//}:pkgsrc//:C/[><=!]//:C/=//}
+.  endif
+.endfor
+
+.for _t_ in ${USE_TOOLS:M*\:run*}
 _TOOLS_DEPMETHOD.${_t_:C/:.*//}=	DEPENDS
+# If _t_ has >=, >, <=, <, == or !=, set _TOOLS_DEPVERPATTERN.
+.  if ${_t_:C/.*[><=!].*//} == ""
+_TOOLS_DEPVERPATTERN.${_t_:C/:.*//}=	${_t_:C/:run//}
+_TOOLS_DEPVER.${_t_:C/:.*//}=		${_t_:C/${_t_:C/:.*//}:run//}
+_TOOLS_DEPVERNUM.${_t_:C/:.*//}=	${_t_:C/${_t_:C/:.*//}:run//:C/[><=!]//:C/=//}
+.  endif
 .endfor
 
+
 .if !empty(_USE_TOOLS:Mbison-yacc)	# bison-yacc > yacc
 .  if defined(_TOOLS_DEPMETHOD.bison-yacc) && \
       (${_TOOLS_DEPMETHOD.bison-yacc} == "TOOL_DEPENDS") && \
@@ -209,7 +255,8 @@
 .  if !empty(PKGPATH:Marchivers/p7zip)
 MAKEFLAGS+=			TOOLS_IGNORE.7za=
 .  elif !empty(_TOOLS_USE_PKGSRC.7za:M[yY][eE][sS])
-TOOLS_DEPENDS.7za?=		p7zip>=9.04:../../archivers/p7zip
+_TOOLS_DEPVERPATTERN.p7zip?=	p7zip>=9.04
+TOOLS_DEPENDS.7za?=		${_TOOLS_DEPVERPATTERN.p7zip}:../../archivers/p7zip
 TOOLS_CREATE+=			7za
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.7za=7za
 TOOLS_PATH.7za=			${TOOLS_PREFIX.7za}/bin/7za
@@ -220,7 +267,8 @@
 .  if !empty(PKGPATH:Mlang/nawk)
 MAKEFLAGS+=			TOOLS_IGNORE.awk=
 .  elif !empty(_TOOLS_USE_PKGSRC.awk:M[yY][eE][sS])
-TOOLS_DEPENDS.awk?=		nawk>=20040207:../../lang/nawk
+_TOOLS_DEPVERPATTERN.awk?=	nawk>=20040207
+TOOLS_DEPENDS.awk?=		${_TOOLS_DEPVERPATTERN.awk}:../../lang/nawk
 TOOLS_CREATE+=			awk
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.awk=nawk
 TOOLS_PATH.awk=			${TOOLS_PREFIX.awk}/bin/nawk
@@ -231,7 +279,8 @@
 .  if !empty(PKGPATH:Mshells/bash)
 MAKEFLAGS+=			TOOLS_IGNORE.bash=
 .  elif !empty(_TOOLS_USE_PKGSRC.bash:M[yY][eE][sS])
-TOOLS_DEPENDS.bash?=		bash-[0-9]*:../../shells/bash
+_TOOLS_DEPVERPATTERN.bash?=	bash-[0-9]*
+TOOLS_DEPENDS.bash?=		${_TOOLS_DEPVERPATTERN.bash}:../../shells/bash
 TOOLS_CREATE+=			bash
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.bash=bash
 TOOLS_PATH.bash=		${TOOLS_PREFIX.bash}/bin/bash
@@ -242,7 +291,8 @@
 .  if !empty(PKGPATH:Mdevel/bison)
 MAKEFLAGS+=			TOOLS_IGNORE.bison=
 .  elif !empty(_TOOLS_USE_PKGSRC.bison:M[yY][eE][sS])
-TOOLS_DEPENDS.bison?=		bison>=1.0:../../devel/bison
+_TOOLS_DEPVERPATTERN.bison?=	bison>=1.0
+TOOLS_DEPENDS.bison?=		${_TOOLS_DEPVERPATTERN.bison}:../../devel/bison
 TOOLS_CREATE+=			bison
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.bison=bison
 TOOLS_PATH.bison=		${TOOLS_PREFIX.bison}/bin/bison
@@ -253,7 +303,8 @@
 .  if !empty(PKGPATH:Mdevel/bison)
 MAKEFLAGS+=			TOOLS_IGNORE.bison-yacc=
 .  elif !empty(_TOOLS_USE_PKGSRC.bison-yacc:M[yY][eE][sS])
-TOOLS_DEPENDS.bison-yacc?=	bison>=1.0:../../devel/bison
+_TOOLS_DEPVERPATTERN.bison-yacc?=	bison>=1.0
+TOOLS_DEPENDS.bison-yacc?=	${_TOOLS_DEPVERPATTERN.bison-yacc}:../../devel/bison
 TOOLS_CREATE+=			bison-yacc
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.bison-yacc=bison
 TOOLS_PATH.bison-yacc=		${TOOLS_PREFIX.bison-yacc}/bin/bison
@@ -273,7 +324,8 @@
 .  if !empty(PKGPATH:Marchivers/bsdtar)
 MAKEFLAGS+=			TOOLS_IGNORE.bsdtar=
 .  elif !empty(_TOOLS_USE_PKGSRC.bsdtar:M[yY][eE][sS])
-TOOLS_DEPENDS.bsdtar?=		bsdtar-[0-9]*:../../archivers/bsdtar
+_TOOLS_DEPVERPATTERN.bsdtar?=	bsdtar-[0-9]*
+TOOLS_DEPENDS.bsdtar?=		${_TOOLS_DEPVERPATTERN.bsdtar}:../../archivers/bsdtar
 TOOLS_CREATE+=			bsdtar
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.bsdtar=bsdtar
 TOOLS_PATH.bsdtar=		${TOOLS_PREFIX.bsdtar}/bin/bsdtar
@@ -284,7 +336,8 @@
 .  if !empty(PKGPATH:Mdevel/byacc)
 MAKEFLAGS+=			TOOLS_IGNORE.byacc=
 .  elif !empty(_TOOLS_USE_PKGSRC.byacc:M[yY][eE][sS])
-TOOLS_DEPENDS.byacc?=		byacc>=20040328:../../devel/byacc
+_TOOLS_DEPVERPATTERN.byacc?=	byacc>=20040328
+TOOLS_DEPENDS.byacc?=		${_TOOLS_DEPVERPATTERN.byacc}:../../devel/byacc
 TOOLS_CREATE+=			byacc
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.byacc=byacc
 TOOLS_PATH.byacc=		${TOOLS_PREFIX.byacc}/bin/yacc
@@ -298,7 +351,12 @@
 .    if !empty(PKGPATH:Marchivers/bzip2)
 MAKEFLAGS+=			TOOLS_IGNORE.${_t_}=
 .    elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
-TOOLS_DEPENDS.${_t_}?=		bzip2>=0.9.0b:../../archivers/bzip2
+.      if empty(_TOOLS_DEPVER.${_t_})
+_TOOLS_DEPVERPATTERN.${_t_}=	bzip2>=0.9.0b
+.      else
+_TOOLS_DEPVERPATTERN.${_t_}=	bzip2${_TOOLS_DEPVER.${_t_}}
+.      endif
+TOOLS_DEPENDS.${_t_}?=		${_TOOLS_DEPVERPATTERN.${_t_}}:../../archivers/bzip2
 TOOLS_CREATE+=			${_t_}
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.${_t_}=bzip2
 TOOLS_PATH.${_t_}=		${TOOLS_PREFIX.${_t_}}/bin/${_t_}
@@ -310,7 +368,8 @@
 .  if !empty(PKGPATH:Mdevel/chrpath)
 MAKEFLAGS+=			TOOLS_IGNORE.chrpath=
 .  elif !empty(_TOOLS_USE_PKGSRC.chrpath:M[yY][eE][sS])
-TOOLS_DEPENDS.chrpath?=		chrpath>=0.13:../../devel/chrpath
+_TOOLS_DEPVERPATTERN.chrpath?=	chrpath>=0.13
+TOOLS_DEPENDS.chrpath?=		${_TOOLS_DEPVERPATTERN.chrpath}:../../devel/chrpath
 TOOLS_CREATE+=			chrpath
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.chrpath=chrpath
 TOOLS_PATH.chrpath=		${TOOLS_PREFIX.chrpath}/bin/chrpath
@@ -323,7 +382,12 @@
 .    if !empty(PKGPATH:Mdevel/cmake)
 MAKEFLAGS+=			TOOLS_IGNORE.${_t_}=
 .    elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
-TOOLS_DEPENDS.${_t_}?=		cmake>=2.8.1nb1:../../devel/cmake
+.      if empty(_TOOLS_DEPVER.${_t_})
+_TOOLS_DEPVERPATTERN.${_t_}=	cmake>=2.8.1nb1
+.      else
+_TOOLS_DEPVERPATTERN.${_t_}=	cmake${_TOOLS_DEPVER.${_t_}}
+.      endif
+TOOLS_DEPENDS.${_t_}?=		${_TOOLS_DEPVERPATTERN.${_t_}}:../../devel/cmake
 TOOLS_CREATE+=			${_t_}
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.${_t_}=cmake
 TOOLS_PATH.${_t_}=		${TOOLS_PREFIX.${_t_}}/bin/${_t_}
@@ -335,7 +399,8 @@
 .  if !empty(PKGPATH:Mshells/tcsh)
 MAKEFLAGS+=			TOOLS_IGNORE.csh=
 .  elif !empty(_TOOLS_USE_PKGSRC.csh:M[yY][eE][sS])
-TOOLS_DEPENDS.csh?=		tcsh-[0-9]*:../../shells/tcsh
+_TOOLS_DEPVERPATTERN.csh?=	tcsh-[0-9]*
+TOOLS_DEPENDS.csh?=		${_TOOLS_DEPVERPATTERN.csh}:../../shells/tcsh
 TOOLS_CREATE+=			csh
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.csh=tcsh
 TOOLS_PATH.csh=			${TOOLS_PREFIX.csh}/bin/tcsh
@@ -346,7 +411,8 @@
 .  if !empty(PKGPATH:Mwww/curl)
 MAKEFLAGS+=			TOOLS_IGNORE.curl=
 .  elif !empty(_TOOLS_USE_PKGSRC.curl:M[yY][eE][sS])
-TOOLS_DEPENDS.curl?=		curl-[0-9]*:../../www/curl
+_TOOLS_DEPVERPATTERN.curl?=	curl-[0-9]*
+TOOLS_DEPENDS.curl?=		${_TOOLS_DEPVERPATTERN.curl}:../../www/curl
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.curl=curl
 TOOLS_PATH.curl=		${TOOLS_PREFIX.curl}/bin/curl
 .  endif
@@ -356,7 +422,8 @@
 .  if !empty(PKGPATH:Mnet/fetch)
 MAKEFLAGS+=			TOOLS_IGNORE.fetch=
 .  elif !empty(_TOOLS_USE_PKGSRC.fetch:M[yY][eE][sS])
-TOOLS_DEPENDS.fetch?=		fetch-[0-9]*:../../net/fetch
+_TOOLS_DEPVERPATTERN.fetch?=	fetch-[0-9]*
+TOOLS_DEPENDS.fetch?=		${_TOOLS_DEPVERPATTERN.fetch}:../../net/fetch
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.fetch=fetch
 TOOLS_PATH.fetch=		${TOOLS_PREFIX.fetch}/bin/fetch
 .  endif
@@ -366,7 +433,8 @@
 .  if !empty(PKGPATH:Msysutils/file)
 MAKEFLAGS+=			TOOLS_IGNORE.file=
 .  elif !empty(_TOOLS_USE_PKGSRC.file:M[yY][eE][sS])
-TOOLS_DEPENDS.file?=		file>=4.13:../../sysutils/file
+_TOOLS_DEPVERPATTERN.file?=	file>=4.13
+TOOLS_DEPENDS.file?=		${_TOOLS_DEPVERPATTERN.file}:../../sysutils/file
 TOOLS_CREATE+=			file
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.file=file
 TOOLS_PATH.file=		${TOOLS_PREFIX.file}/bin/file
@@ -377,13 +445,15 @@
 .  if !empty(PKGPATH:Msysutils/findutils)
 MAKEFLAGS+=			TOOLS_IGNORE.find=
 .  elif !empty(_TOOLS_USE_PKGSRC.find:M[yY][eE][sS])
-TOOLS_DEPENDS.find?=		findutils>=4.1:../../sysutils/findutils
+_TOOLS_DEPVERPATTERN.find?=	findutils>=4.1
+TOOLS_DEPENDS.find?=		${_TOOLS_DEPVERPATTERN.find}:../../sysutils/findutils
 TOOLS_CREATE+=			find
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.find=findutils
 TOOLS_PATH.find=		${TOOLS_PREFIX.find}/bin/gfind
 .  endif
 .endif
 
+# USE_TOOLS+=flex does not support version reqirement pattern.
 .if !defined(TOOLS_IGNORE.flex) && !empty(_USE_TOOLS:Mflex)
 .  if !empty(PKGPATH:Mdevel/flex)
 MAKEFLAGS+=			TOOLS_IGNORE.flex=
@@ -405,7 +475,8 @@
 .  if !empty(PKGPATH:Mnet/tnftp)
 MAKEFLAGS+=			TOOLS_IGNORE.ftp=
 .  elif !empty(_TOOLS_USE_PKGSRC.ftp:M[yY][eE][sS])
-TOOLS_DEPENDS.ftp?=		tnftp-[0-9]*:../../net/tnftp
+_TOOLS_DEPVERPATTERN.ftp?=	tnftp-[0-9]*
+TOOLS_DEPENDS.ftp?=		${_TOOLS_DEPVERPATTERN.ftp}:../../net/tnftp
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.ftp=ftp
 TOOLS_PATH.ftp=			${TOOLS_PREFIX.ftp}/bin/ftp
 .  endif
@@ -415,7 +486,8 @@
 .  if !empty(PKGPATH:Mlang/gawk)
 MAKEFLAGS+=			TOOLS_IGNORE.gawk=
 .  elif !empty(_TOOLS_USE_PKGSRC.gawk:M[yY][eE][sS])
-TOOLS_DEPENDS.gawk?=		gawk>=3.1.1:../../lang/gawk
+_TOOLS_DEPVERPATTERN.gawk?=	gawk>=3.1.1
+TOOLS_DEPENDS.gawk?=		${_TOOLS_DEPVERPATTERN.gawk}:../../lang/gawk
 TOOLS_CREATE+=			gawk
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.gawk=gawk
 TOOLS_PATH.gawk=		${TOOLS_PREFIX.gawk}/bin/gawk
@@ -428,7 +500,8 @@
 MAKEFLAGS+=			TOOLS_IGNORE.gem=
 .  elif !empty(_TOOLS_USE_PKGSRC.gem:M[yY][eE][sS])
 .    if !defined(RUBY_VER) || !empty(RUBY_VER:M18)
-TOOLS_DEPENDS.gem?=		${RUBY_PKGPREFIX}-rubygems-[0-9]*:../../misc/rubygems
+_TOOLS_DEPVERPATTERN.gem?=	${RUBY_PKGPREFIX}-rubygems-[0-9]*
+TOOLS_DEPENDS.gem?=		$_TOOLS_DEPVERPATTERN.gem}:../../misc/rubygems
 .    else
 TOOLS_DEPENDS.gem?=		${RUBY_BASE}>=${RUBY_VERSION}:${RUBY_SRCDIR}
 .    endif
@@ -442,7 +515,8 @@
 .  if !empty(PKGPATH:Mdevel/m4)
 MAKEFLAGS+=			TOOLS_IGNORE.gm4=
 .  elif !empty(_TOOLS_USE_PKGSRC.gm4:M[yY][eE][sS])
-TOOLS_DEPENDS.gm4?=		m4>=1.4:../../devel/m4
+_TOOLS_DEPVERPATTERN.gm4?=	m4>=1.4
+TOOLS_DEPENDS.gm4?=		${_TOOLS_DEPVERPATTERN.gm4}:../../devel/m4
 TOOLS_CREATE+=			gm4
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.gm4=m4
 TOOLS_PATH.gm4=			${TOOLS_PREFIX.gm4}/bin/gm4
@@ -450,11 +524,12 @@
 TOOLS_ALIASES.gm4=		m4
 .endif
 
-.if !defined(TOOLS_IGNORE.gmake) && !empty(_USE_TOOLS:Mgmake)
+.if !defined(TOOLS_IGNORE.gmake) && !empty(_USE_TOOLS:Mgmake*)
 .  if !empty(PKGPATH:Mdevel/gmake)
 MAKEFLAGS+=			TOOLS_IGNORE.gmake=
 .  elif !empty(_TOOLS_USE_PKGSRC.gmake:M[yY][eE][sS])
-TOOLS_DEPENDS.gmake?=		gmake>=${GMAKE_REQD}:../../devel/gmake
+_TOOLS_DEPVERPATTERN.gmake?=	gmake>=3.81
+TOOLS_DEPENDS.gmake?=		${_TOOLS_DEPVERPATTERN.gmake}:../../devel/gmake
 TOOLS_CREATE+=			gmake
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.gmake=gmake
 TOOLS_PATH.gmake=		${TOOLS_PREFIX.gmake}/bin/gmake
@@ -465,7 +540,8 @@
 .  if !empty(PKGPATH:Mtextproc/gsed)
 MAKEFLAGS+=			TOOLS_IGNORE.gsed=
 .  elif !empty(_TOOLS_USE_PKGSRC.gsed:M[yY][eE][sS])
-TOOLS_DEPENDS.gsed?=		gsed>=3.0.2:../../textproc/gsed
+_TOOLS_DEPVERPATTERN.gsed?=	gsed>=3.0.2
+TOOLS_DEPENDS.gsed?=		${_TOOLS_DEPVERPATTERN.gsed}:../../textproc/gsed
 TOOLS_CREATE+=			gsed
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.gsed=gsed
 TOOLS_PATH.gsed=		${TOOLS_PREFIX.gsed}/bin/gsed
@@ -477,7 +553,8 @@
 .  if !empty(PKGPATH:Marchivers/gtar-base)
 MAKEFLAGS+=			TOOLS_IGNORE.gtar=
 .  elif !empty(_TOOLS_USE_PKGSRC.gtar:M[yY][eE][sS])
-TOOLS_DEPENDS.gtar?=		gtar-base>=1.13.25:../../archivers/gtar-base
+_TOOLS_DEPVERPATTERN.gtar?=	gtar-base>=1.13.25
+TOOLS_DEPENDS.gtar?=		${_TOOLS_DEPVERPATTERN.gtar}:../../archivers/gtar-base
 TOOLS_CREATE+=			gtar
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.gtar=gtar-base
 TOOLS_PATH.gtar=		${TOOLS_PREFIX.gtar}/bin/gtar
@@ -488,7 +565,8 @@
 .  if !empty(PKGPATH:Marchivers/gzip)
 MAKEFLAGS+=			TOOLS_IGNORE.gunzip=
 .  elif !empty(_TOOLS_USE_PKGSRC.gunzip:M[yY][eE][sS])
-TOOLS_DEPENDS.gunzip?=		{gzip>=1.2.4b,gzip-base>=1.2.4b}:../../archivers/gzip
+_TOOLS_DEPVERPATTERN.gunzip?=	{gzip>=1.2.4b,gzip-base>=1.2.4b}
+TOOLS_DEPENDS.gunzip?=		${_TOOLS_DEPVERPATTERN.gunzip}:../../archivers/gzip
 TOOLS_CREATE+=			gunzip
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.gunzip=gzip
 TOOLS_PATH.gunzip=		${TOOLS_PREFIX.gunzip}/bin/gunzip
@@ -500,7 +578,8 @@
 .  if !empty(PKGPATH:Marchivers/gzip)
 MAKEFLAGS+=			TOOLS_IGNORE.gzcat=
 .  elif !empty(_TOOLS_USE_PKGSRC.gzcat:M[yY][eE][sS])
-TOOLS_DEPENDS.gzcat?=		{gzip>=1.2.4b,gzip-base>=1.2.4b}:../../archivers/gzip
+_TOOLS_DEPVERPATTERN.gzcat?=	{gzip>=1.2.4b,gzip-base>=1.2.4b}
+TOOLS_DEPENDS.gzcat?=		${_TOOLS_DEPVERPATTERN.gzcat}:../../archivers/gzip
 TOOLS_CREATE+=			gzcat
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.gzcat=gzip
 TOOLS_PATH.gzcat=		${TOOLS_PREFIX.gzcat}/bin/zcat
@@ -511,7 +590,8 @@
 .  if !empty(PKGPATH:Marchivers/gzip)
 MAKEFLAGS+=			TOOLS_IGNORE.gzip=
 .  elif !empty(_TOOLS_USE_PKGSRC.gzip:M[yY][eE][sS])
-TOOLS_DEPENDS.gzip?=		{gzip>=1.2.4b,gzip-base>=1.2.4b}:../../archivers/gzip
+_TOOLS_DEPVERPATTERN.gzip?=	{gzip>=1.2.4b,gzip-base>=1.2.4b}
+TOOLS_DEPENDS.gzip?=		${_TOOLS_DEPVERPATTERN.gzip}:../../archivers/gzip
 TOOLS_CREATE+=			gzip
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.gzip=gzip
 TOOLS_PATH.gzip=		${TOOLS_PREFIX.gzip}/bin/gzip
@@ -523,7 +603,8 @@
 .  if !empty(PKGPATH:Mdevel/rcs)
 MAKEFLAGS+=			TOOLS_IGNORE.ident=
 .  elif !empty(_TOOLS_USE_PKGSRC.ident:M[yY][eE][sS])
-TOOLS_DEPENDS.ident?=		rcs-[0-9]*:../../devel/rcs
+_TOOLS_DEPVERPATTERN.ident?=	rcs-[0-9]*
+TOOLS_DEPENDS.ident?=		${_TOOLS_DEPVERPATTERN.ident}:../../devel/rcs
 TOOLS_CREATE+=			ident
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.ident=rcs
 TOOLS_PATH.ident=		${TOOLS_PREFIX.ident}/bin/ident
@@ -534,7 +615,8 @@
 .  if !empty(PKGPATH:Mpkgtools/pkg_install-info)
 MAKEFLAGS+=			TOOLS_IGNORE.install-info=
 .  elif !empty(_TOOLS_USE_PKGSRC.install-info:M[yY][eE][sS])
-TOOLS_DEPENDS.install-info?=	pkg_install-info-[0-9]*:../../pkgtools/pkg_install-info
+_TOOLS_DEPVERPATTERN.install-info?=	pkg_install-info-[0-9]*
+TOOLS_DEPENDS.install-info?=	${_TOOLS_DEPVERPATTERN.install-info}:../../pkgtools/pkg_install-info
 TOOLS_CREATE+=			install-info
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.install-info=pkg_install-info
 TOOLS_PATH.install-info=	${TOOLS_PREFIX.install-info}/bin/pkg_install-info
@@ -550,13 +632,15 @@
 .  if !empty(PKGPATH:Mshells/pdksh)
 MAKEFLAGS+=			TOOLS_IGNORE.ksh=
 .  elif !empty(_TOOLS_USE_PKGSRC.ksh:M[yY][eE][sS])
-TOOLS_DEPENDS.ksh?=		pdksh>=5.2.14:../../shells/pdksh
+_TOOLS_DEPVERPATTERN.ksh?=	pdksh>=5.2.14
+TOOLS_DEPENDS.ksh?=		${_TOOLS_DEPVERPATTERN.ksh}:../../shells/pdksh
 TOOLS_CREATE+=			ksh
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.ksh=pdksh
 TOOLS_PATH.ksh=			${TOOLS_PREFIX.ksh}/bin/pdksh
 .  endif
 .endif
 
+# USE_TOOLS+=lex does not support version reqirement pattern.
 .if !defined(TOOLS_IGNORE.lex) && !empty(_USE_TOOLS:Mlex)
 .  if !empty(PKGPATH:Mdevel/flex)
 MAKEFLAGS+=			TOOLS_IGNORE.lex=
@@ -577,7 +661,8 @@
 .  if !empty(PKGPATH:Marchivers/lha)
 MAKEFLAGS+=			TOOLS_IGNORE.lha=
 .  elif !empty(_TOOLS_USE_PKGSRC.lha:M[yY][eE][sS])
-TOOLS_DEPENDS.lha?=		lha>=114.9:../../archivers/lha
+_TOOLS_DEPVERPATTERN.lha?=	lha>=114.9
+TOOLS_DEPENDS.lha?=		${_TOOLS_DEPVERPATTERN.lha}:../../archivers/lha
 TOOLS_CREATE+=			lha
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.lha=lha
 TOOLS_PATH.lha=			${TOOLS_PREFIX.lha}/bin/lha
@@ -588,7 +673,8 @@
 .  if !empty(PKGPATH:Marchivers/lzip)
 MAKEFLAGS+=			TOOLS_IGNORE.lzip=
 .  elif !empty(_TOOLS_USE_PKGSRC.lzip:M[yY][eE][sS])
-TOOLS_DEPENDS.lzip?=		lzip>=1.14:../../archivers/lzip
+_TOOLS_DEPVERPATTERN.lzip?=	lzip>=1.14
+TOOLS_DEPENDS.lzip?=		${_TOOLS_DEPVERPATTERN.lzip}:../../archivers/lzip
 TOOLS_CREATE+=			lzip
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.lzip=lzip
 TOOLS_PATH.lzip=		${TOOLS_PREFIX.lzip}/bin/lzip
@@ -599,7 +685,8 @@
 .  if !empty(PKGPATH:Marchivers/xz)
 MAKEFLAGS+=			TOOLS_IGNORE.lzcat=
 .  elif !empty(_TOOLS_USE_PKGSRC.lzcat:M[yY][eE][sS])
-TOOLS_DEPENDS.lzcat?=		xz>=4.999.9betanb1:../../archivers/xz
+_TOOLS_DEPVERPATTERN.lzcat?=	xz>=4.999.9betanb1
+TOOLS_DEPENDS.lzcat?=		${_TOOLS_DEPVERPATTERN.lzcat}:../../archivers/xz
 TOOLS_CREATE+=			lzcat
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.lzcat=lzcat
 TOOLS_PATH.lzcat=		${TOOLS_PREFIX.lzcat}/bin/lzcat
@@ -610,7 +697,8 @@
 .  if !empty(PKGPATH:Mdevel/m4)
 MAKEFLAGS+=			TOOLS_IGNORE.m4=
 .  elif !empty(_TOOLS_USE_PKGSRC.m4:M[yY][eE][sS])
-TOOLS_DEPENDS.m4?=		m4>=1.4:../../devel/m4
+_TOOLS_DEPVERPATTERN.m4?=	m4>=1.4
+TOOLS_DEPENDS.m4?=		${_TOOLS_DEPVERPATTERN.m4}:../../devel/m4
 TOOLS_CREATE+=			m4
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.m4=m4
 TOOLS_PATH.m4=			${TOOLS_PREFIX.m4}/bin/gm4
@@ -621,7 +709,8 @@
 .  if !empty(PKGPATH:Mmail/heirloom-mailx)
 MAKEFLAGS+=			TOOLS_IGNORE.mail=
 .  elif !empty(_TOOLS_USE_PKGSRC.mail:M[yY][eE][sS])
-TOOLS_DEPENDS.mail?=		heirloom-mailx-[0-9]*:../../mail/heirloom-mailx
+_TOOLS_DEPVERPATTERN.mail?=	heirloom-mailx-[0-9]*
+TOOLS_DEPENDS.mail?=		${_TOOLS_DEPVERPATTERN.mail}:../../mail/heirloom-mailx
 TOOLS_CREATE+=			mail
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.mail=heirloom-mailx
 TOOLS_PATH.mail=		${TOOLS_PREFIX.mail}/bin/mailx
@@ -632,7 +721,8 @@
 .  if !empty(PKGPATH:Mdevel/gtexinfo)
 MAKEFLAGS+=			TOOLS_IGNORE.makeinfo=
 .  elif !empty(_TOOLS_USE_PKGSRC.makeinfo:M[yY][eE][sS])
-TOOLS_DEPENDS.makeinfo?=	gtexinfo>=${TEXINFO_REQD}:../../devel/gtexinfo
+_TOOLS_DEPVERPATTERN.makeinfo?=	gtexinfo>=3.12
+TOOLS_DEPENDS.makeinfo?=	${_TOOLS_DEPVERPATTERN.makeinfo}:../../devel/gtexinfo
 TOOLS_CREATE+=			makeinfo
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.makeinfo=gtexinfo
 TOOLS_PATH.makeinfo=		${TOOLS_PREFIX.makeinfo}/bin/makeinfo
@@ -643,7 +733,8 @@
 .  if !empty(PKGPATH:Msysutils/mktemp)
 MAKEFLAGS+=			TOOLS_IGNORE.mktemp=
 .  elif !empty(_TOOLS_USE_PKGSRC.mktemp:M[yY][eE][sS])
-TOOLS_DEPENDS.mktemp?=		mktemp>=1.5:../../sysutils/mktemp
+_TOOLS_DEPVERPATTERN.mktemp?=	mktemp>=1.5
+TOOLS_DEPENDS.mktemp?=		${_TOOLS_DEPVERPATTERN.mktemp}:../../sysutils/mktemp
 TOOLS_CREATE+=			mktemp
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.mktemp=mktemp
 TOOLS_PATH.mktemp=		${TOOLS_PREFIX.mktemp}/bin/mktemp
@@ -658,7 +749,8 @@
 # This is installed by pkgsrc bootstrap, and is never registered, so
 # comment out the dependency on it.
 #
-TOOLS_DEPENDS.mtree?=		mtree>=20040722:../../pkgtools/mtree
+_TOOLS_DEPVERPATTERN.mtree?=	mtree>=20040722
+TOOLS_DEPENDS.mtree?=		${_TOOLS_DEPVERPATTERN.mtree}:../../pkgtools/mtree
 TOOLS_CREATE+=			mtree
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.mtree=mtree
 TOOLS_PATH.mtree=		${TOOLS_PREFIX.mtree}/bin/mtree
@@ -678,7 +770,8 @@
 .  if !empty(PKGPATH:Msecurity/openssl)
 MAKEFLAGS+=			TOOLS_IGNORE.openssl=
 .  elif !empty(_TOOLS_USE_PKGSRC.openssl:M[yY][eE][sS])
-TOOLS_DEPENDS.openssl?=		openssl>=0.9.6:../../security/openssl
+_TOOLS_DEPVERPATTERN.openssl?=	openssl>=0.9.6
+TOOLS_DEPENDS.openssl?=		${_TOOLS_DEPVERPATTERN.openssl}:../../security/openssl
 TOOLS_CREATE+=			openssl
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.openssl=openssl
 TOOLS_PATH.openssl=		${TOOLS_PREFIX.openssl}/bin/openssl
@@ -689,7 +782,8 @@
 .  if !empty(PKGPATH:Mdevel/patch)
 MAKEFLAGS+=			TOOLS_IGNORE.patch=
 .  elif !empty(_TOOLS_USE_PKGSRC.patch:M[yY][eE][sS])
-TOOLS_DEPENDS.patch?=		nbpatch-[0-9]*:../../devel/nbpatch
+_TOOLS_DEPVERPATTERN.patch?=	nbpatch-[0-9]*
+TOOLS_DEPENDS.patch?=		${_TOOLS_DEPVERPATTERN.patch}:../../devel/nbpatch
 TOOLS_CREATE+=			patch
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.patch=nbpatch
 TOOLS_PATH.patch=		${TOOLS_PREFIX.patch}/bin/nbpatch
@@ -702,7 +796,8 @@
 .  if !empty(PKGPATH:Marchivers/pax)
 MAKEFLAGS+=			TOOLS_IGNORE.pax=
 .  elif !empty(_TOOLS_USE_PKGSRC.pax:M[yY][eE][sS])
-TOOLS_DEPENDS.pax?=		pax>=20040802:../../archivers/pax
+_TOOLS_DEPVERPATTERN.pax?=	pax>=20040802
+TOOLS_DEPENDS.pax?=		${_TOOLS_DEPVERPATTERN.pax}:../../archivers/pax
 TOOLS_CREATE+=			pax
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.pax=pax
 TOOLS_PATH.pax=			${TOOLS_PREFIX.pax}/bin/${NBPAX_PROGRAM_PREFIX}pax
@@ -713,7 +808,8 @@
 .  if !empty(PKGPATH:Mdevel/pkg-config)
 MAKEFLAGS+=			TOOLS_IGNORE.pkg-config=
 .  elif !empty(_TOOLS_USE_PKGSRC.pkg-config:M[yY][eE][sS])
-TOOLS_DEPENDS.pkg-config?=	pkg-config>=0.25:../../devel/pkg-config
+_TOOLS_DEPVERPATTERN.pkg-config?=	pkg-config>=0.25
+TOOLS_DEPENDS.pkg-config?=	${_TOOLS_DEPVERPATTERN.pkg-config}:../../devel/pkg-config
 TOOLS_CREATE+=			pkg-config
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.pkg-config=pkg-config
 TOOLS_PATH.pkg-config=		${TOOLS_PREFIX.pkg-config}/bin/pkg-config
@@ -726,7 +822,8 @@
 .  if !empty(PKGPATH:Mpkgtools/rpm2pkg)
 MAKEFLAGS+=			TOOLS_IGNORE.rpm2pkg=
 .  elif !empty(_TOOLS_USE_PKGSRC.rpm2pkg:M[yY][eE][sS])
-TOOLS_DEPENDS.rpm2pkg?=		rpm2pkg>=3.1.4:../../pkgtools/rpm2pkg
+_TOOLS_DEPVERPATTERN.rpm2pkg?=	rpm2pkg>=3.1.4
+TOOLS_DEPENDS.rpm2pkg?=		${_TOOLS_DEPVERPATTERN.rpm2pkg}:../../pkgtools/rpm2pkg
 TOOLS_CREATE+=			rpm2pkg
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.rpm2pkg=rpm2pkg
 TOOLS_PATH.rpm2pkg=		${TOOLS_PREFIX.rpm2pkg}/sbin/rpm2pkg
@@ -737,7 +834,8 @@
 .  if !empty(PKGPATH:Mtextproc/nbsed)
 MAKEFLAGS+=			TOOLS_IGNORE.sed=
 .  elif !empty(_TOOLS_USE_PKGSRC.sed:M[yY][eE][sS])
-TOOLS_DEPENDS.sed?=		nbsed>=20040821:../../textproc/nbsed
+_TOOLS_DEPVERPATTERN.sed?=	nbsed>=20040821
+TOOLS_DEPENDS.sed?=		${_TOOLS_DEPVERPATTERN.sed}:../../textproc/nbsed
 TOOLS_CREATE+=			sed
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.sed=nbsed
 TOOLS_PATH.sed=			${TOOLS_PREFIX.nbsed}/bin/nbsed
@@ -748,7 +846,8 @@
 .  if !empty(PKGPATH:Mshells/pdksh)
 MAKEFLAGS+=			TOOLS_IGNORE.sh=
 .  elif !empty(_TOOLS_USE_PKGSRC.sh:M[yY][eE][sS])
-TOOLS_DEPENDS.sh?=		pdksh>=5.2.14:../../shells/pdksh
+_TOOLS_DEPVERPATTERN.sh?=	pdksh>=5.2.14
+TOOLS_DEPENDS.sh?=		${_TOOLS_DEPVERPATTERN.sh}:../../shells/pdksh
 TOOLS_CREATE+=			sh
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.sh=pdksh
 TOOLS_PATH.sh=			${TOOLS_PREFIX.sh}/bin/pdksh
@@ -760,7 +859,8 @@
 .  if !empty(PKGPATH:Mpkgtools/shlock)
 MAKEFLAGS+=			TOOLS_IGNORE.shlock=
 .  elif !empty(_TOOLS_USE_PKGSRC.shlock:M[yY][eE][sS])
-TOOLS_DEPENDS.shlock?=		shlock>=20020114:../../pkgtools/shlock
+_TOOLS_DEPVERPATTERN.shlock?=	shlock>=20020114
+TOOLS_DEPENDS.shlock?=		${_TOOLS_DEPVERPATTERN.shlock}:../../pkgtools/shlock
 TOOLS_CREATE+=			shlock
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.shlock=shlock
 TOOLS_PATH.shlock=		${TOOLS_PREFIX.shlock}/bin/shlock
@@ -771,7 +871,8 @@
 .  if !empty(PKGPATH:Marchivers/pax)
 MAKEFLAGS+=			TOOLS_IGNORE.tar=
 .  elif !empty(_TOOLS_USE_PKGSRC.tar:M[yY][eE][sS])
-TOOLS_DEPENDS.tar?=		pax>=20040802:../../archivers/pax
+_TOOLS_DEPVERPATTERN.tar?=	pax>=20040802
+TOOLS_DEPENDS.tar?=		${_TOOLS_DEPVERPATTERN.tar}:../../archivers/pax
 TOOLS_CREATE+=			tar
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.tar=pax
 TOOLS_PATH.tar=			${TOOLS_PREFIX.tar}/bin/${NBPAX_PROGRAM_PREFIX}tar
@@ -782,7 +883,8 @@
 .  if !empty(PKGPATH:Mlang/tcl)
 MAKEFLAGS+=			TOOLS_IGNORE.tclsh=
 .  elif !empty(_TOOLS_USE_PKGSRC.tclsh:M[yY][eE][sS])
-TOOLS_DEPENDS.tclsh?=		tcl>=8.4:../../lang/tcl
+_TOOLS_DEPVERPATTERN.tclsh?=	tcl>=8.4
+TOOLS_DEPENDS.tclsh?=		${_TOOLS_DEPVERPATTERN.tclsh}:../../lang/tcl
 TOOLS_CREATE+=			tclsh
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.tclsh=tcl
 TOOLS_PATH.tclsh=		${TOOLS_PREFIX.tclsh}/bin/tclsh
@@ -793,7 +895,8 @@
 .  if !empty(PKGPATH:Mtextproc/texi2html)
 MAKEFLAGS+=			TOOLS_IGNORE.texi2html=
 .  elif !empty(_TOOLS_USE_PKGSRC.texi2html:M[yY][eE][sS])
-TOOLS_DEPENDS.texi2html?=	texi2html>=1.76:../../textproc/texi2html
+_TOOLS_DEPVERPATTERN.texi2html?=	texi2html>=1.76
+TOOLS_DEPENDS.texi2html?=	${_TOOLS_DEPVERPATTERN.texi2html}:../../textproc/texi2html
 TOOLS_CREATE+=			texi2html
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.texi2html=texi2html
 TOOLS_PATH.texi2html=		${TOOLS_PREFIX.texi2html}/bin/texi2html
@@ -804,7 +907,8 @@
 .  if !empty(PKGPATH:Mfonts/ttmkfdir2)
 MAKEFLAGS+=			TOOLS_IGNORE.ttmkfdir=
 .  elif !empty(_TOOLS_USE_PKGSRC.ttmkfdir:M[yY][eE][sS])
-TOOLS_DEPENDS.ttmkfdir?=	ttmkfdir2>=20021109:../../fonts/ttmkfdir2
+_TOOLS_DEPVERPATTERN.ttmkfdir?=	ttmkfdir2>=20021109
+TOOLS_DEPENDS.ttmkfdir?=	${_TOOLS_DEPVERPATTERN.ttmkfdir}:../../fonts/ttmkfdir2
 TOOLS_CREATE+=			ttmkfdir
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.ttmkfdir=ttmkfdir2
 TOOLS_PATH.ttmkfdir=		${TOOLS_PREFIX.ttmkfdir}/bin/ttmkfdir
@@ -815,7 +919,8 @@
 .  if !empty(PKGPATH:Mfonts/type1inst)
 MAKEFLAGS+=			TOOLS_IGNORE.type1inst=
 .  elif !empty(_TOOLS_USE_PKGSRC.type1inst:M[yY][eE][sS])
-TOOLS_DEPENDS.type1inst?=	type1inst>=0.6.1:../../fonts/type1inst
+_TOOLS_DEPVERPATTERN.type1inst?=	type1inst>=0.6.1
+TOOLS_DEPENDS.type1inst?=	${_TOOLS_DEPVERPATTERN.type1inst}:../../fonts/type1inst
 TOOLS_CREATE+=			type1inst
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.type1inst=type1inst
 TOOLS_PATH.type1inst=		${TOOLS_PREFIX.type1inst}/bin/type1inst
@@ -826,7 +931,8 @@
 .  if !empty(PKGPATH:Marchivers/unrar)
 MAKEFLAGS+=			TOOLS_IGNORE.unrar=
 .  elif !empty(_TOOLS_USE_PKGSRC.unrar:M[yY][eE][sS])
-TOOLS_DEPENDS.unrar?=		unrar>=3.3.4:../../archivers/unrar
+_TOOLS_DEPVERPATTERN.unrar?=	unrar>=3.3.4
+TOOLS_DEPENDS.unrar?=		${_TOOLS_DEPVERPATTERN.unrar}:../../archivers/unrar
 TOOLS_CREATE+=			unrar
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.unrar=unrar
 TOOLS_PATH.unrar=		${TOOLS_PREFIX.unrar}/bin/unrar
@@ -837,7 +943,8 @@
 .  if !empty(PKGPATH:Marchivers/unzip)
 MAKEFLAGS+=			TOOLS_IGNORE.unzip=
 .  elif !empty(_TOOLS_USE_PKGSRC.unzip:M[yY][eE][sS])
-TOOLS_DEPENDS.unzip?=		unzip-[0-9]*:../../archivers/unzip
+_TOOLS_DEPVERPATTERN.unzip?=	unzip-[0-9]*
+TOOLS_DEPENDS.unzip?=		${_TOOLS_DEPVERPATTERN.unzip}:../../archivers/unzip
 TOOLS_CREATE+=			unzip
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.unzip=unzip
 TOOLS_PATH.unzip=		${TOOLS_PREFIX.unzip}/bin/unzip
@@ -848,7 +955,8 @@
 .  if !empty(PKGPATH:Marchivers/unzoo)
 MAKEFLAGS+=			TOOLS_IGNORE.unzoo=
 .  elif !empty(_TOOLS_USE_PKGSRC.unzoo:M[yY][eE][sS])
-TOOLS_DEPENDS.unzoo?=		unzoo-[0-9]*:../../archivers/unzoo
+_TOOLS_DEPVERPATTERN.unzoo?=	unzoo-[0-9]*
+TOOLS_DEPENDS.unzoo?=		${_TOOLS_DEPVERPATTERN.unzoo}:../../archivers/unzoo
 TOOLS_CREATE+=			unzoo
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.unzoo=unzoo
 TOOLS_PATH.unzoo=		${TOOLS_PREFIX.unzoo}/bin/unzoo
@@ -859,7 +967,8 @@
 .  if !empty(PKGPATH:Mnet/wget)
 MAKEFLAGS+=			TOOLS_IGNORE.wget=
 .  elif !empty(_TOOLS_USE_PKGSRC.wget:M[yY][eE][sS])
-TOOLS_DEPENDS.wget?=		wget-[0-9]*:../../net/wget
+_TOOLS_DEPVERPATTERN.wget?=	wget-[0-9]*
+TOOLS_DEPENDS.wget?=		${_TOOLS_DEPVERPATTERN.wget}:../../net/wget
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.wget=wget
 TOOLS_PATH.wget=		${TOOLS_PREFIX.wget}/bin/wget
 .  endif
@@ -869,7 +978,8 @@
 .  if !empty(PKGPATH:Mx11/tk)
 MAKEFLAGS+=			TOOLS_IGNORE.wish=
 .  elif !empty(_TOOLS_USE_PKGSRC.wish:M[yY][eE][sS])
-TOOLS_DEPENDS.wish?=		tk>=8.4:../../x11/tk
+_TOOLS_DEPVERPATTERN.wish?=	tk>=8.4
+TOOLS_DEPENDS.wish?=		${_TOOLS_DEPVERPATTERN.wish}:../../x11/tk
 TOOLS_CREATE+=			wish
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.wish=tk
 TOOLS_PATH.wish=		${TOOLS_PREFIX.wish}/bin/wish
@@ -880,7 +990,8 @@
 .  if !empty(PKGPATH:Msysutils/findutils)
 MAKEFLAGS+=			TOOLS_IGNORE.xargs=
 .  elif !empty(_TOOLS_USE_PKGSRC.xargs:M[yY][eE][sS])
-TOOLS_DEPENDS.xargs?=		findutils>=4.1:../../sysutils/findutils
+_TOOLS_DEPVERPATTERN.xargs?=	findutils>=4.1
+TOOLS_DEPENDS.xargs?=		${_TOOLS_DEPVERPATTERN.xargs}:../../sysutils/findutils
 TOOLS_CREATE+=			xargs
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.xargs=findutils
 TOOLS_PATH.xargs=		${TOOLS_PREFIX.xargs}/bin/gxargs
@@ -894,7 +1005,12 @@
 .    if !empty(PKGPATH:Marchivers/xz)
 MAKEFLAGS+=			TOOLS_IGNORE.${_t_}=
 .    elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
-TOOLS_DEPENDS.${_t_}?=		xz>=4.999.9betanb1:../../archivers/xz
+.      if empty(_TOOLS_DEPVER.${_t_})
+_TOOLS_DEPVERPATTERN.${_t_}=	xz>=4.999.9betanb1
+.      else
+_TOOLS_DEPVERPATTERN.${_t_}=	xz${_TOOLS_DEPVER.${_t_}}
+.      endif
+TOOLS_DEPENDS.${_t_}?=		${_TOOLS_DEPVERPATTERN.${_t_}}:../../archivers/xz
 TOOLS_CREATE+=			${_t_}
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.${_t_}=xz
 TOOLS_PATH.${_t_}=		${TOOLS_PREFIX.${_t_}}/bin/${_t_}
@@ -906,7 +1022,8 @@
 .  if !empty(PKGPATH:Mdevel/bison)
 MAKEFLAGS+=			TOOLS_IGNORE.yacc=
 .  elif !empty(_TOOLS_USE_PKGSRC.yacc:M[yY][eE][sS])
-TOOLS_DEPENDS.yacc?=		bison>=1.0:../../devel/bison
+_TOOLS_DEPVERPATTERN.yacc?=	bison>=1.0
+TOOLS_DEPENDS.yacc?=		${_TOOLS_DEPVERPATTERN.yacc}:../../devel/bison
 TOOLS_CREATE+=			yacc
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.yacc=bison
 TOOLS_PATH.yacc=		${TOOLS_PREFIX.yacc}/bin/bison
@@ -927,7 +1044,8 @@
 .    if !empty(PKGPATH:Marchivers/zip)
 MAKEFLAGS+=			TOOLS_IGNORE.${_t_}=
 .    elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
-TOOLS_DEPENDS.${_t_}?=		zip-[0-9]*:../../archivers/zip
+_TOOLS_DEPVERPATTERN.${_t_}?=	zip-[0-9]*
+TOOLS_DEPENDS.${_t_}?=		${_TOOLS_DEPVERPATTERN.${_t_}}:../../archivers/zip
 TOOLS_CREATE+=			${_t_}
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.${_t_}=zip
 TOOLS_PATH.${_t_}=		${TOOLS_PREFIX.${_t_}}/bin/${_t_}
@@ -995,7 +1113,16 @@
      !empty(DEPENDS:Mp5-*) || !empty(PERL5_PREFIX:M${PREFIX})
 .      include "../../lang/perl5/version.mk"
 _TOOLS_USE_PKGSRC.perl=		yes
-TOOLS_DEPENDS.${_t_}?=		perl>=${PERL5_REQD}:../../lang/perl5
+.      if empty(_TOOLS_DEPVER.${_t_})
+.        if empty(_OPSYS_PERL_REQD)
+_TOOLS_DEPVERPATTERN.${_t_}=	perl-[0-9]*
+.        else
+_TOOLS_DEPVERPATTERN.${_t_}=	perl>=${_OPSYS_PERL_REQD}
+.        endif
+.      else
+_TOOLS_DEPVERPATTERN.${_t_}=	perl${_TOOLS_DEPVER.${_t_}}
+.      endif
+TOOLS_DEPENDS.${_t_}?=		${_TOOLS_DEPVERPATTERN.${_t_}}:../../lang/perl5
 TOOLS_CREATE+=			${_t_}
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.${_t_}=perl
 TOOLS_PATH.${_t_}=		${TOOLS_PREFIX.${_t_}}/bin/${_t_}
@@ -1016,7 +1143,12 @@
 .    if !empty(PKGPATH:Msysutils/coreutils)
 MAKEFLAGS+=		TOOLS_IGNORE.${_t_}=
 .    elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
-TOOLS_DEPENDS.${_t_}?=	coreutils>=5.2.1:../../sysutils/coreutils
+.      if empty(_TOOLS_DEPVER.${_t_})
+_TOOLS_DEPVERPATTERN.${_t_}=	coreutils>=5.2.1
+.      else
+_TOOLS_DEPVERPATTERN.${_t_}=	coreutils${_TOOLS_DEPVER.${_t_}}
+.      endif
+TOOLS_DEPENDS.${_t_}?=	${_TOOLS_DEPVERPATTERN.{_t_}}:../../sysutils/coreutils
 TOOLS_CREATE+=		${_t_}
 TOOLS_FIND_PREFIX+=	TOOLS_PREFIX.${_t_}=coreutils
 TOOLS_PATH.${_t_}=	${TOOLS_PREFIX.${_t_}}/bin/g${_t_}
@@ -1031,7 +1163,8 @@
 .  if !empty(PKGPATH:Msysutils/coreutils)
 MAKEFLAGS+=		TOOLS_IGNORE.[=
 .  elif !empty(_TOOLS_USE_PKGSRC.[:M[yY][eE][sS])
-TOOLS_DEPENDS.[?=	coreutils>=5.2.1:../../sysutils/coreutils
+_TOOLS_DEPVERPATTERN.[?=	coreutils>=5.2.1
+TOOLS_DEPENDS.[?=	${_TOOLS_DEPVERPATTERN.[}:../../sysutils/coreutils
 TOOLS_CREATE+=		[
 TOOLS_FIND_PREFIX+=	TOOLS_PREFIX.[=coreutils
 TOOLS_PATH.[=		${TOOLS_PREFIX.[}/bin/g[
@@ -1050,7 +1183,12 @@
 .    if !empty(PKGPATH:Mtextproc/grep)
 MAKEFLAGS+=		TOOLS_IGNORE.${_t_}=
 .    elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
-TOOLS_DEPENDS.${_t_}?=	grep>=2.5.1:../../textproc/grep
+.      if empty(_TOOLS_DEPVER.${_t_})
+_TOOLS_DEPVERPATTERN.${_t_}=	grep>=2.5.1
+.      else
+_TOOLS_DEPVERPATTERN.${_t_}=	grep${_TOOLS_DEPVER.${_t_}}
+.      endif
+TOOLS_DEPENDS.${_t_}?=	${_TOOLS_DEPVERPATTERN.${_t_}}:../../textproc/grep
 TOOLS_CREATE+=		${_t_}
 TOOLS_FIND_PREFIX+=	TOOLS_PREFIX.${_t_}=grep
 TOOLS_PATH.${_t_}=	${TOOLS_PREFIX.${_t_}}/bin/g${_t_}
@@ -1071,7 +1209,12 @@
 .    if !empty(PKGPATH:Mtextproc/mdocml)
 MAKEFLAGS+=		TOOLS_IGNORE.${_t_}=
 .    elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
-TOOLS_DEPENDS.${_t_}?=	mdocml>=1.12.0nb3:../../textproc/mdocml
+.      if empty(_TOOLS_DEPVER.${_t_})
+_TOOLS_DEPVERPATTERN.${_t_}=	mdocml>=1.12.0nb3
+.      else
+_TOOLS_DEPVERPATTERN.${_t_}=	mdocml${_TOOLS_DEPVER.${_t_}}
+.      endif
+TOOLS_DEPENDS.${_t_}?=	${_TOOLS_DEPVERPATTERN.${_t_}}:../../textproc/mdocml
 TOOLS_CREATE+=		${_t_}
 TOOLS_FIND_PREFIX+=	TOOLS_PREFIX.${_t_}=mdocml
 TOOLS_PATH.${_t_}=	${TOOLS_PREFIX.${_t_}}/bin/mandoc
@@ -1096,7 +1239,12 @@
 _TOOLS_USE_PKGSRC.${_t_}= yes
 .      endif
 .      if !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
-TOOLS_DEPENDS.${_t_}?=	groff>=1.19.2nb3:../../textproc/groff
+.      if empty(_TOOLS_DEPVER.${_t_})
+_TOOLS_DEPVERPATTERN.${_t_}=	groff>=1.19.2nb3
+.      else
+_TOOLS_DEPVERPATTERN.${_t_}=	groff${_TOOLS_DEPVER.${_t_}}
+.      endif
+TOOLS_DEPENDS.${_t_}?=	${_TOOLS_DEPVERPATTERN.${_t_}}:../../textproc/groff
 TOOLS_CREATE+=		${_t_}
 TOOLS_FIND_PREFIX+=	TOOLS_PREFIX.${_t_}=groff
 .        if ${OPSYS} == "SunOS" && "${_t_}" != "groff"
@@ -1116,7 +1264,8 @@
 .  if !empty(PKGPATH:Mtextproc/groff)
 MAKEFLAGS+=		TOOLS_IGNORE.gsoelim=
 .  elif !empty(_TOOLS_USE_PKGSRC.gsoelim:M[yY][eE][sS])
-TOOLS_DEPENDS.gsoelim?=	groff>=1.19nb4:../../textproc/groff
+_TOOLS_DEPVERPATTERN.gsoelim?=	groff>=1.19nb4
+TOOLS_DEPENDS.gsoelim?=	${TOOLS_DEPENDS.gsoelim}:../../textproc/groff
 TOOLS_CREATE+=		gsoelim
 TOOLS_FIND_PREFIX+=	TOOLS_PREFIX.gsoelim=groff
 .    if ${OPSYS} == "SunOS"
@@ -1140,7 +1289,12 @@
 .    if !empty(PKGPATH:Mdevel/diffutils)
 MAKEFLAGS+=		TOOLS_IGNORE.${_t_}=
 .    elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
-TOOLS_DEPENDS.${_t_}?=	diffutils>=2.8.1:../../devel/diffutils
+.      if empty(_TOOLS_DEPVER.${_t_})
+_TOOLS_DEPVERPATTERN.${_t_}=	diffutils>=2.8.1
+.      else
+_TOOLS_DEPVERPATTERN.${_t_}=	diffutils${_TOOLS_DEPVER.${_t_}}
+.      endif
+TOOLS_DEPENDS.${_t_}?=	${_TOOLS_DEPVERPATTERN.${_t_}}:../../devel/diffutils
 TOOLS_CREATE+=		${_t_}
 TOOLS_FIND_PREFIX+=	TOOLS_PREFIX.${_t_}=diffutils
 TOOLS_PATH.${_t_}=	${TOOLS_PREFIX.${_t_}}/bin/g${_t_}
@@ -1155,27 +1309,26 @@
 #
 _TOOLS.ghostscript=	dvipdf gs pdf2ps ps2pdf
 
-# This is the minimum version of Ghostscript required by the current
-# package.
-#
-GHOSTSCRIPT_REQD?=	6.01
-
 # Set TOOLS_DEPENDS.ghostscript to an appropriate dependency based on
 # various package options.
 #
 .if !defined(TOOLS_DEPENDS.ghostscript)
 _TOOLS_DEP.ghostscript:=	ghostscript
-TOOLS_DEPENDS.ghostscript=	ghostscript>=${GHOSTSCRIPT_REQD}:../../print/ghostscript
 MAKEVARS+=			TOOLS_DEPENDS.ghostscript
 .endif
 
 .for _t_ in ${_TOOLS.ghostscript}
 .  if !defined(TOOLS_IGNORE.${_t_}) && !empty(_USE_TOOLS:M${_t_})
-.    if !empty(PKGPATH:Mprint/ghostscript) || \
-        !empty(PKGPATH:Mprint/ghostscript-esp)
+.    if !empty(PKGPATH:Mprint/ghostscript-gpl) || \
+        !empty(PKGPATH:Mprint/ghostscript-agpl)
 MAKEFLAGS+=		TOOLS_IGNORE.${_t_}=
 .    elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
-TOOLS_DEPENDS.${_t_}?=	${TOOLS_DEPENDS.ghostscript}
+.      if empty(_TOOLS_DEPVER.${_t_})
+_TOOLS_DEPVERPATTERN.${_t_}=	ghostscript>=6.01
+.      else
+_TOOLS_DEPVERPATTERN.${_t_}=	ghostscript${_TOOLS_DEPVER.${_t_}}
+.      endif
+TOOLS_DEPENDS.${_t_}?=	${_TOOLS_DEPVERPATTERN.${_t_}}:../../print/ghostscript
 TOOLS_CREATE+=		${_t_}
 TOOLS_FIND_PREFIX+=	TOOLS_PREFIX.${_t_}=${TOOLS_DEPENDS.ghostscript:C/:.*//}
 TOOLS_PATH.${_t_}=	${TOOLS_PREFIX.${_t_}}/bin/${_t_}
@@ -1195,7 +1348,8 @@
 .    if !empty(X11_TYPE:Mnative)
 TOOLS_PATH.iceauth=	${X11BASE}/bin/iceauth
 .    else
-TOOLS_DEPENDS.iceauth?=		iceauth-[0-9]*:../../x11/iceauth
+_TOOLS_DEPVERPATTERN.iceauth?=	iceauth-[0-9]*
+TOOLS_DEPENDS.iceauth?=		${_TOOLS_DEPVERPATTERN.iceauth}:../../x11/iceauth
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.iceauth=iceauth
 TOOLS_PATH.iceauth=		${TOOLS_PREFIX.iceauth}/bin/iceauth
 .    endif
@@ -1210,7 +1364,8 @@
 .    if !empty(X11_TYPE:Mnative)
 TOOLS_PATH.mkfontdir=	${X11BASE}/bin/mkfontdir
 .    else
-TOOLS_DEPENDS.mkfontdir?=	mkfontdir-[0-9]*:../../fonts/mkfontdir
+_TOOLS_DEPVERPATTERN.mkfontdir?=	mkfontdir-[0-9]*
+TOOLS_DEPENDS.mkfontdir?=	${_TOOLS_DEPVERPATTERN.mkfontdir}:../../fonts/mkfontdir
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.mkfontdir=mkfontdir
 TOOLS_PATH.mkfontdir=		${TOOLS_PREFIX.mkfontdir}/bin/mkfontdir
 .    endif
@@ -1225,7 +1380,8 @@
 .    if !empty(X11_TYPE:Mnative)
 TOOLS_PATH.mkfontscale=	${X11BASE}/bin/mkfontscale
 .    else
-TOOLS_DEPENDS.mkfontscale?=	mkfontscale-[0-9]*:../../fonts/mkfontscale
+_TOOLS_DEPVERPATTERN.mkfontscale?=	mkfontscale-[0-9]*
+TOOLS_DEPENDS.mkfontscale?=	${_TOOLS_DEPVERPATTERN.mkfontscale}:../../fonts/mkfontscale
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.mkfontscale=mkfontscale
 TOOLS_PATH.mkfontscale=		${TOOLS_PREFIX.mkfontscale}/bin/mkfontscale
 .    endif
@@ -1240,7 +1396,8 @@
 .    if !empty(X11_TYPE:Mnative) && exists(${X11BASE}/bin/bdftopcf)
 TOOLS_PATH.bdftopcf=	${X11BASE}/bin/bdftopcf
 .    else
-TOOLS_DEPENDS.bdftopcf?=	bdftopcf-[0-9]*:../../fonts/bdftopcf
+_TOOLS_DEPVERPATTERN.bdftopcf?=	bdftopcf-[0-9]*
+TOOLS_DEPENDS.bdftopcf?=	${_TOOLS_DEPVERPATTERN.bdftopcf}:../../fonts/bdftopcf
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.bdftopcf=bdftopcf
 TOOLS_PATH.bdftopcf=		${TOOLS_PREFIX.bdftopcf}/bin/bdftopcf
 .    endif
@@ -1255,7 +1412,8 @@
 .    if !empty(X11_TYPE:Mnative)
 TOOLS_PATH.ucs2any=	${X11BASE}/bin/ucs2any
 .    else
-TOOLS_DEPENDS.ucs2any?=		font-util-[0-9]*:../../fonts/font-util
+_TOOLS_DEPVERPATTERN.ucs2any?=	font-util-[0-9]*
+TOOLS_DEPENDS.ucs2any?=		${_TOOLS_DEPVERPATTERN.ucs2any}:../../fonts/font-util
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.ucs2any=ucs2any
 TOOLS_PATH.ucs2any=		${TOOLS_PREFIX.ucs2any}/bin/ucs2any
 .    endif
@@ -1270,7 +1428,8 @@
 .    if !empty(X11_TYPE:Mnative)
 TOOLS_PATH.bdftruncate=	${X11BASE}/bin/bdftruncate
 .    else
-TOOLS_DEPENDS.bdftruncate?=	font-util-[0-9]*:../../fonts/font-util
+_TOOLS_DEPVERPATTERN.bdftruncate?=	font-util-[0-9]*
+TOOLS_DEPENDS.bdftruncate?=	${_TOOLS_DEPVERPATTERN.bdftruncate}:../../fonts/font-util
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.bdftruncate=bdftruncate
 TOOLS_PATH.bdftruncate=		${TOOLS_PREFIX.bdftruncate}/bin/bdftruncate
 .    endif
@@ -1285,7 +1444,8 @@
 .    if !empty(X11_TYPE:Mnative)
 TOOLS_PATH.xauth=	${X11BASE}/bin/xauth
 .    else
-TOOLS_DEPENDS.xauth?=		xauth-[0-9]*:../../x11/xauth
+_TOOLS_DEPVERPATTERN.xauth?=	xauth-[0-9]*
+TOOLS_DEPENDS.xauth?=		${_TOOLS_DEPVERPATTERN.xauth}:../../x11/xauth
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.xauth=xauth
 TOOLS_PATH.xauth=		${TOOLS_PREFIX.xauth}/bin/xauth
 .    endif
@@ -1300,7 +1460,8 @@
 .    if !empty(X11_TYPE:Mnative)
 TOOLS_PATH.xinit=	${X11BASE}/bin/xinit
 .    else
-TOOLS_DEPENDS.xinit?=		xinit-[0-9]*:../../x11/xinit
+_TOOLS_DEPVERPATTERN.xinit?=	xinit-[0-9]*
+TOOLS_DEPENDS.xinit?=		${_TOOLS_DEPVERPATTERN.xinit}:../../x11/xinit
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.xinit=xinit
 TOOLS_PATH.xinit=		${TOOLS_PREFIX.xinit}/bin/xinit
 .    endif
@@ -1315,7 +1476,8 @@
 .    if !empty(X11_TYPE:Mnative)
 TOOLS_PATH.xmessage=	${X11BASE}/bin/xmessage
 .    else
-TOOLS_DEPENDS.xmessage?=		xmessage-[0-9]*:../../x11/xmessage
+_TOOLS_DEPVERPATTERN.xmessage?=	xmessage-[0-9]*
+TOOLS_DEPENDS.xmessage?=	${_TOOLS_DEPVERPATTERN.xmessage}:../../x11/xmessage
 TOOLS_FIND_PREFIX+=		TOOLS_PREFIX.xmessage=xmessage
 TOOLS_PATH.xmessage=		${TOOLS_PREFIX.xmessage}/bin/xmessage
 .    endif
@@ -1333,7 +1495,12 @@
 .  if !defined(TOOLS_IGNORE.${_t_}) && !empty(_USE_TOOLS:M${_t_}) && \
       !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
 TOOLS_CREATE+=		${_t_}
-TOOLS_DEPENDS.${_t_}?=	imake-[0-9]*:../../devel/imake
+.      if empty(_TOOLS_DEPVER.${_t_})
+_TOOLS_DEPVERPATTERN.${_t_}=	imake-[0-9]*
+.      else
+_TOOLS_DEPVERPATTERN.${_t_}=	imake${_TOOLS_DEPVER.${_t_}}
+.      endif
+TOOLS_DEPENDS.${_t_}?=	${_TOOLS_DEPVERPATTERN.${_t_}}:../../devel/imake
 TOOLS_FIND_PREFIX+=	TOOLS_PREFIX.${_t_}=imake
 TOOLS_PATH.${_t_}=	${TOOLS_PREFIX.${_t_}}/bin/${_t_}
 .  endif
@@ -1343,7 +1510,8 @@
     !empty(_TOOLS_USE_PKGSRC.makedepend:M[yY][eE][sS])
 TOOLS_CREATE+=		makedepend
 .  if defined(X11_TYPE) && !empty(X11_TYPE:Mmodular)
-TOOLS_DEPENDS.makedepend?=	makedepend-[0-9]*:../../devel/makedepend
+_TOOLS_DEPVERPATTERN.makedepend?=	makedepend-[0-9]*
+TOOLS_DEPENDS.makedepend?=	${_TOOLS_DEPVERPATTERN.makedepend}:../../devel/makedepend
 TOOLS_FIND_PREFIX+=	TOOLS_PREFIX.makedepend=makedepend
 TOOLS_PATH.makedepend=	${TOOLS_PREFIX.makedepend}/bin/makedepend
 .  else # !empty(X11_TYPE:Mnative)
@@ -1426,7 +1594,7 @@
 # points to the real command, e.g., AWK, SED, etc., provided that
 # "TOOL" has been associated with <tool>.
 #
-.for _t_ in ${USE_TOOLS:M*\:pkgsrc:C/:.*//:O:u}
+.for _t_ in ${USE_TOOLS:M*\:pkgsrc*:C/:.*//:C/[><=!].*//:O:u}
 _TOOLS_USE_PKGSRC.${_t_}?=	no
 .  if defined(_TOOLS_VARNAME.${_t_})
 .    if !empty(_TOOLS_USE_PKGSRC.${_t_}:M[nN][oO])

--
Ryo ONODERA // ryo_on%yk.rim.or.jp@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Home | Main Index | Thread Index | Old Index