mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-26 06:44:18 +08:00
Update mesa to use meson
This commit is contained in:
parent
6c3a3980f3
commit
bdcad6f251
@ -17,27 +17,57 @@ function recipe_build {
|
||||
sysroot="$(realpath ../sysroot)"
|
||||
export CFLAGS="-I$sysroot/include -DHAVE_PTHREAD=1"
|
||||
export CPPFLAGS="-I$sysroot/include -DHAVE_PTHREAD=1"
|
||||
export LDFLAGS="-L$sysroot/lib --static"
|
||||
export LDFLAGS="-L$sysroot/lib --static $("${TARGET}-llvm-config" --libfiles all)"
|
||||
#export LLVM_CONFIG="x86_64-unknown-redox-llvm-config"
|
||||
NOCONFIGURE=1 ./autogen.sh
|
||||
./configure \
|
||||
--build=${BUILD} \
|
||||
--host="${HOST}" \
|
||||
--prefix=/ \
|
||||
--disable-dri \
|
||||
--disable-dri3 \
|
||||
--disable-driglx-direct \
|
||||
--disable-egl \
|
||||
--disable-glx \
|
||||
--disable-gbm \
|
||||
--disable-llvm-shared-libs \
|
||||
--disable-shared \
|
||||
--enable-llvm \
|
||||
--enable-gallium-osmesa \
|
||||
--enable-static \
|
||||
--with-gallium-drivers=swrast \
|
||||
--with-platforms=surfaceless
|
||||
"$REDOX_MAKE" V=1 -j"$($NPROC)"
|
||||
|
||||
# TODO: Fix this annoying shite
|
||||
echo "[binaries]" > cross_file.txt
|
||||
echo "c = '${CC}'" >> cross_file.txt
|
||||
echo "cpp = '${CXX}'" >> cross_file.txt
|
||||
echo "ar = '${AR}'" >> cross_file.txt
|
||||
echo "strip = '${STRIP}'" >> cross_file.txt
|
||||
echo "pkgconfig = '${PKG_CONFIG}'" >> cross_file.txt
|
||||
echo "llvm-config = '${TARGET}-llvm-config'" >> cross_file.txt
|
||||
|
||||
echo "[host_machine]" >> cross_file.txt
|
||||
echo "system = 'redox'" >> cross_file.txt
|
||||
echo "cpu_family = 'x86_64'" >> cross_file.txt
|
||||
echo "cpu = 'x86_64'" >> cross_file.txt
|
||||
echo "endian = 'little'" >> cross_file.txt
|
||||
|
||||
echo "[paths]" >> cross_file.txt
|
||||
echo "prefix = '/'" >> cross_file.txt
|
||||
echo "libdir = 'lib'" >> cross_file.txt
|
||||
echo "bindir = 'bin'" >> cross_file.txt
|
||||
|
||||
unset AR
|
||||
unset AS
|
||||
unset CC
|
||||
unset CXX
|
||||
unset LD
|
||||
unset NM
|
||||
unset OBJCOPY
|
||||
unset OBJDUMP
|
||||
unset PKG_CONFIG
|
||||
unset PKG_CONFIG_PATH
|
||||
unset RANLIB
|
||||
unset READELF
|
||||
unset STRIP
|
||||
|
||||
meson . _build \
|
||||
--cross-file cross_file.txt \
|
||||
--buildtype release \
|
||||
--strip \
|
||||
-Ddefault_library=static \
|
||||
-Dglx=disabled \
|
||||
-Dllvm=enabled \
|
||||
-Dosmesa=gallium \
|
||||
-Dplatforms= \
|
||||
-Dshader-cache=disabled \
|
||||
-Dshared-llvm=disabled \
|
||||
-Dshared-glapi=disabled
|
||||
|
||||
ninja -C _build -v
|
||||
skip=1
|
||||
}
|
||||
|
||||
@ -52,9 +82,8 @@ function recipe_clean {
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
#export LLVM_CONFIG="x86_64-unknown-redox-llvm-config"
|
||||
dest="$(realpath $1)"
|
||||
"$REDOX_MAKE" DESTDIR="$dest" install
|
||||
DESTDIR="$dest" ninja -C _build install
|
||||
rm -f "$dest/lib/"*.la
|
||||
skip=1
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user