hblock: bump to 3.4.0
[kiss-trunc88.git] / mesa / build
blobae7a13c7a695bc54a1da99044e67e52a5fd86884
1 #!/bin/sh -e
3 # Install python-mako which is solely needed for mesa
4 # and thus contained in this build.
6 cd mako
8 python3 setup.py build
9 python3 setup.py install \
10 --prefix=/usr \
11 --root="$PWD/dist"
13 # Use a glob to avoid having to figure out the Python
14 # version for the path below.
15 cd dist/usr/lib/python*/site-packages
17 # Set the PYTHONPATH so python knows where to find mako.
18 # The one liner simply appends the existing path and
19 # handles the case where an unset PYTHONPATH breaks
20 # python as it will only contain our new addition.
21 PYTHONPATH=$PWD:$(python -c "import sys; print(':'.join(sys.path))")
23 cd -; cd ..
25 export PYTHONPATH
27 #patch -p1 < gallium_msaa-mine.patch
29 # Fix issues with musl and firefox.
30 # https://bugs.freedesktop.org/show_bug.cgi?id=35268
31 # https://github.com/mesa3d/mesa/commit/9f37c9903b87f86a533bfaffa72f0ecb285b02b2
32 # https://gitlab.freedesktop.org/mesa/mesa/-/issues/966
33 sed "/pre_args += '-DUSE_ELF_TLS'/d" meson.build > _
34 mv -f _ meson.build
36 # To prevent the need for users to fork the mesa package to add
37 # libglvnd support, the below code checks for its availability
38 # and enables it if present. ie: install glvnd, rebuild mesa.
39 pkg-config --exists libglvnd || glvnd_enabled=false
41 meson \
42 --prefix=/usr \
43 --sysconfdir=/etc \
44 --mandir=/usr/share/man \
45 --localstatedir=/var \
46 --buildtype=plain \
47 -Ddebug=false \
48 -Dstrip=true \
49 -Db_ndebug=true \
50 -Dglx-read-only-text=true \
51 -Dplatforms=x11 \
52 -Dglx=auto \
53 -Degl=enabled \
54 -Dvalgrind=false \
55 -Dzstd=false \
56 -Dglvnd="${glvnd_enabled:-true}" \
57 -Dgallium-drivers="r600" \
58 -Dvulkan-drivers="" \
59 . output
61 # -Ddri-drivers="nouveau" \
64 ninja -C output
65 ninja -C output install