Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jun 2023 21:09:58 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 6f4c248c8cc2 - main - =?utf-8?Q?audio/noise-suppression-for-voice-lv2:=20Update=200.91-2=20=E2=86=92=201.03?=
Message-ID:  <202306092109.359L9wtp089128@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6f4c248c8cc2d627ae96944f0d4ebb2c67966aca

commit 6f4c248c8cc2d627ae96944f0d4ebb2c67966aca
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-06-09 21:09:31 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-06-09 21:09:55 +0000

    audio/noise-suppression-for-voice-lv2: Update 0.91-2 → 1.03
---
 audio/noise-suppression-for-voice-lv2/Makefile     | 33 +++++++++++++++-------
 audio/noise-suppression-for-voice-lv2/distinfo     |  6 ++--
 .../files/patch-CMakeLists.txt                     | 20 +++++++++++++
 .../files/patch-src_juce__plugin_CMakeLists.txt    | 28 ++++++++++++++++++
 audio/noise-suppression-for-voice-lv2/pkg-plist    | 10 +++++++
 5 files changed, 84 insertions(+), 13 deletions(-)

diff --git a/audio/noise-suppression-for-voice-lv2/Makefile b/audio/noise-suppression-for-voice-lv2/Makefile
index 6b0e2705248f..8c4bb67450a5 100644
--- a/audio/noise-suppression-for-voice-lv2/Makefile
+++ b/audio/noise-suppression-for-voice-lv2/Makefile
@@ -1,8 +1,6 @@
 PORTNAME=	noise-suppression-for-voice
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.91-2
-PORTREVISION=	1
-DISTVERSIONSUFFIX=	-g6466b34
+DISTVERSION=	1.03
 CATEGORIES=	audio
 PKGNAMESUFFIX=	-lv2
 
@@ -13,18 +11,33 @@ WWW=		https://github.com/werman/noise-suppression-for-voice
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BUILD_DEPENDS=	lv2>0:audio/lv2
+BUILD_DEPENDS=	juce>0:devel/juce \
+		lv2>0:audio/lv2
+LIB_DEPENDS=	libfreetype.so:print/freetype2
 
-USES=		cmake compiler:c11
+USES=		cmake compiler:c11 pkgconfig
 USE_GITHUB=	yes
 GH_ACCOUNT=	werman
 
 CMAKE_OFF=	BUILD_VST_PLUGIN # https://github.com/werman/noise-suppression-for-voice/issues/65
-
-PLIST_FILES=	lib/ladspa/librnnoise_ladspa.so \
-		lib/lv2/rnnoise.lv2/manifest.ttl \
-		lib/lv2/rnnoise.lv2/rnnoise.ttl \
-		lib/lv2/rnnoise.lv2/rnnoise_lv2.so
+CXXFLAGS+=	-DJUCE_CUSTOM_VST3_SDK=1
+
+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
+	@${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} \
+		lib/lv2/rnnoise_mono.lv2/librnnoise_mono.so \
+		lib/lv2/rnnoise_stereo.lv2/librnnoise_stereo.so \
+		lib/vst3/rnnoise.vst3/Contents/x86_64-linux/rnnoise.so
 
 # the LADSPA plugin can be used directly from PulseAudio's config file
 
