Add mesa recipe

This commit is contained in:
Jeremy Soller 2018-12-09 13:35:08 -07:00
parent e92d74f7f2
commit b0b19c9495
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1

48
recipes/mesa/recipe.sh Normal file
View File

@ -0,0 +1,48 @@
GIT=https://gitlab.redox-os.org/redox-os/mesa.git
GIT_UPSTREAM=git://anongit.freedesktop.org/mesa/mesa
BUILD_DEPENDS=(expat zlib)
function recipe_update {
echo "skipping update"
skip=1
}
function recipe_build {
#NOCONFIGURE=1 ./autogen.sh
sysroot="${PWD}/../sysroot"
export CFLAGS="-I$sysroot/include -DHAVE_PTHREAD=1"
export CPPFLAGS="-I$sysroot/include -DHAVE_PTHREAD=1"
export LDFLAGS="-L$sysroot/lib"
EXPAT_LIBS="-lexpat" EXPAT_CFLAGS="." \
./configure --host=${HOST} --prefix=/ \
--disable-gles1 \
--disable-gles2 \
--disable-dri \
--disable-dri3 \
--disable-glx \
--disable-egl \
--disable-driglx-direct \
--disable-gbm \
--disable-llvm \
--enable-gallium-osmesa \
--with-gallium-drivers=swrast \
--with-platforms=surfaceless
make -j"$(nproc)"
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
make clean
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
skip=1
}