PKGBUILDs/community/x42-plugins/PKGBUILD

287 lines
12 KiB
Bash
Raw Normal View History

2019-12-15 19:23:20 +00:00
# Maintainer: David Runge <dvzrv@archlinux.org>
2018-02-07 03:29:04 +00:00
# Contributor: Lieven Moors <lievenmoors@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - export OPTIMIZATIONS to override Makefiles without x86isms
pkgname=x42-plugins
2022-09-13 12:07:35 +00:00
pkgver=20220913
pkgrel=2
2018-02-07 03:29:04 +00:00
pkgdesc="Collection of LV2 plugins"
2022-01-15 14:21:44 +00:00
arch=(x86_64)
2018-02-07 03:29:04 +00:00
url="https://github.com/x42/x42-plugins"
2022-01-15 14:21:44 +00:00
license=(GPL2 GPL3)
groups=(lv2-plugins pro-audio)
depends=(cairo ftgl gcc-libs glibc hicolor-icon-theme libglvnd libx11 lv2-host)
makedepends=(fftw gendesk glib2 help2man jack liblo libltc libsamplerate
libsndfile lv2 pango ttf-dejavu zita-convolver)
checkdepends=(kxstudio-lv2-extensions lv2lint)
2022-04-04 13:19:45 +00:00
optdepends=(
'jack: for standalone applications'
'liblo: for standalone applications'
)
options=(debug)
source=(
http://gareus.org/misc/$pkgname/$pkgname-$pkgver.tar.xz
$pkgname.png::https://x42-plugins.com/x42/static/img/x42.png
$pkgname.directory
$pkgname.menu
2022-09-13 12:07:35 +00:00
$pkgname-20220913-phaserotate_manpage.patch::https://github.com/x42/phaserotate.lv2/pull/2/commits/1c26ad251dd4c516334fd1c28ed2d50453de4835.patch
$pkgname-20220913-bindir_mandir.patch::https://github.com/x42/phaserotate.lv2/pull/4/commits/2390ab0be83a189ae72b52fede4aa248306cd9d4.patch
2022-04-04 13:19:45 +00:00
)
2022-09-13 12:07:35 +00:00
sha512sums=('a5bcf488459c737de647c115d49da64a4ff003f20f80255ec8a9370429871df377368692061a4902e8d3336837f58d4d594e7443b4556a9d88c36fb120ab2fae'
2019-09-22 23:04:21 +00:00
'956fdd8e04c846d06a5267d1748916744418e0ddfce0ac2e9dd3a1c1376aea61499177af80709d9fe78f8c0c2ddcbf9f9e5b2e413adc9a7eca9b648a87ad4860'
2020-04-12 00:32:00 +00:00
'fef75b22b2c1fed8586af4dfd01ea291a7c1506e80ce384f05f13dc04c4b7e3e934003c20d89ae94f36ad1021b7ad75097da836ca30ee965b4107b559305b496'
2022-09-13 12:07:35 +00:00
'411015b0feb8a289272cb821afa7e2a284d3e9d994a446baa73b3a6ce0f0ebd1e94c4cb3392a0afb1d741ce6d8b2d14c9bd124a0684b830275b4ba8e14680aa3'
'17713ab585619de5ca31f20aea88bd226cbff572bf6c56e8f4ce54c0a7d25a5b099352911719dc65d6f467dbd991bc74a26e066d219f5b0d394f55876aa865b3'
'de2ef676f331566a2ecf7167662459aec0462da65319d1ce0bc919ff2d9f365068f8cf27e53de3fcd33f20d48e3bece8073d8cb1163bb29dbef69d0fe4860186')
b2sums=('e20fece6dac1ab85ce40603d6d66f243776a024ddd929b5d94a2b1b1bac20473eaf15ef818725a9c2baafeeea4b04a56e341912975f489dfa795d923f6cbeaf0'
2020-07-15 00:36:49 +00:00
'35a8cfcdf7f8c57ba655049a6d75b3bf9d253c25702a3f191d3f6cab215887f7de5025d025993861ae88c1b4daae132e9cc1ddf083e5b822f1b53a683c0fcaa3'
'fb6557cd2e8b83dae1cb38503f2a72093085ddcc0a4ba2e5e0375f7063b83b3fb4180091ce10524cd336eeb33cffed45ada93055b960c9189f83d664216b33ee'
2022-09-13 12:07:35 +00:00
'9c695f58099fcbfdce3e693e491d851ff7894a650ea12e079894176ef054b5f592785467c286bd8feaa340fdcdfb53d930b3a44ea890112e3fc1a4d172beb243'
'819e2ceac2a4a299595a7b28a542347d85517ee7cc595f1ae5de441d81ff994ac81d6ceb609f155234dcb3b6d45a28495d21da108b1a4bef785fd9ef6c88c976'
'ec02179202b3bce5cf2eaea4e3a4ae52d73fe29ec1ebb7988ce802270ccb52c96e1506e078fcfcceba713773f67a96552577d00d81a02957cedfdbcbf403215c')
2019-09-22 23:04:21 +00:00
2022-09-13 12:07:35 +00:00
_names=(darc dpl fat1 fil4 matrixmixer8x8 meter mixtri phaserotate scope spectr stepseq tuna)
2018-07-24 00:25:27 +00:00
prepare() {
2022-09-13 12:07:35 +00:00
# build missing man page: https://github.com/x42/phaserotate.lv2/issues/1
patch -Np1 -d $pkgname-$pkgver/phaserotate.lv2 -i ../../$pkgname-20220913-phaserotate_manpage.patch
# set BINDIR and MANDIR: https://github.com/x42/phaserotate.lv2/issues/2
patch -Np1 -d $pkgname-$pkgver/phaserotate.lv2 -i ../../$pkgname-20220913-bindir_mandir.patch
2022-04-04 13:19:45 +00:00
cd $pkgname-$pkgver
2019-01-07 01:27:08 +00:00
declare -A comments=(
2019-05-08 00:04:18 +00:00
["darc"]="A general purpose audio signal compressor"
2019-09-22 23:04:21 +00:00
["dpl"]="Look-ahead digital peak limiter intended but not limited to the final step of mastering or mixing"
2018-09-01 22:57:53 +00:00
["fat1"]="Auto-tuner based on Fons Adriaensen's zita-at1"
["fil4"]="4 band parametric equalizer with additional low+high shelf filters, Low and High-pass"
2019-09-22 23:04:21 +00:00
["matrixmixer8x8"]="Matrix Mixer 8x8"
2018-09-01 22:57:53 +00:00
["mixtri"]="Matrix mixer and trigger processor"
2022-09-13 12:07:35 +00:00
["phaserotate"]="Audio Phase rotate"
2018-09-01 22:57:53 +00:00
["scope"]="Simple audio oscilloscope with variable time scale, triggering, cursors and numeric readout"
2019-02-22 13:27:28 +00:00
["spectr"]="Spectrum Analyzer"
2018-09-01 22:57:53 +00:00
["stepseq"]="Simple step sequencer for moddevices.com"
)
2019-01-07 01:27:08 +00:00
declare -A generic=(
2019-05-08 00:04:18 +00:00
["darc"]="Dynamic Audio Range Compressor"
2019-09-22 23:04:21 +00:00
["dpl"]="Peak Limiter"
2019-01-07 01:27:08 +00:00
["fat1"]="Auto Tune"
["fil4"]="Parametric Equalizer"
2019-09-22 23:04:21 +00:00
["matrixmixer8x8"]="Matrix Mixer"
2019-01-07 01:27:08 +00:00
["mixtri"]="Mixer'n'Trigger"
2022-09-13 12:07:35 +00:00
["phaserotate"]="Phase Rotation"
2019-01-07 01:27:08 +00:00
["scope"]="Oscilloscope"
2019-02-22 13:27:28 +00:00
["spectr"]="Spectrum Analyzer"
2019-01-07 01:27:08 +00:00
["stepseq"]="Step Sequencer"
)
2019-04-14 23:29:54 +00:00
declare -A meter_types=(
[0]='EBU R128 Meter'
[1]='K20/RMS Meter (Stereo)'
[2]='K14/RMS Meter (Stereo)'
[3]='K12/RMS Meter (Stereo)'
[4]='BBC Meter (Stereo)'
[5]='BBC M-6'
[6]='DIN Meter (Stereo)'
[7]='EBU Meter (Stereo)'
[8]='Nordic Meter (Stereo)'
[9]='VU Meter (Stereo)'
[10]='True-Peak and RMS Meter (Stereo)'
[11]='DR-14 - Crest Factor Loudness Range Meter'
[12]='Stereo Phase-Correlation Meter'
[13]='Goniometer'
[14]='Phase/Frequency Wheel'
[15]='1/3 Octave Spectrum Analyzer'
[16]='Stereo/Frequency Scope'
[17]='Signal Distribution Histogram'
[18]='Bit Meter'
[19]='Surround Level 8'
)
declare -A tuna_types=(
[0]='Instrument Tuner'
[1]='Instrument Tuner (Spectrum)'
)
2018-09-01 22:57:53 +00:00
# XDG desktop files
2019-09-22 23:04:21 +00:00
for name in "${_names[@]}"; do
case "$name" in
meter)
for type in {0..19}; do
2021-11-18 18:36:50 +00:00
gendesk -n -f \
2022-04-04 13:19:45 +00:00
--pkgname "com.x42_plugins.x42_meter_$type" \
2019-09-22 23:04:21 +00:00
--name "x42-meter ${meter_types[$type]}" \
--pkgdesc "${meter_types[$type]}" \
--exec "x42-meter $type" \
--icon "x42-meter" \
2020-04-12 00:32:00 +00:00
--genericname "Audio Meter"
2019-09-22 23:04:21 +00:00
done
;;
tuna)
for type in {0,1}; do
2021-11-18 18:36:50 +00:00
gendesk -n -f \
2022-04-04 13:19:45 +00:00
--pkgname "com.x42_plugins.x42_${name}_$type" \
2019-09-22 23:04:21 +00:00
--name "x42-${name} ${tuna_types[$type]}" \
--pkgdesc "${tuna_types[$type]}" \
2022-04-04 13:19:45 +00:00
--exec "x42-$name $type" \
--icon "x42-$name" \
2020-04-12 00:32:00 +00:00
--genericname "Music Instrument Tuner"
2019-09-22 23:04:21 +00:00
done
;;
*)
2021-11-18 18:36:50 +00:00
gendesk -n -f \
2022-04-04 13:19:45 +00:00
--pkgname "com.x42_plugins.x42_$name" \
--name "x42-$name" \
2019-09-22 23:04:21 +00:00
--pkgdesc "${comments[$name]}" \
2022-04-04 13:19:45 +00:00
--exec "x42-$name" \
--icon "x42-$name" \
2020-04-12 00:32:00 +00:00
--genericname "${generic[$name]}"
2019-09-22 23:04:21 +00:00
;;
esac
2019-04-14 23:29:54 +00:00
done
2021-11-18 18:36:50 +00:00
sed -e '/Categories/d' -i *.desktop
2019-09-22 23:04:21 +00:00
# moving images to correct location so installation is not such a hassle later on
mv -v fat1.lv2/img/x42{_,-}fat1.png
2021-11-18 18:36:50 +00:00
mv -v fil4.lv2/img/x42{_,-}fil4.png
2019-09-22 23:04:21 +00:00
mv -v mixtri.lv2/img/x42{_,-}mixtri.png
mv -v meters.lv2/img/x42-meter{s,}.png
mv -v matrixmixer.lv2/img/x42-matrixmixer{,8x8}.png
2018-07-24 00:25:27 +00:00
}
2018-02-07 03:29:04 +00:00
build() {
2022-04-04 13:19:45 +00:00
cd $pkgname-$pkgver
2019-01-07 01:27:08 +00:00
# replace ttf-freefont with ttf-liberation
export FONTFILE=/usr/share/fonts/TTF/DejaVuSans-Bold.ttf
2018-02-07 03:29:04 +00:00
export OPTIMIZATIONS="-ffast-math -fomit-frame-pointer -O3 -fno-finite-math-only"
2018-07-27 13:48:13 +00:00
make
2018-02-07 03:29:04 +00:00
}
2020-07-15 00:36:49 +00:00
check() {
local _name _version _convolver _controlfilter _default _meter _midifilter _onsettrigger _sisco _tuna
2022-01-15 14:21:44 +00:00
local _controlfilters=(exp invert linearscale lowpass nlog)
local _convolvers=(Mono MonoToStereo Stereo)
local _defaults=(mono stereo)
local _meters=(VUmono VUstereo BBCmono BBCstereo BBCM6 EBUmono EBUstereo
DINmono DINstereo NORmono NORstereo COR EBUr128 goniometer spectr30mono
spectr30stereo dBTPmono dBTPstereo K12mono K12stereo K14mono K14stereo
K20mono K20stereo phasewheel stereoscope dr14mono dr14stereo TPnRMSmono
TPnRMSstereo SigDistHist bitmeter surround8 surround5 surround4 surround3)
local _midifilters=(cctonote channelfilter channelmap chokefilter
enforcescale eventblocker keyrange keysplit mapcc mapkeychannel mapkeyscale
midichord mididelay mididup midistrum miditranspose monolegato
noactivesensing nodup notetocc notetoggle ntapdelay onechannelfilter passthru
quantize randvelocity scalecc sostenuto velocitygamma velocityrange
velocityscale)
local _onsettriggers=(bassdrum_mono bassdrum_stereo)
local _siscos=(Mono Stereo 3chan 4chan)
local _tunas=(one two)
local _zconvolvers=(Mono CfgMono Stereo CfgStereo MonoToStereo
CfgMonoToStereo)
2020-07-15 00:36:49 +00:00
2022-04-04 13:19:45 +00:00
cd $pkgname-$pkgver
2020-07-15 00:36:49 +00:00
while IFS=" " read -r _name _version; do
2022-04-04 13:19:45 +00:00
echo "lv2lint test for $_name $_version"
2020-07-15 00:36:49 +00:00
case "$_name" in
controlfilter.lv2 )
for _controlfilter in "${_controlfilters[@]}"; do
2022-04-04 13:19:45 +00:00
lv2lint -Mpack -I "$_name/build" "http://gareus.org/oss/lv2/${_name//.lv2/}#$_controlfilter"
2020-07-15 00:36:49 +00:00
done
;;
convoLV2 )
for _convolver in "${_convolvers[@]}"; do
2022-04-04 13:19:45 +00:00
lv2lint -Mpack -I "$_name/build" "http://gareus.org/oss/lv2/$_name#$_convolver"
2020-07-15 00:36:49 +00:00
done
;;
darc.lv2|dpl.lv2|fil4.lv2 )
for _default in "${_defaults[@]}"; do
2022-04-04 13:19:45 +00:00
lv2lint -Mpack -I "$_name/build" "http://gareus.org/oss/lv2/${_name//.lv2/}#$_default"
2020-07-15 00:36:49 +00:00
done
;;
matrixmixer.lv2 )
2022-04-04 13:19:45 +00:00
lv2lint -Mpack -I "$_name/build" "http://gareus.org/oss/lv2/${_name//.lv2/}#i8o8"
2020-07-15 00:36:49 +00:00
;;
meters.lv2 )
for _meter in "${_meters[@]}"; do
2022-04-04 13:19:45 +00:00
lv2lint -Mpack -I "$_name/build" "http://gareus.org/oss/lv2/${_name//.lv2/}#$_meter"
2020-07-15 00:36:49 +00:00
done
;;
midifilter.lv2 )
for _midifilter in "${_midifilters[@]}"; do
2022-04-04 13:19:45 +00:00
lv2lint -Mpack -I "$_name/build" "http://gareus.org/oss/lv2/${_name//.lv2/}#$_midifilter"
2020-07-15 00:36:49 +00:00
done
;;
mixtri.lv2 )
2022-04-04 13:19:45 +00:00
lv2lint -Mpack -I "$_name/build" "http://gareus.org/oss/lv2/${_name//.lv2/}#lv2"
2020-07-15 00:36:49 +00:00
;;
onsettrigger.lv2 )
for _onsettrigger in "${_onsettriggers[@]}"; do
2022-04-04 13:19:45 +00:00
lv2lint -Mpack -I "$_name/build" "http://gareus.org/oss/lv2/${_name//.lv2/}#$_onsettrigger"
2020-07-15 00:36:49 +00:00
done
;;
sisco.lv2 )
for _sisco in "${_siscos[@]}"; do
2022-04-04 13:19:45 +00:00
lv2lint -Mpack -I "$_name/build" "http://gareus.org/oss/lv2/${_name//.lv2/}#$_sisco"
2020-07-15 00:36:49 +00:00
done
;;
spectra.lv2 )
2022-04-04 13:19:45 +00:00
lv2lint -Mpack -I "$_name/build" "http://gareus.org/oss/lv2/${_name//.lv2/}#Mono"
2020-07-15 00:36:49 +00:00
;;
stepseq.lv2 )
2022-04-04 13:19:45 +00:00
lv2lint -Mpack -I "$_name/build" "http://gareus.org/oss/lv2/${_name//.lv2/}#s8n8"
2020-07-15 00:36:49 +00:00
;;
tuna.lv2 )
for _tuna in "${_tunas[@]}"; do
2022-04-04 13:19:45 +00:00
lv2lint -Mpack -I "$_name/build" "http://gareus.org/oss/lv2/${_name//.lv2/}#$_tuna"
2020-07-15 00:36:49 +00:00
done
;;
2021-04-07 14:08:26 +00:00
zconvo.lv2 )
for _zconvolver in "${_zconvolvers[@]}"; do
2022-04-04 13:19:45 +00:00
lv2lint -Mpack -I "$_name/build" "http://gareus.org/oss/lv2/zeroconvolv#$_zconvolver"
2021-04-07 14:08:26 +00:00
done
;;
2020-07-15 00:36:49 +00:00
robtk )
echo "Toolkit. Skipping..."
;;
* )
2022-04-04 13:19:45 +00:00
lv2lint -Mpack -I "$_name/build" "http://gareus.org/oss/lv2/${_name//.lv2/}"
2020-07-15 00:36:49 +00:00
;;
esac
done < plugin.versions
}
2018-02-07 03:29:04 +00:00
package() {
2022-01-15 14:21:44 +00:00
depends+=(libfftw3f.so libgobject-2.0.so libltc.so libpango-1.0.so
libpangocairo-1.0.so libsamplerate.so libsndfile.so libzita-convolver.so)
2019-09-22 23:04:21 +00:00
declare -A _dirs=(
["darc"]="darc.lv2"
["dpl"]="dpl.lv2"
["fat1"]="fat1.lv2"
["fil4"]="fil4.lv2"
["matrixmixer8x8"]="matrixmixer.lv2"
["meter"]="meters.lv2"
["mixtri"]="mixtri.lv2"
2022-09-13 12:07:35 +00:00
["phaserotate"]="phaserotate.lv2"
2019-09-22 23:04:21 +00:00
["scope"]="sisco.lv2"
["spectr"]="spectra.lv2"
["stepseq"]="stepseq.lv2"
["tuna"]="tuna.lv2"
)
2022-04-04 13:19:45 +00:00
cd $pkgname-$pkgver
2018-02-07 03:29:04 +00:00
make install DESTDIR="$pkgdir/" PREFIX=/usr
2021-10-12 17:05:29 +00:00
2019-09-22 23:04:21 +00:00
# xdg desktop integration
2022-04-04 13:19:45 +00:00
install -vDm 644 ./*.desktop -t "$pkgdir/usr/share/applications/"
2019-09-22 23:04:21 +00:00
# icons
for name in "${_names[@]}"; do
2022-04-04 13:19:45 +00:00
install -vDm 644 "${_dirs[$name]}/img/x42-$name.png" -t "$pkgdir/usr/share/icons/hicolor/256x256/apps/"
2019-09-22 23:04:21 +00:00
done
2022-04-04 13:19:45 +00:00
install -vDm 644 ../$pkgname.png -t "$pkgdir/usr/share/icons/hicolor/256x256/apps/"
2019-09-22 23:04:21 +00:00
# menu integration
2022-04-04 13:19:45 +00:00
install -vDm 644 ../$pkgname.menu -t "$pkgdir/etc/xdg/menus/applications-merged/"
install -vDm 644 ../$pkgname.directory -t "$pkgdir/usr/share/desktop-directories/"
install -vDm 644 plugin.news -t "$pkgdir/usr/share/doc/$pkgname"
2018-02-07 03:29:04 +00:00
}
# vim:set ts=2 sw=2 et: