audio/apulse: Allow library path option.

Signed-off-by: Ryan P.C. McQuen <ryan.q@linux.com>
This commit is contained in:
Ryan P.C. McQuen 2015-01-03 11:02:56 -08:00 committed by Willy Sudiarto Raharjo
parent c4d4607a4a
commit 1f45b1282b
2 changed files with 43 additions and 5 deletions

View file

@ -6,7 +6,7 @@ Any app that requires pulseaudio can be run as such:
PulseAudio is not required.
Speex is recommended for compatibility.
Speex is recommended for greater compatibility.
The SlackBuild now detects a multilib machine and will
build with COMPAT32 libraries. If you have a reason
@ -14,3 +14,25 @@ to bypass this, run:
# COMPAT32=no sh apulse.SlackBuild
The multilib version will create two binaries,
apulse (64-bit) and apulse32 (32-bit), unless
you choose to install the libraries globally.
The default is for libraries to be installed in:
/usr/lib${LIBDIRSUFFIX}/apulse
To override this setting and install the libraries
directly into the /usr/lib*/ directories, run:
GLOBAL_LIBS=yes sh apulse.SlackBuild
The advantage of this, is the ability for pulseaudio
emulation in several applications beyond those
originally intended by the apulse project, such
as games from gog.com. The disadvantage of this
'global' build type, is that some programs (such as
Google Chrome) will believe you have pulseaudio
installed and may not have sound.

View file

@ -24,9 +24,18 @@
PRGNAM=apulse
VERSION=${VERSION:-0.1.5}
BUILD=${BUILD:-2}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
## build with GLOBAL_LIBS=yes
## to install pulse libraries
## directly in lib* directories
GLOBAL_LIBS=${GLOBAL_LIBS:-no}
if [ "$GLOBAL_LIBS" = no ]; then
APULSELIBPATHSUFFIX=${APULSELIBPATHSUFFIX:-/apulse}
elif [ "$GLOBAL_LIBS" = yes ]; then
APULSELIBPATHSUFFIX=${APULSELIBPATHSUFFIX:-/}
fi
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@ -68,7 +77,11 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz
if [ -e $CWD/v$VERSION.tar.gz ]; then
tar xvf $CWD/v$VERSION.tar.gz
else
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
fi
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@ -81,14 +94,17 @@ if [ "$COMPAT32" = "yes" ]; then
mkdir -pv build-m32
cd build-m32
CFLAGS=-m32 \
cmake -DAPULSEPATH=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
cmake -DAPULSEPATH=/usr/lib${APULSELIBPATHSUFFIX} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
make VERBOSE=1
make install DESTDIR=$PKG
if [ "$GLOBAL_LIBS" = no ]; then
mv $PKG/usr/bin/${PRGNAM} $PKG/usr/bin/${PRGNAM}32
fi
cd ..
fi
mkdir -pv build
cd build
cmake -DAPULSEPATH=/usr/lib${LIBDIRSUFFIX} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
cmake -DAPULSEPATH=/usr/lib${LIBDIRSUFFIX}${APULSELIBPATHSUFFIX} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
make VERBOSE=1
make install DESTDIR=$PKG
cd ..