diff options
author B. Watson <>2019-12-14 17:07:35 -0500
committer Willy Sudiarto Raharjo <>2019-12-15 17:06:28 +0700
commit03fac6920caec46af801b1eda3a5dd03f925855a (patch)
parente9b011fb5c34eb671159ae1d8398e9657353f7bc (diff)
audio/sonic-visualiser: Updated for version 4.0.1.
Signed-off-by: B. Watson <>
6 files changed, 139 insertions, 34 deletions
diff --git a/audio/sonic-visualiser/README b/audio/sonic-visualiser/README
index 83f564333c..0fe3b7cd84 100644
--- a/audio/sonic-visualiser/README
+++ b/audio/sonic-visualiser/README
@@ -7,17 +7,21 @@ simply listen to it.
Optional dependencies, detected at build time:
-liblo - allows remote control of sonic-visualiser via OSC.
portaudio - allows sonic-visualiser to run without a JACK or pulseaudio
- server.
+server (using plain ALSA).
-Note: the SlackBuild author is unable to get sonic-visualiser to work
-with PortAudio. PulseAudio seems to work but hasn't been thoroughly
-tested. If you have problems with the other audio I/O backends, try JACK.
-See File -> Preferences -> Audio I/O.
+jack-audio-connection-kit *or* jack2 - allows sonic-visualiser to use
+JACK for realtime audio recording/playback [*].
-This package uses POSIX filesystem capabilities to execute with
-elevated privileges (required for realtime audio processing). This
-may be considered a security/stability risk. Please read
- for more information. To disable
-capabilities, pass SETCAP=no to the script.
+liblo - allows remote control of sonic-visualiser via OSC.
+Note: PulseAudio seems to work but hasn't been thoroughly tested. If you
+have problems with the other audio I/O backends, try JACK. See File ->
+Preferences -> Audio I/O.
+[*] When built with jack-audio-connection-kit or jack2, this package
+uses POSIX filesystem capabilities to execute with elevated privileges
+(required for realtime audio processing). This may be considered a
+security/stability risk. Please read
+for more information. To disable capabilities, pass SETCAP=no to the
+script, or build without JACK.
diff --git a/audio/sonic-visualiser/slack-desc b/audio/sonic-visualiser/slack-desc
index f71c870a0f..d29d068310 100644
--- a/audio/sonic-visualiser/slack-desc
+++ b/audio/sonic-visualiser/slack-desc
@@ -13,7 +13,7 @@ sonic-visualiser: contents of music audio files. The aim of Sonic Visualiser is
sonic-visualiser: the first program you reach for when want to study a musical recording
sonic-visualiser: rather than simply listen to it.
+sonic-visualiser: Build options:
+sonic-visualiser: JACK support: @JACKYN@
+sonic-visualiser: PortAudio: @PAYN@
+sonic-visualiser: liblo (OSC): @LIBLOYN@
diff --git a/audio/sonic-visualiser/sonic-visualiser.SlackBuild b/audio/sonic-visualiser/sonic-visualiser.SlackBuild
index e166c6ba11..806b046073 100644
--- a/audio/sonic-visualiser/sonic-visualiser.SlackBuild
+++ b/audio/sonic-visualiser/sonic-visualiser.SlackBuild
@@ -6,6 +6,18 @@
# Licensed under the WTFPL. See for details.
+# 20191212 bkw:
+# - Update for 4.0.1.
+# - New deps: libfishsound capnproto opusfile.
+# - Removed JACK as a hard dep.
+# - Have slack-desc tell the user what optional deps are built-in.
+# - Annoying stuff relating to the test suite.
+# - If necessary, source the qt5 profile script.
+# - Install French man page.
+# - Fix icon reference in .desktop.
+# - It looks like the segfault-on-exit problem was caused by an outdated
+# version of qt5. It's gone away with qt5-5.9.8.
# 20181217 bkw:
# - Update for 3.2. This was left stale for a long time due to
# problems with SBo's old qt5, which has finally been updated,
@@ -48,7 +60,7 @@
# - add realtime capabilities
@@ -91,6 +103,40 @@ chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+# In case the user just now installed qt5 and hasn't sourced the profile
+# script, let's be nice and do it here.
+[ "$QT5DIR" = "" ] && \
+ [ -x /etc/profile.d/ ] && \
+ source /etc/profile.d/
+# Fudge the test suite, all but 2 tests pass. I think the error is in the
+# test suite, not a real error in the code. Even if it is broken code, the
+# failure is caused by a 32KHz mp3, which is is pretty uncommon sampling
+# rate to find in an mp3 and shouldn't prevent us using sonic-visualiser
+# on other filetypes (or mp3 at normal sampling rates, e.g. the 44.1KHz
+# test cases pass).
+rm -f svcore/data/fileio/test/audio/mp3/32000-1.mp3
+# The test suite uses utf8 encoded filenames, so it will *fail* if
+# the current locale is a non-utf8 one (such as Slackware's default
+# of en_US). Try to set a locale that makes sense for the user, fall
+# back on en_US.UTF-8 if we can't figure it out.
+case "$LANG" in
+ *.utf8|*.UTF8|*.utf-8|*.UTF-8) ;; # already OK
+ ??_??) LANG="$LANG.UTF-8" ;; # e.g "en_US", "de_DE"
+ *) LANG=$FALLBACK ;; # empty, "C", or garbage
+# Make sure the chosen locale exists. If it doesn't, the locale
+# command will give us errors that begin with "locale:" (its exit
+# status is always 0/success, how annoying).
+export LANG
+if locale 2>&1 >/dev/null | grep -q '^locale:'; then
+ export LANG
@@ -103,15 +149,10 @@ CXXFLAGS="$SLKCFLAGS" \
--docdir=/usr/doc/$PRGNAM-$VERSION \
-# fudge the test suite, all but 2 tests pass, and I think the error
-# is in the test suite, not a real error in the code.
-sed -i '375s,"aac","aac" || format == "mp3",' \
- svcore/data/fileio/test/AudioFileReaderTest.h
# Override $HOME since the unit tests insist on writing useless stuff
# there. In case the user's using ccache, this changes the cache dir,
# so we put it back like it was (no harm done if user not using ccache).
-# Parallel build seems to work OK in 3.0.1. If not, uncomment the -j1
+# Parallel build seems to work OK in 4.0.1. If not, uncomment the -j1
# and email me a bug report.
HOME=$( pwd ) \
@@ -131,29 +172,45 @@ install -m0755 -s \
# man page borrowed from Debian
-mkdir -p $PKG/usr/man/man1
+mkdir -p $PKG/usr/man/man1 $PKG/usr/man/fr/man1 $PKG/usr/man/fr.UTF-8/man1
gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
+gzip -9c < $CWD/$ > $PKG/usr/man/fr.UTF-8/man1/$PRGNAM.1.gz
+iconv -f UTF-8 -t ISO8859-1 $CWD/$ \
+ | gzip -9c > $PKG/usr/man/fr/man1/$PRGNAM.1.gz
mkdir -p $PKG/usr/share/applications
-cat $PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+sed "/^Icon/s,=.*,=/usr/share/pixmaps/$PRGNAM.png," $PRGNAM.desktop \
+ > $PKG/usr/share/applications/$PRGNAM.desktop
# define MIME types to associate *.sv and *.svl
mkdir -p $PKG/usr/share/mime/packages
cat $CWD/$PRGNAM.xml > $PKG/usr/share/mime/packages/$PRGNAM.xml
mkdir -p $PKG/usr/share/pixmaps
-cat icons/sv-128x128.png > $PKG/usr/share/pixmaps/sv-icon.png
+cat icons/sv-128x128.png > $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+ldd $PKG/usr/bin/$PRGNAM > ldd.out
+#fgrep -q ldd.out && JACKYN=yes # jack is dynamically loaded!
+pkg-config --exists jack && JACKYN=yes
+fgrep -q ldd.out && PAYN=yes
+fgrep -q ldd.out && LIBLOYN=yes
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+sed \
+ -e "s,@JACKYN@,$JACKYN," \
+ -e "s,@PAYN@,$PAYN," \
+ -e "s,@LIBLOYN@,$LIBLOYN," \
+ $CWD/slack-desc \
+ > $PKG/install/slack-desc
cat $CWD/ > $PKG/install/
-# Only add capability stuff if not disabled:
-if [ "${SETCAP:-yes}" = "yes" ]; then
+# Only add capability stuff if not disabled (and if we built with JACK):
+if [ "${SETCAP:-yes}" = "yes" -a "$JACKYN" = "yes" ]; then
cat $CWD/ >> $PKG/install/
# Only allow execution by audio group
chown root:audio $PKG/usr/bin/$PRGNAM
diff --git a/audio/sonic-visualiser/ b/audio/sonic-visualiser/
new file mode 100644
index 0000000000..b55712b9ca
--- /dev/null
+++ b/audio/sonic-visualiser/
@@ -0,0 +1,44 @@
+.TH SONIC-VISUALISER 1 "Novembre 17, 2010"
+sonic-visualiser \- affichage et analyse des contenus des fichiers audio de musique
+.B sonic-visualiser
+[\fIoptions\fR] [\fIfile\fR] ...
+.B Sonic Visualiser
+est un programme pour afficher et explorer les données audio pour de l'analyse
+et des annontations de musique sémantique.
+.B Sonic Visualiser
+pourrait être utile pour les musicologues, les archivistes, les chercheurs dans
+le domaine du traitement de signal, et toute autre personne recherchant un
+moyen facile de jeter un oeil sur ce qui se trouve dans un fichier audio.
+Après installatation, l'application est disponible à partir du menu
+.B Applications
+\fB\-h\fR, \fB\-\-help\fR
+affiche ce message d'aide et quitte
+Ne pas essayer d'ouvrir un périphérique de sortie audio.
+Ne pas fournir de port Open Sound Control pour le contrôle à distance.
+Un, ou plusieurs, fichiers Sonic Visualiser (.sv) et audio peuvent être fournis.
+La documentation complète est disponible en ligne à
+sonic-visualisera été écrit par Chris Cannam <> et
+Cette page de manuel a été écrite par Alessio Treglia <>, pour
+le projet Debian (mais peut être utilisée par d'autres).
+La version française de cette page de manuel a été traduite par Olivier Humbert
+<>, pour le projet LibraZiK (mais peut être utilisée par
+d'autres). \ No newline at end of file
diff --git a/audio/sonic-visualiser/ b/audio/sonic-visualiser/
index 234884a7df..0f0b6bbee8 100644
--- a/audio/sonic-visualiser/
+++ b/audio/sonic-visualiser/
@@ -1,10 +1,10 @@
-REQUIRES="qt5 jack-audio-connection-kit liblrdf rubberband vamp-plugin-sdk sord"
+REQUIRES="qt5 liblrdf rubberband vamp-plugin-sdk sord capnproto opusfile libfishsound"
diff --git a/audio/sonic-visualiser/sonic-visualiser.xml b/audio/sonic-visualiser/sonic-visualiser.xml
index 9de7cf410b..c014d5bddf 100644
--- a/audio/sonic-visualiser/sonic-visualiser.xml
+++ b/audio/sonic-visualiser/sonic-visualiser.xml
@@ -3,11 +3,11 @@
<mime-type type="application/x-sonicvisualiser">
<comment>Sonic Visualiser Session</comment>
<glob pattern="*.sv"/>
- <generic-icon name="sv-icon" />
+ <generic-icon name="sonic-visualiser" />
<mime-type type="application/x-sonicvisualiser-layer">
<comment>Sonic Visualiser Layer</comment>
<glob pattern="*.svl"/>
- <generic-icon name="sv-icon" />
+ <generic-icon name="sonic-visualiser" />