diff --git a/audio/odin2-synthesizer/Makefile b/audio/odin2-synthesizer/Makefile index 3511d9060a7d..a6c6df31dc05 100644 --- a/audio/odin2-synthesizer/Makefile +++ b/audio/odin2-synthesizer/Makefile @@ -1,55 +1,55 @@ PORTNAME= odin2-synthesizer DISTVERSIONPREFIX= v -DISTVERSION= 2.3.4-13 -DISTVERSIONSUFFIX= -gc8d3861f -PORTREVISION= 2 +DISTVERSION= 2.4.1 CATEGORIES= audio multimedia MAINTAINER= yuri@FreeBSD.org COMMENT= Polyphonic synthesizer WWW= https://thewavewarden.com/pages/odin-2 \ https://github.com/TheWaveWarden/odin2 LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE BROKEN_armv7= compilation fails, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279134 BUILD_DEPENDS= lv2>0:audio/lv2 \ bash:shells/bash LIB_DEPENDS= libasound.so:audio/alsa-lib \ libfreetype.so:print/freetype2 -USES= gl cmake localbase:ldflags pkgconfig xorg +USES= gl cmake dos2unix localbase:ldflags pkgconfig xorg USE_GL= gl USE_XORG= x11 xcursor xext xinerama xrandr xrender # for juce +CMAKE_ARGS= -DODIN2_COPY_PLUGIN_AFTER_BUILD:BOOL=OFF USE_GITHUB= yes GH_ACCOUNT= TheWaveWarden GH_PROJECT= odin2 GH_TUPLE= surge-synthesizer:tuning-library:8eb7232ac24ac2f97a052063161c0c4f5fd763e3:surge_synthesizer_tuning_library/libs/tuning-library \ juce-framework:JUCE:53b04877c6ebc7ef3cb42e84cb11a48e0cf809b5:juce_framework_JUCE/libs/JUCE \ free-audio:clap-juce-extensions:f11e8c3284e7ff2629534148cbd98da9f602bfea:free_audio_clap_juce_extensions/libs/clap-juce-extensions \ free-audio:clap:84ad6fe9739d3070ed0eb05c24be303a899ab813:free_audio_clap/libs/clap-juce-extensions/clap-libs/clap \ free-audio:clap-helpers:2bb43c18788c689708ead6f127a2d75e772ab389:free_audio_clap_helpers/libs/clap-juce-extensions/clap-libs/clap-helpers \ + nlohmann:json:960b763:nlohmann_json/libs/json \ lv2-porting-project:JUCE:b8fb637be2f7d6bb3bd2f104c4c798ec79b2f2f1:lv2_porting_project_JUCE/libs/JUCELV2 CXXFLAGS+= -DJUCE_CUSTOM_VST3_SDK=1 post-patch: # remove PLUGIN_API: -DPLUGIN_API= doesn't work for some reason @${FIND} ${WRKSRC} -name "*.h" -o -name "*.cpp" | ${XARGS} ${REINPLACE_CMD} -i '' -e 's| PLUGIN_API | |' do-install: # LV2 plugin ${MKDIR} ${STAGEDIR}${PREFIX}/lib/lv2 cd ${BUILD_WRKSRC}/Odin2_artefacts/Release/LV2 && ${COPYTREE_SHARE} Odin2.lv2 ${STAGEDIR}${PREFIX}/lib/lv2 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lv2/Odin2.lv2/Odin2.so # CLAP plugin ${MKDIR} ${STAGEDIR}${PREFIX}/lib/clap ${INSTALL_DATA} ${BUILD_WRKSRC}/Odin2_artefacts/Release/CLAP/Odin2.clap ${STAGEDIR}${PREFIX}/lib/clap ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/clap/Odin2.clap # VST3 plugin ${MKDIR} ${STAGEDIR}${PREFIX}/lib/vst ${INSTALL_LIB} ${BUILD_WRKSRC}/Odin2_artefacts/Release/VST3/Odin2.vst3/Contents/*/Odin2.so ${STAGEDIR}${PREFIX}/lib/vst .include diff --git a/audio/odin2-synthesizer/distinfo b/audio/odin2-synthesizer/distinfo index 8b8353e3fcdd..b54750f6a427 100644 --- a/audio/odin2-synthesizer/distinfo +++ b/audio/odin2-synthesizer/distinfo @@ -1,15 +1,17 @@ -TIMESTAMP = 1740208433 -SHA256 (TheWaveWarden-odin2-v2.3.4-13-gc8d3861f_GH0.tar.gz) = 677b3e2ff752da7cdd3d68013a3fdfae7ad5bb196d0e609325c517308fca819f -SIZE (TheWaveWarden-odin2-v2.3.4-13-gc8d3861f_GH0.tar.gz) = 68696686 +TIMESTAMP = 1778973095 +SHA256 (TheWaveWarden-odin2-v2.4.1_GH0.tar.gz) = 3acc6f28c19fbde70a503c2ef7ffb961bdc5ef8292ccbdfeb2894d490a5428e6 +SIZE (TheWaveWarden-odin2-v2.4.1_GH0.tar.gz) = 40695615 SHA256 (surge-synthesizer-tuning-library-8eb7232ac24ac2f97a052063161c0c4f5fd763e3_GH0.tar.gz) = a4f03d0d0ee6d7712fe47cd27b6006a32dc20387b35a2e4ebe7e7339e748a249 SIZE (surge-synthesizer-tuning-library-8eb7232ac24ac2f97a052063161c0c4f5fd763e3_GH0.tar.gz) = 137623 SHA256 (juce-framework-JUCE-53b04877c6ebc7ef3cb42e84cb11a48e0cf809b5_GH0.tar.gz) = c86c86c55648c29dd36fd9f4e36fa798556892a6d6e92a0eee5852361f82be9b SIZE (juce-framework-JUCE-53b04877c6ebc7ef3cb42e84cb11a48e0cf809b5_GH0.tar.gz) = 18691224 SHA256 (free-audio-clap-juce-extensions-f11e8c3284e7ff2629534148cbd98da9f602bfea_GH0.tar.gz) = cde52a4f16743aeca96481639bd1328159dcad830ddc62ac3b1f509843529f8b SIZE (free-audio-clap-juce-extensions-f11e8c3284e7ff2629534148cbd98da9f602bfea_GH0.tar.gz) = 17710 SHA256 (free-audio-clap-84ad6fe9739d3070ed0eb05c24be303a899ab813_GH0.tar.gz) = 87699efad3af3a96d291c73785fae30bcde72ab4a994549940d1cc18901ac05f SIZE (free-audio-clap-84ad6fe9739d3070ed0eb05c24be303a899ab813_GH0.tar.gz) = 2318725 SHA256 (free-audio-clap-helpers-2bb43c18788c689708ead6f127a2d75e772ab389_GH0.tar.gz) = 13cd0106ffb4ecd764d9355d46342a79d87e0ea037e5f129fe4bd29a542d6c95 SIZE (free-audio-clap-helpers-2bb43c18788c689708ead6f127a2d75e772ab389_GH0.tar.gz) = 19010 +SHA256 (nlohmann-json-960b763_GH0.tar.gz) = 8fa69a53b389e8dfb1374927305e4c92e5d24520d23c22772fbd4ea825895037 +SIZE (nlohmann-json-960b763_GH0.tar.gz) = 8054299 SHA256 (lv2-porting-project-JUCE-b8fb637be2f7d6bb3bd2f104c4c798ec79b2f2f1_GH0.tar.gz) = 7f414c62674155326bb189527fd9755aca4c58b6f74d7caafaa2b14cd36963a0 SIZE (lv2-porting-project-JUCE-b8fb637be2f7d6bb3bd2f104c4c798ec79b2f2f1_GH0.tar.gz) = 18717111 diff --git a/audio/odin2-synthesizer/files/patch-CMakeLists.txt b/audio/odin2-synthesizer/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..32e87726a9ef --- /dev/null +++ b/audio/odin2-synthesizer/files/patch-CMakeLists.txt @@ -0,0 +1,14 @@ +-- Remove CMAKE_SOURCE_DIRECTORY to avoid embedding absolute build paths. +-- It's only used for debug builds anyway, and BinaryData is used in release. + +--- CMakeLists.txt.orig 2026-05-17 03:55:19 UTC ++++ CMakeLists.txt +@@ -31,7 +31,7 @@ add_compile_definitions( + add_compile_definitions( + JUCE_MODAL_LOOPS_PERMITTED + #JUCE_ENABLE_REPAINT_DEBUGGING +- CMAKE_SOURCE_DIRECTORY="${CMAKE_SOURCE_DIR}" ++ + ) + + # ==================== Add Plugin ======================= diff --git a/audio/odin2-synthesizer/files/patch-clap-juce-wrapper.cpp b/audio/odin2-synthesizer/files/patch-clap-juce-wrapper.cpp new file mode 100644 index 000000000000..c033c612d388 --- /dev/null +++ b/audio/odin2-synthesizer/files/patch-clap-juce-wrapper.cpp @@ -0,0 +1,49 @@ +-- Add JUCE_BSD to ensure compatibility with FreeBSD. + +--- libs/clap-juce-extensions/src/wrapper/clap-juce-wrapper.cpp.orig 2026-05-17 03:55:19 UTC ++++ libs/clap-juce-extensions/src/wrapper/clap-juce-wrapper.cpp +@@ -35,7 +35,7 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE + + #include + +-#if JUCE_LINUX ++#if JUCE_LINUX || JUCE_BSD + #include + #endif + +@@ -159,7 +159,7 @@ class ClapJuceWrapper : public clap::helpers::PlugineditorBeingDeleted(editor.get()); + +-#if JUCE_LINUX ++#if JUCE_LINUX || JUCE_BSD + if (_host.canUseTimerSupport()) + { + _host.timerSupportUnregister(idleTimer); +@@ -169,7 +169,7 @@ class ClapJuceWrapper : public clap::helpers::Plugin + #include #if __BYTE_ORDER == __LITTLE_ENDIAN #define BYTEORDER kLittleEndian #else diff --git a/audio/odin2-synthesizer/files/patch-jucelv2-juceutils.cmake b/audio/odin2-synthesizer/files/patch-jucelv2-juceutils.cmake new file mode 100644 index 000000000000..052dbab2cf76 --- /dev/null +++ b/audio/odin2-synthesizer/files/patch-jucelv2-juceutils.cmake @@ -0,0 +1,58 @@ +-- Add BSD support to JUCELV2 CMake utilities. + +--- libs/JUCELV2/extras/Build/CMake/JUCEUtils.cmake.orig 2026-05-17 03:55:19 UTC ++++ libs/JUCELV2/extras/Build/CMake/JUCEUtils.cmake +@@ -84,7 +84,7 @@ set_property(GLOBAL PROPERTY JUCE_COPY_PLUGIN_AFTER_BU + FULL_DOCS "Whether or not plugins should be copied after building") + set_property(GLOBAL PROPERTY JUCE_COPY_PLUGIN_AFTER_BUILD FALSE) + +-if((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) ++if(((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) + _juce_create_pkgconfig_target(JUCE_CURL_LINUX_DEPS libcurl) + _juce_create_pkgconfig_target(JUCE_BROWSER_LINUX_DEPS webkit2gtk-4.0 gtk+-x11-3.0) + elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") +@@ -116,7 +116,7 @@ function(_juce_set_default_properties) + + set_property(GLOBAL PROPERTY JUCE_VST3_COPY_DIR "${prefix}/VST3") + set_property(GLOBAL PROPERTY JUCE_AAX_COPY_DIR "${prefix}/Avid/Audio/Plug-Ins") +- elseif((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) ++ elseif(((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) + set_property(GLOBAL PROPERTY JUCE_VST_COPY_DIR "$ENV{HOME}/.vst") + set_property(GLOBAL PROPERTY JUCE_VST3_COPY_DIR "$ENV{HOME}/.vst3") + set_property(GLOBAL PROPERTY JUCE_LV2_COPY_DIR "$ENV{HOME}/.lv2") +@@ -218,7 +218,7 @@ function(_juce_link_optional_libraries target) + # know they need it. Otherwise, we won't link anything. + # See the NEEDS_CURL, NEEDS_WEB_BROWSER, and NEEDS_STORE_KIT options in the CMake/readme.md. + function(_juce_link_optional_libraries target) +- if((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) ++ if(((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) + get_target_property(needs_curl ${target} JUCE_NEEDS_CURL) + + if(needs_curl) +@@ -898,7 +898,7 @@ function(_juce_set_plugin_target_properties shared_cod + + set(output_path "${products_folder}/${product_name}.vst3") + +- if((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) ++ if(((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) + set_target_properties(${target_name} PROPERTIES + SUFFIX .so + LIBRARY_OUTPUT_DIRECTORY "${output_path}/Contents/${JUCE_TARGET_ARCHITECTURE}-linux") +@@ -934,7 +934,7 @@ function(_juce_set_plugin_target_properties shared_cod + + set(output_path "${products_folder}/${product_name}.lv2") + +- if(CMAKE_SYSTEM_NAME STREQUAL "Linux") ++ if((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) + # On linux we assume that the output arch is the same as the that of the host platform + set(is_platform_x64 $) + set(arch_string $) +@@ -1082,7 +1082,7 @@ function(_juce_link_plugin_wrapper shared_code_target + add_library(${target_name} MODULE) + endif() + +- if((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) ++ if(((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) + target_link_options(${target_name} PRIVATE "-Wl,--no-undefined") + endif() + diff --git a/audio/odin2-synthesizer/files/patch-libs_JUCELV2_modules_juce__core_native_juce__linux__Files.cpp b/audio/odin2-synthesizer/files/patch-jucelv2-linux-files.cpp similarity index 77% rename from audio/odin2-synthesizer/files/patch-libs_JUCELV2_modules_juce__core_native_juce__linux__Files.cpp rename to audio/odin2-synthesizer/files/patch-jucelv2-linux-files.cpp index f741e67ce3b1..628152ed7c9e 100644 --- a/audio/odin2-synthesizer/files/patch-libs_JUCELV2_modules_juce__core_native_juce__linux__Files.cpp +++ b/audio/odin2-synthesizer/files/patch-jucelv2-linux-files.cpp @@ -1,11 +1,13 @@ ---- libs/JUCELV2/modules/juce_core/native/juce_linux_Files.cpp.orig 2025-02-22 09:24:47 UTC +-- Use execv instead of execve to avoid issues with environ on some platforms. + +--- libs/JUCELV2/modules/juce_core/native/juce_linux_Files.cpp.orig 2026-05-17 03:55:19 UTC +++ libs/JUCELV2/modules/juce_core/native/juce_linux_Files.cpp @@ -230,7 +230,7 @@ bool Process::openDocument (const String& fileName, co - setsid(); - - // Child process -- execve (argv[0], (char**) argv, environ); -+ execv (argv[0], (char**) argv); - exit (0); - } - + setsid(); + + // Child process +- execve (argv[0], (char**) argv, environ); ++ execv (argv[0], (char**) argv); + exit (0); + } + diff --git a/audio/odin2-synthesizer/files/patch-libs_JUCELV2_modules_juce__audio__plugin__client_LV2_juce__LV2__Wrapper__Exporter.cpp b/audio/odin2-synthesizer/files/patch-jucelv2-lv2-exporter.cpp similarity index 54% rename from audio/odin2-synthesizer/files/patch-libs_JUCELV2_modules_juce__audio__plugin__client_LV2_juce__LV2__Wrapper__Exporter.cpp rename to audio/odin2-synthesizer/files/patch-jucelv2-lv2-exporter.cpp index e4599373aaa8..828c6253d609 100644 --- a/audio/odin2-synthesizer/files/patch-libs_JUCELV2_modules_juce__audio__plugin__client_LV2_juce__LV2__Wrapper__Exporter.cpp +++ b/audio/odin2-synthesizer/files/patch-jucelv2-lv2-exporter.cpp @@ -1,20 +1,22 @@ ---- libs/JUCELV2/modules/juce_audio_plugin_client/LV2/juce_LV2_Wrapper_Exporter.cpp.orig 2025-02-22 08:52:21 UTC +-- Add BSD support to JUCELV2 LV2 wrapper exporter. + +--- libs/JUCELV2/modules/juce_audio_plugin_client/LV2/juce_LV2_Wrapper_Exporter.cpp.orig 2026-05-17 03:55:19 UTC +++ libs/JUCELV2/modules/juce_audio_plugin_client/LV2/juce_LV2_Wrapper_Exporter.cpp -@@ -15,6 +15,8 @@ +@@ -13,7 +13,7 @@ + + #if JUCE_MAC #define PLUGIN_EXT ".dylib" - #elif JUCE_LINUX +-#elif JUCE_LINUX ++#elif JUCE_LINUX || JUCE_BSD #define PLUGIN_EXT ".so" -+#elif JUCE_BSD -+ #define PLUGIN_EXT ".so" #elif JUCE_WINDOWS #define PLUGIN_EXT ".dll" - #endif -@@ -127,6 +129,8 @@ static const String makeManifestFile (AudioProcessor* +@@ -126,7 +126,7 @@ static const String makeManifestFile (AudioProcessor* + text += "<" + pluginURI + "#ParentUI>\n"; #if JUCE_MAC text += " a ui:CocoaUI ;\n"; - #elif JUCE_LINUX -+ text += " a ui:X11UI ;\n"; -+ #elif JUCE_BSD +- #elif JUCE_LINUX ++ #elif JUCE_LINUX || JUCE_BSD text += " a ui:X11UI ;\n"; #elif JUCE_WINDOWS text += " a ui:WindowsUI ;\n"; diff --git a/audio/odin2-synthesizer/files/patch-libs_JUCELV2_modules_juce__audio__processors_format__types_VST3__SDK_pluginterfaces_base_fplatform.h b/audio/odin2-synthesizer/files/patch-jucelv2-vst3-fplatform.h similarity index 73% rename from audio/odin2-synthesizer/files/patch-libs_JUCELV2_modules_juce__audio__processors_format__types_VST3__SDK_pluginterfaces_base_fplatform.h rename to audio/odin2-synthesizer/files/patch-jucelv2-vst3-fplatform.h index dd9070a34f0c..423c55c0de63 100644 --- a/audio/odin2-synthesizer/files/patch-libs_JUCELV2_modules_juce__audio__processors_format__types_VST3__SDK_pluginterfaces_base_fplatform.h +++ b/audio/odin2-synthesizer/files/patch-jucelv2-vst3-fplatform.h @@ -1,29 +1,22 @@ ---- libs/JUCELV2/modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/fplatform.h.orig 2022-02-11 05:09:33 UTC +-- Add FreeBSD support to VST3 SDK fplatform.h. + +--- libs/JUCELV2/modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/fplatform.h.orig 2026-05-17 03:55:19 UTC +++ libs/JUCELV2/modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/fplatform.h -@@ -57,7 +57,7 @@ - #define BYTEORDER kLittleEndian - - #define COM_COMPATIBLE 1 -- #define PLUGIN_API __stdcall -+ #define __stdcall - #define SMTG_PTHREADS 0 - - #define SMTG_EXPORT_SYMBOL __declspec (dllexport) @@ -95,7 +95,7 @@ //----------------------------------------------------------------------------- // LINUX //----------------------------------------------------------------------------- -#elif __gnu_linux__ || __linux__ +#elif __gnu_linux__ || __linux__ || defined(__FreeBSD__) || defined(__DragonFly__) #define SMTG_OS_LINUX 1 #define SMTG_OS_MACOS 0 #define SMTG_OS_WINDOWS 0 @@ -107,7 +107,7 @@ #define SMTG_CPU_ARM __arm__ #define SMTG_CPU_ARM_64 __aarch64__ - #include + #include #if __BYTE_ORDER == __LITTLE_ENDIAN #define BYTEORDER kLittleEndian #else diff --git a/audio/odin2-synthesizer/files/patch-libs_JUCELV2_extras_Build_CMake_JUCEUtils.cmake b/audio/odin2-synthesizer/files/patch-libs_JUCELV2_extras_Build_CMake_JUCEUtils.cmake deleted file mode 100644 index 8096eb34ae55..000000000000 --- a/audio/odin2-synthesizer/files/patch-libs_JUCELV2_extras_Build_CMake_JUCEUtils.cmake +++ /dev/null @@ -1,11 +0,0 @@ ---- libs/JUCELV2/extras/Build/CMake/JUCEUtils.cmake.orig 2025-02-22 09:54:25 UTC -+++ libs/JUCELV2/extras/Build/CMake/JUCEUtils.cmake -@@ -934,7 +934,7 @@ function(_juce_set_plugin_target_properties shared_cod - - set(output_path "${products_folder}/${product_name}.lv2") - -- if(CMAKE_SYSTEM_NAME STREQUAL "Linux") -+ if((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")) - # On linux we assume that the output arch is the same as the that of the host platform - set(is_platform_x64 $) - set(arch_string $) diff --git a/audio/odin2-synthesizer/files/patch-libs_clap-juce-extensions_src_wrapper_clap-juce-wrapper.cpp b/audio/odin2-synthesizer/files/patch-libs_clap-juce-extensions_src_wrapper_clap-juce-wrapper.cpp deleted file mode 100644 index c7015955ed92..000000000000 --- a/audio/odin2-synthesizer/files/patch-libs_clap-juce-extensions_src_wrapper_clap-juce-wrapper.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- libs/clap-juce-extensions/src/wrapper/clap-juce-wrapper.cpp.orig 2025-02-22 09:13:25 UTC -+++ libs/clap-juce-extensions/src/wrapper/clap-juce-wrapper.cpp -@@ -35,7 +35,7 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE - - #include - --#if JUCE_LINUX -+#if JUCE_LINUX || JUCE_BSD - #include - #endif -