gentoo-ebuilds/media-sound/sonic-visualiser/files/sonic-visualiser-5.2.1-meson.build.patch
Andreas Sturmlechner ed944428c9
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@gentoo.org>
2025-12-10 21:43:02 +01:00

197 lines
5.1 KiB
Diff

From fa992d87fb7acb601ca00ffa89fa29426046866a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miroslav=20=C5=A0ulc?= <fordfrog@gentoo.org>
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