commit:     ed944428c99c76e95339d74ac648c679747b8819
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 10 20:08:07 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Dec 10 20:43:02 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed944428

media-sound/sonic-visualiser: add 5.2.1, fix build w/ Qt 6.9

Rebase meson.build.patch
Add new dependency sys-libs/libunwind
Add alternative GitHub SRC_URI for upstream main site certificate issues

Bug: https://bugs.gentoo.org/966627
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-sound/sonic-visualiser/Manifest              |   1 +
 .../files/sonic-visualiser-5.2.1-meson.build.patch | 197 +++++++++++++++++++++
 .../files/sonic-visualiser-5.2.1-qt-6.9.patch      |  77 ++++++++
 .../sonic-visualiser/sonic-visualiser-5.2.1.ebuild |  78 ++++++++
 4 files changed, 353 insertions(+)

diff --git a/media-sound/sonic-visualiser/Manifest 
b/media-sound/sonic-visualiser/Manifest
index cb0b1d7fb07a..ab4f2b4d6e64 100644
--- a/media-sound/sonic-visualiser/Manifest
+++ b/media-sound/sonic-visualiser/Manifest
@@ -1 +1,2 @@
 DIST sonic-visualiser-5.0.1.tar.gz 6583441 BLAKE2B 
8c3b87aaae14d2ec3284c75b7a4c7a977bd54ede14a6c8c6d8a4f1bd679d051c6abc12045003940537d2ce86f20c33103fee6a90b56947b17f917e7deff7faad
 SHA512 
eb58403b3d680bbe9b6b30a2ee1899db71f245d6b7b153caa04953268bff1bb52da069d63d2e062ebb14e01a4474214de6770e389b6d611990db7fab8fd6ecc6
+DIST sonic-visualiser-5.2.1.tar.gz 6597676 BLAKE2B 
3176d336d7aeaab98c7bae4783e8b8ade6bcbf4a13242843a8b271a7b285bc2a961806dff448fe0de301bd1a1b5bef4c0aa8cade1dc01dc1761bf3c56f0e3623
 SHA512 
27bd8528a9b75b0bc11ead82447b2ce48c6ea8cfc527df6b3d057792a40b78e7bd29d895e30782016385a98bec5c2d976d08d24bb79898ba6732248c2c49601c

