mirror of
https://codeberg.org/kiss-community/repo
synced 2024-08-20 13:16:19 +00:00
50 lines
1.3 KiB
Bash
Executable File
50 lines
1.3 KiB
Bash
Executable File
#!/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
|
|
|
|
# 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.
|
|
pkg-config --exists libglvnd || glvnd_enabled=false
|
|
|
|
meson \
|
|
--prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--mandir=/usr/share/man \
|
|
--localstatedir=/var \
|
|
--buildtype=release \
|
|
-Dglx-read-only-text=true \
|
|
-Dplatforms=wayland \
|
|
-Dglx=disabled \
|
|
-Degl=enabled \
|
|
-Dvalgrind=false \
|
|
-Dzstd=disabled \
|
|
-Dglvnd="${glvnd_enabled:-true}" \
|
|
-Dvulkan-drivers='' \
|
|
. output
|
|
|
|
ninja -C output
|
|
ninja -C output install
|