From 646a5c1cbfd95873950a87b5f75d52073a967023 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Mon, 28 May 2018 19:12:29 +0000 Subject: Mon May 28 19:12:29 UTC 2018 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. --- source/l/sdl/sdl.SlackBuild | 58 ++++++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 19 deletions(-) (limited to 'source/l/sdl/sdl.SlackBuild') diff --git a/source/l/sdl/sdl.SlackBuild b/source/l/sdl/sdl.SlackBuild index 80466266..9f886303 100755 --- a/source/l/sdl/sdl.SlackBuild +++ b/source/l/sdl/sdl.SlackBuild @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -# Copyright 2008, 2009, 2010, 2011, 2013, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2008, 2009, 2010, 2011, 2013, 2016, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,13 +20,16 @@ # 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=sdl VERSION=${VERSION:-$(echo SDL-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} IMAGE=${IMAGE:-$(echo SDL_image-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} MIXER=${MIXER:-$(echo SDL_mixer-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} NET=${NET:-$(echo SDL_net-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} TTF=${TTF:-$(echo SDL_ttf-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-4} +BUILD=${BUILD:-7} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -38,6 +41,14 @@ if [ -z "$ARCH" ]; then esac fi +# 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 + NUMJOBS=${NUMJOBS:-" -j7 "} if [ "$ARCH" = "i586" ]; then @@ -54,7 +65,6 @@ else LIBDIRSUFFIX="" fi -CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-sdl @@ -86,12 +96,14 @@ CFLAGS="$SLKCFLAGS" \ --disable-esd \ --enable-shared=yes \ --enable-static=no \ - --disable-x11-shared + --disable-x11-shared || exit 1 make $NUMJOBS || make || exit 1 # Spam /, for mixer/image later on: -make install +make install || exit 1 +# Later we will need to remove .la files installed to the system by the above. + # install to package: make install DESTDIR=$PKG || exit 1 mkdir -p $PKG/usr/doc/SDL-$VERSION/html @@ -108,7 +120,7 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cd $TMP rm -rf SDL_image-$IMAGE tar xf $CWD/SDL_image-$IMAGE.tar.?z* || exit 1 -cd SDL_image-$IMAGE +cd SDL_image-$IMAGE || exit 1 chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -126,7 +138,7 @@ CFLAGS="$SLKCFLAGS" \ --enable-static=no \ --enable-jpg-shared=no \ --enable-png-shared=no \ - --enable-tif-shared=no + --enable-tif-shared=no || exit 1 make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 @@ -139,23 +151,24 @@ cp -a \ cd $TMP rm -rf SDL_mixer-$MIXER tar xf $CWD/SDL_mixer-$MIXER.tar.?z* || exit 1 -cd SDL_mixer-$MIXER +cd SDL_mixer-$MIXER || exit 1 # Fix default library path. Don't use /usr/local, and use lib64 where needed: sed -i "s,usr/local/lib,usr/lib${LIBDIRSUFFIX},g" timidity/config.h # Install patched static libmikmod: -unzip libmikmod-3.1.12.zip -( cd libmikmod-3.1.12.patched +tar xf $CWD/libmikmod-3.1.20.tar.xz +( cd libmikmod-3.1.20 + CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr/local \ --libdir=/usr/local/lib${LIBDIRSUFFIX} \ --with-pic \ --enable-shared=no \ - --enable-static=yes + --enable-static=yes || exit 1 make $NUMJOBS || make || exit 1 - make install -) + make install || exit 1 +) || exit 1 chown -R root:root . find . \ @@ -171,7 +184,7 @@ CFLAGS="$SLKCFLAGS" \ --mandir=/usr/man \ --enable-music-mod \ --enable-shared=yes \ - --enable-static=no + --enable-static=no || exit 1 make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 @@ -188,7 +201,7 @@ sed -i -e "s/ -lmikmod//g" $PKG/usr/lib${LIBDIRSUFFIX}/libSDL_mixer.la cd $TMP rm -rf SDL_net-$NET tar xf $CWD/SDL_net-$NET.tar.?z* || exit 1 -cd SDL_net-$NET +cd SDL_net-$NET || exit 1 chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -202,7 +215,7 @@ CFLAGS="$SLKCFLAGS" \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --mandir=/usr/man \ --enable-shared=yes \ - --enable-static=no + --enable-static=no || exit 1 make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 @@ -216,7 +229,7 @@ cp -a \ cd $TMP rm -rf SDL_ttf-$TTF tar xf $CWD/SDL_ttf-$TTF.tar.?z* || exit 1 -cd SDL_ttf-$TTF +cd SDL_ttf-$TTF || exit 1 #zcat $CWD/SDL_ttf-2.0.8-noftinternals.diff.gz | patch -p1 --verbose || exit 1 zcat $CWD/SDL_ttf.shaded.text.diff.gz | patch -p1 --verbose || exit 1 @@ -234,7 +247,7 @@ CFLAGS="$SLKCFLAGS" \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --mandir=/usr/man \ --enable-shared=yes \ - --enable-static=no + --enable-static=no || exit 1 make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 @@ -244,6 +257,13 @@ cp -a \ CHANGES COPYING README \ $PKG/usr/doc/SDL_ttf-$TTF +# Remove .la files from the package and the system (due to make install): +pushd $PKG + for lafile in usr/lib${LIBDIRSUFFIX}/*.la ; do + rm -f ${lafile} /${lafile} + done +popd + find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -- cgit v1.2.3