Skip to content

Commit

Permalink
audio/noise-suppression-for-voice-lv2: Fix build by disabling VST3
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yurivict committed Aug 15, 2023
1 parent a3f74b1 commit bbdab99
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
26 changes: 19 additions & 7 deletions audio/noise-suppression-for-voice-lv2/Makefile
@@ -1,6 +1,7 @@
PORTNAME= noise-suppression-for-voice
DISTVERSIONPREFIX= v
DISTVERSION= 1.03
PORTREVISION= 1
CATEGORIES= audio
PKGNAMESUFFIX= -lv2

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions audio/noise-suppression-for-voice-lv2/pkg-plist
@@ -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
Expand All @@ -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

0 comments on commit bbdab99

Please sign in to comment.