1 # $NetBSD: options.mk,v 1.2 2007/12/08 09:23:16 wiz Exp $
3 PKG_OPTIONS_VAR= PKG_OPTIONS.modular-xorg-server
4 PKG_SUPPORTED_OPTIONS= dri inet6
6 .include "../../mk/bsd.options.mk"
10 .if !empty(PKG_OPTIONS:Mdri)
12 .include "mesaconfig.mk"
13 DISTFILES+= MesaLib-7.0.4.tar.bz2
14 EXTRACT_ONLY+= MesaLib-7.0.4.tar.bz2
15 _PKGSRC_PATCHES+= ${FILESDIR}/patch-mesa # XXX is there a better way?
16 SITES.MesaLib-7.0.4.tar.bz2=\
17 ${MASTER_SITE_SOURCEFORGE:=mesa3d/}
18 MESA_SRC= ${WRKDIR}/Mesa-7.0.4
19 CONFIGURE_ARGS+= --enable-glx
20 CONFIGURE_ARGS+= --enable-aiglx
21 CONFIGURE_ARGS+= --with-mesa-source=${MESA_SRC}
22 .if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" || \
23 ${MACHINE_ARCH} == "alpha"
24 GLX_DEFINES+= -D__GLX_ALIGN64
26 CONFIGURE_ENV+= GLX_DEFINES=${GLX_DEFINES:M*:Q}
27 # glcore.h and dri_interface.h shipped with *proto are older than
28 # those in Mesa-7.0.2. Either patch them or trick the build into using
30 #BUILDLINK_API_DEPENDS.glproto+= glproto>=1.4.8nb1
31 #BUILDLINK_API_DEPENDS.xf86driproto+= xf86driproto>=2.0.3nb1
33 ### XXX As of driproto-2.0.4 and glproto-1.4.9, this should not be needed.
36 ${LN} -s ${MESA_SRC:Q}/include/GL ${WRKSRC:Q}/GL/glx/GL
40 ### XXX Do we want this?
42 CONFIGURE_ARGS+= --disable-glx
47 # for GLX we already have the Mesa source
48 .include "../../graphics/MesaLib/buildlink3.mk"
51 .if !empty(PKG_OPTIONS:Minet6)
52 CONFIGURE_ARGS+= --enable-ipv6
54 CONFIGURE_ARGS+= --disable-ipv6