diff --git 
a/media-sound/sonic-visualiser/files/sonic-visualiser-5.2.1-meson.build.patch 
b/media-sound/sonic-visualiser/files/sonic-visualiser-5.2.1-meson.build.patch
new file mode 100644
index 000000000000..bf1e67df7298
--- /dev/null
+++ 
b/media-sound/sonic-visualiser/files/sonic-visualiser-5.2.1-meson.build.patch
@@ -0,0 +1,197 @@
+From fa992d87fb7acb601ca00ffa89fa29426046866a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miroslav=20=C5=A0ulc?= <[email protected]>
+Date: Sat, 13 Feb 2021 20:25:15 +0100
+Subject: [PATCH] Make various dependencies optional
+
+---
+ meson.build       | 126 +++++++++++++++++++++++++++++++---------------
+ meson_options.txt |   8 +++
+ 2 files changed, 94 insertions(+), 40 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 5f615e9..8b01f49 100644
+--- a/meson.build
++++ b/meson.build
+@@ -122,22 +122,8 @@ if system == 'linux'
+   serd_dep = dependency('serd-0', version: '>= 0.5')
+   capnp_dep = dependency('capnp', version: '>= 0.6')
+   lrdf_dep = dependency('lrdf', version: '>= 0.2')
+-  oggz_dep = dependency('oggz', version: '>= 1.0.0')
+-  fishsound_dep = dependency('fishsound', version: '>= 1.0.0')
+-  mad_dep = dependency('mad', version: '>= 0.15.0')
+-  id3tag_dep = dependency('id3tag', version: '>= 0.15.0')
+-  opus_dep = dependency('opusfile')
+-  opusenc_dep = dependency('opusenc', required: false)
+-  if not opusenc_dep.found()
+-    opusenc_dep = dependency('libopusenc', required: false)
+-  endif
+-  lo_dep = dependency('liblo')
+-  jack_dep = dependency('jack', version: '>= 0.100')
+-  libpulse_dep = dependency('libpulse', version: '>= 0.9')
+   alsa_dep = dependency('alsa')
+   
+-  portaudio_dep = dependency('portaudio-2.0', version: '>= 19', required: 
false)
+-  
+   unwind_dep = dependency('libunwind', required: false)
+ 
+   feature_dependencies = [
+@@ -151,16 +137,6 @@ if system == 'linux'
+     serd_dep,
+     capnp_dep,
+     lrdf_dep,
+-    oggz_dep,
+-    fishsound_dep,
+-    mad_dep,
+-    id3tag_dep,
+-    opus_dep,
+-    opusenc_dep,
+-    lo_dep,
+-    portaudio_dep,
+-    jack_dep,
+-    libpulse_dep,
+     alsa_dep,
+   ]
+ 
+@@ -183,14 +159,6 @@ if system == 'linux'
+     '-DHAVE_SERD',
+     '-DHAVE_CAPNP',
+     '-DHAVE_LRDF',
+-    '-DHAVE_OGGZ',
+-    '-DHAVE_FISHSOUND',
+-    '-DHAVE_MAD',
+-    '-DHAVE_ID3TAG',
+-    '-DHAVE_OPUS',
+-    '-DHAVE_LIBLO',
+-    '-DHAVE_JACK', '-DDYNAMIC_JACK',
+-    '-DHAVE_LIBPULSE',
+     '-D__LINUX_ALSASEQ__',
+     '-D__LINUX_ALSA__' # for RtMidi
+   ]
+@@ -204,22 +172,100 @@ if system == 'linux'
+     unwind_dep = []
+   endif
+ 
+-  if portaudio_dep.found()
++  enable_id3tag = get_option('id3tag')
++  if enable_id3tag
++    id3tag_dep = dependency('id3tag', version: '>= 0.15.0')
++    feature_dependencies += [
++      id3tag_dep,
++    ]
+     feature_defines += [
+-      '-DHAVE_PORTAUDIO',
++      '-DHAVE_ID3TAG',
+     ]
+   endif
+ 
+-  if not opusenc_dep.found()
++  enable_jack = get_option('jack')
++  if enable_jack
++    jack_dep = dependency('jack', version: '>= 0.100')
++    feature_dependencies += [
++      jack_dep,
++    ]
+     feature_defines += [
+-      '-DHAVE_OPUS_READ_ONLY'
++      '-DHAVE_JACK',
++      '-DDYNAMIC_JACK',
++    ]
++  endif
++
++  enable_mad = get_option('mad')
++  if enable_mad
++    mad_dep = dependency('mad', version: '>= 0.15.0')
++    feature_dependencies += [
++      mad_dep,
++    ]
++    feature_defines += [
++      '-DHAVE_MAD',
++    ]
++
++    svcore_moc_args = [
++      '-DHAVE_MAD'
++    ]
++  endif
++
++  enable_ogg = get_option('ogg')
++  if enable_ogg
++    oggz_dep = dependency('oggz', version: '>= 1.0.0')
++    fishsound_dep = dependency('fishsound', version: '>= 1.0.0')
++    feature_dependencies += [
++      oggz_dep,
++      fishsound_dep,
++    ]
++    feature_defines += [
++      '-DHAVE_OGGZ',
++      '-DHAVE_FISHSOUND',
++    ]
++  endif
++
++  enable_opus = get_option('opus')
++  if enable_opus
++    opus_dep = dependency('opusfile')
++    opusenc_dep = dependency('libopusenc')
++    feature_dependencies += [
++      opus_dep, opusenc_dep,
++    ]
++    feature_defines += [
++      '-DHAVE_OPUS',
++    ]
++  endif
++
++  enable_osc = get_option('osc')
++  if enable_osc
++    lo_dep = dependency('liblo')
++    feature_dependencies += [
++      lo_dep,
++    ]
++    feature_defines += [
++      '-DHAVE_LIBLO',
++    ]
++  endif
++
++  enable_portaudio = get_option('portaudio')
++  if enable_portaudio
++    portaudio_dep = dependency('portaudio-2.0', version: '>= 19', required: 
false)
++    feature_dependencies += [
++      portaudio_dep,
++    ]
++  endif
++
++  enable_pulseaudio = get_option('pulseaudio')
++  if enable_pulseaudio
++    libpulse_dep = dependency('libpulse', version: '>= 0.9')
++    feature_dependencies += [
++      libpulse_dep,
++    ]
++    feature_defines += [
++      '-DHAVE_LIBPULSE',
+     ]
+   endif
+ 
+-  svcore_moc_args = [
+-    '-DHAVE_MAD'
+-  ]
+-  
+ elif system == 'darwin'
+ 
+   svdeps_dir = meson.current_source_dir() / 'sv-dependency-builds/osx'
+diff --git a/meson_options.txt b/meson_options.txt
+index 2f0bef4..a52a186 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,3 +3,11 @@ option('no_qt',
+        value: 'false',
+        description: 'Build only the small utilities that do not use Qt.')
+ 
++option('id3tag', type: 'boolean', value: false)
++option('jack', type: 'boolean', value: false)
++option('mad', type: 'boolean', value: false)
++option('ogg', type: 'boolean', value: false)
++option('opus', type: 'boolean', value: false)
++option('osc', type: 'boolean', value: false)
++option('portaudio', type: 'boolean', value: false)
++option('pulseaudio', type: 'boolean', value: false)
+-- 
+2.52.0
+

