aboutsummaryrefslogtreecommitdiff
path: root/audio/FAudio/FAudio.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/FAudio/FAudio.SlackBuild')
-rw-r--r--audio/FAudio/FAudio.SlackBuild22
1 files changed, 17 insertions, 5 deletions
diff --git a/audio/FAudio/FAudio.SlackBuild b/audio/FAudio/FAudio.SlackBuild
index a16edef591167..bdd24fd25f8fc 100644
--- a/audio/FAudio/FAudio.SlackBuild
+++ b/audio/FAudio/FAudio.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=FAudio
-VERSION=${VERSION:-20.01}
+VERSION=${VERSION:-20.11}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -69,16 +69,29 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-[ "${FFMPEG:=OFF}" != OFF ] && FFMPEG=ON
+# gstreamer and gst-plugins-base are too old in Slackware 14.2.
+if pkg-config --atleast-version 1.9.2 gstreamer-1.0 &&
+ pkg-config --atleast-version 1.9.2 gstreamer-audio-1.0 &&
+ pkg-config --atleast-version 1.9.2 gstreamer-app-1.0; then
+ GST=ON
+else
+ GST=OFF
+fi
+
+# cmake: Fix compatiblity with older cmake versions.
+# https://github.com/FNA-XNA/FAudio/commit/6a1b6b5d7bc237635d8cbc143b42418c16651a35
+# https://github.com/FNA-XNA/FAudio/pull/227
+# https://github.com/FNA-XNA/FAudio/issues/226
+patch -p1 < $CWD/0001-cmake.patch
mkdir -p build
cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
- -DFFMPEG=$FFMPEG \
+ -DGSTREAMER=$GST \
+ -DCMAKE_SKIP_RPATH=TRUE \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
@@ -89,7 +102,6 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" |
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION
-[ "$FFMPEG" != ON ] || cp -a README.ffmpeg $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install