smlinux/xorg/mesa/mesa.SMBuild

65 lines
No EOL
2.2 KiB
Text
Executable file

app=mesa
version=20.1.4
build=2sml
homepage="https://www.mesa3d.org/"
download="https://archive.mesa3d.org/mesa-$version.tar.xz"
desc="An open-source implementation of the OpenGL specification"
requires="gcc-libs expat libxml2 llvm libdrm libx11 libxrandr libxdamage libxshmfence libxxf86vm libvdpau"
build() {
mkandenterbuilddir
rm -rf $app-$version
tar xf $srcdir/$app-$version.tar.?z*
cd $app-$version
fixbuilddirpermissions
applypatch $srcdir/add-use-elf-tls.patch
applypatch $srcdir/adjust-cache-deflate-buffer.patch
applypatch $srcdir/disable-rgb10-by-default.patch
applypatch $srcdir/musl-fix-includes.patch
export CFLAGS="$CFLAGS -D_XOPEN_SOURCE=700"
if [ "$arch" = "aarch64" ]; then
dridrivers=""
galliumdrivers="v3d,vc4,kmsro"
elif [ "$arch" = "x86_64" ]; then
dridrivers="i915,i965,nouveau,r100,r200,swrast"
galliumdrivers="nouveau,radeonsi,r300,r600"
fi
mkdir -p smbuild && cd smbuild
meson .. \
--prefix="/" \
--sysconfdir=/etc \
--localstatedir=/var \
-Dbuildtype=release \
-Ddri-drivers="$dridrivers" \
-Dgallium-drivers="$galliumdrivers" \
-Dplatforms="x11,wayland" \
-Dgallium-nine=false \
-Degl=true \
-Dgles1=false \
-Dgles2=true \
-Dglx=dri \
-Dopengl=true \
-Dvalgrind=false \
-Dlibunwind=false
ninja
DESTDIR="$pkg" ninja install
cp $srcdir/LICENSE $pkgdocs/
mkfinalpkg
}
sha512sums="
9c5ad845373ac50ba56502379fe398ee08448faea3e4bbba49ec1d182846070c1c1a64f03f0f32525d6ffaabd9ec4a38e5e0bd014444141dec145add86cfcee6 mesa-20.1.4.tar.lz
cd3961319079882e692176f654feb21ddfeccafcc7f4ce4f8d21160f36deda768eb3ee7f49dae2e18f0587d321473adc7f127a2d75ae143ec29168bcc0fe12c0 add-use-elf-tls.patch
cdf22d2da3328e116c379264886bd01fd3ad5cc45fe03dc6fd97bdc4794502598ee195c0b9d975fa264d6ac31c6fa108c0535c91800ecf4fcabfd308e53074cc adjust-cache-deflate-buffer.patch
ede642ae9be64c3fc5fee46e8bf1b2f982191febcfadb235b0261868213c7cca11d38bb53b972f3184a887430f37b9f470a9b12fd03cf54b98315ec75c4d8ed4 disable-rgb10-by-default.patch
cf849044d6cc7d2af4ff015208fb09d70bf9660538699797da21bda2ecb7c1892d312af83d05116afd826708d9caafb1d05a13f09139c558aea6fee931e3eee7 musl-fix-includes.patch
"