summaryrefslogtreecommitdiff
path: root/libraries/OpenAL/OpenAL.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/OpenAL/OpenAL.SlackBuild')
-rw-r--r--libraries/OpenAL/OpenAL.SlackBuild48
1 files changed, 21 insertions, 27 deletions
diff --git a/libraries/OpenAL/OpenAL.SlackBuild b/libraries/OpenAL/OpenAL.SlackBuild
index bd9f43cc59..a7eea27caf 100644
--- a/libraries/OpenAL/OpenAL.SlackBuild
+++ b/libraries/OpenAL/OpenAL.SlackBuild
@@ -1,15 +1,16 @@
#!/bin/sh
-# Slackware build script for OpenAL
+# Slackware build script for OpenAL Soft
# Written by Erik Hanson erik@slackbuilds.org
# Modified by the SlackBuilds.org project
PRGNAM=OpenAL
-SRCNAM=openal
-VERSION=0.0.8
+SRCNAM=openal-soft
+VERSION=1.7.411
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -17,43 +18,36 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
+set -eu
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP || exit 1
+cd $TMP
rm -rf $SRCNAM-$VERSION
-tar -zxvf $CWD/$SRCNAM-$VERSION.tar.gz || exit 1
-cd openal-$VERSION || exit 1
-
-# Fix when compiling other things against OpenAL using GCC 4.2.
-# Begotten from debian.
-patch -p1 < $CWD/fix_gcc-4.2.diff || exit 1
-
+tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
+cd $SRCNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-CFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var/lib || exit 1
-
-make || exit 1
-make install DESTDIR=$PKG || exit 1
-
-( 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
-)
+cmake \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX}
-# This package has no man pages or info pages
+make
+make install/strip DESTDIR=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog INSTALL NEWS NOTES README TODO \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuilld
mkdir -p $PKG/install