Mon Mar 20 23:59:01 2017 UTC ()
Do not suggest llvm option on Darwin

With llvm, the build fails, as apparently llvm turns on including
multiple libraries that do not build.  (Until recently, this option
was not enabled by default, so this change is essentially omitting
Darwin from the change to default to llvm in i386/x86_64.)

Thanks to maya@ for explaining/suggesting.


(gdt)
diff -r1.135 -r1.136 pkgsrc/graphics/MesaLib/Makefile
diff -r1.53 -r1.54 pkgsrc/graphics/MesaLib/options.mk

cvs diff -r1.135 -r1.136 pkgsrc/graphics/MesaLib/Makefile (switch to unified diff)

--- pkgsrc/graphics/MesaLib/Makefile 2017/03/02 06:00:03 1.135
+++ pkgsrc/graphics/MesaLib/Makefile 2017/03/20 23:59:01 1.136
@@ -1,111 +1,111 @@ @@ -1,111 +1,111 @@
1# $NetBSD: Makefile,v 1.135 2017/03/02 06:00:03 maya Exp $ 1# $NetBSD: Makefile,v 1.136 2017/03/20 23:59:01 gdt Exp $
2 2
3DISTNAME= mesa-11.2.2 3DISTNAME= mesa-11.2.2
4PKGNAME= ${DISTNAME:S/mesa/MesaLib/} 4PKGNAME= ${DISTNAME:S/mesa/MesaLib/}
5PKGREVISION= 3 5PKGREVISION= 4
6CATEGORIES= graphics x11 6CATEGORIES= graphics x11
7MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${PKGVERSION_NOREV}/ 7MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${PKGVERSION_NOREV}/
8EXTRACT_SUFX= .tar.xz 8EXTRACT_SUFX= .tar.xz
9 9
10MAINTAINER= pkgsrc-users@NetBSD.org 10MAINTAINER= pkgsrc-users@NetBSD.org
11HOMEPAGE= http://www.mesa3d.org/ 11HOMEPAGE= http://www.mesa3d.org/
12COMMENT= The Mesa 3D Graphics Library 12COMMENT= The Mesa 3D Graphics Library
13LICENSE= mit 13LICENSE= mit
14 14
15GNU_CONFIGURE= yes 15GNU_CONFIGURE= yes
16USE_TOOLS+= bison pkg-config gmake flex 16USE_TOOLS+= bison pkg-config gmake flex
17USE_LANGUAGES= c99 c++ 17USE_LANGUAGES= c99 c++
18USE_LIBTOOL= yes 18USE_LIBTOOL= yes
19 19
20#CFLAGS+= -g -O0 20#CFLAGS+= -g -O0
21#CXXFLAGS+= -g -O0 21#CXXFLAGS+= -g -O0
22 22
23GCC_REQD+= 4.2 23GCC_REQD+= 4.2
24 24
25PKGCONFIG_OVERRIDE+= src/egl/main/egl.pc.in 25PKGCONFIG_OVERRIDE+= src/egl/main/egl.pc.in
26PKGCONFIG_OVERRIDE+= src/egl/wayland/wayland-egl/wayland-egl.pc.in 26PKGCONFIG_OVERRIDE+= src/egl/wayland/wayland-egl/wayland-egl.pc.in
27PKGCONFIG_OVERRIDE+= src/gallium/targets/d3dadapter9/d3d.pc.in 27PKGCONFIG_OVERRIDE+= src/gallium/targets/d3dadapter9/d3d.pc.in
28PKGCONFIG_OVERRIDE+= src/gallium/targets/osmesa/osmesa.pc.in 28PKGCONFIG_OVERRIDE+= src/gallium/targets/osmesa/osmesa.pc.in
29PKGCONFIG_OVERRIDE+= src/gallium/targets/xa/xatracker.pc.in 29PKGCONFIG_OVERRIDE+= src/gallium/targets/xa/xatracker.pc.in
30PKGCONFIG_OVERRIDE+= src/gbm/main/gbm.pc.in 30PKGCONFIG_OVERRIDE+= src/gbm/main/gbm.pc.in
31PKGCONFIG_OVERRIDE+= src/mapi/es1api/glesv1_cm.pc.in 31PKGCONFIG_OVERRIDE+= src/mapi/es1api/glesv1_cm.pc.in
32PKGCONFIG_OVERRIDE+= src/mapi/es2api/glesv2.pc.in 32PKGCONFIG_OVERRIDE+= src/mapi/es2api/glesv2.pc.in
33PKGCONFIG_OVERRIDE+= src/mesa/drivers/dri/dri.pc.in 33PKGCONFIG_OVERRIDE+= src/mesa/drivers/dri/dri.pc.in
34PKGCONFIG_OVERRIDE+= src/mesa/drivers/osmesa/osmesa.pc.in 34PKGCONFIG_OVERRIDE+= src/mesa/drivers/osmesa/osmesa.pc.in
35PKGCONFIG_OVERRIDE+= src/mesa/gl.pc.in 35PKGCONFIG_OVERRIDE+= src/mesa/gl.pc.in
36 36
37CONFIGURE_ARGS+= --enable-shared-glapi 37CONFIGURE_ARGS+= --enable-shared-glapi
38 38
39# Work around a buildlink and/or libtool bug: 39# Work around a buildlink and/or libtool bug:
40# In the libtool install/relink stage, if we want to link with two static 40# In the libtool install/relink stage, if we want to link with two static
41# archives named libglapi.la but in different directories, bad things happen. 41# archives named libglapi.la but in different directories, bad things happen.
42SUBST_CLASSES+= wrapper-bug 42SUBST_CLASSES+= wrapper-bug
43SUBST_STAGE.wrapper-bug= pre-configure 43SUBST_STAGE.wrapper-bug= pre-configure
44SUBST_MESSAGE.wrapper-bug= Renaming glapi-shared/libglapi in Makefiles 44SUBST_MESSAGE.wrapper-bug= Renaming glapi-shared/libglapi in Makefiles
45SUBST_FILES.wrapper-bug= src/gbm/Makefile.in 45SUBST_FILES.wrapper-bug= src/gbm/Makefile.in
46SUBST_FILES.wrapper-bug+= src/glx/Makefile.in 46SUBST_FILES.wrapper-bug+= src/glx/Makefile.in
47SUBST_FILES.wrapper-bug+= src/mapi/Makefile.in 47SUBST_FILES.wrapper-bug+= src/mapi/Makefile.in
48SUBST_FILES.wrapper-bug+= src/mesa/drivers/x11/Makefile.in 48SUBST_FILES.wrapper-bug+= src/mesa/drivers/x11/Makefile.in
49SUBST_SED.wrapper-bug= -e 's,shared-glapi/libglapi.la,shared-glapi/libglapi_tmp_rename.la,g' 49SUBST_SED.wrapper-bug= -e 's,shared-glapi/libglapi.la,shared-glapi/libglapi_tmp_rename.la,g'
50SUBST_SED.wrapper-bug+= -e 's,libglapi.la,libglapi_impl.la,g' 50SUBST_SED.wrapper-bug+= -e 's,libglapi.la,libglapi_impl.la,g'
51SUBST_SED.wrapper-bug+= -e 's,libglapi_tmp_rename.la,libglapi.la,g' 51SUBST_SED.wrapper-bug+= -e 's,libglapi_tmp_rename.la,libglapi.la,g'
52 52
53# Replace /etc/drirc with ${PREFIX}/etc/drirc 53# Replace /etc/drirc with ${PREFIX}/etc/drirc
54SUBST_CLASSES+= drirc 54SUBST_CLASSES+= drirc
55SUBST_STAGE.drirc= pre-configure 55SUBST_STAGE.drirc= pre-configure
56SUBST_MESSAGE.drirc= Fixing hardcoded /etc/drirc references 56SUBST_MESSAGE.drirc= Fixing hardcoded /etc/drirc references
57SUBST_FILES.drirc+= src/mesa/drivers/dri/common/xmlconfig.c 57SUBST_FILES.drirc+= src/mesa/drivers/dri/common/xmlconfig.c
58SUBST_SED.drirc+= -e 's|/etc/|${PREFIX}/etc/|g' 58SUBST_SED.drirc+= -e 's|/etc/|${PREFIX}/etc/|g'
59 59
60.include "../../mk/bsd.prefs.mk" 60.include "../../mk/bsd.prefs.mk"
61.include "../../mk/compiler.mk" 61.include "../../mk/compiler.mk"
62.include "options.mk" 62.include "options.mk"
63 63
64.if !empty(PKGSRC_COMPILER:Mclang) 64.if !empty(PKGSRC_COMPILER:Mclang)
65SUBST_CLASSES+= tr1 65SUBST_CLASSES+= tr1
66SUBST_STAGE.tr1= pre-configure 66SUBST_STAGE.tr1= pre-configure
67SUBST_MESSAGE.tr1= Fixing TR1 C++ namespace 67SUBST_MESSAGE.tr1= Fixing TR1 C++ namespace
68SUBST_FILES.tr1= src/gallium/drivers/nouveau/codegen/*.h 68SUBST_FILES.tr1= src/gallium/drivers/nouveau/codegen/*.h
69SUBST_FILES.tr1+= src/gallium/drivers/nouveau/codegen/*.cpp 69SUBST_FILES.tr1+= src/gallium/drivers/nouveau/codegen/*.cpp
70SUBST_SED.tr1= -e 's,std::tr1::,std::,g' 70SUBST_SED.tr1= -e 's,std::tr1::,std::,g'
71SUBST_SED.tr1+= -e 's,include <tr1/,include <,g' 71SUBST_SED.tr1+= -e 's,include <tr1/,include <,g'
72.endif 72.endif
73 73
74PYTHON_FOR_BUILD_ONLY= yes 74PYTHON_FOR_BUILD_ONLY= yes
75PYTHON_VERSIONS_INCOMPATIBLE= 34 35 36 # as of 11.2.2 75PYTHON_VERSIONS_INCOMPATIBLE= 34 35 36 # as of 11.2.2
76BUILD_DEPENDS+= ${PYPKGPREFIX}-mako-[0-9]*:../../devel/py-mako 76BUILD_DEPENDS+= ${PYPKGPREFIX}-mako-[0-9]*:../../devel/py-mako
77CONFIGURE_ENV+= ac_cv_prog_PYTHON2=${PYTHONBIN} 77CONFIGURE_ENV+= ac_cv_prog_PYTHON2=${PYTHONBIN}
78.include "../../lang/python/tool.mk" 78.include "../../lang/python/tool.mk"
79 79
80# On NetBSD < 6 we need to compile with GCC from pkgsrc. 80# On NetBSD < 6 we need to compile with GCC from pkgsrc.
81# But GCC from pkgsrc does not add implicit -lc like base GCC does, 81# But GCC from pkgsrc does not add implicit -lc like base GCC does,
82# which breaks the build with -Wl,--no-undefined. 82# which breaks the build with -Wl,--no-undefined.
83# So we piggy back on -lpthread and inject -lc after it. 83# So we piggy back on -lpthread and inject -lc after it.
84.if !empty(MACHINE_PLATFORM:MNetBSD-[1-5].*-*) 84.if !empty(MACHINE_PLATFORM:MNetBSD-[1-5].*-*)
85BUILDLINK_TRANSFORM+= l:pthread:pthread:c l:m:m:c 85BUILDLINK_TRANSFORM+= l:pthread:pthread:c l:m:m:c
86.endif 86.endif
87 87
88# Handle platforms without exp2 88# Handle platforms without exp2
89.if !empty(MACHINE_PLATFORM:MNetBSD-[1-5].*-*) 89.if !empty(MACHINE_PLATFORM:MNetBSD-[1-5].*-*)
90CPPFLAGS+= -Dexp2\(x\)=exp\(\(x\)\*M_LN2\) 90CPPFLAGS+= -Dexp2\(x\)=exp\(\(x\)\*M_LN2\)
91CPPFLAGS+= -Dexp2f\(x\)=expf\(\(x\)\*M_LN2\) 91CPPFLAGS+= -Dexp2f\(x\)=expf\(\(x\)\*M_LN2\)
92.endif 92.endif
93 93
94# Manual patch for FDO bug 90311. Don't apply if not on Darwin as there could 94# Manual patch for FDO bug 90311. Don't apply if not on Darwin as there could
95# be side effects. 95# be side effects.
96.if ${OPSYS} == "Darwin" 96.if ${OPSYS} == "Darwin"
97pre-configure: ${WRKDIR}/.manual_patch_done 97pre-configure: ${WRKDIR}/.manual_patch_done
98${WRKDIR}/.manual_patch_done: 98${WRKDIR}/.manual_patch_done:
99 cd ${WRKSRC} && ${TOOLS_PATCH} -z .manual -p0 < ${FILESDIR}/patch-manual_fdo90311 99 cd ${WRKSRC} && ${TOOLS_PATCH} -z .manual -p0 < ${FILESDIR}/patch-manual_fdo90311
100 touch ${.TARGET} 100 touch ${.TARGET}
101.endif 101.endif
102 102
103INSTALLATION_DIRS+= share/examples/MesaLib 103INSTALLATION_DIRS+= share/examples/MesaLib
104 104
105post-install: 105post-install:
106 ${INSTALL_DATA} ${WRKSRC}/src/mesa/drivers/dri/common/drirc ${DESTDIR}${PREFIX}/share/examples/MesaLib 106 ${INSTALL_DATA} ${WRKSRC}/src/mesa/drivers/dri/common/drirc ${DESTDIR}${PREFIX}/share/examples/MesaLib
107 107
108.include "../../x11/libX11/buildlink3.mk" 108.include "../../x11/libX11/buildlink3.mk"
109.include "../../x11/libXext/buildlink3.mk" 109.include "../../x11/libXext/buildlink3.mk"
110.include "../../x11/libxcb/buildlink3.mk" 110.include "../../x11/libxcb/buildlink3.mk"
111.include "../../mk/bsd.pkg.mk" 111.include "../../mk/bsd.pkg.mk"

cvs diff -r1.53 -r1.54 pkgsrc/graphics/MesaLib/options.mk (switch to unified diff)

--- pkgsrc/graphics/MesaLib/options.mk 2017/03/09 09:51:04 1.53
+++ pkgsrc/graphics/MesaLib/options.mk 2017/03/20 23:59:01 1.54
@@ -1,201 +1,201 @@ @@ -1,201 +1,201 @@
1# $NetBSD: options.mk,v 1.53 2017/03/09 09:51:04 jperkin Exp $ 1# $NetBSD: options.mk,v 1.54 2017/03/20 23:59:01 gdt Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.MesaLib 3PKG_OPTIONS_VAR= PKG_OPTIONS.MesaLib
4PKG_SUPPORTED_OPTIONS= llvm dri 4PKG_SUPPORTED_OPTIONS= llvm dri
5PKG_SUGGESTED_OPTIONS= 5PKG_SUGGESTED_OPTIONS=
6 6
7# The LLVM option enables JIT accelerated software rendering and 7# The LLVM option enables JIT accelerated software rendering and
8# is also required to support the latest RADEON GPUs, so enable it 8# is also required to support the latest RADEON GPUs, so enable it
9# by default on platforms where such GPUs might be encountered. 9# by default on platforms where such GPUs might be encountered.
10.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \ 10.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \
11 ${OPSYS} != "SunOS" 11 ${OPSYS} != "SunOS" && ${OPSYS} != "Darwin"
12PKG_SUGGESTED_OPTIONS+= llvm 12PKG_SUGGESTED_OPTIONS+= llvm
13.endif 13.endif
14 14
15.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "OpenBSD" || \ 15.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "OpenBSD" || \
16 ${OPSYS} == "DragonFly" || ${OPSYS} == "Linux" || \ 16 ${OPSYS} == "DragonFly" || ${OPSYS} == "Linux" || \
17 ${OPSYS} == "SunOS" || ${OPSYS} == "NetBSD" || \ 17 ${OPSYS} == "SunOS" || ${OPSYS} == "NetBSD" || \
18 ${OPSYS} == "Darwin" 18 ${OPSYS} == "Darwin"
19PKG_SUGGESTED_OPTIONS+= dri 19PKG_SUGGESTED_OPTIONS+= dri
20.endif 20.endif
21 21
22.include "../../mk/bsd.options.mk" 22.include "../../mk/bsd.options.mk"
23 23
24# gallium 24# gallium
25PLIST_VARS+= freedreno ilo i915 i965 nouveau r300 r600 radeonsi \ 25PLIST_VARS+= freedreno ilo i915 i965 nouveau r300 r600 radeonsi \
26 swrast svga vc4 virgl 26 swrast svga vc4 virgl
27# classic DRI 27# classic DRI
28PLIST_VARS+= dri swrast_dri i915_dri nouveau_dri i965_dri radeon_dri r200_dri 28PLIST_VARS+= dri swrast_dri i915_dri nouveau_dri i965_dri radeon_dri r200_dri
29# other features 29# other features
30PLIST_VARS+= gbm vaapi vdpau wayland xatracker 30PLIST_VARS+= gbm vaapi vdpau wayland xatracker
31 31
32.if !empty(PKG_OPTIONS:Mdri) 32.if !empty(PKG_OPTIONS:Mdri)
33 33
34CONFIGURE_ARGS+= --enable-dri 34CONFIGURE_ARGS+= --enable-dri
35CONFIGURE_ARGS+= --enable-egl 35CONFIGURE_ARGS+= --enable-egl
36.if ${OPSYS} != "Darwin" 36.if ${OPSYS} != "Darwin"
37CFLAGS+= -DHAVE_DRI3 37CFLAGS+= -DHAVE_DRI3
38CONFIGURE_ARGS+= --enable-dri3 38CONFIGURE_ARGS+= --enable-dri3
39CONFIGURE_ARGS+= --enable-gbm 39CONFIGURE_ARGS+= --enable-gbm
40PLIST.gbm= yes 40PLIST.gbm= yes
41.endif 41.endif
42CONFIGURE_ARGS+= --enable-gles1 42CONFIGURE_ARGS+= --enable-gles1
43CONFIGURE_ARGS+= --enable-gles2 43CONFIGURE_ARGS+= --enable-gles2
44 44
45# Use Thread Local Storage in GLX where it is supported by Mesa and works. 45# Use Thread Local Storage in GLX where it is supported by Mesa and works.
46.if \ 46.if \
47 !empty(MACHINE_PLATFORM:MNetBSD-[789].*-i386) || \ 47 !empty(MACHINE_PLATFORM:MNetBSD-[789].*-i386) || \
48 !empty(MACHINE_PLATFORM:MNetBSD-[789].*-x86_64) || \ 48 !empty(MACHINE_PLATFORM:MNetBSD-[789].*-x86_64) || \
49 !empty(MACHINE_PLATFORM:MLinux-*-i386) || \ 49 !empty(MACHINE_PLATFORM:MLinux-*-i386) || \
50 !empty(MACHINE_PLATFORM:MLinux-*-x86_64) || \ 50 !empty(MACHINE_PLATFORM:MLinux-*-x86_64) || \
51 !empty(MACHINE_PLATFORM:MFreeBSD-1[0-9].*-x86_64) || \ 51 !empty(MACHINE_PLATFORM:MFreeBSD-1[0-9].*-x86_64) || \
52 !empty(MACHINE_PLATFORM:MDragonFly-*-x86_64) 52 !empty(MACHINE_PLATFORM:MDragonFly-*-x86_64)
53CONFIGURE_ARGS+= --enable-glx-tls 53CONFIGURE_ARGS+= --enable-glx-tls
54.else 54.else
55CONFIGURE_ARGS+= --disable-glx-tls 55CONFIGURE_ARGS+= --disable-glx-tls
56.endif 56.endif
57 57
58# DRI on Linux needs either sysfs or udev 58# DRI on Linux needs either sysfs or udev
59CONFIGURE_ARGS.Linux+= --enable-sysfs 59CONFIGURE_ARGS.Linux+= --enable-sysfs
60 60
61PLIST.dri= yes 61PLIST.dri= yes
62 62
63.if ${OPSYS} != "Darwin" 63.if ${OPSYS} != "Darwin"
64BUILDLINK_DEPMETHOD.libpciaccess= full 64BUILDLINK_DEPMETHOD.libpciaccess= full
65.include "../../sysutils/libpciaccess/buildlink3.mk" 65.include "../../sysutils/libpciaccess/buildlink3.mk"
66.endif 66.endif
67.include "../../graphics/MesaLib/dri.mk" 67.include "../../graphics/MesaLib/dri.mk"
68 68
69DRI_DRIVERS= # 69DRI_DRIVERS= #
70GALLIUM_DRIVERS= # 70GALLIUM_DRIVERS= #
71 71
72# Software rasterizer 72# Software rasterizer
73PLIST.swrast_dri= yes 73PLIST.swrast_dri= yes
74DRI_DRIVERS+= swrast 74DRI_DRIVERS+= swrast
75.if ${OPSYS} != "Darwin" 75.if ${OPSYS} != "Darwin"
76PLIST.swrast= yes 76PLIST.swrast= yes
77GALLIUM_DRIVERS+= swrast 77GALLIUM_DRIVERS+= swrast
78.endif 78.endif
79 79
80# x86 only drivers 80# x86 only drivers
81.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && ${OPSYS} != "Darwin" 81.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && ${OPSYS} != "Darwin"
82# svga / VMWare driver 82# svga / VMWare driver
83PLIST.svga= yes 83PLIST.svga= yes
84GALLIUM_DRIVERS+= svga 84GALLIUM_DRIVERS+= svga
85 85
86# Intel chipsets, x86 only 86# Intel chipsets, x86 only
87PLIST.i915= yes 87PLIST.i915= yes
88GALLIUM_DRIVERS+= i915 88GALLIUM_DRIVERS+= i915
89PLIST.i915_dri= yes 89PLIST.i915_dri= yes
90DRI_DRIVERS+= i915 90DRI_DRIVERS+= i915
91 91
92# Experimental Intel driver 92# Experimental Intel driver
93PLIST.ilo= yes 93PLIST.ilo= yes
94GALLIUM_DRIVERS+= ilo 94GALLIUM_DRIVERS+= ilo
95 95
96PLIST.i965_dri= yes 96PLIST.i965_dri= yes
97DRI_DRIVERS+= i965 97DRI_DRIVERS+= i965
98.endif 98.endif
99 99
100# ARM drivers 100# ARM drivers
101.if !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*) 101.if !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*)
102# Qualcomm SnapDragon, libdrm_freedreno.pc 102# Qualcomm SnapDragon, libdrm_freedreno.pc
103GALLIUM_DRIVERS+= freedreno 103GALLIUM_DRIVERS+= freedreno
104PLIST.freedreno= yes 104PLIST.freedreno= yes
105 105
106# Broadcom VideoCore 4 106# Broadcom VideoCore 4
107GALLIUM_DRIVERS+= vc4 107GALLIUM_DRIVERS+= vc4
108PLIST.vc4= yes 108PLIST.vc4= yes
109.endif 109.endif
110 110
111# qemu Linux guest driver 111# qemu Linux guest driver
112.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) 112.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64)
113# XXX test this 113# XXX test this
114#GALLIUM_DRIVERS+= virgl 114#GALLIUM_DRIVERS+= virgl
115#PLIST.virgl= yes 115#PLIST.virgl= yes
116.endif 116.endif
117 117
118# theoretically cross platform PCI drivers, but don't build on ARM 118# theoretically cross platform PCI drivers, but don't build on ARM
119.if ${OPSYS} != "Darwin" && empty(MACHINE_PLATFORM:MNetBSD-*-*arm*) 119.if ${OPSYS} != "Darwin" && empty(MACHINE_PLATFORM:MNetBSD-*-*arm*)
120 120
121# AMD Radeon r600 121# AMD Radeon r600
122PLIST.r600= yes 122PLIST.r600= yes
123GALLIUM_DRIVERS+= r600 123GALLIUM_DRIVERS+= r600
124 124
125# nVidia 125# nVidia
126PLIST.nouveau= yes 126PLIST.nouveau= yes
127GALLIUM_DRIVERS+= nouveau 127GALLIUM_DRIVERS+= nouveau
128 128
129# classic DRI radeon 129# classic DRI radeon
130PLIST.radeon_dri= yes 130PLIST.radeon_dri= yes
131DRI_DRIVERS+= radeon 131DRI_DRIVERS+= radeon
132 132
133# classic DRI r200 133# classic DRI r200
134PLIST.r200_dri= yes 134PLIST.r200_dri= yes
135DRI_DRIVERS+= r200 135DRI_DRIVERS+= r200
136 136
137# classic DRI nouveau 137# classic DRI nouveau
138PLIST.nouveau_dri= yes 138PLIST.nouveau_dri= yes
139DRI_DRIVERS+= nouveau 139DRI_DRIVERS+= nouveau
140.endif 140.endif
141 141
142.if ${OPSYS} == "Darwin" 142.if ${OPSYS} == "Darwin"
143CONFIGURE_ARGS+= --with-egl-platforms=x11 143CONFIGURE_ARGS+= --with-egl-platforms=x11
144#.elif ${OPSYS} == "Linux" 144#.elif ${OPSYS} == "Linux"
145#.include "../../wip/wayland/buildlink3.mk" 145#.include "../../wip/wayland/buildlink3.mk"
146#CONFIGURE_ARGS+= --with-egl-platforms=x11,drm,wayland 146#CONFIGURE_ARGS+= --with-egl-platforms=x11,drm,wayland
147#PLIST.wayland= yes 147#PLIST.wayland= yes
148.else 148.else
149CONFIGURE_ARGS+= --with-egl-platforms=x11,drm 149CONFIGURE_ARGS+= --with-egl-platforms=x11,drm
150.endif 150.endif
151 151
152CONFIGURE_ARGS+= --with-gallium-drivers=${GALLIUM_DRIVERS:ts,} 152CONFIGURE_ARGS+= --with-gallium-drivers=${GALLIUM_DRIVERS:ts,}
153CONFIGURE_ARGS+= --with-dri-drivers=${DRI_DRIVERS:ts,} 153CONFIGURE_ARGS+= --with-dri-drivers=${DRI_DRIVERS:ts,}
154 154
155.if !empty(PKG_OPTIONS:Mllvm) 155.if !empty(PKG_OPTIONS:Mllvm)
156# VA-API and VDPAU 156# VA-API and VDPAU
157.include "../../multimedia/libva/available.mk" 157.include "../../multimedia/libva/available.mk"
158.if ${VAAPI_AVAILABLE} == "yes" 158.if ${VAAPI_AVAILABLE} == "yes"
159PLIST.vaapi= yes 159PLIST.vaapi= yes
160.include "../../multimedia/libva/buildlink3.mk" 160.include "../../multimedia/libva/buildlink3.mk"
161.endif 161.endif
162.include "../../multimedia/libvdpau/available.mk" 162.include "../../multimedia/libvdpau/available.mk"
163.if ${VDPAU_AVAILABLE} == "yes" 163.if ${VDPAU_AVAILABLE} == "yes"
164PLIST.vdpau= yes 164PLIST.vdpau= yes
165.include "../../multimedia/libvdpau/buildlink3.mk" 165.include "../../multimedia/libvdpau/buildlink3.mk"
166.endif 166.endif
167 167
168# XA is useful for accelerating xf86-video-vmware 168# XA is useful for accelerating xf86-video-vmware
169CONFIGURE_ARGS+= --enable-xa 169CONFIGURE_ARGS+= --enable-xa
170PLIST.xatracker= yes 170PLIST.xatracker= yes
171# AMD Radeon r300 171# AMD Radeon r300
172PLIST.r300= yes 172PLIST.r300= yes
173GALLIUM_DRIVERS+= r300 173GALLIUM_DRIVERS+= r300
174# AMD Canary Islands GPUs 174# AMD Canary Islands GPUs
175PLIST.radeonsi= yes 175PLIST.radeonsi= yes
176GALLIUM_DRIVERS+= radeonsi 176GALLIUM_DRIVERS+= radeonsi
177CONFIGURE_ARGS+= --enable-gallium-llvm 177CONFIGURE_ARGS+= --enable-gallium-llvm
178CONFIGURE_ARGS+= --enable-r600-llvm-compiler 178CONFIGURE_ARGS+= --enable-r600-llvm-compiler
179.include "../../devel/libelf/buildlink3.mk" 179.include "../../devel/libelf/buildlink3.mk"
180CPPFLAGS+= -I${BUILDLINK_PREFIX.libelf}/include/libelf 180CPPFLAGS+= -I${BUILDLINK_PREFIX.libelf}/include/libelf
181.include "../../lang/libLLVM/buildlink3.mk" 181.include "../../lang/libLLVM/buildlink3.mk"
182CONFIGURE_ENV+= ac_cv_path_ac_pt_LLVM_CONFIG=${LLVM_CONFIG_PATH} 182CONFIGURE_ENV+= ac_cv_path_ac_pt_LLVM_CONFIG=${LLVM_CONFIG_PATH}
183.else # !llvm 183.else # !llvm
184CONFIGURE_ARGS+= --disable-xa 184CONFIGURE_ARGS+= --disable-xa
185CONFIGURE_ARGS+= --disable-gallium-llvm 185CONFIGURE_ARGS+= --disable-gallium-llvm
186CONFIGURE_ARGS+= --disable-r600-llvm-compiler 186CONFIGURE_ARGS+= --disable-r600-llvm-compiler
187.endif # llvm 187.endif # llvm
188.else # !dri 188.else # !dri
189CONFIGURE_ARGS+= --with-gallium-drivers= 189CONFIGURE_ARGS+= --with-gallium-drivers=
190CONFIGURE_ARGS+= --with-dri-drivers= 190CONFIGURE_ARGS+= --with-dri-drivers=
191CONFIGURE_ARGS+= --disable-dri 191CONFIGURE_ARGS+= --disable-dri
192CONFIGURE_ARGS+= --disable-dri3 192CONFIGURE_ARGS+= --disable-dri3
193CONFIGURE_ARGS+= --disable-egl 193CONFIGURE_ARGS+= --disable-egl
194CONFIGURE_ARGS+= --disable-gbm 194CONFIGURE_ARGS+= --disable-gbm
195CONFIGURE_ARGS+= --disable-gles1 195CONFIGURE_ARGS+= --disable-gles1
196CONFIGURE_ARGS+= --disable-gles2 196CONFIGURE_ARGS+= --disable-gles2
197CONFIGURE_ARGS+= --enable-xlib-glx 197CONFIGURE_ARGS+= --enable-xlib-glx
198.if !empty(PKG_OPTIONS:Mllvm) 198.if !empty(PKG_OPTIONS:Mllvm)
199PKG_FAIL_REASON+= "The llvm PKG_OPTION must also be disabled when dri is disabled" 199PKG_FAIL_REASON+= "The llvm PKG_OPTION must also be disabled when dri is disabled"
200.endif 200.endif
201.endif 201.endif