# Below I just blow away existing library files before running 'make
# install' to ensure that extra files aren't left behind that are no longer
# needed. If you run a production system with multiple local users that may
# be using apps that are linked with libSDL, you'll want to skip that part
# below and you should clean up old files manually after you're done
# installing SDL.
# FYI, when I was running Slackware 11.0, this would not build for me
# with the Slackware kernel headers for 2.6 from 'testing', but was OK
# with the regular (2.4) kernel headers package.
cd
test -f installed/SDL/SDL-1.2.13.tar.gz &&
mv installed/SDL/SDL-1.2.13.tar.gz .
test ! -f SDL-1.2.13.tar.gz &&
wget http://www.libsdl.org/release/SDL-1.2.13.tar.gz
# Verify tarball w/ md5sum:
# (this came from my gpg-verified tarball)
echo "c6660feea2a6834de10bc71b2f8e4d88 SDL-1.2.13.tar.gz" | md5sum -c
# Verify tarball w/ sha1sum:
# (this also came from my gpg-verified tarball)
echo "51fcaa3e1d5c01fd813ea08688780f86b19cf539 SDL-1.2.13.tar.gz" | \
sha1sum -c
cd src/SDL
find -maxdepth 1 -type d -name "SDL-*" -exec rm -r {} \;
tar xzvf ~/SDL-1.2.13.tar.gz
cd SDL-1.2.13
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr
make
# Become root to install it
su
test -x /sbin/removepkg && /sbin/removepkg sdl
# This will zap the include directory if you have an old version of SDL
# installed, which I do to try to avoid having old deprecated files taking
# up space
test -d /usr/include/SDL && rm -r /usr/include/SDL
cd
rm -f installed/SDL-*.tar.* installed/SDL/SDL-*.tar.*
mv SDL-1.2.13.tar.gz installed/SDL/
# SDL Libraries
# =============
# Install these if the SDL-using application that you're compiling requires
# them. At the bottom is SDL_Perl (SDL bindings for perl).
# SDL_image 1.2.6
# ===============
# Apps/libs/games that I know of that use this one are:
# (the list will be updated as I come across others)
# Frozen Bubble
cd
test -f installed/SDL/sdlconsole-2.1.tar.gz &&
mv installed/SDL/sdlconsole-2.1.tar.gz .
test ! -f sdlconsole-2.1.tar.gz &&
wget http://easynews.dl.sourceforge.net/sourceforge/sdlconsole/\
sdlconsole-2.1.tar.gz
cd src/SDL
find -maxdepth 1 -type d -name "sdlconsole-*" -exec rm -r {} \;
tar xzvf ~/sdlconsole-2.1.tar.gz
cd sdlconsole-2.1
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr
make
su -c "make install ; ldconfig"
cd
rm -f installed/SDL/sdlconsole-*.tar.*
mv sdlconsole-2.1.tar.gz installed/SDL/
# SMPEG
# =====
# The prerequisites are only current as of the time that I wrote this
# because you'll be getting the software from CVS, they may change by the
# time you install SMPEG.
#
# Prerequisites (beyond those listed above):
# autoconf (to create ./configure, etc.)
# cvs (to get SMPEG itself)
# SDL >= 1.2.0
# GTK+ >= 1.2.1
#
# Note: to update smpeg after you first check it out, cd into the source
# directory and run 'cvs update'.
# If you have any trouble updating a version of CVS, just blow it away and
# check out a new copy.
cd ~/src/SDL
test -d ./smpeg && ( cd smpeg ; svn up )
test ! -d ./smpeg &&
svn co svn://svn.icculus.org/smpeg/trunk smpeg
cd smpeg
test -f Makefile && make distclean
./autogen.sh
./configure --prefix=/usr
make
su -c "make install"
cd
echo "SMPEG was installed from Subversion" > installed/SDL/SMPEG.README
echo "Source is in ~/src/SDL/smpeg" >> installed/SDL/SMPEG.README
# SDL_mixer 1.2.8
# ===============
# Apps/libs/games that I know of that use this one are:
# Frozen Bubble
# With previous versions of SDL_mixer I had to pass --disable-smpegtest
# to configure, but that is no longer required for SDL_mixer 1.2.8 and
# SMPEG from Subversion.
cd
test -f installed/SDL/SDL_mixer-1.2.8.tar.gz &&
mv installed/SDL/SDL_mixer-1.2.8.tar.gz .
test ! -f SDL_mixer-1.2.8.tar.gz &&
wget http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.8.tar.gz
cd src/SDL
find -maxdepth 1 -type d -name "SDL_mixer-*" -exec rm -r {} \;
tar xzvf ~/SDL_mixer-1.2.8.tar.gz
cd SDL_mixer-1.2.8
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr --disable-smpegtest
make
su -c "make install ; ldconfig"
cd
rm -f installed/SDL/SDL_mixer-*.tar.*
mv SDL_mixer-1.2.8.tar.gz installed/SDL/
cd
test -f installed/SDL/SDL_ttf-2.0.9.tar.gz &&
mv installed/SDL/SDL_ttf-2.0.9.tar.gz .
test ! -f SDL_ttf-2.0.9.tar.gz &&
wget http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.9.tar.gz
cd src/SDL
find -maxdepth 1 -type d -name "SDL_ttf-*" -exec rm -r {} \;
tar xzvf ~/SDL_ttf-2.0.9.tar.gz
cd SDL_ttf-2.0.9
test $UID = 0 && chown -R root:root .
# Apply this patch from the freetype folks to update SDL_ttf for freetype
# 2.2.x If it can't figure out what file to patch, type in SDL_ttf.c
wget -nc http://freetype.sourceforge.net/freetype2/patches/\
SDL_ttf-2.0.7-noftinternals.patch &&
patch -p1 < SDL_ttf-2.0.7-noftinternals.patch
./configure --prefix=/usr
make
# Become root to install it
su
rm -f /usr/lib/libSDL_ttf*
make install
ldconfig
# Become yourself again
exit
cd
rm -f installed/SDL/SDL_ttf-*.tar.*
mv SDL_ttf-2.0.9.tar.gz installed/SDL/
# SDL_gfx 2.0.13
# ==============
# Apps/libs/games that I know of that use this one are:
# ClanLib
# Prerequisites (beyond those listed above):
# SDL >= 1.2.0
cd
test -f installed/SDL/SDL_gfx-2.0.13.tar.gz &&
mv installed/SDL/SDL_gfx-2.0.13.tar.gz .
test ! -f SDL_gfx-2.0.13.tar.gz &&
wget http://www.ferzkopp.net/Software/SDL_gfx-2.0/\
SDL_gfx-2.0.13.tar.gz
cd src/SDL
find -maxdepth 1 -type d -name "SDL_gfx-*" -exec rm -r {} \;
tar xzvf ~/SDL_gfx-2.0.13.tar.gz
cd SDL_gfx-2.0.13
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr
make
# Become root to install it
su
rm -f /usr/lib/libSDL_gfx*
make install
ldconfig
# Become yourself again
exit
cd
rm -f installed/SDL/SDL_gfx-*.tar.*
mv SDL_gfx-2.0.13.tar.gz installed/SDL/
# SDL_Pango 0.1.2
# ===============
# Apps/libs/games that I know of that use this one are:
# Frozen Bubble
cd
test -f installed/SDL/SDL_Pango-0.1.2.tar.gz &&
mv installed/SDL/SDL_Pango-0.1.2.tar.gz .
test ! -f SDL_Pango-0.1.2.tar.gz &&
wget http://downloads.sf.net/sdlpango/SDL_Pango-0.1.2.tar.gz
cd src/SDL
find -maxdepth 1 -type d -name "SDL_Pango-*" -exec rm -r {} \;
tar xzvf ~/SDL_Pango-0.1.2.tar.gz
cd SDL_Pango-0.1.2
test $UID = 0 && chown -R root:root .
# Apply this patch if you'll be using SDL::Pango with Frozen Bubble 2.x:
wget -nc http://zarb.org/~gc/t/SDL_Pango-0.1.2-API-adds.patch &&
patch -p0 < SDL_Pango-0.1.2-API-adds.patch
./configure --prefix=/usr
make
# Become root to install it
su
rm -f /usr/lib/libSDL_Pango.*
make install
ldconfig
# Become yourself again
exit
cd
rm -f installed/SDL/SDL_Pango-*.tar.*
mv SDL_Pango-0.1.2.tar.gz installed/SDL/
# Fix a bug that is with Module::Build (according to what I've read)
# that causes the files to go into the wrong place. Replace these
# example paths with your actual ones:
mv /usr/lib/perl5/site_perl/5.8.8/i486-linux-thread-multi/auto/src/SDL* \
/usr/lib/perl5/site_perl/5.8.8/i486-linux-thread-multi/auto/
# Become yourself again
exit
cd
rm -f installed/SDL/SDL_perl-*.tar.* installed/SDL/SDL_Perl-*.tar.* \
installed/SDL/SDL-Perl-*.tar.*
mv SDL_Perl-2.1.3.tar.gz installed/SDL/