summaryrefslogtreecommitdiff
path: root/source/l/sdl
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2018-05-28 19:12:29 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 23:39:35 +0200
commit646a5c1cbfd95873950a87b5f75d52073a967023 (patch)
treeb8b8d2ab3b0d432ea69ad1a64d1c789649d65020 /source/l/sdl
parentd31c50870d0bee042ce660e445c9294a59a3a65b (diff)
downloadcurrent-646a5c1cbfd95873950a87b5f75d52073a967023.tar.gz
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/l/sdl')
-rwxr-xr-xsource/l/sdl/sdl.SlackBuild58
-rw-r--r--source/l/sdl/slack-desc12
2 files changed, 45 insertions, 25 deletions
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
diff --git a/source/l/sdl/slack-desc b/source/l/sdl/slack-desc
index 1d5d5c01..3ee1d457 100644
--- a/source/l/sdl/slack-desc
+++ b/source/l/sdl/slack-desc
@@ -1,8 +1,8 @@
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
@@ -12,8 +12,8 @@ sdl: This is the Simple DirectMedia Layer, a generic API that provides low
sdl: level access to audio, keyboard, mouse, joystick, 3D hardware via
sdl: OpenGL, and 2D framebuffer across multiple platforms.
sdl:
-sdl: SDL links against alsa-lib, arts, audiofile, esound, and the X11
-sdl: libraries. Make sure all of these are installed if you're planning to
-sdl: use SDL (a full installation will cover all of the prerequisites).
+sdl: SDL links against alsa-lib, audiofile, esound, and the X11 libraries.
+sdl: Make sure all of these are installed if you're planning to use SDL
+sdl: (a full installation will cover all of the prerequisites).
sdl:
sdl: