aboutsummaryrefslogtreecommitdiff
path: root/patches/sdl
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-07-31 20:45:44 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-07-31 20:45:44 +0000
commit3ae891bbbaa3f96365f4c9fbe49e5cee26183fbc (patch)
tree59f0163f13e99eefb959385243c564c5662bc5c2 /patches/sdl
downloadslackbuilds-3ae891bbbaa3f96365f4c9fbe49e5cee26183fbc.tar.gz
slackbuilds-3ae891bbbaa3f96365f4c9fbe49e5cee26183fbc.tar.bz2
initial import
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'patches/sdl')
-rw-r--r--patches/sdl/libdir-fix.diff.gzbin0 -> 323 bytes
-rwxr-xr-xpatches/sdl/sdl.SlackBuild201
-rw-r--r--patches/sdl/slack-desc19
3 files changed, 220 insertions, 0 deletions
diff --git a/patches/sdl/libdir-fix.diff.gz b/patches/sdl/libdir-fix.diff.gz
new file mode 100644
index 00000000..b34d6945
--- /dev/null
+++ b/patches/sdl/libdir-fix.diff.gz
Binary files differ
diff --git a/patches/sdl/sdl.SlackBuild b/patches/sdl/sdl.SlackBuild
new file mode 100755
index 00000000..ba3fb9c4
--- /dev/null
+++ b/patches/sdl/sdl.SlackBuild
@@ -0,0 +1,201 @@
+#!/bin/bash
+#
+# got it from ftp://ftp.slackware.com/pub/slackware/slackware-10.2/source/l/sdl/sdl.SlackBuild
+# small changes by rhatto
+#
+
+CWD="`pwd`"
+
+if [ -f "/etc/slackbuildrc" ]; then
+ source /etc/slackbuildrc
+fi
+
+if [ -f "~/.slackbuildrc" ]; then
+ source ~/.slackbuildrc
+fi
+
+PACKAGE="sdl"
+VERSION=${VERSION:=1.2.11}
+ARCH=${ARCH:=x86_64}
+BUILD=${BUILD:=1rha}
+SRC_DIR=${SRC:=$CWD}
+TMP=${TMP:=/tmp}
+
+IMAGE=${IMAGE:=1.2.5}
+MIXER=${MIXER:=1.2.7}
+NET=${NET:=1.2.6}
+TTF=${TTF:=2.0.8}
+
+RTOOL="wget"
+PACKAGE_EXT="gz"
+SRC="SDL-$VERSION.tar.$PACKAGE_EXT"
+SRC_image="SDL_image-$IMAGE.tar.gz"
+SRC_mixer="SDL_mixer-$MIXER.tar.gz"
+SRC_net="SDL_net-$NET.tar.gz"
+SRC_ttf="SDL_ttf-$TTF.tar.gz"
+URL="http://www.libsdl.org/release/$SRC"
+URL_LIB="http://www.libsdl.org/projects"
+
+if [ "$PACKAGE_EXT" == "bz2" ]; then
+ tarflag="j"
+else
+ tarflag="z"
+fi
+
+SRC_DIR="$SRC_DIR/$PACKAGE"
+TMP="$TMP/$PACKAGE"
+mkdir -p $SRC_DIR $TMP
+
+if [ "$RTOOL" == "wget" ]; then
+ if [ ! -f "$SRC_DIR/$SRC" ]; then
+ wget "$URL/$SRC" -O "$SRC_DIR/$SRC"
+ fi
+ if [ ! -f "$SRC_DIR/$SRC_image" ]; then
+ wget "$URL_LIB/SDL_image/release/$SRC_image" -O "$SRC_DIR/$SRC_image"
+ fi
+ if [ ! -f "$SRC_DIR/$SRC_mixer" ]; then
+ wget "$URL_LIB/SDL_mixer/release/$SRC_mixer" -O "$SRC_DIR/$SRC_mixer"
+ fi
+ if [ ! -f "$SRC_DIR/SDL_net-$NET.tar.gz" ]; then
+ wget "$URL_LIB/SDL_net/release/$SRC_net" -O "$SRC_DIR/$SRC_net"
+ fi
+ if [ ! -f "$SRC_DIR/SDL_ttf-$TTF.tar.gz" ]; then
+ wget "$URL_LIB/SDL_ttf/release/$SRC_ttf" -O "$SRC_DIR/$SRC_ttf"
+ fi
+fi
+
+PKG="$TMP/package-$PACKAGE"
+
+LIBDIR=/usr/lib
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR=/usr/lib64
+fi
+rm -rf $PKG
+mkdir -p $PKG
+cd $TMP
+rm -rf sdl-$VERSION
+tar xf$tarflag $SRC_DIR/$SRC
+cd SDL-$VERSION
+if [ "$ARCH" == "x86_64" ]; then
+ gzip -dc $CWD/libdir-fix.diff.gz | patch -p1
+fi
+chown -R root.root .
+find . -perm 777 -exec chmod 755 {} \;
+find . -perm 664 -exec chmod 644 {} \;
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --enable-shared=yes \
+ --libdir=$LIBDIR \
+ --enable-static=no
+make -j3
+# Spam /, for mixer/image later on:
+make install
+# install to package:
+make install DESTDIR=$PKG
+mkdir -p $PKG/usr/doc/SDL-$VERSION/html
+cp -a docs/index.html $PKG/usr/doc/SDL-$VERSION
+cp -a docs/html/*.html $PKG/usr/doc/SDL-$VERSION/html
+cp -a BUGS COPYING CREDITS INSTALL README* TODO WhatsNew $PKG/usr/doc/SDL-$VERSION
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Add SDL_image:
+cd $TMP
+rm -rf SDL_image-$IMAGE
+tar xf$tarflag $SRC_DIR/$SRC_image
+cd SDL_image-$IMAGE
+chown -R root.root .
+find . -perm 777 -exec chmod 755 {} \;
+find . -perm 664 -exec chmod 644 {} \;
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --enable-shared=yes \
+ --libdir=$LIBDIR \
+ --enable-static=no
+make -j3
+make install DESTDIR=$PKG
+mkdir -p $PKG/usr/doc/SDL_image-$IMAGE
+cp -a \
+ CHANGES COPYING README \
+ $PKG/usr/doc/SDL_image-$IMAGE
+
+# Add SDL_mixer:
+cd $TMP
+rm -rf SDL_mixer-$MIXER
+tar xf$tarflag $SRC_DIR/$SRC_mixer
+cd SDL_mixer-$MIXER
+chown -R root.root .
+find . -perm 777 -exec chmod 755 {} \;
+find . -perm 664 -exec chmod 644 {} \;
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --enable-shared=yes \
+ --libdir=$LIBDIR \
+ --enable-static=no
+make -j3
+make install DESTDIR=$PKG
+mkdir -p $PKG/usr/doc/SDL_mixer-$MIXER
+cp -a \
+ CHANGES COPYING README \
+ $PKG/usr/doc/SDL_mixer-$MIXER
+
+# Add SDL_net:
+cd $TMP
+rm -rf SDL_net-$NET
+tar xf$tarflag $SRC_DIR/$SRC_net
+cd SDL_net-$NET
+chown -R root.root .
+find . -perm 777 -exec chmod 755 {} \;
+find . -perm 664 -exec chmod 644 {} \;
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --enable-shared=yes \
+ --libdir=$LIBDIR \
+ --enable-static=no
+make -j3
+make install DESTDIR=$PKG
+mkdir -p $PKG/usr/doc/SDL_net-$NET
+cp -a \
+ CHANGES COPYING README \
+ $PKG/usr/doc/SDL_net-$NET
+
+# Add SDL_ttf:
+cd $TMP
+rm -rf SDL_ttf-$TTF
+tar xf$tarflag $SRC_DIR/$SRC_ttf
+cd SDL_ttf-$TTF
+chown -R root.root .
+find . -perm 777 -exec chmod 755 {} \;
+find . -perm 664 -exec chmod 644 {} \;
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --enable-shared=yes \
+ --libdir=$LIBDIR \
+ --enable-static=no
+make -j3
+make install DESTDIR=$PKG
+mkdir -p $PKG/usr/doc/SDL_ttf-$TTF
+cp -a \
+ CHANGES COPYING README \
+ $PKG/usr/doc/SDL_ttf-$TTF
+
+chown -R root.bin $PKG/usr/bin
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+gzip -9 $PKG/usr/man/man?/*.?
+
+cd $PKG
+makepkg -l y -c n ../sdl-$VERSION-$ARCH-$BUILD.tgz
+
diff --git a/patches/sdl/slack-desc b/patches/sdl/slack-desc
new file mode 100644
index 00000000..1d5d5c01
--- /dev/null
+++ b/patches/sdl/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# 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
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+sdl: sdl (Simple DirectMedia Layer library)
+sdl:
+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: