summaryrefslogtreecommitdiffstats
path: root/source/x/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'source/x/mesa')
-rwxr-xr-xsource/x/mesa/get-mesa.sh10
-rwxr-xr-xsource/x/mesa/mesa.SlackBuild82
-rw-r--r--source/x/mesa/mesa.no.mako.diff34
3 files changed, 90 insertions, 36 deletions
diff --git a/source/x/mesa/get-mesa.sh b/source/x/mesa/get-mesa.sh
index 253deeb4c..b88329984 100755
--- a/source/x/mesa/get-mesa.sh
+++ b/source/x/mesa/get-mesa.sh
@@ -11,10 +11,10 @@ HEADISAT="$(cat mesa/.git/packed-refs | grep "refs/remotes/origin/${BRANCH}$" |
# Cleanup. We're not packing up the whole git repo.
( cd mesa && find . -type d -name ".git*" -exec rm -rf {} \; 2> /dev/null )
DATE=$(date +%Y%m%d)
-mv mesa Mesa-${BRANCH}_${HEADISAT}
-tar cf MesaLib-${BRANCH}_${HEADISAT}.tar Mesa-${BRANCH}_${HEADISAT}
-xz -9 MesaLib-${BRANCH}_${HEADISAT}.tar
-rm -rf MesaLib-${BRANCH}_${HEADISAT}
+mv mesa mesa-${BRANCH}_${HEADISAT}
+tar cf mesa-${BRANCH}_${HEADISAT}.tar mesa-${BRANCH}_${HEADISAT}
+xz -9 mesa-${BRANCH}_${HEADISAT}.tar
+rm -rf mesa-${BRANCH}_${HEADISAT}
echo
-echo "Mesa branch $BRANCH with HEAD at $HEADISAT packaged as MesaLib-${BRANCH}_${HEADISAT}.tar.xz"
+echo "Mesa branch $BRANCH with HEAD at $HEADISAT packaged as mesa-${BRANCH}_${HEADISAT}.tar.xz"
echo
diff --git a/source/x/mesa/mesa.SlackBuild b/source/x/mesa/mesa.SlackBuild
index 8d04e7fe0..af959695c 100755
--- a/source/x/mesa/mesa.SlackBuild
+++ b/source/x/mesa/mesa.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,18 +21,20 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PKGNAM=mesa
-VERSION=9.1.7
-DEMOVERS=8.1.0
+VERSION=${VERSION:-11.2.2}
+DEMOVERS=${DEMOVERS:-8.3.0}
BUILD=${BUILD:-1}
-NUMJOBS=${NUMJOBS:--j8}
+NUMJOBS=${NUMJOBS:--j7}
# Be sure this list is up-to-date:
-DRI_DRIVERS="i915,i965,intel,nouveau,r200,radeon,swrast"
+DRI_DRIVERS="i915,i965,nouveau,r200,radeon,swrast"
+GALLIUM_DRIVERS="nouveau,r300,r600,svga,radeonsi,swrast"
+EGL_PLATFORMS="drm,x11"
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
*) export ARCH=$( uname -m ) ;;
esac
@@ -42,8 +44,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-mesa
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
@@ -56,10 +58,10 @@ fi
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-rm -rf Mesa-${VERSION}
+rm -rf ${PKGNAM}-${VERSION}
-tar xvf $CWD/MesaLib-${VERSION}.tar.?z* || exit 1
-cd Mesa-$VERSION
+tar xvf $CWD/${PKGNAM}-${VERSION}.tar.xz || exit 1
+cd ${PKGNAM}-$VERSION
# Let's kill the warning about operating on a dangling symlink:
rm -f src/gallium/state_trackers/d3d1x/w32api
@@ -74,20 +76,26 @@ find . \
# Apply patches from git (and maybe elsewhere):
# Patches obtained by:
-# git checkout origin/8.0
-# git format-patch 3d657b14b4cab98a2945904823e78cd8950944f4.. # 8.0.3 release
+# git checkout origin/11.2
+# git format-patch 5de088f7da75cc0209ff1602ed70aff14f733e4b # 11.2.2 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 ;
+ patch -p1 < $patch || exit 1 ;
done
fi
-if [ ! -r configure ]; then
- autoreconf || exit 1
-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
-# Running autogen to avoid problems if our autotools don't match upstream's:
-./autogen.sh
+# Fix detection of libLLVM when built with CMake
+sed -i 's/LLVM_SO_NAME=.*/LLVM_SO_NAME=LLVM/' configure.ac
+
+# Seems to need this to avoid tripping over a different libtool version:
+autoreconf -fi
CFLAGS="$SLKCFLAGS" \
./configure \
@@ -95,19 +103,31 @@ CFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
- --docdir=/usr/doc/mesa-$VERSION \
+ --docdir=/usr/doc/${PKGNAM}-$VERSION \
--with-dri-driverdir=/usr/lib${LIBDIRSUFFIX}/xorg/modules/dri \
--with-dri-drivers="$DRI_DRIVERS" \
- --with-gallium-drivers=nouveau,r300,r600,svga \
+ --with-gallium-drivers="$GALLIUM_DRIVERS" \
+ --with-egl-platforms="$EGL_PLATFORMS" \
--enable-gallium-llvm \
+ --enable-llvm-shared-libs \
+ --enable-egl \
+ --enable-texture-float \
--enable-shared-glapi \
--enable-xa \
+ --enable-nine \
--enable-osmesa \
+ --enable-dri \
+ --enable-dri3 \
+ --enable-gbm \
+ --enable-glx \
+ --enable-glx-tls \
+ --enable-gles1 \
+ --enable-gles2 \
+ --enable-vdpau \
--build=$ARCH-slackware-linux
-# r300 requires llvm
-# Other gallium drivers:
-# galahad,i915,identity,llvmpipe,noop,nv50,nvc0,nvfx,rbug,softpipe,svga,trace
+# This is autodetected anyway:
+# --enable-va \
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
@@ -122,7 +142,7 @@ make install DESTDIR=$PKG || exit 1
\( -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 {} \;
+ -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
@@ -139,7 +159,7 @@ make install DESTDIR=$PKG || exit 1
cp -a src/xdemos/$i $PKG/usr/bin ;
done
)
-
+
# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -153,12 +173,12 @@ if [ -d $PKG/usr/info ]; then
gzip -9 $PKG/usr/info/*
fi
-mkdir -p $PKG/usr/doc/Mesa-$VERSION/html
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/html
cp -a \
- docs/COPYING* docs/relnotes-${VERSION}*.html docs/README* docs/GL* \
- $PKG/usr/doc/Mesa-$VERSION
-cp -a docs/*.html $PKG/usr/doc/Mesa-$VERSION/html
-rm -f $PKG/usr/doc/Mesa-$VERSION/html/relnotes*.html
+ docs/COPYING* docs/relnotes/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
diff --git a/source/x/mesa/mesa.no.mako.diff b/source/x/mesa/mesa.no.mako.diff
new file mode 100644
index 000000000..513589924
--- /dev/null
+++ b/source/x/mesa/mesa.no.mako.diff
@@ -0,0 +1,34 @@
+--- ./configure.ac.orig 2015-04-09 06:28:58.000000000 -0500
++++ ./configure.ac 2015-04-16 15:33:30.087481982 -0500
+@@ -114,19 +114,19 @@
+ fi
+ fi
+
+-AX_CHECK_PYTHON_MAKO_MODULE($PYTHON_MAKO_REQUIRED)
++dnl AX_CHECK_PYTHON_MAKO_MODULE($PYTHON_MAKO_REQUIRED)
+
+-if test -z "$PYTHON2"; then
+- if test ! -f "$srcdir/src/util/format_srgb.c"; then
+- AC_MSG_ERROR([Python not found - unable to generate sources])
+- fi
+-else
+- if test "x$acv_mako_found" = xno; then
+- if test ! -f "$srcdir/src/mesa/main/format_unpack.c"; then
+- AC_MSG_ERROR([Python mako module v$PYTHON_MAKO_REQUIRED or higher not found])
+- fi
+- fi
+-fi
++dnl if test -z "$PYTHON2"; then
++dnl if test ! -f "$srcdir/src/util/format_srgb.c"; then
++dnl AC_MSG_ERROR([Python not found - unable to generate sources])
++dnl fi
++dnl else
++dnl if test "x$acv_mako_found" = xno; then
++dnl if test ! -f "$srcdir/src/mesa/main/format_unpack.c"; then
++dnl AC_MSG_ERROR([Python mako module v$PYTHON_MAKO_REQUIRED or higher not found])
++dnl fi
++dnl fi
++dnl fi
+
+ AC_PROG_INSTALL
+