ponce |
05-31-2009 08:54 AM |
slackware64 - enemy territory - et-sdl-sound
hi fellas!
as a Wolfenstein Enemy Territory freak I tried it on slackware64-current, so I used 32 bit compatibility libs and the latest beta nvidia installer (the fat one, that asks you also if you want to install 32bit GL comp. libs).
I tried to use with ET a library that preloaded makes sound output on sdl (alsa), but also after having added preloading of the .so file in the main binary launch script I discovered I had mute sound :(
so, looking at the error messages I found that sdl output needed also sdl-compat32 and svgalib-compat32 libraries (i packaged following slackbuilds of the others compat32 libs).
and now ET sounds well! Jahahaa! :D
maybe this should be useful to other ET bros ;)
P.S. here are the two slackbuilds
Code:
#!/bin/sh
# Copyright 2006, 2007, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PKGNAM=svgalib
VERSION=${VERSION:-1.9.25}
ARCH=${ARCH:-x86_64}
BUILD=${BUILD:-9ponce}
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-svgalib-compat32
rm -rf $PKG
mkdir -p $TMP $PKG
export CC="gcc -m32"
SLKCFLAGS="-O2 -fPIC"
SLKLDFLAGS="-L/usr/lib"
LIBDIRSUFFIX=""
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
cd ${PKGNAM}-$VERSION || exit 1
# Make sure ownerships and permissions are sane:
chown -R root:root .
find . -perm 666 -exec chmod 644 {} \;
find . -perm 664 -exec chmod 644 {} \;
find . -perm 600 -exec chmod 644 {} \;
find . -perm 444 -exec chmod 644 {} \;
find . -perm 400 -exec chmod 644 {} \;
find . -perm 440 -exec chmod 644 {} \;
find . -perm 777 -exec chmod 755 {} \;
find . -perm 775 -exec chmod 755 {} \;
find . -perm 511 -exec chmod 755 {} \;
find . -perm 711 -exec chmod 755 {} \;
find . -perm 555 -exec chmod 755 {} \;
find . -name "*.h" -exec chmod 644 {} \;
zcat $CWD/svgalib.prefix.diff.gz | patch -p1 --verbose || exit 1
zcat $CWD/svgalib-1.9.25-kernel-2.6.26.diff.gz | patch -p1 --verbose || exit 1
zcat $CWD/svgalib.nohelper.diff.gz | patch -p1 --verbose || exit 1
# Build and install - spamming your partition first...:
make install \
TOPDIR=$PKG \
prefix=$PKG/usr \
mandir=$PKG/usr/man \
sharedlibdir=$PKG/usr/lib${LIBDIRSUFFIX} \
MANFORMAT=compressed \
NO_HELPER=y \
|| exit 1
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
rm -rf $PKG/usr/{bin,sbin,info,share,doc,man,include} $PKG/etc
cd $PKG
/sbin/makepkg -l y -c n $TMP/$PKGNAM-compat32-$VERSION-$ARCH-$BUILD.txz
Code:
#!/bin/sh
# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
VERSION=1.2.13
ARCH=${ARCH:-x86_64}
BUILD=${BUILD:-2ponce}
NUMJOBS=${NUMJOBS:-" -j4 "}
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-sdl-compat32
export CC="gcc -m32"
SLKCFLAGS="-O2 -fPIC"
SLKLDFLAGS="-L/usr/lib"
LIBDIRSUFFIX=""
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf sdl-$VERSION
tar xjf $CWD/SDL-$VERSION.tar.bz2 || exit 1
cd SDL-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
# We must use --disable-x11-shared or programs linked with SDL will
# crash on machines that use the closed source nVidia drivers.
LDFLAGS="$SLKLDFLAGS" \
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--enable-shared=yes \
--enable-static=no \
--disable-x11-shared
make $NUMJOBS || make || exit 1
# install to package:
make install DESTDIR=$PKG || exit 1
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
rm -rf $PKG/usr/{bin,sbin,info,share,doc,man,include}
cd $PKG
/sbin/makepkg -l y -c n $TMP/sdl-compat32-$VERSION-$ARCH-$BUILD.txz
|