-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmesa-zink-mini.sh
More file actions
58 lines (49 loc) · 2.09 KB
/
mesa-zink-mini.sh
File metadata and controls
58 lines (49 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh
set -e
sed -i -e 's|-O2|-Os -fno-strict-aliasing -fno-fast-math -fno-plt|' /etc/makepkg.conf
export PACKAGE=mesa
get-pkgbuild
cd "$BUILD_DIR"
gallium='d3d12,softpipe,virgl,zink'
# remove as much as possible and only leave gallium
sed -i \
-e '/llvm-libs/d' \
-e '/sysprof/d' \
-e '/_pick vk/d' \
-e '/_pick opencl/d' \
-e 's/opencl-mesa//' \
-e 's/vulkan-intel//' \
-e 's/vulkan-radeon//' \
-e 's/vulkan-nouveau//' \
-e 's/vulkan-swrast//' \
-e 's/vulkan-virtio//' \
-e 's/vulkan-gfxstream//' \
-e 's/vulkan-dzn//' \
-e 's/vulkan-broadcom//' \
-e 's/vulkan-freedreno//' \
-e 's/vulkan-panfrost//' \
-e 's/vulkan-powervr//' \
-e 's/vulkan-asahi//' \
-e 's/vulkan-kosmickrisp//' \
-e 's/vulkan-mesa-layers//' \
-e 's/vulkan-mesa-implicit-layers//' \
-e '/gallium-rusticl-enable-drivers/d' \
-e 's/intel-rt=enabled/intel-rt=disabled/' \
-e 's/gallium-rusticl=true/gallium-rusticl=false/' \
-e 's/valgrind=enabled/valgrind=disabled/' \
-e 's|vulkan-layers=.*|vulkan-layers=|' \
-e 's|vulkan-drivers=.*|vulkan-drivers=|' \
-e "s|gallium-drivers=.*|gallium-drivers=$gallium|" \
-e 's/-D video-codecs=all/-D gallium-va=disabled -D draw-use-llvm=false/' \
"$PKGBUILD"
cat "$PKGBUILD"
# Do not build if version does not match with upstream
if check-upstream-version; then
makepkg -fs --noconfirm --skippgpcheck
else
exit 0
fi
ls -la
rm -fv ./*-docs-*.pkg.tar.* ./*-debug-*.pkg.tar.*
mv -v ./mesa-*.pkg.tar."$EXT" ../mesa-zink-mini-"$ARCH".pkg.tar."$EXT"
echo "All done!"