summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-06-26 05:36:29 +0000
committerjlam <jlam@pkgsrc.org>2002-06-26 05:36:29 +0000
commitaa6c28e1a94a0b2b3c5cc3c67743f2861b37fbd2 (patch)
tree79b93bc8f2de5388f1c466f21d1c66abe4e5f5af /graphics
parent8b1d8d6595d2f7033d5bb1eaf366fa1ff6ed3d06 (diff)
downloadpkgsrc-aa6c28e1a94a0b2b3c5cc3c67743f2861b37fbd2.tar.gz
Give the parts of Mesa their own buildlink.mk files and have Mesa's
buildlink.mk simply include the others. This allows distributing the various tests for whether that part of Mesa is in the base X11R6 into the relevant buildlink.mk file.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/Mesa/buildlink.mk33
-rw-r--r--graphics/MesaLib/buildlink.mk49
-rw-r--r--graphics/glu/buildlink.mk42
-rw-r--r--graphics/glut/buildlink.mk22
4 files changed, 118 insertions, 28 deletions
diff --git a/graphics/Mesa/buildlink.mk b/graphics/Mesa/buildlink.mk
index c026fd0026f..bda4e218f46 100644
--- a/graphics/Mesa/buildlink.mk
+++ b/graphics/Mesa/buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink.mk,v 1.8 2001/09/10 13:35:56 jlam Exp $
+# $NetBSD: buildlink.mk,v 1.9 2002/06/26 05:36:29 jlam Exp $
#
# This Makefile fragment is included by packages that use Mesa.
#
@@ -13,33 +13,10 @@
.if !defined(MESA_BUILDLINK_MK)
MESA_BUILDLINK_MK= # defined
-.include "../../mk/bsd.buildlink.mk"
+BUILDLINK_PREFIX.Mesa= ${BUILDLINK_PREFIX.MesaLib}
-USE_MESA= # defined
-
-# We double-list because we're not sure if the files are in ${X11BASE}
-# or in ${LOCALBASE}.
-
-BUILDLINK_PREFIX.Mesa-x11base= ${X11BASE}
-BUILDLINK_FILES.Mesa-x11base= include/GL/*
-BUILDLINK_FILES.Mesa-x11base+= lib/libGL.*
-BUILDLINK_FILES.Mesa-x11base+= lib/libGLU.*
-BUILDLINK_FILES.Mesa-x11base+= lib/libglut.*
-
-BUILDLINK_TARGETS.Mesa= Mesa-x11base-buildlink
-
-BUILDLINK_PREFIX.Mesa-localbase= ${LOCALBASE}
-BUILDLINK_FILES.Mesa-localbase= include/GL/*
-BUILDLINK_FILES.Mesa-localbase+= lib/libGL.*
-BUILDLINK_FILES.Mesa-localbase+= lib/libGLU.*
-BUILDLINK_FILES.Mesa-localbase+= lib/libglut.*
-
-BUILDLINK_TARGETS.Mesa+= Mesa-localbase-buildlink
-
-BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.Mesa}
-
-pre-configure: ${BUILDLINK_TARGETS.Mesa}
-Mesa-x11base-buildlink: _BUILDLINK_USE
-Mesa-localbase-buildlink: _BUILDLINK_USE
+.include "../../graphics/MesaLib/buildlink.mk"
+.include "../../graphics/glu/buildlink.mk"
+.include "../../graphics/glut/buildlink.mk"
.endif # MESA_BUILDLINK_MK
diff --git a/graphics/MesaLib/buildlink.mk b/graphics/MesaLib/buildlink.mk
new file mode 100644
index 00000000000..f7902acbcb9
--- /dev/null
+++ b/graphics/MesaLib/buildlink.mk
@@ -0,0 +1,49 @@
+# $NetBSD: buildlink.mk,v 1.1 2002/06/26 05:36:30 jlam Exp $
+
+.if !defined(MESALIB_BUILDLINK_MK)
+MESALIB_BUILDLINK_MK= # defined
+
+.include "../../mk/bsd.buildlink.mk"
+
+BUILDLINK_DEPENDS.MesaLib?= MesaLib>=3.4.2
+
+# Check if we got Mesa distributed with XFree86 4.x or if we need to
+# depend on the Mesa package.
+#
+_REQUIRE_BUILTIN_MESALIB?= NO
+.if exists(${X11BASE}/include/GL/glx.h)
+_IS_BUILTIN_MESALIB!= ${EGREP} -c BuildGLXLibrary ${X11BASE}/lib/X11/config/X11.tmpl || ${TRUE}
+.else
+_IS_BUILTIN_MESALIB= 0
+.endif
+.if (${_IS_BUILTIN_MESALIB} == "0") && (${_REQUIRE_BUILTIN_MESALIB} == "NO")
+_NEED_MESALIB= YES
+.else
+_NEED_MESALIB= NO
+.endif
+
+.if ${_NEED_MESALIB} == "YES"
+DEPENDS+= ${BUILDLINK_DEPENDS.MesaLib}:../../graphics/MesaLib
+EVAL_PREFIX+= BUILDLINK_PREFIX.MesaLib=MesaLib
+BUILDLINK_PREFIX.MesaLib_DEFAULT= ${X11PREFIX}
+.else
+BUILDLINK_PREFIX.MesaLib= ${X11BASE}
+.endif
+
+BUILDLINK_FILES.MesaLib+= include/GL/GL*.h
+BUILDLINK_FILES.MesaLib+= include/GL/gl.h
+BUILDLINK_FILES.MesaLib+= include/GL/glext.h
+BUILDLINK_FILES.MesaLib+= include/GL/gl_mangle.h
+BUILDLINK_FILES.MesaLib+= include/GL/glx*.h
+BUILDLINK_FILES.MesaLib+= include/GL/osmesa.h
+BUILDLINK_FILES.MesaLib+= include/GL/xmesa.h
+BUILDLINK_FILES.MesaLib+= include/GL/xmesa_x.h
+BUILDLINK_FILES.MesaLib+= include/GL/xmesa_xf86.h
+BUILDLINK_FILES.MesaLib+= lib/libGL.*
+
+BUILDLINK_TARGETS+= MesaLib-buildlink
+
+pre-configure: MesaLib-buildlink
+MesaLib-buildlink: _BUILDLINK_USE
+
+.endif # MESALIB_BUILDLINK_MK
diff --git a/graphics/glu/buildlink.mk b/graphics/glu/buildlink.mk
new file mode 100644
index 00000000000..6013ca40faf
--- /dev/null
+++ b/graphics/glu/buildlink.mk
@@ -0,0 +1,42 @@
+# $NetBSD: buildlink.mk,v 1.1 2002/06/26 05:36:30 jlam Exp $
+
+.if !defined(GLU_BUILDLINK_MK)
+GLU_BUILDLINK_MK= # defined
+
+.include "../../mk/bsd.buildlink.mk"
+
+BUILDLINK_DEPENDS.glu?= glu>=3.4.2
+
+# Check if we got libGLU distributed with XFree86 4.x or if we need to
+# depend on the glu package.
+#
+_REQUIRE_BUILTIN_GLU?= NO
+.if exists(${X11BASE}/include/GL/glu.h)
+_IS_BUILTIN_GLU!= ${EGREP} -c BuildGLULibrary ${X11BASE}/lib/X11/config/X11.tmpl || ${TRUE}
+.else
+_IS_BUILTIN_GLU= 0
+.endif
+.if (${_IS_BUILTIN_GLU} == "0") && (${_REQUIRE_BUILTIN_GLU} == "NO")
+_NEED_GLU= YES
+.else
+_NEED_GLU= NO
+.endif
+
+.if ${_NEED_GLU} == "YES"
+DEPENDS+= ${BUILDLINK_DEPENDS.glu}:../../graphics/glu
+EVAL_PREFIX+= BUILDLINK_PREFIX.glu=glu
+BUILDLINK_PREFIX.glu_DEFAULT= ${X11PREFIX}
+.else
+BUILDLINK_PREFIX.glu= ${X11BASE}
+.endif
+
+BUILDLINK_FILES.glu= include/GL/glu.h
+BUILDLINK_FILES.glu+= include/GL/glu_mangle.h
+BUILDLINK_FILES.glu+= lib/libGLU.*
+
+BUILDLINK_TARGETS+= glu-buildlink
+
+pre-configure: glu-buildlink
+glu-buildlink: _BUILDLINK_USE
+
+.endif # GLU_BUILDLINK_MK
diff --git a/graphics/glut/buildlink.mk b/graphics/glut/buildlink.mk
new file mode 100644
index 00000000000..4eb328e3e91
--- /dev/null
+++ b/graphics/glut/buildlink.mk
@@ -0,0 +1,22 @@
+# $NetBSD: buildlink.mk,v 1.1 2002/06/26 05:36:30 jlam Exp $
+
+.if !defined(GLUT_BUILDLINK_MK)
+GLUT_BUILDLINK_MK= # defined
+
+.include "../../mk/bsd.buildlink.mk"
+
+BUILDLINK_DEPENDS.glut?= glut>=3.4.2
+DEPENDS+= ${BUILDLINK_DEPENDS.glut}:../../graphics/glut
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.glut=glut
+BUILDLINK_PREFIX.glut_DEFAULT= ${X11PREFIX}
+BUILDLINK_FILES.glut= include/GL/glut.h
+BUILDLINK_FILES.glut+= include/GL/glutf90.h
+BUILDLINK_FILES.glut+= lib/libglut.*
+
+BUILDLINK_TARGETS+= glut-buildlink
+
+pre-configure: glut-buildlink
+glut-buildlink: _BUILDLINK_USE
+
+.endif # GLUT_BUILDLINK_MK