summaryrefslogtreecommitdiffstats
path: root/source/x/mesa/mesa.SlackBuild
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2018-05-28 19:12:29 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 23:39:35 +0200
commit646a5c1cbfd95873950a87b5f75d52073a967023 (patch)
treeb8b8d2ab3b0d432ea69ad1a64d1c789649d65020 /source/x/mesa/mesa.SlackBuild
parentd31c50870d0bee042ce660e445c9294a59a3a65b (diff)
downloadcurrent-646a5c1cbfd95873950a87b5f75d52073a967023.tar.gz
current-646a5c1cbfd95873950a87b5f75d52073a967023.tar.xz
Mon May 28 19:12:29 UTC 201820180528191229
a/pkgtools-15.0-noarch-13.txz: Rebuilt. installpkg: default line length for --terselength is the number of columns. removepkg: added --terse mode. upgradepkg: default line length for --terselength is the number of columns. upgradepkg: accept -option in addition to --option. ap/vim-8.1.0026-x86_64-1.txz: Upgraded. d/bison-3.0.5-x86_64-1.txz: Upgraded. e/emacs-26.1-x86_64-1.txz: Upgraded. kde/kopete-4.14.3-x86_64-8.txz: Rebuilt. Recompiled against libidn-1.35. n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded. n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded. n/libnftnl-1.1.0-x86_64-1.txz: Upgraded. n/links-2.16-x86_64-2.txz: Rebuilt. Rebuilt to enable X driver for -g mode. n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded. n/nftables-0.8.5-x86_64-1.txz: Upgraded. n/p11-kit-0.23.11-x86_64-1.txz: Upgraded. n/ulogd-2.0.7-x86_64-1.txz: Upgraded. n/whois-5.3.1-x86_64-1.txz: Upgraded. xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded. xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/x/mesa/mesa.SlackBuild')
-rwxr-xr-xsource/x/mesa/mesa.SlackBuild77
1 files changed, 49 insertions, 28 deletions
diff --git a/source/x/mesa/mesa.SlackBuild b/source/x/mesa/mesa.SlackBuild
index af959695c..99fc6399f 100755
--- a/source/x/mesa/mesa.SlackBuild
+++ b/source/x/mesa/mesa.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,16 +20,18 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PKGNAM=mesa
-VERSION=${VERSION:-11.2.2}
-DEMOVERS=${DEMOVERS:-8.3.0}
+VERSION=${VERSION:-$(echo $PKGNAM-1*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+DEMOVERS=${DEMOVERS:-8.4.0}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:--j7}
# Be sure this list is up-to-date:
DRI_DRIVERS="i915,i965,nouveau,r200,radeon,swrast"
-GALLIUM_DRIVERS="nouveau,r300,r600,svga,radeonsi,swrast"
+GALLIUM_DRIVERS="nouveau,r300,r600,svga,radeonsi,swrast,virgl"
EGL_PLATFORMS="drm,x11"
if [ -z "$ARCH" ]; then
@@ -40,16 +42,27 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-mesa
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
+ # I've heard some reports as of late 2016 that Vulkan has some issues on
+ # 32-bit, but we'll try it anyway and see if anything is reported:
+ VULKAN=" --with-vulkan-drivers=intel,radeon "
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+ VULKAN=" --with-vulkan-drivers=intel,radeon "
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
@@ -61,7 +74,7 @@ cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-${VERSION}.tar.xz || exit 1
-cd ${PKGNAM}-$VERSION
+cd ${PKGNAM}-$VERSION || exit 1
# Let's kill the warning about operating on a dangling symlink:
rm -f src/gallium/state_trackers/d3d1x/w32api
@@ -76,18 +89,14 @@ find . \
# Apply patches from git (and maybe elsewhere):
# Patches obtained by:
-# git checkout origin/11.2
-# git format-patch 5de088f7da75cc0209ff1602ed70aff14f733e4b # 11.2.2 release
+# 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 < $patch || exit 1 ;
done
fi
-# Don't worry if Mako is not present:
-#sed -i "s,AX_CHECK_PYTHON_MAKO_MODULE(\$PYTHON_MAKO_REQUIRED),,g" configure.ac
-zcat $CWD/mesa.no.mako.diff.gz | patch -p1 --verbose || exit 1
-
# This doesn't fully do the trick. See below. ;-)
#./autogen.sh
@@ -108,7 +117,8 @@ CFLAGS="$SLKCFLAGS" \
--with-dri-drivers="$DRI_DRIVERS" \
--with-gallium-drivers="$GALLIUM_DRIVERS" \
--with-egl-platforms="$EGL_PLATFORMS" \
- --enable-gallium-llvm \
+ $VULKAN \
+ --enable-llvm \
--enable-llvm-shared-libs \
--enable-egl \
--enable-texture-float \
@@ -124,7 +134,9 @@ CFLAGS="$SLKCFLAGS" \
--enable-gles1 \
--enable-gles2 \
--enable-vdpau \
- --build=$ARCH-slackware-linux
+ --enable-opencl \
+ --enable-opencl-icd \
+ --build=$ARCH-slackware-linux || exit 1
# This is autodetected anyway:
# --enable-va \
@@ -132,7 +144,14 @@ CFLAGS="$SLKCFLAGS" \
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-# Now install the demos
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+# Install /etc/drirc as a .new file:
+mv $PKG/etc/drirc $PKG/etc/drirc.new
+
+# 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
@@ -146,19 +165,20 @@ make install DESTDIR=$PKG || exit 1
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --build=$ARCH-slackware-linux
- # Build and install gears and glinfo, as well as a few other demos
- make -C src/demos gears glinfo
- make -C src/xdemos \
- glthreads glxcontexts glxdemo glxgears glxgears_fbconfig \
- glxheads glxinfo glxpbdemo glxpixmap
+ --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
- cp -a src/demos/{gears,glinfo} $PKG/usr/bin
- for i in glthreads glxcontexts glxdemo glxgears glxgears_fbconfig \
- glxheads glxinfo glxpbdemo glxpixmap ; do
- cp -a src/xdemos/$i $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
# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
@@ -175,13 +195,14 @@ fi
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/html
cp -a \
- docs/COPYING* docs/relnotes/relnotes-${VERSION}*.html docs/README* docs/GL* \
+ docs/COPYING* docs/relnotes/${VERSION}.html docs/README* docs/GL* \
$PKG/usr/doc/$PKGNAM-$VERSION
cp -a docs/*.html $PKG/usr/doc/$PKGNAM-$VERSION/html
rm -f $PKG/usr/doc/$PKGNAM-$VERSION/html/relnotes*.html
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz