1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-19 00:13:33 +00:00

audio/noise-suppression-for-voice-lv2: Fix build by disabling VST3

Add options LADSPA and VST3. The VST3 plugin isn;t built any more
after juce update. Now the new option VST3 is OFF by default.

Reported by:	fallout
This commit is contained in:
Yuri Victorovich 2023-08-14 19:21:31 -07:00
parent a3f74b1611
commit bbdab99505
2 changed files with 21 additions and 9 deletions

View File

@ -1,6 +1,7 @@
PORTNAME= noise-suppression-for-voice
DISTVERSIONPREFIX= v
DISTVERSION= 1.03
PORTREVISION= 1
CATEGORIES= audio
PKGNAMESUFFIX= -lv2
@ -24,21 +25,32 @@ CXXFLAGS+= -DJUCE_CUSTOM_VST3_SDK=1
PLIST_SUB= XARCH=${ARCH:S/amd64/x86_64/}
OPTIONS_DEFINE= LADSPA VST3
OPTIONS_DEFAULT= LADSPA #VST3
OPTIONS_SUB= yes
LADSPA_CMAKE_BOOL= BUILD_LADSPA_PLUGIN
VST3_CMAKE_BOOL= BUILD_VST3_PLUGIN
VST3_BROKEN= fails to build with juce-7.0.6, see https://github.com/werman/noise-suppression-for-voice/issues/177
post-extract: # remove bundled JUCE
@${RM} -rf ${WRKSRC}/external/JUCE
post-install: # move plugins to a proper place: workaround for https://github.com/juce-framework/JUCE/issues/1237
# LV2 plugin
post-install: # move plugins to a proper place: workaround for https://github.com/juce-framework/JUCE/issues/1237 and strip binaries
@${MV} ${STAGEDIR}${WRKDIR}/.lv2 ${STAGEDIR}${PREFIX}/lib/lv2
# VST3 plugin
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/vst3
@${MV} `${FIND} ${STAGEDIR} -name rnnoise.vst3` ${STAGEDIR}${PREFIX}/lib/vst3
# remove empty directories
@${FIND} ${STAGEDIR} -type d -empty -delete
# strip binaries
cd ${STAGEDIR}${PREFIX} && ${STRIP_CMD} \
@cd ${STAGEDIR}${PREFIX} && ${STRIP_CMD} \
lib/lv2/rnnoise_mono.lv2/librnnoise_mono.so \
lib/lv2/rnnoise_stereo.lv2/librnnoise_stereo.so \
lib/lv2/rnnoise_stereo.lv2/librnnoise_stereo.so
post-install-VST3-on:
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/vst3
@${MV} `${FIND} ${STAGEDIR} -name rnnoise.vst3` ${STAGEDIR}${PREFIX}/lib/vst3
# strip binaries
@cd ${STAGEDIR}${PREFIX} && ${STRIP_CMD} \
lib/vst3/rnnoise.vst3/Contents/*/rnnoise.so
# the LADSPA plugin can be used directly from PulseAudio's config file

View File

@ -1,4 +1,4 @@
lib/ladspa/librnnoise_ladspa.so
%%LADSPA%%lib/ladspa/librnnoise_ladspa.so
lib/lv2/rnnoise_mono.lv2/dsp.ttl
lib/lv2/rnnoise_mono.lv2/librnnoise_mono.so
lib/lv2/rnnoise_mono.lv2/manifest.ttl
@ -7,4 +7,4 @@ lib/lv2/rnnoise_stereo.lv2/dsp.ttl
lib/lv2/rnnoise_stereo.lv2/librnnoise_stereo.so
lib/lv2/rnnoise_stereo.lv2/manifest.ttl
lib/lv2/rnnoise_stereo.lv2/ui.ttl
lib/vst3/rnnoise.vst3/Contents/%%XARCH%%-linux/rnnoise.so
%%VST3%%lib/vst3/rnnoise.vst3/Contents/%%XARCH%%-linux/rnnoise.so