aboutsummaryrefslogtreecommitdiff
path: root/audio/FAudio
diff options
context:
space:
mode:
authororbea <orbea@riseup.net>2020-11-11 14:08:59 -0800
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-11-14 17:16:53 +0700
commit00238db83708696a047bfc62cef93ec8b0fb3052 (patch)
tree2b6a2c33aebf8d10c259f65600e22fda97b3b8ae /audio/FAudio
parent0e6e9280daf0c3b3216a4fd2532e6bf5e6ea8413 (diff)
audio/FAudio: Updated for version 20.11.
Signed-off-by: orbea <orbea@riseup.net> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio/FAudio')
-rw-r--r--audio/FAudio/0001-cmake.patch45
-rw-r--r--audio/FAudio/FAudio.SlackBuild22
-rw-r--r--audio/FAudio/FAudio.info6
-rw-r--r--audio/FAudio/README10
4 files changed, 67 insertions, 16 deletions
diff --git a/audio/FAudio/0001-cmake.patch b/audio/FAudio/0001-cmake.patch
new file mode 100644
index 0000000000000..37d5e01276de8
--- /dev/null
+++ b/audio/FAudio/0001-cmake.patch
@@ -0,0 +1,45 @@
+From 931b198dae23863dd2e5c205bd819991a7259d85 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Wed, 11 Nov 2020 10:05:41 -0800
+Subject: [PATCH] cmake: Fix compatiblity with older cmake versions.
+
+IMPORTED_TARGET was only introduced in cmake 3.6 and FAudio
+does not build with GStremer versions older than 1.9.2.
+
+Fixes https://github.com/FNA-XNA/FAudio/issues/226
+
+v2: Use _LDFLAGS to ensure linking against the correct gstreamer.
+---
+ CMakeLists.txt | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bb57a672..58da7f18 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -142,9 +142,9 @@ if(GSTREAMER)
+
+ # Find GStreamer
+ find_package(PkgConfig)
+- pkg_check_modules(GST REQUIRED IMPORTED_TARGET gstreamer-1.0)
+- pkg_check_modules(GSTAUDIO REQUIRED IMPORTED_TARGET gstreamer-audio-1.0)
+- pkg_check_modules(GSTAPP REQUIRED IMPORTED_TARGET gstreamer-app-1.0)
++ pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.9.2)
++ pkg_check_modules(GSTAUDIO REQUIRED gstreamer-audio-1.0>=1.9.2)
++ pkg_check_modules(GSTAPP REQUIRED gstreamer-app-1.0>=1.9.2)
+
+ # Include/Link GStreamer...
+ target_include_directories(FAudio PRIVATE
+@@ -153,9 +153,9 @@ if(GSTREAMER)
+ ${GSTAPP_INCLUDE_DIRS}
+ )
+ target_link_libraries(FAudio PRIVATE
+- PkgConfig::GST
+- PkgConfig::GSTAUDIO
+- PkgConfig::GSTAPP
++ ${GST_LDFLAGS}
++ ${GSTAUDIO_LDFLAGS}
++ ${GSTAPP_LDFLAGS}
+ )
+ endif(GSTREAMER)
+
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
diff --git a/audio/FAudio/FAudio.info b/audio/FAudio/FAudio.info
index 68b03ddb4686e..edc0f0e9b1ed3 100644
--- a/audio/FAudio/FAudio.info
+++ b/audio/FAudio/FAudio.info
@@ -1,8 +1,8 @@
PRGNAM="FAudio"
-VERSION="20.01"
+VERSION="20.11"
HOMEPAGE="https://fna-xna.github.io/"
-DOWNLOAD="https://github.com/FNA-XNA/FAudio/archive/20.01/FAudio-20.01.tar.gz"
-MD5SUM="f687b27a6052301af205963d87d4855b"
+DOWNLOAD="https://github.com/FNA-XNA/FAudio/archive/20.11/FAudio-20.11.tar.gz"
+MD5SUM="412d42ddf06b26fbabf7fd78af549f6f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="SDL2"
diff --git a/audio/FAudio/README b/audio/FAudio/README
index 2d971dd8902e1..d208b174bb91e 100644
--- a/audio/FAudio/README
+++ b/audio/FAudio/README
@@ -1,9 +1,3 @@
This is FAudio, an XAudio reimplementation that focuses solely on
-developing fully accurate DirectX Audio runtime libraries for the FNA
-project, including XAudio2, X3DAudio, XAPO, and XACT3.
-
-ffmpeg is an optional dependency for decoding xWMA resources.
-
-To enable ffmpeg support use:
-
- FFMPEG=yes ./FAudio.SlackBuild
+developing fully accurate DirectX Audio runtime libraries for the
+FNA project, including XAudio2, X3DAudio, XAPO, and XACT3.