summaryrefslogtreecommitdiff
path: root/graphics/glu
diff options
context:
space:
mode:
authorjlam <jlam>2002-06-26 05:36:29 +0000
committerjlam <jlam>2002-06-26 05:36:29 +0000
commit32ae630cae685929807eb707c8cbd89f3a0bb79d (patch)
tree79b93bc8f2de5388f1c466f21d1c66abe4e5f5af /graphics/glu
parent4d6a4b50bdff1f0859f0beac124cc38c1248178b (diff)
downloadpkgsrc-32ae630cae685929807eb707c8cbd89f3a0bb79d.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/glu')
-rw-r--r--graphics/glu/buildlink.mk42
1 files changed, 42 insertions, 0 deletions
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