mirror of
git://slackware.nl/current.git
synced 2024-12-25 09:58:55 +01:00
99 lines
2.8 KiB
Text
99 lines
2.8 KiB
Text
|
#!/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
|