comparison graphics/mesa/mesa.sh @ 1309:66d3e04b22e6

graphics/mesa: upgrade to 21.2.5
author David Demelier <markand@malikania.fr>
date Fri, 19 Nov 2021 21:45:27 +0100
parents 9867e578b1a9
children
comparison
equal deleted inserted replaced
1308:7c81bdc2541b 1309:66d3e04b22e6
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 # 16 #
17 17
18 PKGNAME=mesa 18 PKGNAME=mesa
19 PKGVERSION=18.3.5 19 PKGVERSION=21.2.5
20 PKGREVISION=1 20 PKGREVISION=1
21 PKGLICENSE="CUSTOM" 21 PKGLICENSE="Custom"
22 PKGSUMMARY="opensource OpenGL implementation" 22 PKGSUMMARY="opensource OpenGL implementation"
23 PKGWWW="https://www.mesa3d.org"
23 PKGDOWNLOAD="https://mesa.freedesktop.org/archive/$PKGNAME-$PKGVERSION.tar.xz" 24 PKGDOWNLOAD="https://mesa.freedesktop.org/archive/$PKGNAME-$PKGVERSION.tar.xz"
24 PKGDEPENDS="meson:build" 25 PKGDEPENDS="meson:build"
25 PKGOPTIONS="DRI DRM EGL GALLIUM GLVND LLVM PLATFORMS SELINUX VULKAN WAYLAND X" 26 PKGOPTIONS="DRI EGL GALLIUM GLVND LLVM PLATFORMS SELINUX VULKAN WAYLAND X"
26 27
27 : ${CC:=clang} 28 : ${CC:=clang}
28 : ${CFLAGS:=-O2} 29 : ${CFLAGS:=-O2}
29 : ${CXX:=clang++} 30 : ${CXX:=clang++}
30 : ${CXXFLAGS:=-O2} 31 : ${CXXFLAGS:=-O2}
31 : ${LDFLAGS:=} 32 : ${LDFLAGS:=}
32 : ${DRI:=i965 r100 r200 nouveau} # driver list or "no" 33 : ${DRI:=yes} # Select: list|yes, no
33 : ${DRM:=yes}
34 : ${EGL:=yes} 34 : ${EGL:=yes}
35 : ${GALLIUM:=i915 radeonsi r300 r600 virgl swrast} # driver list or "no" 35 : ${GALLIUM:=yes} # Select: list|yes, no
36 : ${GLVND:=no} 36 : ${GLVND:=no}
37 : ${LLVM:=yes} 37 : ${LLVM:=yes}
38 : ${SELINUX:=no} 38 : ${SELINUX:=no}
39 : ${VULKAN:=intel amd} # driver list or "no" 39 : ${VULKAN:=yes} # Select: list|yes, no
40 : ${WAYLAND:=yes} 40 : ${WAYLAND:=yes}
41 : ${X:=yes} 41 : ${X:=yes}
42 42
43 # Convert user options separated by spaces to comma. 43 # Convert user options separated by spaces to comma.
44 with_platforms="" 44 with_platforms=""
45 with_dri_drivers=""
46 with_gallium_drivers=""
47 with_vulkan_drivers=""
48 45
49 if [ "$DRM" = "yes" ]; then 46 case "$DRI" in
50 PKGDEPENDS="libdrm $PKGDEPENDS" 47 "yes")
51 with_platforms="drm" 48 with_dri_drivers="auto" ;;
52 fi 49 "no")
53 50 with_dri_drivers="" ;;
54 if [ "$DRI" != "no" ]; then 51 *)
55 with_dri_drivers=$(echo $DRI | sed -e "s/ /,/g") 52 with_dri_drivers="$(echo $DRI | sed -e "s/ /,/g")" ;;
56 fi 53 esac
57 54
58 if [ "$EGL" = "yes" ]; then 55 if [ "$EGL" = "yes" ]; then
59 with_egl="-D egl=true" 56 with_egl="-D egl=true"
60 else 57 else
61 with_egl="-D egl=false" 58 with_egl="-D egl=false"
62 fi 59 fi
63 60
64 if [ "$GALLIUM" != "no" ]; then 61 case "$GALLIUM" in
65 with_gallium_drivers=$(echo $GALLIUM | sed -e "s/ /,/g") 62 "yes")
66 fi 63 with_gallium_drivers="auto" ;;
64 "no")
65 with_gallium_drivers="" ;;
66 *)
67 with_gallium_drivers="$(echo $GALLIUM | sed -e "s/ /,/g")"
68 esac
67 69
68 if [ "$GLVND" = "yes" ]; then 70 if [ "$GLVND" = "yes" ]; then
69 with_glvnd="-D glvnd=true" 71 with_glvnd="-D glvnd=true"
70 else 72 else
71 with_glvnd="-D glvnd=false" 73 with_glvnd="-D glvnd=false"
76 with_llvm="-D llvm=true" 78 with_llvm="-D llvm=true"
77 else 79 else
78 with_llvm="-D llvm=false" 80 with_llvm="-D llvm=false"
79 fi 81 fi
80 82
81 if [ "$VULKAN" != "no" ]; then 83 case "$VULKAN" in
82 with_vulkan_drivers=$(echo $VULKAN | sed -e "s/ /,/g") 84 "yes")
83 fi 85 with_vulkan_drivers="auto" ;;
86 "no")
87 with_vulkan_drivers="$(echo $VULKAN | sed -e "s/ /,/g")" ;;
88 *)
89 with_vulkan_drivers="" ;;
90 esac
84 91
85 if [ "$WAYLAND" = "yes" ]; then 92 if [ "$WAYLAND" = "yes" ]; then
86 PKGDEPENDS="wayland wayland-protocols $PKGDEPENDS" 93 PKGDEPENDS="wayland wayland-protocols $PKGDEPENDS"
87 with_platforms="wayland,$with_platforms" 94 with_platforms="wayland $with_platforms"
88 fi 95 fi
89 96
90 if [ "$X" = "yes" ]; then 97 if [ "$X" = "yes" ]; then
91 PKGDEPENDS="libx11 98 PKGDEPENDS="libx11
92 libxdamage 99 libxdamage
93 libxext 100 libxext
94 libxrandr 101 libxrandr
95 libxshmfence 102 libxshmfence
96 libxxf86vm 103 libxxf86vm
97 $PKGDEPENDS" 104 $PKGDEPENDS"
98 with_platforms="x11,$with_platforms" 105 with_platforms="x11 $with_platforms"
99 with_dri="-D dri3=true" 106 with_dri="-D dri3=true"
100 with_glx="-D glx=dri" 107 with_glx="-D glx=dri"
101 else 108 else
102 with_dri="-D dri3=false" 109 with_dri="-D dri3=false"
103 with_glx="-D glx=disabled" 110 with_glx="-D glx=disabled"
104 fi 111 fi
105 112
106 build() 113 build()
107 { 114 {
108 rm -rf $PKGNAME-$PKGVERSION 115 rm -rf $PKGNAME-$PKGVERSION
109 tar xvf $PKGNAME-$PKGVERSION.tar.xz 116 tar -xvf $PKGNAME-$PKGVERSION.tar.xz
110 cd $PKGNAME-$PKGVERSION 117 cd $PKGNAME-$PKGVERSION
111 118
112 patch -p0 < ../disable-tls.patch
113 # https://git.alpinelinux.org/aports/plain/main/mesa/musl-fix-includes.patch
114 patch -p1 < ../musl.patch
115 CC="$CC" \ 119 CC="$CC" \
116 CFLAGS="$CFLAGS" \ 120 CFLAGS="$CFLAGS" \
117 CXX="$CXX" \ 121 CXX="$CXX" \
118 CXXFLAGS="$CXXFLAGS" \ 122 CXXFLAGS="$CXXFLAGS" \
119 LDFLAGS="$LDFLAGS" \ 123 LDFLAGS="$LDFLAGS" \
120 meson . build \ 124 meson . build \
121 --prefix / \ 125 --prefix / \
122 --buildtype release \ 126 --buildtype release \
123 --default-library shared \ 127 --default-library shared \
124 -D libdir=lib \ 128 -D libdir=lib \
125 -D bpm=true \ 129 -D platforms="$(echo ${with_platforms% *} | tr " " ",")" \
126 -D platforms="$with_platforms" \
127 -D dri-drivers="$with_dri_drivers" \ 130 -D dri-drivers="$with_dri_drivers" \
128 -D gallium-drivers="$with_gallium_drivers" \ 131 -D gallium-drivers="$with_gallium_drivers" \
129 -D vulkan-drivers="$with_vulkan_drivers" \ 132 -D vulkan-drivers="$with_vulkan_drivers" \
130 $with_dri \ 133 $with_dri \
131 $with_egl \ 134 $with_egl \