git: 4d1970829bb3 - main - audio/dexed: New port: DX7 FM multi plaform/multi format plugin

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Wed, 13 Apr 2022 03:27:52 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4d1970829bb31e69ff383ee30d819df841999045

commit 4d1970829bb31e69ff383ee30d819df841999045
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-04-13 03:27:08 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-04-13 03:27:50 +0000

    audio/dexed: New port: DX7 FM multi plaform/multi format plugin
---
 audio/Makefile                                     |  1 +
 audio/dexed/Makefile                               | 44 ++++++++++++++++++++++
 audio/dexed/distinfo                               | 23 +++++++++++
 audio/dexed/files/patch-Source_CMakeLists.txt      | 13 +++++++
 ...types_VST3__SDK_pluginterfaces_base_fplatform.h | 20 ++++++++++
 ...ypes_VST3__SDK_pluginterfaces_base_funknown.cpp | 21 +++++++++++
 ...tch-libs_JUCE_modules_juce__core_juce__core.cpp | 11 ++++++
 audio/dexed/pkg-descr                              |  5 +++
 8 files changed, 138 insertions(+)

diff --git a/audio/Makefile b/audio/Makefile
index 40ed524e428d..7cbf653ef5b5 100644
--- a/audio/Makefile
+++ b/audio/Makefile
@@ -115,6 +115,7 @@
     SUBDIR += deadbeef-waveform-seekbar-plugin
     SUBDIR += dekagen
     SUBDIR += denemo
+    SUBDIR += dexed
     SUBDIR += din
     SUBDIR += discid
     SUBDIR += dmidiplayer
