diff --git a/devel/juce/Makefile b/devel/juce/Makefile index 2b018c0ab851..173ad4201784 100644 --- a/devel/juce/Makefile +++ b/devel/juce/Makefile @@ -1,94 +1,95 @@ PORTNAME= juce DISTVERSION= 7.0.5 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= yuri@FreeBSD.org COMMENT= C++ application framework to develop desktop and mobile applications WWW= https://juce.com/ LICENSE= JUCE6 LICENSE_NAME= JUCE 6 End User License Agreement LICENSE_FILE= ${WRKSRC}/LICENSE.md LICENSE_PERMS= auto-accept dist-mirror pkg-mirror BROKEN_riscv64= Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi) BUILD_DEPENDS= ladspa>0:audio/ladspa LIB_DEPENDS= libasound.so:audio/alsa-lib \ libcurl.so:ftp/curl \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libjavascriptcoregtk-4.0.so:www/webkit2-gtk3 \ libpng16.so:graphics/png \ libsoup-2.4.so:devel/libsoup \ libsysinfo.so:devel/libsysinfo USES= cmake compiler:c++11-lang dos2unix gl gnome localbase:ldflags pkgconfig xorg DOS2UNIX_FILES= modules/juce_core/juce_core.h USE_GNOME= atk cairo gdkpixbuf2 glib20 gtk30 pango USE_GL= gl USE_XORG= x11 xcomposite xcursor xext xinerama xorgproto xrandr USE_GITHUB= yes GH_ACCOUNT= juce-framework GH_PROJECT= JUCE CMAKE_ON= JUCE_BUILD_EXTRAS CXXFLAGS+= -I${LOCALBASE}/include/freetype2 -DJUCE_INCLUDE_PNGLIB_CODE=0 LDFLAGS+= -pthread -lfreetype -lpng16 LDFLAGS+= -lGL # while building NetworkGraphicsDemo ld: error: undefined symbol: glXGetCurrentContext referenced by ld-temp.o LDFLAGS+= -lasound # while building AudioPerformanceTest ld: error: undefined symbol: snd_seq_system_info_sizeof LDFLAGS+= -lsysinfo # while building Projucer ld: error: undefined symbol: sysinfo CONFIGURE_ENV+= CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS} -lexecinfo" # for the step 'Building juceaide' during configure phase: https://github.com/juce-framework/JUCE/issues/877 PLIST_SUB+= VERSION=${PORTVERSION} OPTIONS_DEFINE= DEMOS DEMOS_DESC= Build and install demo programs DEMOS_USES= gnome pkgconfig DEMOS_CMAKE_BOOL= JUCE_BUILD_EXAMPLES DEMOS_LDFLAGS= -lexecinfo DEMOS_USE= GNOME=atk,cairo,gdkpixbuf2,gtk30,pango DEMOS_LIB_DEPENDS= libcurl.so:ftp/curl \ libwebkit2gtk-4.0.so:www/webkit2-gtk3 \ libsoup-2.4.so:devel/libsoup DEMO_FILES= \ AnalyticsCollectionDemo AnimationAppDemo AnimationDemo AudioAppDemo AudioLatencyDemo AudioPlaybackDemo AudioPluginDemo AudioRecordingDemo AudioSettingsDemo AudioSynthesiserDemo \ BlocksDrawingDemo BlocksMonitorDemo BlocksSynthDemo BouncingBallWavetableDemo Box2DDemo ChildProcessDemo CodeEditorDemo ComponentDemo ComponentTransformsDemo ConvolutionDemo \ CryptographyDemo DSPModulePluginDemo DialogsDemo FIRFilterDemo FlexBoxDemo FontsDemo GainDemo GraphicsDemo GridDemo HelloWorldDemo \ IIRFilterDemo ImagesDemo InAppPurchasesDemo JavaScriptDemo KeyMappingsDemo LiveConstantDemo LookAndFeelDemo MDIDemo MPEDemo MenusDemo \ MidiDemo MultiTouchDemo MultithreadingDemo NetworkingDemo OSCDemo OpenGLAppDemo OpenGLDemo OscillatorDemo OverdriveDemo PluckedStringsDemo \ PropertiesDemo SIMDRegisterDemo SimpleFFTDemo StateVariableFilterDemo SystemInfoDemo TimersAndEventsDemo UnitTestsDemo ValueTreesDemo WaveShaperTanhDemo WebBrowserDemo \ WidgetsDemo WindowsDemo XMLandJSONDemo DEMOS_PLIST_FILES= ${DEMO_FILES:S/^/bin\/${PORTNAME}-/} DEMOS_BROKEN= pending merge of patches from https://github.com/juce-framework/JUCE/pull/881 post-patch: # fix fonts.conf path @${REINPLACE_CMD} -i '' -e ' \ s|"/etc/fonts/fonts.conf"|"${PREFIX}/etc/fonts/fonts.conf"| ; \ s|"/usr/share/fonts/fonts.conf"|"${PREFIX}/share/fonts/fonts.conf"| \ ' ${WRKSRC}/modules/juce_graphics/native/juce_linux_Fonts.cpp # fix JUCE modules path (but it still complains about the path) @${REINPLACE_CMD} -i '' -e ' \ s|"~/JUCE|"${PREFIX}/include/JUCE-${PORTVERSION}| \ ' ${WRKSRC}/extras/Projucer/Source/Settings/jucer_StoredSettings.cpp post-install: # install extras which are essential apps that aren't installed by the project for some reason .for exe in AudioPerformanceTest AudioPluginHost BinaryBuilder NetworkGraphicsDemo Projucer UnitTestRunner ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/extras/${exe}/${exe}_artefacts/Release/${exe} ${STAGEDIR}${PREFIX}/bin .endfor # fix path and strip juceaide cd ${STAGEDIR}${PREFIX} && ${MV} bin/JUCE-${PORTVERSION}/juceaide bin/ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/juceaide do-install-DEMOS-on: .for e in ${DEMO_FILES} ${INSTALL_PROGRAM} `${FIND} ${BUILD_WRKSRC} -name ${e}` ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-${e} .endfor .include diff --git a/devel/juce/files/patch-modules_juce__audio__processors_format__types_VST3__SDK_pluginterfaces_base_fplatform.h b/devel/juce/files/patch-modules_juce__audio__processors_format__types_VST3__SDK_pluginterfaces_base_fplatform.h new file mode 100644 index 000000000000..010ec0eed47a --- /dev/null +++ b/devel/juce/files/patch-modules_juce__audio__processors_format__types_VST3__SDK_pluginterfaces_base_fplatform.h @@ -0,0 +1,46 @@ +--- modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/fplatform.h.orig 2023-01-25 11:45:10 UTC ++++ modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/fplatform.h +@@ -139,6 +139,43 @@ + #define SMTG_HAS_NOEXCEPT 1 + #endif + //----------------------------------------------------------------------------- ++// BSD ++//----------------------------------------------------------------------------- ++#elif __FreeBSD__ ++ #define SMTG_OS_LINUX 1 // atomic operations need to be implemented ++ #define SMTG_OS_MACOS 0 ++ #define SMTG_OS_WINDOWS 0 ++ #define SMTG_OS_IOS 0 ++ #define SMTG_OS_OSX 0 ++ ++ #include ++ #if __BYTE_ORDER == __LITTLE_ENDIAN ++ #define BYTEORDER kLittleEndian ++ #else ++ #define BYTEORDER kBigEndian ++ #endif ++ ++ #define COM_COMPATIBLE 0 ++ #define PLUGIN_API ++ #define SMTG_PTHREADS 1 ++ ++ #define SMTG_EXPORT_SYMBOL __attribute__ ((visibility ("default"))) ++ ++ #if __LP64__ ++ #define SMTG_PLATFORM_64 1 ++ #else ++ #define SMTG_PLATFORM_64 0 ++ #endif ++ #ifdef __cplusplus ++ #include ++ #define SMTG_CPP11 (__cplusplus >= 201103L) ++ #ifndef SMTG_CPP11 ++ #error unsupported compiler ++ #endif ++ #define SMTG_CPP11_STDLIBSUPPORT 1 ++ #define SMTG_HAS_NOEXCEPT 1 ++ #endif ++//----------------------------------------------------------------------------- + // Mac and iOS + //----------------------------------------------------------------------------- + #elif __APPLE__ diff --git a/devel/juce/files/patch-modules_juce__audio__processors_format__types_VST3__SDK_pluginterfaces_base_funknown.cpp b/devel/juce/files/patch-modules_juce__audio__processors_format__types_VST3__SDK_pluginterfaces_base_funknown.cpp new file mode 100644 index 000000000000..c8583d61d146 --- /dev/null +++ b/devel/juce/files/patch-modules_juce__audio__processors_format__types_VST3__SDK_pluginterfaces_base_funknown.cpp @@ -0,0 +1,29 @@ +--- modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/funknown.cpp.orig 2023-03-05 05:39:00 UTC ++++ modules/juce_audio_processors/format_types/VST3_SDK/pluginterfaces/base/funknown.cpp +@@ -44,7 +44,7 @@ + #endif // !SMTG_USE_STDATOMIC_H + #endif // SMTG_OS_MACOS + +-#if SMTG_OS_LINUX ++#if SMTG_OS_LINUX && !JUCE_BSD + #if !defined (SMTG_USE_STDATOMIC_H) + #if defined (__ANDROID__) || defined(_LIBCPP_VERSION) + #define SMTG_USE_STDATOMIC_H 1 +@@ -100,7 +100,7 @@ int32 PLUGIN_API atomicAdd (int32& var, int32 d) + return OSAtomicAdd32Barrier (d, (int32_t*)&var); + #elif defined(__ANDROID__) + return atomic_fetch_add ((atomic_int*)&var, d) + d; +-#elif SMTG_OS_LINUX ++#elif SMTG_OS_LINUX && !JUCE_BSD + __gnu_cxx::__atomic_add (&var, d); + return var; + #else +@@ -177,7 +177,7 @@ bool FUID::generate () + } + return false; + +-#elif SMTG_OS_LINUX ++#elif SMTG_OS_LINUX && !JUCE_BSD + srand ((size_t)this); + for (int32 i = 0; i < 16; i++) + data[i] = static_cast(rand ());