forked from mattbillenstein/kiss-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmesa-build-override
56 lines (46 loc) · 1.44 KB
/
mesa-build-override
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
#!/bin/sh -e
# Install python-mako which is solely needed for mesa
# and thus contained in this build.
{
cd mako
python3 setup.py build
python3 setup.py install \
--prefix=/usr \
--root="$PWD/dist"
# Use a glob to avoid having to figure out the Python
# version for the path below.
cd dist/usr/lib/python*/site-packages
# Set the PYTHONPATH so python knows where to find mako.
# The one liner simply appends the existing path and
# handles the case where an unset PYTHONPATH breaks
# python as it will only contain our new addition.
PYTHONPATH=$PWD:$(python -c "import sys; print(':'.join(sys.path))")
cd -; cd ..
}
export PYTHONPATH
export DESTDIR="$1"
export CFLAGS="$CFLAGS -DGLX_X86_READONLY_TEXT"
# Fix issues with musl and firefox.
# https://bugs.freedesktop.org/show_bug.cgi?id=35268
# https://github.com/mesa3d/mesa/commit/9f37c9903b87f86a533bfaffa72f0ecb285b02b2
sed -i "/pre_args += '-DUSE_ELF_TLS'/d" meson.build
python3 bin/git_sha1_gen.py --output include/git_sha1.h
meson \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--buildtype=release \
-Dgbm=enabled \
-Dglvnd=true \
-Dplatforms=wayland \
-Dzstd=disabled \
-Ddri-drivers=nouveau \
-Dgallium-drivers="" \
-Dvulkan-drivers="" \
-Dglx=disabled \
-Dgles1=disabled \
-Dgles2=disabled \
. output
ninja -C output
ninja -C output install