From 01bdba68759dd7f3361b5367d5a8366de0c0edbe Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Thu, 19 Apr 2018 22:13:38 +0200 Subject: deps: synced mesa and xorg-server to the Slackware versions --- deps/mesa/mesa.SlackBuild | 21 +++++++-- deps/xorg-server/xorg-server.SlackBuild | 75 ++++++++++++++++++--------------- 2 files changed, 57 insertions(+), 39 deletions(-) (limited to 'deps') diff --git a/deps/mesa/mesa.SlackBuild b/deps/mesa/mesa.SlackBuild index 81911e6..7708915 100755 --- a/deps/mesa/mesa.SlackBuild +++ b/deps/mesa/mesa.SlackBuild @@ -20,8 +20,11 @@ # 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:-17.3.6} +VERSION=${VERSION:-18.0.1} DEMOVERS=${DEMOVERS:-8.4.0} BUILD=${BUILD:-1} @@ -40,7 +43,14 @@ 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 @@ -65,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 @@ -135,6 +145,9 @@ CFLAGS="$SLKCFLAGS" \ make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 +# 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 @@ -157,7 +170,7 @@ export CWD SLKCFLAGS NUMJOBS PKG make $NUMJOBS || exit 1 # Install all the demos (including the pointless ones) at first, in a # temporary location: - make install DESTDIR=$PKG/cruft + 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 \ diff --git a/deps/xorg-server/xorg-server.SlackBuild b/deps/xorg-server/xorg-server.SlackBuild index 1921d5a..dc96755 100755 --- a/deps/xorg-server/xorg-server.SlackBuild +++ b/deps/xorg-server/xorg-server.SlackBuild @@ -30,45 +30,47 @@ PKGNAM=xorg-server VERSION=${VERSION:-1.19.6} BUILD=${BUILD:-2} -CWD=$(pwd) +cd $(dirname $0) ; CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-$PKGNAM -if [ -e $CWD/machine.conf ]; then - . $CWD/machine.conf ] -elif [ -e /etc/slackbuild/machine.conf ]; then - . /etc/slackbuild/machine.conf ] +# Automatically determine the architecture we're building on: +MARCH=$( uname -m ) +if [ -z "$ARCH" ]; then + case "$MARCH" in + i?86) export ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$MARCH ;; + esac +fi + +# If this variable is passed to the script, nothing will be built. +# Instead, a list of packages to be built will be output. +if [ ! -z "$PRINT_PACKAGE_NAME" ]; then + echo "${PKGNAME}-${VERSION}-${ARCH}-${BUILD}.txz" + exit 0 +fi + +# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX: +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "armv7hl" ]; then + SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "arm" ]; then + SLKCFLAGS="-O2 -march=armv5te" + LIBDIRSUFFIX="" else - # Automatically determine the architecture we're building on: - MARCH=$( uname -m ) - if [ -z "$ARCH" ]; then - case "$MARCH" in - i?86) export ARCH=i486 ;; - arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; - # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$MARCH ;; - esac - fi - # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX: - if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" - elif [ "$ARCH" = "s390" ]; then - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" - elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" - elif [ "$ARCH" = "armv7hl" ]; then - SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16" - LIBDIRSUFFIX="" - elif [ "$ARCH" = "arm" ]; then - SLKCFLAGS="-O2 -march=armv5te" - LIBDIRSUFFIX="" - else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" - fi + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi case "$ARCH" in @@ -235,6 +237,9 @@ rmdir $PKG/var 2>/dev/null find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \ grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +# Don't ship .la files: +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + # Compress and link manpages, if any: if [ -d $PKG/usr/man ]; then ( cd $PKG/usr/man -- cgit v1.2.3