2019-06-27 03:19:50 -06:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2020-02-25 13:02:34 -07:00
|
|
|
# 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
|
2019-10-07 15:16:49 -06:00
|
|
|
export DESTDIR="$1"
|
2020-05-08 15:28:46 -06:00
|
|
|
export CFLAGS="$CFLAGS -DGLX_X86_READONLY_TEXT"
|
2019-08-03 10:36:34 -06:00
|
|
|
|
2019-08-03 15:32:53 -06:00
|
|
|
# Fix issues with musl and firefox.
|
2019-10-10 03:49:08 -06:00
|
|
|
# https://bugs.freedesktop.org/show_bug.cgi?id=35268
|
|
|
|
# https://github.com/mesa3d/mesa/commit/9f37c9903b87f86a533bfaffa72f0ecb285b02b2
|
2021-07-03 14:42:55 -06:00
|
|
|
sed "/pre_args += '-DUSE_ELF_TLS'/d" meson.build > _
|
|
|
|
mv -f _ meson.build
|
2019-08-03 15:32:53 -06:00
|
|
|
|
2021-07-10 14:31:20 -06:00
|
|
|
# To prevent the need for users to fork the mesa package to add
|
|
|
|
# libglvnd support, the below code checks for its availability
|
|
|
|
# and enables it if present. ie: install glvnd, rebuild mesa.
|
|
|
|
! kiss l libglvnd >/dev/null 2>&1 || glvnd_enabled=true
|
|
|
|
|
2019-06-27 12:36:01 -06:00
|
|
|
meson \
|
2019-06-27 03:19:50 -06:00
|
|
|
--prefix=/usr \
|
2019-06-27 03:25:10 -06:00
|
|
|
--sysconfdir=/etc \
|
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--localstatedir=/var \
|
2019-06-27 12:36:01 -06:00
|
|
|
--buildtype=release \
|
2021-07-08 00:50:41 -06:00
|
|
|
-Dplatforms=wayland \
|
|
|
|
-Dglx=disabled \
|
2020-10-01 00:53:07 -06:00
|
|
|
-Dzstd=false \
|
2021-07-10 14:36:30 -06:00
|
|
|
-Dglvnd="${glvnd_enabled:-false}" \
|
2019-06-27 12:36:01 -06:00
|
|
|
. output
|
|
|
|
|
|
|
|
ninja -C output
|
2019-10-07 15:16:49 -06:00
|
|
|
ninja -C output install
|