diff options
Diffstat (limited to 'source/x/mesa/mesa.SlackBuild')
-rwxr-xr-x | source/x/mesa/mesa.SlackBuild | 68 |
1 files changed, 32 insertions, 36 deletions
diff --git a/source/x/mesa/mesa.SlackBuild b/source/x/mesa/mesa.SlackBuild index 5428881b..a3cf4ae3 100755 --- a/source/x/mesa/mesa.SlackBuild +++ b/source/x/mesa/mesa.SlackBuild @@ -25,7 +25,8 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=mesa VERSION=${VERSION:-$(echo $PKGNAM-1*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} DEMOVERS=${DEMOVERS:-8.4.0} -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} +BUILD_DEMOS=${BUILD_DEMOS:-YES} NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} @@ -129,7 +130,7 @@ meson setup \ -Dshared-llvm=true \ -Dshared-glapi=true \ -Degl=true \ - -Dgles1=false \ + -Dgles1=true \ -Dgles2=true \ .. || exit 1 "${NINJA:=ninja}" $NUMJOBS || exit 1 @@ -141,42 +142,37 @@ if [ -r $PKG/etc/drirc ]; then mv $PKG/etc/drirc $PKG/etc/drirc.new fi -# Install glesv2.pc: -mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig -cat $CWD/glesv2.pc > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/glesv2.pc -if [ ! "${LIBDIRSUFFIX}" = "64" ]; then - sed -i "s/lib64/lib/g" $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/glesv2.pc -fi - -# Now build/install a small subset of the demos: -export CWD SLKCFLAGS NUMJOBS PKG -( cd $TMP - rm -rf mesa-demos-$DEMOVERS - tar xvf $CWD/mesa-demos-$DEMOVERS.tar.?z* || exit 1 - cd mesa-demos-$DEMOVERS - chown -R root:root . - find . \ - \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \+ -o \ +if [ "$BUILD_DEMOS" = "YES" ]; then + # Now build/install a small subset of the demos: + export CWD SLKCFLAGS NUMJOBS PKG + ( cd $TMP + rm -rf mesa-demos-$DEMOVERS + tar xvf $CWD/mesa-demos-$DEMOVERS.tar.?z* || exit 1 + cd mesa-demos-$DEMOVERS + 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 {} \+ - CFLAGS="$SLKCFLAGS" \ - ./configure \ - --prefix=/usr \ - --build=$ARCH-slackware-linux || exit 1 - make $NUMJOBS || exit 1 - # Install all the demos (including the pointless ones) at first, in a - # temporary location: - make install DESTDIR=$PKG/cruft || exit 1 - # Install gears and glinfo, as well as a few other demos: - mkdir -p $PKG/usr/bin - for demo in gears glinfo glthreads glxcontexts glxdemo glxgears \ - glxgears_fbconfig glxheads glxinfo glxpbdemo glxpixmap ; do - mv --verbose $PKG/cruft/usr/bin/$demo $PKG/usr/bin + -exec chmod 644 {} \+ + CFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix=/usr \ + --build=$ARCH-slackware-linux || exit 1 + make $NUMJOBS || exit 1 + # Install all the demos (including the pointless ones) at first, in a + # temporary location: + make install DESTDIR=$PKG/cruft || exit 1 + # Install gears and glinfo, as well as a few other demos: + mkdir -p $PKG/usr/bin + for demo in gears glinfo glthreads glxcontexts glxdemo glxgears \ + glxgears_fbconfig glxheads glxinfo glxpbdemo glxpixmap ; do + mv --verbose $PKG/cruft/usr/bin/$demo $PKG/usr/bin done - # Remove cruft: - rm -rf $PKG/cruft -) || exit 1 + # Remove cruft: + rm -rf $PKG/cruft + ) || exit 1 +fi # Strip binaries: find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ |