slackware-current/source/x/mesa/mesa-amber.build
Patrick J Volkerding 5e846dcebf Sun Jun 9 18:41:17 UTC 2024
l/qt6-6.7.1_20240516_6977d02f-x86_64-3.txz:  Rebuilt.
  Fixed config option: -DINSTALL_MKSPECSDIR=lib${LIBDIRSUFFIX}/qt6/mkspecs
  Thanks to USUARIONUEVO.
x/fcitx5-qt-5.1.6-x86_64-2.txz:  Rebuilt.
  Recompiled against qt6-6.7.1_20240516_6977d02f to fix segfaults.
  Thanks to rinza.
x/mesa-24.1.1-x86_64-3.txz:  Rebuilt.
  Don't allow amber drivers to overwrite modern ones. Thanks to LuckyCyborg.
  Bundle the subprojects instead of allowing them to download.
xfce/xfce4-settings-4.18.5-x86_64-1.txz:  Upgraded.
2024-06-09 21:04:22 +02:00

98 lines
2.8 KiB
Bash
Executable file

#!/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/amber/patches/*.patch 1> /dev/null 2> /dev/null ; then
for patch in $CWD/amber/patches/*.patch ; do
patch -p1 --verbose < $patch || exit 1 ;
done
fi
# Revert these patches from git (and maybe elsewhere):
if /bin/ls $CWD/amber/patches-revert/*.patch 1> /dev/null 2> /dev/null ; then
for patch in $CWD/amber/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
# Architecture-specific settings can be configured in the mesa.SlackBuild
# within the variable 'SLK_AMBER_CONF_OPTS'
meson setup \
$SLK_AMBER_CONF_OPTS \
--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
# First, remove any drivers that were built by the newer Mesa:
( cd $PKG/usr/lib${LIBDIRSUFFIX}/dri ; /bin/ls * ) | while read newdriver ; do
rm -f -v $PKG/cruft/usr/lib${LIBDIRSUFFIX}/dri/$newdriver
done
rsync -lHprvt $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