comparison graphics/mesa/mesa.sh @ 689:439aade5bee6

graphics/mesa: add DRI option
author David Demelier <markand@malikania.fr>
date Thu, 01 Aug 2019 11:26:30 +0200
parents d13cafd27a68
children e91fbcb3d1ef
comparison
equal deleted inserted replaced
688:d13cafd27a68 689:439aade5bee6
20 PKGREVISION=1 20 PKGREVISION=1
21 PKGLICENSE="CUSTOM" 21 PKGLICENSE="CUSTOM"
22 PKGSUMMARY="opensource OpenGL implementation" 22 PKGSUMMARY="opensource OpenGL implementation"
23 PKGDOWNLOAD="https://mesa.freedesktop.org/archive/$PKGNAME-$PKGVERSION.tar.xz" 23 PKGDOWNLOAD="https://mesa.freedesktop.org/archive/$PKGNAME-$PKGVERSION.tar.xz"
24 PKGDEPENDS="dev/meson:build" 24 PKGDEPENDS="dev/meson:build"
25 PKGOPTIONS="DRM EGL GALLIUM GLVND LLVM PLATFORMS SELINUX VULKAN WAYLAND X" 25 PKGOPTIONS="DRI DRM EGL GALLIUM GLVND LLVM PLATFORMS SELINUX VULKAN WAYLAND X"
26 26
27 : ${CC:=clang} 27 : ${CC:=clang}
28 : ${CFLAGS:=-O2} 28 : ${CFLAGS:=-O2}
29 : ${CXX:=clang++} 29 : ${CXX:=clang++}
30 : ${CXXFLAGS:=-O2} 30 : ${CXXFLAGS:=-O2}
31 : ${LDFLAGS:=} 31 : ${LDFLAGS:=}
32 : ${DRI:=i965 r100 r200 nouveau} # driver list or "no"
32 : ${DRM:=yes} 33 : ${DRM:=yes}
33 : ${EGL:=yes} 34 : ${EGL:=yes}
34 : ${GALLIUM:=radeonsi r300 r600 virgl svga swrast} # drivers list or "no" 35 : ${GALLIUM:=i915 radeonsi r300 r600 virgl swrast} # driver list or "no"
35 : ${GLVND:=yes} 36 : ${GLVND:=no}
36 : ${LLVM:=yes} 37 : ${LLVM:=yes}
37 : ${SELINUX:=no} 38 : ${SELINUX:=no}
38 : ${VULKAN:=intel amd} # drivers list or "no" 39 : ${VULKAN:=intel amd} # driver list or "no"
39 : ${WAYLAND:=yes} 40 : ${WAYLAND:=yes}
40 : ${X:=yes} 41 : ${X:=yes}
41 42
42 # Convert user options separated by spaces to comma. 43 # Convert user options separated by spaces to comma.
43 with_platforms="" 44 with_platforms=""
45 with_dri_drivers=""
44 with_gallium_drivers="" 46 with_gallium_drivers=""
45 with_vulkan_drivers="" 47 with_vulkan_drivers=""
46 48
47 if [ "$DRM" = "yes" ]; then 49 if [ "$DRM" = "yes" ]; then
48 PKGDEPENDS="graphics/libdrm $PKGDEPENDS" 50 PKGDEPENDS="graphics/libdrm $PKGDEPENDS"
49 with_platforms="drm" 51 with_platforms="drm"
52 fi
53
54 if [ "$DRI" != "no" ]; then
55 with_dri_drivers=$(echo $DRI | sed -e "s/ /,/g")
50 fi 56 fi
51 57
52 if [ "$EGL" = "yes" ]; then 58 if [ "$EGL" = "yes" ]; then
53 with_egl="-D egl=true" 59 with_egl="-D egl=true"
54 else 60 else
55 with_egl="-D egl=false" 61 with_egl="-D egl=false"
56 fi 62 fi
57 63
58 if [ "$GALLIUM" != "no" ]; then 64 if [ "$GALLIUM" != "no" ]; then
59 with_gallium_drivers=$(echo $GALLIUM | sed -e "s/ /,/") 65 with_gallium_drivers=$(echo $GALLIUM | sed -e "s/ /,/g")
60 fi 66 fi
61 67
62 if [ "$GLVND" = "yes" ]; then 68 if [ "$GLVND" = "yes" ]; then
63 with_glvnd="-D glvnd=true" 69 with_glvnd="-D glvnd=true"
64 else 70 else
71 else 77 else
72 with_llvm="-D llvm=false" 78 with_llvm="-D llvm=false"
73 fi 79 fi
74 80
75 if [ "$VULKAN" != "no" ]; then 81 if [ "$VULKAN" != "no" ]; then
76 with_vulkan_drivers=$(echo $VULKAN | sed -e "s/ /,/") 82 with_vulkan_drivers=$(echo $VULKAN | sed -e "s/ /,/g")
77 fi 83 fi
78 84
79 if [ "$WAYLAND" = "yes" ]; then 85 if [ "$WAYLAND" = "yes" ]; then
80 PKGDEPENDS="graphics/wayland graphics/wayland-protocols $PKGDEPENDS" 86 PKGDEPENDS="graphics/wayland graphics/wayland-protocols $PKGDEPENDS"
81 with_platforms="wayland,$with_platforms" 87 with_platforms="wayland,$with_platforms"
115 --prefix / \ 121 --prefix / \
116 --buildtype release \ 122 --buildtype release \
117 --default-library shared \ 123 --default-library shared \
118 -D libdir=lib \ 124 -D libdir=lib \
119 -D bpm=true \ 125 -D bpm=true \
120 -D platforms=$with_platforms \ 126 -D platforms="$with_platforms" \
121 -D gallium-drivers=$with_gallium_drivers \ 127 -D dri-drivers="$with_dri_drivers" \
122 -D vulkan-drivers=$with_vulkan_drivers \ 128 -D gallium-drivers="$with_gallium_drivers" \
129 -D vulkan-drivers="$with_vulkan_drivers" \
123 $with_dri \ 130 $with_dri \
124 $with_egl \ 131 $with_egl \
125 $with_glvnd \ 132 $with_glvnd \
126 $with_glx \ 133 $with_glx \
127 $with_llvm \ 134 $with_llvm \