summaryrefslogtreecommitdiff
path: root/graphics/Mesa
diff options
context:
space:
mode:
authorjlam <jlam>2004-03-15 17:38:10 +0000
committerjlam <jlam>2004-03-15 17:38:10 +0000
commitf62a4c2131483cb536a368b073e6d5dcf88a36ab (patch)
tree8c279b1ed5a6f869fd2a81904aa52940890e8433 /graphics/Mesa
parent7a8ace5366a38800b589d85b0173e8b64556f98f (diff)
downloadpkgsrc-f62a4c2131483cb536a368b073e6d5dcf88a36ab.tar.gz
Move the definitions of MESA_REQD and _MESA_REQD to Mesa/version.mk and
modify {MesaLib,glu}/{buildlink3,builtin}.mk accordingly. Also add the dependency on {MesaLib,glu}>=${_MESA_REQD} to the builtin.mk files so that we correctly check the built-in Mesa version against the dependency requirements.
Diffstat (limited to 'graphics/Mesa')
-rw-r--r--graphics/Mesa/version.mk53
1 files changed, 41 insertions, 12 deletions
diff --git a/graphics/Mesa/version.mk b/graphics/Mesa/version.mk
index 6c0aa7f2abc..0a8f6acfdab 100644
--- a/graphics/Mesa/version.mk
+++ b/graphics/Mesa/version.mk
@@ -1,10 +1,9 @@
-# $NetBSD: version.mk,v 1.7 2004/01/23 19:37:18 jlam Exp $
+# $NetBSD: version.mk,v 1.8 2004/03/15 17:38:10 jlam Exp $
#
# This file computes the version number of the Mesa distributed with
# XFree86 and stores it in ${_MESA_VERSION}.
#
-# NOTE: This file should only be used by the Mesa-related buildlink*.mk
-# files.
+# NOTE: This file should only be used by the Mesa-related builtin.mk files.
#
.if !defined(MESA_VERSION_MK)
MESA_VERSION_MK= # defined
@@ -14,15 +13,17 @@ MESA_VERSION_MK= # defined
_GL_GL_H= ${X11BASE}/include/GL/gl.h
_MESA_GL_VERSIONS= 1.2 1.3 1.4 1.5
.for _glvers_ in ${_MESA_GL_VERSIONS}
-. if !exists(${_GL_GL_H})
-_MESA_GL_VERSION_${_glvers_}= NO
-. else
+. if !defined(_MESA_GL_VERSION_${_glvers_})
+_MESA_GL_VERSION_${_glvers_}?= no
+. if exists(${_GL_GL_H})
_MESA_GL_VERSION_${_glvers_}!= \
if ${EGREP} -q "\#define[ ]*GL_VERSION_${_glvers_:S/./_/}[ ]*1" ${_GL_GL_H}; then \
- ${ECHO} YES; \
+ ${ECHO} "yes"; \
else \
- ${ECHO} NO; \
+ ${ECHO} "no"; \
fi
+. endif
+MAKEFLAGS+= _MESA_GL_VERSION_${_glvers_}=${_MESA_GL_VERSION_${_glvers_}}
. endif
.endfor
#
@@ -33,16 +34,44 @@ _MESA_GL_VERSION_${_glvers_}!= \
# Mesa-4.0.4 implements OpenGL 1.3,
# Mesa-3.4.2 implements OpenGL 1.2.
#
-.if ${_MESA_GL_VERSION_1.5} == "YES"
+.if !empty(_MESA_GL_VERSION_1.5:M[yY][eE][sS])
_MESA_VERSION?= 6.0
-.elif ${_MESA_GL_VERSION_1.4} == "YES"
+.elif !empty(_MESA_GL_VERSION_1.4:M[yY][eE][sS])
_MESA_VERSION?= 5.0
-.elif ${_MESA_GL_VERSION_1.3} == "YES"
+.elif !empty(_MESA_GL_VERSION_1.3:M[yY][eE][sS])
_MESA_VERSION?= 4.0.4
-.elif ${_MESA_GL_VERSION_1.2} == "YES"
+.elif !empty(_MESA_GL_VERSION_1.2:M[yY][eE][sS])
_MESA_VERSION?= 3.4.2
.else
_MESA_VERSION?= 0
.endif
+MESA_REQD?= 3.4.2
+
+# Distill the MESA_REQD list into a single _MESA_REQD value that is the
+# highest version of Mesa required.
+#
+_MESA_STRICTEST_REQD?= none
+. for _version_ in ${MESA_REQD}
+. for _pkg_ in Mesa-${_version_}
+. if ${_MESA_STRICTEST_REQD} == "none"
+_MESA_PKG_SATISFIES_DEP= yes
+. for _vers_ in ${MESA_REQD}
+. if !empty(_MESA_PKG_SATISFIES_DEP:M[yY][eE][sS])
+_MESA_PKG_SATISFIES_DEP!= \
+ if ${PKG_ADMIN} pmatch 'Mesa>=${_vers_}' ${_pkg_}; then \
+ ${ECHO} "yes"; \
+ else \
+ ${ECHO} "no"; \
+ fi
+. endif
+. endfor
+. if !empty(_MESA_PKG_SATISFIES_DEP:M[yY][eE][sS])
+_MESA_STRICTEST_REQD= ${_version_}
+. endif
+. endif
+. endfor
+. endfor
+_MESA_REQD= ${_MESA_STRICTEST_REQD}
+
.endif # MESA_VERSION_MK