aboutsummaryrefslogtreecommitdiff
path: root/extra/mesa/build
blob: 26d29fcb7781473e84c96d70020664975e95072d (plain)
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
#!/bin/sh -e

# Temporarily install python-mako to build mesa
(
    cd mako

    python3 setup.py build
    python3 setup.py install \
        --prefix=/usr \
        --root="$PWD/dist"

)

pyver=$(python3 --version) pyver=${pyver##* }
PYTHONPATH="$PWD/mako/dist/usr/lib/python${pyver%.*}/site-packages:$(python -c "import sys; print(':'.join(sys.path))")"

export PYTHONPATH
export DESTDIR="$1"
export CFLAGS="-DGLX_X86_READONLY_TEXT $CFLAGS"

# Fix issues with musl and firefox.
# https://bugs.freedesktop.org/show_bug.cgi?id=35268
# https://github.com/mesa3d/mesa/commit/9f37c9903b87f86a533bfaffa72f0ecb285b02b2
clsed "/pre_args += '-DUSE_ELF_TLS'/d" meson.build

python3 bin/git_sha1_gen.py --output include/git_sha1.h

platforms=x11
cpt l -q wayland-protocols && platforms=$platforms,wayland

cl-meson \
    -Dplatforms="$platforms" \
    -Dzstd=false \
    . output

ninja -C output
ninja -C output install