1 # Maintainer: David Runge <dvzrv@archlinux.org>
4 pkgname=(cardinal cardinal-clap cardinal-data cardinal-jack cardinal-lv2 cardinal-vst cardinal-vst3)
7 pkgdesc="Virtual modular synthesizer"
9 url="https://github.com/DISTRHO/Cardinal"
33 kxstudio-lv2-extensions
40 https://github.com/DISTRHO/$pkgbase/releases/download/$pkgver/$pkgbase-$pkgver.tar.xz
41 $pkgbase-$pkgver.svg::https://raw.githubusercontent.com/DISTRHO/Cardinal/eb95b5990cf734c10f2caab1a246eac893f0266d/plugins/Cardinal/orig/distrho.svg
43 sha512sums=('60d6dcb2f3c90e41739c645f75408dc1603c5c999819577be26dbc7d05e2fbbce8dbf3d8d20d7d9e3075459f0fadb6f32c17d98c2186cf0ebed767f016410aec'
44 '31a7d1e548285af0ead1bc844fbb1d35b50f6284159047cb401a829d4068992fa328770e42c377c08d013f6787e55ac12b94eba4d5af4b90373b157971fc8835')
45 b2sums=('c28b1aff34c3e1b5fff01cf74c2df38e4ed58e7c56ccb5e106ef8582675e2914e4973bca874053371521150a838007d4eaa0e8ea58899337c22a2f5b22dfd5cd'
46 'd82fefe15234c1ed3a4d487c6082a2e3ac73b60f11041314e99c5a5de5b3ea141efbd5afd18851510bd4f801fd71f7cd89d54d86258d1ba750bbfd762aa37a8d')
55 libarchive libarchive.so
58 libsamplerate libsamplerate.so
59 libsndfile libsndfile.so
63 speexdsp libspeexdsp.so
66 'carla: for carla module and ildaeil plugin host'
67 'mpv: for experimental video support'
68 'xdg-desktop-portal-impl: for file browser'
72 local p="$1" f d; shift
74 d="$srcdir/$p/${f#$pkgdir/}"
75 mkdir -p "$(dirname "$d")"
77 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
85 --pkgname studio.kx.distrho.Cardinal \
86 --pkgdesc "$pkgdesc JACK standalone" \
88 --genericname "Virtual modular synthesizer"
92 export CFLAGS+=" -B/usr/lib/mold -Wno-format-security"
93 export CXXFLAGS+=" -B/usr/lib/mold -Wno-format-security"
94 make PREFIX=/usr SYSDEPS=true WITH_LTO=true -C $pkgname-$pkgver
99 ["Cardinal"]="https://distrho.kx.studio/plugins/cardinal"
100 ["CardinalFX"]="https://distrho.kx.studio/plugins/cardinal#fx"
101 ["CardinalSynth"]="https://distrho.kx.studio/plugins/cardinal#synth"
104 # NOTE: lvlint fails on Cardinal, as it makes use of non-standard Port Class, which it does not support yet
105 for _name in Cardinal{FX,Synth}; do
106 xvfb-run lv2lint -s "lv2_generate_ttl" -Mpack -I $pkgname-$pkgver/bin/$_name.lv2 "${_links[$_name]}"
111 depends=(cardinal-jack cardinal-lv2 cardinal-vst cardinal-vst3)
113 make PREFIX=/usr SYSDEPS=true DESTDIR="$pkgdir" install -C $pkgbase-$pkgver
117 # have find-libdeps resolve dependencies properly:
118 # https://gitlab.archlinux.org/archlinux/devtools/-/issues/102
119 find usr/lib -type f \( -iname "*.clap" -or -iname "*.so" \) -exec chmod +x {} \;
121 _pick $pkgbase-clap usr/lib/clap/
122 _pick $pkgbase-data usr/share/$pkgbase
123 _pick $pkgbase-data usr/share/doc
124 _pick $pkgbase-jack usr/bin/
125 _pick $pkgbase-lv2 usr/lib/lv2/
126 _pick $pkgbase-vst usr/lib/vst/
127 _pick $pkgbase-vst3 usr/lib/vst3/
131 package_cardinal-clap() {
132 pkgdesc+=" - CLAP plugin"
133 groups=(clap-plugins pro-audio)
134 depends=("${_common_depends[@]}" clap-host)
135 optdepends=("${_common_optdepends[@]}")
137 mv -v $pkgbase-clap/* "$pkgdir"
140 package_cardinal-data() {
143 mv -v $pkgbase-data/* "$pkgdir"
146 package_cardinal-jack() {
147 pkgdesc+=" - JACK standalone"
149 depends=("${_common_depends[@]}" hicolor-icon-theme jack)
150 optdepends=("${_common_optdepends[@]}")
152 mv -v $pkgbase-jack/* "$pkgdir"
153 install -vDm 644 *.desktop -t "$pkgdir/usr/share/applications"
154 install -vDm 644 $pkgbase-$pkgver.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgbase.svg"
157 package_cardinal-lv2() {
158 pkgdesc+=" - LV2 plugin"
159 groups=(lv2-plugins pro-audio)
160 depends=("${_common_depends[@]}" lv2-host)
161 optdepends=("${_common_optdepends[@]}")
163 mv -v $pkgbase-lv2/* "$pkgdir"
166 package_cardinal-vst() {
167 pkgdesc+=" - VST2 plugin"
168 groups=(pro-audio vst-plugins)
169 depends=("${_common_depends[@]}" vst-host)
170 optdepends=("${_common_optdepends[@]}")
172 mv -v $pkgbase-vst/* "$pkgdir"
175 package_cardinal-vst3() {
176 pkgdesc+=" - VST3 plugin"
177 groups=(pro-audio vst3-plugins)
178 depends=("${_common_depends[@]}" vst3-host)
179 optdepends=("${_common_optdepends[@]}")
181 mv -v $pkgbase-vst3/* "$pkgdir"