diff --git 
a/media-sound/sonic-visualiser/files/sonic-visualiser-5.2.1-qt-6.9.patch 
b/media-sound/sonic-visualiser/files/sonic-visualiser-5.2.1-qt-6.9.patch
new file mode 100644
index 000000000000..c95b6b6ba958
--- /dev/null
+++ b/media-sound/sonic-visualiser/files/sonic-visualiser-5.2.1-qt-6.9.patch
@@ -0,0 +1,77 @@
+From 2dee776aad88060d41086c4fb0191ecb0bded86c Mon Sep 17 00:00:00 2001
+From: Chris Cannam <[email protected]>
+Date: Mon, 14 Apr 2025 16:21:05 +0100
+Subject: [PATCH] Fix incompatibility between atomic and qt with just-updated
+ compiler and libraries
+
+---
+ data/model/EditableDenseThreeDimensionalModel.cpp | 8 ++++----
+ data/model/NoteModel.h                            | 4 ++--
+ data/model/RegionModel.h                          | 4 ++--
+ data/model/SparseTimeValueModel.h                 | 4 ++--
+ 4 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/svcore/data/model/EditableDenseThreeDimensionalModel.cpp 
b/svcore/data/model/EditableDenseThreeDimensionalModel.cpp
+index da5ff904..7a621631 100644
+--- a/svcore/data/model/EditableDenseThreeDimensionalModel.cpp
++++ b/svcore/data/model/EditableDenseThreeDimensionalModel.cpp
+@@ -458,10 +458,10 @@ EditableDenseThreeDimensionalModel::toXml(QTextStream 
&out,
+     Model::toXml
+         (out, indent,
+          QString("type=\"dense\" dimensions=\"3\" windowSize=\"%1\" 
yBinCount=\"%2\" minimum=\"%3\" maximum=\"%4\" dataset=\"%5\" startFrame=\"%6\" 
%7")
+-         .arg(m_resolution)
+-         .arg(m_yBinCount)
+-         .arg(m_minimum)
+-         .arg(m_maximum)
++         .arg(m_resolution.load())
++         .arg(m_yBinCount.load())
++         .arg(m_minimum.load())
++         .arg(m_maximum.load())
+          .arg(getExportId())
+          .arg(m_startFrame)
+          .arg(extraAttributes));
+diff --git a/svcore/data/model/NoteModel.h b/svcore/data/model/NoteModel.h
+index 8c3a421e..28e145c2 100644
+--- a/svcore/data/model/NoteModel.h
++++ b/svcore/data/model/NoteModel.h
+@@ -403,8 +403,8 @@ class NoteModel : public Model,
+              .arg(m_events.getExportId())
+              .arg(m_subtype == FLEXI_NOTE ? "flexinote" : "note")
+              .arg(m_valueQuantization)
+-             .arg(m_valueMinimum)
+-             .arg(m_valueMaximum)
++             .arg(m_valueMinimum.load())
++             .arg(m_valueMaximum.load())
+              .arg(encodeEntities(m_units))
+              .arg(extraAttributes));
+         
+diff --git a/svcore/data/model/RegionModel.h b/svcore/data/model/RegionModel.h
+index 916a0477..db021ae7 100644
+--- a/svcore/data/model/RegionModel.h
++++ b/svcore/data/model/RegionModel.h
+@@ -335,8 +335,8 @@ class RegionModel : public Model,
+              .arg(m_events.getExportId())
+              .arg("region")
+              .arg(m_valueQuantization)
+-             .arg(m_valueMinimum)
+-             .arg(m_valueMaximum)
++             .arg(m_valueMinimum.load())
++             .arg(m_valueMaximum.load())
+              .arg(encodeEntities(m_units))
+              .arg(extraAttributes));
+         
+diff --git a/svcore/data/model/SparseTimeValueModel.h 
b/svcore/data/model/SparseTimeValueModel.h
+index fe6e70cc..70335038 100644
+--- a/svcore/data/model/SparseTimeValueModel.h
++++ b/svcore/data/model/SparseTimeValueModel.h
+@@ -342,8 +342,8 @@ class SparseTimeValueModel : public Model,
+              .arg("true") // always true after model reaches 100% -
+                           // subsequent events are always notified
+              .arg(m_events.getExportId())
+-             .arg(m_valueMinimum)
+-             .arg(m_valueMaximum)
++             .arg(m_valueMinimum.load())
++             .arg(m_valueMaximum.load())
+              .arg(encodeEntities(m_units))
+              .arg(extraAttributes));
+         