diff --git a/audio/dexed/Makefile b/audio/dexed/Makefile
new file mode 100644
index 000000000000..55408a55040e
--- /dev/null
+++ b/audio/dexed/Makefile
@@ -0,0 +1,44 @@
+PORTNAME=	dexed
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.9.6-16
+DISTVERSIONSUFFIX=	-g1df9a58
+CATEGORIES=	audio
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	DX7 FM multi plaform/multi format plugin
+
+LICENSE=	GPLv2+
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	libX11>0:x11/libX11 \
+		libXcursor>0:x11/libXcursor \
+		libXinerama>0:x11/libXinerama \
+		libXrandr>0:x11/libXrandr
+LIB_DEPENDS=	libfreetype.so:print/freetype2 \
+		libjack.so:audio/jack \
+		libasound.so:audio/alsa-lib # see https://github.com/asb2m10/dexed/issues/343 about the ALSA use
+
+USES=		cmake dos2unix localbase pkgconfig
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	asb2m10
+
+GH_TUPLE=	steinbergmedia:vst3sdk:2cc517019a2681fccf211e6a95776a0af1e16d04:steinbergmedia_vst3sdk/libs/vst3sdk \
+		steinbergmedia:vst3_base:985fe019276ee03c2751a1736ba3b390678e29f2:asb2m10_vst3_base/libs/vst3sdk/base \
+		steinbergmedia:vst3_cmake:31b3f3c3e5c4e1bcfee221e5076b6b56296214d7:asb2m10_vst3_cmake/libs/vst3sdk/cmake \
+		steinbergmedia:vst3_doc:a3ad6a147ed8347c802dd2a946d84939a3572164:asb2m10_vst3_doc/libs/vst3sdk/doc \
+		steinbergmedia:vst3_pluginterfaces:93cef1afb7061e488625045ba5a82abaa83d27fe:asb2m10_vst3_pluginterfaces/libs/vst3sdk/pluginterfaces \
+		steinbergmedia:vst3_public_sdk:9589800ed94573354bc29de45eec5744523fbfcb:asb2m10_vst3_public_sdk/libs/vst3sdk/public.sdk \
+		steinbergmedia:vstgui:6c48e17c174abaf2f1dc8ae41e5fab70599eca6c:asb2m10_vstgui/libs/vst3sdk/vstgui4 \
+		surge-synthesizer:tuning-library:b3069450045fe439206628f08220300864e5a958:surge_synthesizer_tuning_library/libs/tuning-library \
+		surge-synthesizer:surgesynthteam_tuningui:54f9a74cd55cdb33fb4d32d706067626857cfc75:surge_synthesizer_surgesynthteam_tuningui/libs/surgesynthteam_tuningui \
+		juce-framework:JUCE:2f980209cc4091a4490bb1bafc5d530f16834e58:juce_framework_JUCE/libs/JUCE
+
+DOS2UNIX_GLOB=	*.cpp *.h
+
+PLIST_FILES=	bin/Dexed
+
+do-install: # workaround for https://github.com/asb2m10/dexed/issues/342
+	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/Source/Dexed_artefacts/Release/Standalone/Dexed ${STAGEDIR}${PREFIX}/bin
+
+.include <bsd.port.mk>
diff --git a/audio/dexed/distinfo b/audio/dexed/distinfo
new file mode 100644
index 000000000000..2c3b9af6829c
--- /dev/null
+++ b/audio/dexed/distinfo
@@ -0,0 +1,23 @@
+TIMESTAMP = 1649816149
+SHA256 (asb2m10-dexed-v0.9.6-16-g1df9a58_GH0.tar.gz) = ae42f20fa0df1fbd962d3dc05bd09968d51b218468914a7a5840cadd35d14f3a
+SIZE (asb2m10-dexed-v0.9.6-16-g1df9a58_GH0.tar.gz) = 15500918
+SHA256 (steinbergmedia-vst3sdk-2cc517019a2681fccf211e6a95776a0af1e16d04_GH0.tar.gz) = 35f5f3cde3972760cc0c5ad6786a00960f77c58f9399d3d856279354ff750a42
+SIZE (steinbergmedia-vst3sdk-2cc517019a2681fccf211e6a95776a0af1e16d04_GH0.tar.gz) = 413675
+SHA256 (surge-synthesizer-tuning-library-b3069450045fe439206628f08220300864e5a958_GH0.tar.gz) = 633bb38381161a32896899b109a202be9ed11c8bdba01a40cd61fd7caa81c102
+SIZE (surge-synthesizer-tuning-library-b3069450045fe439206628f08220300864e5a958_GH0.tar.gz) = 140085
+SHA256 (surge-synthesizer-surgesynthteam_tuningui-54f9a74cd55cdb33fb4d32d706067626857cfc75_GH0.tar.gz) = c95f5610f9f965bfea6b3cdf14a54a0479486ed8ba82c0c0830da7ee9cd07da0
+SIZE (surge-synthesizer-surgesynthteam_tuningui-54f9a74cd55cdb33fb4d32d706067626857cfc75_GH0.tar.gz) = 10997
+SHA256 (juce-framework-JUCE-2f980209cc4091a4490bb1bafc5d530f16834e58_GH0.tar.gz) = 4d695ead0f90b2a01de910ae80809ae92dead7527c01589518c78f8626a9dde2
+SIZE (juce-framework-JUCE-2f980209cc4091a4490bb1bafc5d530f16834e58_GH0.tar.gz) = 18707714
+SHA256 (steinbergmedia-vst3_base-985fe019276ee03c2751a1736ba3b390678e29f2_GH0.tar.gz) = 7eaf215f5f95fcdda6261b4e1c45a0d24e4bfb68dc2292ad3c0156b7a8d99f2a
+SIZE (steinbergmedia-vst3_base-985fe019276ee03c2751a1736ba3b390678e29f2_GH0.tar.gz) = 62213
+SHA256 (steinbergmedia-vst3_cmake-31b3f3c3e5c4e1bcfee221e5076b6b56296214d7_GH0.tar.gz) = 284132980df8f318b2d1b2ee1237c99aa0927e266d79bde7fb367d4522ec6108
+SIZE (steinbergmedia-vst3_cmake-31b3f3c3e5c4e1bcfee221e5076b6b56296214d7_GH0.tar.gz) = 19278
+SHA256 (steinbergmedia-vst3_doc-a3ad6a147ed8347c802dd2a946d84939a3572164_GH0.tar.gz) = e223c0433aabd8a3fec377c6ef76e4576422c72f817ea8cd179a9363c941ba8c
+SIZE (steinbergmedia-vst3_doc-a3ad6a147ed8347c802dd2a946d84939a3572164_GH0.tar.gz) = 41607026
+SHA256 (steinbergmedia-vst3_pluginterfaces-93cef1afb7061e488625045ba5a82abaa83d27fe_GH0.tar.gz) = 152f37370d1c284f0eda9e4e43db54e1c0bf5fc3cf1ef6f5fabc9a3314c38f73
+SIZE (steinbergmedia-vst3_pluginterfaces-93cef1afb7061e488625045ba5a82abaa83d27fe_GH0.tar.gz) = 95833
+SHA256 (steinbergmedia-vst3_public_sdk-9589800ed94573354bc29de45eec5744523fbfcb_GH0.tar.gz) = d5519df35613c1e7047ffa4570f1b2a99bd82d2028156b4c5b461a55991c5c7a
+SIZE (steinbergmedia-vst3_public_sdk-9589800ed94573354bc29de45eec5744523fbfcb_GH0.tar.gz) = 12335277
+SHA256 (steinbergmedia-vstgui-6c48e17c174abaf2f1dc8ae41e5fab70599eca6c_GH0.tar.gz) = 4f020e77c2170b2dcfae09da5623271e8253f2f09be03e4a2264c0c20a26c876
+SIZE (steinbergmedia-vstgui-6c48e17c174abaf2f1dc8ae41e5fab70599eca6c_GH0.tar.gz) = 3669983
diff --git a/audio/dexed/files/patch-Source_CMakeLists.txt b/audio/dexed/files/patch-Source_CMakeLists.txt
new file mode 100644
index 000000000000..b7cc65d9758c
--- /dev/null
+++ b/audio/dexed/files/patch-Source_CMakeLists.txt
@@ -0,0 +1,13 @@
+- disable the VST3 plugin, pending https://github.com/asb2m10/dexed/issues/340
+
+--- Source/CMakeLists.txt.orig	2022-04-13 02:18:02 UTC
++++ Source/CMakeLists.txt
+@@ -13,7 +13,7 @@ juce_add_plugin("${BaseTargetName}"
+         COPY_PLUGIN_AFTER_BUILD FALSE
+         PLUGIN_MANUFACTURER_CODE DGSB
+         PLUGIN_CODE Dexd
+-        FORMATS AU VST3 Standalone
++        FORMATS AU Standalone
+         PRODUCT_NAME "Dexed"
+         DESCRIPTION "Dexed FM Synth"
+ )
diff --git a/audio/dexed/files/patch-libs_JUCE_modules_juce__audio__processors_format__types_VST3__SDK_pluginterfaces_base_fplatform.h b/audio/dexed/files/patch-libs_JUCE_modules_juce__audio__processors_format__types_VST3__SDK_pluginterfaces_base_fplatform.h
new file mode 100644
index 000000000000..8cc11954bcd5
--- /dev/null
+++ b/audio/dexed/files/patch-libs_JUCE_modules_juce__audio__processors_format__types_VST3__SDK_pluginterfaces_base_fplatform.h
@@ -0,0 +1,20 @@
+--- libs/JUCE/modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/fplatform.h.orig	2022-02-28 13:41:31 UTC
++++ libs/JUCE/modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/fplatform.h
+@@ -95,7 +95,7 @@
+ //-----------------------------------------------------------------------------
+ // LINUX
+ //-----------------------------------------------------------------------------
+-#elif __gnu_linux__ || __linux__
++#elif __gnu_linux__ || __linux__ || defined(__FreeBSD__)
+ 	#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 <endian.h>
++	#include <sys/endian.h>
+ 	#if __BYTE_ORDER == __LITTLE_ENDIAN
+ 		#define BYTEORDER kLittleEndian
+ 	#else
diff --git a/audio/dexed/files/patch-libs_JUCE_modules_juce__audio__processors_format__types_VST3__SDK_pluginterfaces_base_funknown.cpp b/audio/dexed/files/patch-libs_JUCE_modules_juce__audio__processors_format__types_VST3__SDK_pluginterfaces_base_funknown.cpp
new file mode 100644
index 000000000000..d5214418d0c0
--- /dev/null
+++ b/audio/dexed/files/patch-libs_JUCE_modules_juce__audio__processors_format__types_VST3__SDK_pluginterfaces_base_funknown.cpp
@@ -0,0 +1,21 @@
+--- libs/JUCE/modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/funknown.cpp.orig	2022-04-12 19:24:37 UTC
++++ libs/JUCE/modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/funknown.cpp
+@@ -56,7 +56,8 @@
+ #endif
+ 
+ #if defined (SMTG_USE_STDATOMIC_H) && SMTG_USE_STDATOMIC_H 
+-#include <stdatomic.h>
++//#include <stdatomic.h>
++#include <atomic>
+ #endif
+ 
+ namespace Steinberg {
+@@ -88,7 +89,7 @@ namespace FUnknownPrivate {
+ int32 PLUGIN_API atomicAdd (int32& var, int32 d)
+ {
+ #if SMTG_USE_STDATOMIC_H
+-	return atomic_fetch_add (reinterpret_cast<atomic_int_least32_t*> (&var), d) + d;
++	return atomic_fetch_add (reinterpret_cast<std::atomic_int_least32_t*> (&var), d) + d;
+ #else
+ #if SMTG_OS_WINDOWS
+ #ifdef __MINGW32__
diff --git a/audio/dexed/files/patch-libs_JUCE_modules_juce__core_juce__core.cpp b/audio/dexed/files/patch-libs_JUCE_modules_juce__core_juce__core.cpp
new file mode 100644
index 000000000000..4cb35d77c302
--- /dev/null
+++ b/audio/dexed/files/patch-libs_JUCE_modules_juce__core_juce__core.cpp
@@ -0,0 +1,11 @@
+--- libs/JUCE/modules/juce_core/juce_core.cpp.orig	2022-04-12 19:06:54 UTC
++++ libs/JUCE/modules/juce_core/juce_core.cpp
+@@ -42,7 +42,7 @@
+ #include <thread>
+ 
+ #if ! JUCE_ANDROID
+- #include <sys/timeb.h>
++// #include <sys/timeb.h>
+  #include <cwctype>
+ #endif
+ 
diff --git a/audio/dexed/pkg-descr b/audio/dexed/pkg-descr
new file mode 100644
index 000000000000..f9f7f55f459a
--- /dev/null
+++ b/audio/dexed/pkg-descr
@@ -0,0 +1,5 @@
+Dexed is a multi platform, multi format plugin synth that
+is closely modeled on the Yamaha DX7. Dexed is also a midi
+cartridge librarian/manager for the DX7.
+
+WWW: https://asb2m10.github.io/dexed/