2021-12-20 14:44:35 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-07-12 15:54:12 +00:00
|
|
|
SCRIPT_REPO="https://gitlab.freedesktop.org/glvnd/libglvnd.git"
|
2023-04-18 14:23:16 +00:00
|
|
|
SCRIPT_COMMIT="179d7278d7485ceea2d440807be9d677d32aedc4"
|
2021-12-20 14:44:35 +00:00
|
|
|
|
|
|
|
ffbuild_enabled() {
|
|
|
|
[[ $TARGET != linux* ]] && return -1
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_dockerbuild() {
|
2022-07-12 15:54:12 +00:00
|
|
|
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" glvnd
|
2021-12-20 14:44:35 +00:00
|
|
|
cd glvnd
|
|
|
|
|
|
|
|
mkdir build && cd build
|
|
|
|
|
|
|
|
local myconf=(
|
|
|
|
--prefix="$FFBUILD_PREFIX"
|
|
|
|
--buildtype=release
|
|
|
|
--default-library=static
|
|
|
|
-Dasm=enabled
|
|
|
|
-Dx11=enabled
|
|
|
|
-Degl=true
|
|
|
|
-Dglx=enabled
|
|
|
|
-Dgles1=true
|
|
|
|
-Dgles2=true
|
|
|
|
-Dheaders=true
|
|
|
|
)
|
|
|
|
|
|
|
|
if [[ $TARGET == linux* ]]; then
|
|
|
|
myconf+=(
|
|
|
|
--cross-file=/cross.meson
|
|
|
|
)
|
|
|
|
else
|
|
|
|
echo "Unknown target"
|
|
|
|
return -1
|
|
|
|
fi
|
|
|
|
|
|
|
|
meson "${myconf[@]}" ..
|
|
|
|
ninja -j"$(nproc)"
|
|
|
|
ninja install
|
|
|
|
}
|