diff options
Diffstat (limited to 'deps/mesa')
-rw-r--r-- | deps/mesa/doinst.sh | 13 | ||||
-rwxr-xr-x | deps/mesa/mesa.SlackBuild | 74 | ||||
-rw-r--r-- | deps/mesa/mesa.no.mako.diff.gz | bin | 425 -> 0 bytes |
3 files changed, 61 insertions, 26 deletions
diff --git a/deps/mesa/doinst.sh b/deps/mesa/doinst.sh new file mode 100644 index 0000000..42c4667 --- /dev/null +++ b/deps/mesa/doinst.sh @@ -0,0 +1,13 @@ +#!/bin/sh +config() { + NEW="$1" + OLD="`dirname $NEW`/`basename $NEW .new`" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} +config etc/drirc.new diff --git a/deps/mesa/mesa.SlackBuild b/deps/mesa/mesa.SlackBuild index 24f1b3d..7708915 100755 --- a/deps/mesa/mesa.SlackBuild +++ b/deps/mesa/mesa.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# 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,19 @@ # 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:-12.0.1} -DEMOVERS=${DEMOVERS:-8.3.0} +VERSION=${VERSION:-18.0.1} +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,wayland" if [ -z "$ARCH" ]; then @@ -40,16 +43,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 +75,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 +90,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 +118,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 +135,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 +145,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 +166,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 \ @@ -182,6 +203,7 @@ rm -f $PKG/usr/doc/$PKGNAM-$VERSION/html/relnotes*.html mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz diff --git a/deps/mesa/mesa.no.mako.diff.gz b/deps/mesa/mesa.no.mako.diff.gz Binary files differdeleted file mode 100644 index ab6aa29..0000000 --- a/deps/mesa/mesa.no.mako.diff.gz +++ /dev/null |