LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   slackware64 - enemy territory - et-sdl-sound (https://www.linuxquestions.org/questions/slackware-14/slackware64-enemy-territory-et-sdl-sound-729663/)

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


ROXR 06-02-2009 04:26 AM

Hello, thanks for share your method.

Could is possible apply the same choice for execute Quake3/4 and UT2004 without Bluewhite libs?

thanks

ponce 06-02-2009 05:18 AM

looking at the lib site it looks like only quake 3 is supported.

quake 4 should have alsa native and I think UT2004 should have it also (not sure), so they probably don't need this oss->alsa hack (the matter of this post).

ROXR 06-06-2009 11:36 AM

Hi

I tried now Enemy Territory Quake Wars on Slackware64, I do not any trouble with the sound (X-Fi card), but when I execute etqw a message appears: "./etqw.x86: error while loading shared libraries: libvga.so.1: cannot open shared object file: No such file or directory"

For me only work if execute from etqw-rthread żit is normal?

I used ETQW-client-1.5-full.x86.run for installer.

Thx

ponce 06-06-2009 11:53 AM

I think it's normal.
If you are not aware of it, this thread is about Wolfenstein Enemy Territory, not Quake Wars: they are two different games ;)

ROXR 06-06-2009 12:40 PM

Ahh, jaja ja

Fortunately it's good to talk to someone who controls the topic.

Thx

ponce 06-07-2009 09:36 AM

obviously you can do what you want, this is a free world (more or less) :p

ROXR 06-07-2009 11:21 AM

Sure, but the best is that Slackware64 run very well, despite not having 32bits layer.


All times are GMT -5. The time now is 04:09 AM.