diff --git a/audio/noise-suppression-for-voice-lv2/distinfo b/audio/noise-suppression-for-voice-lv2/distinfo
index df8929f6d5f0..9245c5a9ae8f 100644
--- a/audio/noise-suppression-for-voice-lv2/distinfo
+++ b/audio/noise-suppression-for-voice-lv2/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1617737546
-SHA256 (werman-noise-suppression-for-voice-v0.91-2-g6466b34_GH0.tar.gz) = d9665a60daef47ed052accae0c62aa3b822d7b04a2e3fab2ac718675a10c3906
-SIZE (werman-noise-suppression-for-voice-v0.91-2-g6466b34_GH0.tar.gz) = 207626
+TIMESTAMP = 1686287620
+SHA256 (werman-noise-suppression-for-voice-v1.03_GH0.tar.gz) = 8c85cae3ebbb3a18facc38930a3b67ca90e3ad609526a0018c71690de35baf04
+SIZE (werman-noise-suppression-for-voice-v1.03_GH0.tar.gz) = 19486457
diff --git a/audio/noise-suppression-for-voice-lv2/files/patch-CMakeLists.txt b/audio/noise-suppression-for-voice-lv2/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..40ba5695fd69
--- /dev/null
+++ b/audio/noise-suppression-for-voice-lv2/files/patch-CMakeLists.txt
@@ -0,0 +1,20 @@
+--- CMakeLists.txt.orig	2022-07-28 08:24:44 UTC
++++ CMakeLists.txt
+@@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.6)
+ include(GNUInstallDirs)
+ 
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
+-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
++set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
+ set(CMAKE_BINARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+ 
+ set(MINGW_ADDITIONAL_LINKING_FLAGS "-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic")
+@@ -35,6 +35,7 @@ if (BUILD_VST_PLUGIN OR BUILD_VST3_PLUGIN OR BUILD_LV2
+     # For install JUCE copies all its headers, no one needs them. It also doesn't install actual libraries.
+     # On the other hand JUCE could install libraries during build process (see COPY_PLUGIN_AFTER_BUILD option).
+     # So we have to manually install plugins.
+-    add_subdirectory(external/JUCE EXCLUDE_FROM_ALL)
++    #add_subdirectory(external/JUCE EXCLUDE_FROM_ALL)
++    find_package(JUCE REQUIRED)
+     add_subdirectory(src/juce_plugin)
+ endif ()
diff --git a/audio/noise-suppression-for-voice-lv2/files/patch-src_juce__plugin_CMakeLists.txt b/audio/noise-suppression-for-voice-lv2/files/patch-src_juce__plugin_CMakeLists.txt
new file mode 100644
index 000000000000..a0a868000b81
--- /dev/null
+++ b/audio/noise-suppression-for-voice-lv2/files/patch-src_juce__plugin_CMakeLists.txt
@@ -0,0 +1,28 @@
+--- src/juce_plugin/CMakeLists.txt.orig	2022-07-28 08:24:44 UTC
++++ src/juce_plugin/CMakeLists.txt
+@@ -87,14 +89,14 @@ function(compile_plugins formats suffix default_channe
+     # JUCE has a terrible idea of installing plugin during the BUILD process instead of during the INSTALL,
+     # also JUCE wants to install its headers which we don't want at all.
+     # So it's easier to handle it ourselves.
+-    if (UNIX AND NOT APPLE)
++    if (FALSE AND UNIX AND NOT APPLE)
+         foreach (format IN LISTS formats)
+             if (format STREQUAL "LV2")
+-                install(DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/rnnoise${suffix}.lv2 DESTINATION ${CMAKE_INSTALL_LIBDIR}/lv2)
++                install(DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/../src/juce_plugin/rnnoise_juce_plugin${suffix}_artefacts/Release/LV2/rnnoise${suffix}.lv2 DESTINATION lib/lv2)
+             elseif (format STREQUAL "VST")
+-                install(DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/vst/ DESTINATION ${CMAKE_INSTALL_LIBDIR}/lxvst)
++                install(DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/vst/ DESTINATION lib/lxvst)
+             elseif (format STREQUAL "VST3")
+-                install(DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/rnnoise.vst3 DESTINATION ${CMAKE_INSTALL_LIBDIR}/vst3)
++                install(DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/../src/juce_plugin/rnnoise_juce_plugin_artefacts/Release/VST3/rnnoise.vst3 DESTINATION lib/vst3)
+             endif ()
+         endforeach ()
+     endif ()
+@@ -135,4 +137,4 @@ endif ()
+ 
+ if (FORMATS)
+     compile_plugins("${FORMATS}" "" 1)
+-endif ()
+\ No newline at end of file
++endif ()
diff --git a/audio/noise-suppression-for-voice-lv2/pkg-plist b/audio/noise-suppression-for-voice-lv2/pkg-plist
new file mode 100644
index 000000000000..4c3264186b26
--- /dev/null
+++ b/audio/noise-suppression-for-voice-lv2/pkg-plist
@@ -0,0 +1,10 @@
+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
+lib/lv2/rnnoise_mono.lv2/ui.ttl
+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/x86_64-linux/rnnoise.so



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306092109.359L9wtp089128>