summaryrefslogtreecommitdiff
path: root/graphics/MesaLib
diff options
context:
space:
mode:
authorjlam <jlam>2002-08-25 18:38:05 +0000
committerjlam <jlam>2002-08-25 18:38:05 +0000
commitf22b8c42a61ccfbb462bf2b94c3486b7baec18bd (patch)
treed2b31bb9a6a069ebfb63079b9dddde1e6688bc4b /graphics/MesaLib
parent71eaa77968f19e23d72fdc88e5f38259b8f7cdf3 (diff)
downloadpkgsrc-f22b8c42a61ccfbb462bf2b94c3486b7baec18bd.tar.gz
Merge changes in packages from the buildlink2 branch that have
buildlink2.mk files back into the main trunk. This provides sufficient buildlink2 infrastructure to start merging other packages from the buildlink2 branch that have already been converted to use the buildlink2 framework.
Diffstat (limited to 'graphics/MesaLib')
-rw-r--r--graphics/MesaLib/Makefile46
-rw-r--r--graphics/MesaLib/PLIST4
-rw-r--r--graphics/MesaLib/buildlink.mk2
-rw-r--r--graphics/MesaLib/buildlink2.mk49
4 files changed, 74 insertions, 27 deletions
diff --git a/graphics/MesaLib/Makefile b/graphics/MesaLib/Makefile
index d7a1e6c7def..485eb47fe36 100644
--- a/graphics/MesaLib/Makefile
+++ b/graphics/MesaLib/Makefile
@@ -1,31 +1,27 @@
-# $NetBSD: Makefile,v 1.9 2001/05/31 05:54:45 tron Exp $
-#
+# $NetBSD: Makefile,v 1.10 2002/08/25 18:38:55 jlam Exp $
-.include "../Mesa/Makefile.common"
-
-DISTNAME= MesaLib-${MESA_VERSION}
+PKGNAME= MesaLib-${MESA_VERSION}
WRKSRC= ${WRKDIR}/${DISTNAME:S/Lib//}
-CATEGORIES= graphics
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mesa3d/}
-EXTRACT_SUFX= .tar.bz2
-
MAINTAINER= rh@netbsd.org
-HOMEPAGE= http://www.mesa3d.org/
COMMENT= Graphics library similar to SGI's OpenGL
-CHECK_MESA= yes
-USE_X11BASE= yes
-USE_LIBTOOL= yes
-LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
-USE_GMAKE= yes
+.include "../Mesa/Makefile.common"
-GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --enable-static --without-glut
+USE_BUILDLINK2= yes
+USE_X11BASE= yes
+CONFIGURE_ARGS+= --without-glut
.include "../../mk/bsd.prefs.mk"
-.if ${HAVE_BUILTIN_MESA} != "NO"
-IGNORE= "MesaLib/GLX has already been installed as part of XFree-4.x"
+# Check if we got Mesa distributed with XFree86 4.x.
+.if exists(${X11BASE}/include/GL/glx.h)
+_IS_BUILTIN_MESA!= ${EGREP} -c BuildGLXLibrary ${X11BASE}/lib/X11/config/X11.tmpl || ${TRUE}
+.else
+_IS_BUILTIN_MESA= 0
+.endif
+
+.if ${_IS_BUILTIN_MESA} != "0"
+IGNORE= "MesaLib/GLX has already been installed as part of XFree-4.x"
.endif
do-build:
@@ -37,10 +33,12 @@ do-install:
${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} ${INSTALL_TARGET}
post-install:
- ${INSTALL_DATA_DIR} ${X11PREFIX}/include/GL
-.for hdr in gl.h gl_mangle.h glext.h glx.h glx_mangle.h osmesa.h \
- xmesa.h xmesa_x.h xmesa_xf86.h
- ${INSTALL_DATA} ${WRKSRC}/include/GL/${hdr} ${X11PREFIX}/include/GL
-.endfor
+ ${INSTALL_DATA_DIR} ${PREFIX}/include/GL
+ cd ${WRKSRC}/include/GL; for hdr in \
+ gl.h gl_mangle.h glext.h glx.h glx_mangle.h osmesa.h \
+ xmesa.h xmesa_x.h xmesa_xf86.h; \
+ do \
+ ${INSTALL_DATA} $${hdr} ${PREFIX}/include/GL; \
+ done
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/MesaLib/PLIST b/graphics/MesaLib/PLIST
index cbe5017ea9a..2f6c10b1b00 100644
--- a/graphics/MesaLib/PLIST
+++ b/graphics/MesaLib/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2002/02/15 10:12:42 skrll Exp $
+@comment $NetBSD: PLIST,v 1.3 2002/08/25 18:38:56 jlam Exp $
etc/mesa.conf
include/GL/gl.h
include/GL/gl_mangle.h
@@ -14,4 +14,4 @@ lib/libGL.so.3
lib/libGL.so.3.4
lib/libGL.a
lib/libGL.la
-@unexec ${RMDIR} %D/include/GL >/dev/null 2>&1 || true
+@unexec ${RMDIR} %D/include/GL >/dev/null 2>&1 || ${TRUE}
diff --git a/graphics/MesaLib/buildlink.mk b/graphics/MesaLib/buildlink.mk
index f7902acbcb9..f3a3498c17d 100644
--- a/graphics/MesaLib/buildlink.mk
+++ b/graphics/MesaLib/buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink.mk,v 1.1 2002/06/26 05:36:30 jlam Exp $
+# $NetBSD: buildlink.mk,v 1.2 2002/08/25 18:38:56 jlam Exp $
.if !defined(MESALIB_BUILDLINK_MK)
MESALIB_BUILDLINK_MK= # defined
diff --git a/graphics/MesaLib/buildlink2.mk b/graphics/MesaLib/buildlink2.mk
new file mode 100644
index 00000000000..9931e11acaf
--- /dev/null
+++ b/graphics/MesaLib/buildlink2.mk
@@ -0,0 +1,49 @@
+# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 18:38:56 jlam Exp $
+
+.if !defined(MESALIB_BUILDLINK2_MK)
+MESALIB_BUILDLINK2_MK= # defined
+
+.include "../../mk/bsd.prefs.mk"
+
+BUILDLINK_DEPENDS.MesaLib?= MesaLib>=3.4.2
+BUILDLINK_PKGSRCDIR.MesaLib?= ../../graphics/MesaLib
+
+# 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"
+BUILDLINK_PACKAGES+= 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
+
+MesaLib-buildlink: _BUILDLINK_USE
+
+.endif # MESALIB_BUILDLINK2_MK