pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk Remove this unsupported float comparison. How did t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2a0ac8f43257
branches:  trunk
changeset: 460993:2a0ac8f43257
user:      seb <seb%pkgsrc.org@localhost>
date:      Tue Sep 09 09:10:55 2003 +0000

description:
Remove this unsupported float comparison. How did this worked? I wonder...

Introduce private variables _{MAKEINFO,TEXINFO_REQD}_{MAJOR,MINOR}
holding the major and minor number version numbers of available makeinfo
and of the minimum required version.
Use these to sort out if devel/gtexinfo is needed as dependency.

diffstat:

 mk/texinfo.mk |  17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diffs (46 lines):

diff -r 86a70c7d6ee7 -r 2a0ac8f43257 mk/texinfo.mk
--- a/mk/texinfo.mk     Tue Sep 09 09:02:30 2003 +0000
+++ b/mk/texinfo.mk     Tue Sep 09 09:10:55 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: texinfo.mk,v 1.22 2003/09/02 06:59:48 jlam Exp $
+# $NetBSD: texinfo.mk,v 1.23 2003/09/09 09:10:55 seb Exp $
 #
 # This Makefile fragment is included by bsd.pkg.mk when INFO_FILES is
 # not empty or USE_MAKEINFO is not "no".
@@ -55,6 +55,8 @@
 
 # Minimum required version for the GNU makeinfo command.
 TEXINFO_REQD?= 3.12
+_TEXINFO_REQD_MAJOR=   ${TEXINFO_REQD:C|\..*$||}
+_TEXINFO_REQD_MINOR=   ${TEXINFO_REQD:C|^[0-9]+\.||:C|\..*$||}
 
 # Argument to specify maximum info files size for newer versions
 # of makeinfo. This argument is supported since makeinfo 4.1.
@@ -76,8 +78,9 @@
 .  endfor
 
 # Record makeinfo's version.
-# If makeinfo's version contains useful information outside [0-9].[0-9],
-# the following would have to be changed as well as the comparison below.
+# If makeinfo's version contains useful information outside the first
+# two dot separated numbers the following would have to be changed as well
+# as _{MAKEINFO,TEXINFO_REQD}_{MAJOR,MINOR} and their comparison below.
 .  if !empty(_MAKEINFO) && !defined(MAKEINFO_VERSION)
 MAKEINFO_VERSION_OUTPUT!=      ${_MAKEINFO} --version 2>/dev/null || ${ECHO}
 MAKEINFO_VERSION=
@@ -95,8 +98,14 @@
 # Here it is assumed devel/gtexinfo's makeinfo version will be
 # superior or equal to TEXINFO_REQD.
 _NEED_TEXINFO=         YES
-.  if defined(MAKEINFO_VERSION) && ${MAKEINFO_VERSION} >= ${TEXINFO_REQD}
+.  if defined(MAKEINFO_VERSION)
+_MAKEINFO_VERSION_MAJOR=       ${MAKEINFO_VERSION:C|\..*$||}
+_MAKEINFO_VERSION_MINOR=       ${MAKEINFO_VERSION:C|^[0-9]+\.||:C|\..*$||}
+.    if ${_MAKEINFO_VERSION_MAJOR} > ${_TEXINFO_REQD_MAJOR}
 _NEED_TEXINFO=         NO
+.    elif ${_MAKEINFO_VERSION_MAJOR} == ${_TEXINFO_REQD_MAJOR} && ${_MAKEINFO_VERSION_MINOR} >= ${_TEXINFO_REQD_MINOR}
+_NEED_TEXINFO=         NO
+.    endif
 .  endif
 .  if !empty(_NEED_TEXINFO:M[yY][eE][sS])
 BUILD_DEPENDS+=                gtexinfo>=${TEXINFO_REQD}:../../devel/gtexinfo



Home | Main Index | Thread Index | Old Index