diff options
Diffstat (limited to 'source/x/mesa/mesa-amber.build')
-rwxr-xr-x | source/x/mesa/mesa-amber.build | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/source/x/mesa/mesa-amber.build b/source/x/mesa/mesa-amber.build new file mode 100755 index 000000000..01ea2e880 --- /dev/null +++ b/source/x/mesa/mesa-amber.build @@ -0,0 +1,91 @@ +#!/bin/bash +# This script is not meant to be run directly: +if [ -z $AMBERVERS ]; then + exit 1 +fi + + +# Be sure this list is up-to-date: +DRI_DRIVERS="i915,i965,r100,r200,nouveau" + +cd $TMP +rm -rf ${PKGNAM}-${AMBERVERS} + +tar xvf $CWD/amber/${PKGNAM}-${AMBERVERS}.tar.?z || exit 1 +cd ${PKGNAM}-$AMBERVERS || exit 1 + +# Let's kill the warning about operating on a dangling symlink: +rm -f src/gallium/state_trackers/d3d1x/w32api + +# Make sure ownerships and permissions are sane: +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \+ -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \+ + +# Apply patches from git (and maybe elsewhere): +# Patches obtained by: +# git checkout origin/17.2 +# git format-patch 93c2beafc0a7fa2f210b006d22aba61caa71f773 # 17.2.6 release +if /bin/ls $CWD/patches/*.patch 1> /dev/null 2> /dev/null ; then + for patch in $CWD/patches/*.patch ; do + patch -p1 --verbose < $patch || exit 1 ; + done +fi + +# Revert these patches from git (and maybe elsewhere): +if /bin/ls $CWD/patches-revert/*.patch 1> /dev/null 2> /dev/null ; then + for patch in $CWD/patches-revert/*.patch ; do + patch -p1 -R --verbose < $patch || exit 1 ; + done +fi + +# Configure, build, and install: +export CFLAGS="$SLKCFLAGS" +export CXXFLAGS="$SLKCFLAGS" +mkdir meson-build +cd meson-build +meson setup \ + --prefix=/usr \ + --libdir=lib${LIBDIRSUFFIX} \ + --libexecdir=/usr/libexec \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --includedir=/usr/include \ + --datadir=/usr/share \ + --mandir=/usr/man \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --buildtype=release \ + -Dplatforms=x11,wayland \ + -Damber=true \ + -Ddri-drivers=$DRI_DRIVERS \ + -Dgallium-drivers='' \ + -Dvulkan-drivers='' \ + -Dosmesa=false \ + -Dglvnd=true \ + -Dllvm=enabled \ + -Dshared-llvm=enabled \ + -Dshared-glapi=enabled \ + -Degl=enabled \ + -Dgles1=enabled \ + -Dgles2=enabled \ + -Dopengl=true \ + -Dglx=dri \ + .. || exit 1 + "${NINJA:=ninja}" $NUMJOBS || exit 1 + DESTDIR=$PKG/cruft $NINJA install || exit 1 +cd .. + +# We will install only the DRI drivers: +mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/dri +rsync -lprvt $PKG/cruft/usr/lib${LIBDIRSUFFIX}/dri/ $PKG/usr/lib${LIBDIRSUFFIX}/dri/ +rm -rf $PKG/cruft + +rm -rf $PKG/usr/doc/$PKGNAM-$AMBERVERS +mkdir -p $PKG/usr/doc/$PKGNAM-amber-$AMBERVERS +cp -a \ + CODEOWNERS* README* docs/README* docs/license* docs/relnotes/${AMBERVERS}.* \ + $PKG/usr/doc/$PKGNAM-amber-$AMBERVERS |