diff --git a/media-sound/sonic-visualiser/sonic-visualiser-5.2.1.ebuild 
b/media-sound/sonic-visualiser/sonic-visualiser-5.2.1.ebuild
new file mode 100644
index 000000000000..87978dca9552
--- /dev/null
+++ b/media-sound/sonic-visualiser/sonic-visualiser-5.2.1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson xdg
+
+DESCRIPTION="Music audio files viewer and analyser"
+HOMEPAGE="https://www.sonicvisualiser.org/ 
https://github.com/sonic-visualiser/sonic-visualiser";
+SRC_URI="https://code.soundsoftware.ac.uk/attachments/download/2876/${P}.tar.gz
+       https://github.com/${PN}/${PN}/releases/download/sv_v${PV}/${P}.tar.gz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="id3tag jack mad ogg opus osc +portaudio pulseaudio test"
+
+REQUIRED_USE="
+       || ( jack pulseaudio portaudio )
+       test? ( id3tag mad )
+"
+# tests fail without mp3 support
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       app-arch/bzip2
+       dev-libs/capnproto:=
+       dev-libs/serd
+       dev-libs/sord
+       dev-qt/qtbase:6[gui,network,ssl,widgets,xml]
+       dev-qt/qtsvg:6
+       media-libs/alsa-lib
+       media-libs/dssi
+       media-libs/ladspa-sdk
+       media-libs/liblrdf
+       media-libs/libsamplerate
+       media-libs/libsndfile
+       media-libs/rubberband
+       media-libs/speex
+       media-libs/vamp-plugin-sdk
+       sci-libs/fftw:3.0=
+       sys-libs/libunwind:=
+       id3tag? ( media-libs/libid3tag:= )
+       jack? ( virtual/jack )
+       mad? ( media-libs/libmad )
+       ogg? (
+               media-libs/libfishsound
+               media-libs/liboggz
+       )
+       opus? (
+               media-libs/libopusenc
+               media-libs/opusfile
+       )
+       osc? ( media-libs/liblo )
+       portaudio? ( media-libs/portaudio )
+       pulseaudio? ( media-libs/libpulse )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}/${P}-meson.build.patch" # downstream
+       "${FILESDIR}/${P}-qt-6.9.patch" # bug #966627, svcore git master
+)
+
+src_configure() {
+       local emesonargs=(
+               $(meson_use id3tag)
+               $(meson_use jack)
+               $(meson_use mad)
+               $(meson_use ogg)
+               $(meson_use opus)
+               $(meson_use osc)
+               $(meson_use portaudio)
+               $(meson_use pulseaudio)
+       )
+       meson_src_configure
+}

Reply via email to