diff --git a/audio/audacity/Makefile b/audio/audacity/Makefile index 6e142376fd5d..9e5f84903705 100644 --- a/audio/audacity/Makefile +++ b/audio/audacity/Makefile @@ -1,173 +1,177 @@ PORTNAME= audacity DISTVERSIONPREFIX= Audacity- DISTVERSION= 3.4.2 CATEGORIES= audio PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ PATCHFILES+= 4c833569fb12.patch:-p1 MAINTAINER= xxjack12xx@gmail.com COMMENT= GUI editor for digital audio waveforms WWW= https://www.audacityteam.org/ -BROKEN_FreeBSD_13= compiler bug -BROKEN_FreeBSD_12= compiler bug - LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/LICENSE.txt BUILD_DEPENDS= conan:sysutils/conan LIB_DEPENDS= libasound.so:audio/alsa-lib \ libcurl.so:ftp/curl \ libexpat.so:textproc/expat2 \ libopenjp2.so:graphics/openjpeg \ libmp3lame.so:audio/lame \ libmpg123.so:audio/mpg123 \ libopus.so:audio/opus \ libportaudio.so:audio/portaudio \ libportmidi.so:audio/portmidi \ libpng.so:graphics/png \ libsndfile.so:audio/libsndfile \ libsoxr.so:audio/libsoxr \ libsqlite3.so:databases/sqlite3 \ libwavpack.so:audio/wavpack \ libuuid.so:misc/e2fsprogs-libuuid USES= cmake compiler:c++17-lang cpe desktop-file-utils gettext \ gnome libtool python:build pkgconfig shared-mime-info USE_GITHUB= yes USE_GNOME= cairo gdkpixbuf2 gtk30 USE_WX= 3.2+ CPE_VENDOR= audacityteam WX_COMPS= wx PORTDOCS= README.md CMAKE_ARGS= -Daudacity_lib_preference:STRING=system \ -Daudacity_use_curl:STRING=system \ -Daudacity_use_expat:STRING=system \ -Daudacity_use_jpeg:STRING=system \ -Daudacity_use_libmp3lame:STRING=system \ -Daudacity_use_libmpg123:STRING=system \ -Daudacity_use_libopus:STRING=system \ -Daudacity_use_libsndfile:STRING=system \ -Daudacity_use_midi:STRING=system \ -Daudacity_use_nyquist:STRING=local \ -Daudacity_use_portaudio:STRING=system \ -Daudacity_use_portmixer:STRING=local \ -Daudacity_use_portsmf:STRING=local \ -Daudacity_use_png:STRING=system \ -Daudacity_use_soxr:STRING=system \ -Daudacity_use_sqlite:STRING=system \ -Daudacity_use_wavpack=system \ -Daudacity_use_wxwidgets:STRING=system \ -Daudacity_use_zlib:STRING=system CMAKE_ON= audacity_bundle_gplv3 audacity_conan_allow_prebuilt_binaries audacity_obey_system_dependencies CMAKE_OFF= audacity_has_audiocom_upload audacity_conan_enabled audacity_conan_force_build_dependencies \ audacity_has_crashreports audacity_has_networking audacity_has_updates_check audacity_has_url_schemes_support \ audacity_has_sentry_reporting audacity_has_tests audacity_has_vst3 audacity_perform_codesign audacity_use_pch OPTIONS_DEFINE= DEBUG DOCS FFMPEG FLAC ID3TAG LADSPA LV2 MAD MANUAL \ OGG SBSMS SOUNDTOUCH TWOLAME VAMP \ VORBIS VST OPTIONS_DEFAULT= FFMPEG FLAC ID3TAG LADSPA LV2 MAD OGG SBSMS \ SOUNDTOUCH TWOLAME VAMP VORBIS VST OPTIONS_EXCLUDE_i386= SBSMS LV2_DESC= Add LV2 plug-in support MAD_DESC= Use libmad for mp2/3 decoding support MANUAL_DESC= Include manual SBSMS_DESC= Use libsbsms for pitch and tempo changing SOUNDTOUCH_DESC= Use libSoundTouch for pitch and tempo changing TWOLAME_DESC= Use libtwolame for MP2 export support VAMP_DESC= Vamp plug-in support VST_DESC= VST plug-in support DEBUG_CMAKE_ON= wxWidgets_USE_DEBUG DOCS_BUILD_DEPENDS= docbook-to-man:textproc/docbook-to-man \ docbook2man:textproc/docbook-utils DOCS_LIB_DEPENDS= libharfbuzz.so:print/harfbuzz FFMPEG_CMAKE_ON= -Daudacity_use_ffmpeg:STRING=loaded FFMPEG_CMAKE_OFF= -Daudacity_use_ffmpeg:STRING=off FFMPEG_BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/libavcodec.pc:multimedia/ffmpeg FFMPEG_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg FLAC_CMAKE_ON= -Daudacity_use_libflac:STRING=system FLAC_CMAKE_OFF= -Daudacity_use_libflac:STRING=off FLAC_LIB_DEPENDS= libFLAC.so:audio/flac ID3TAG_CMAKE_ON= -Daudacity_use_libid3tag:STRING=system ID3TAG_CMAKE_OFF= -Daudacity_use_libid3tag:STRING=off ID3TAG_LIB_DEPENDS= libid3tag.so:audio/libid3tag LADSPA_CMAKE_BOOL= audacity_use_ladspa LADSPA_RUN_DEPENDS= listplugins:audio/ladspa LV2_CMAKE_ON= -Daudacity_use_lv2:STRING=system LV2_CMAKE_OFF= -Daudacity_use_lv2:STRING=off LV2_LIB_DEPENDS= liblilv-0.so:audio/lilv \ libserd-0.so:devel/serd \ libsord-0.so:devel/sord \ libsratom-0.so:audio/sratom \ libsuil-0.so:audio/suil MAD_CMAKE_ON= -Daudacity_use_libmad:STRING=system MAD_CMAKE_OFF= -Daudacity_use_libmad:STRING=off MAD_LIB_DEPENDS= libmad.so:audio/libmad MANUAL_CMAKE_BOOL= audacity_package_manual # TODO: fix NLS support properly PLIST_SUB+= NLS="" OPTIONS_SUB= yes OGG_CMAKE_ON= -Daudacity_use_libogg:STRING=system OGG_CMAKE_OFF= -Daudacity_use_libogg:STRING=off OGG_LIB_DEPENDS= libogg.so:audio/libogg SBSMS_CMAKE_ON= -Daudacity_use_sbsms:STRING=local SBSMS_CMAKE_OFF= -Daudacity_use_sbsms:STRING=off SOUNDTOUCH_CMAKE_ON= -Daudacity_use_soundtouch:STRING=system SOUNDTOUCH_CMAKE_OFF= -Daudacity_use_soundtouch:STRING=off SOUNDTOUCH_LIB_DEPENDS= libSoundTouch.so:audio/soundtouch TWOLAME_CMAKE_ON= -Daudacity_use_twolame:STRING=system TWOLAME_CMAKE_OFF= -Daudacity_use_twolame:STRING=off TWOLAME_LIB_DEPENDS= libtwolame.so:audio/twolame VAMP_CMAKE_ON= -Daudacity_use_vamp:STRING=system VAMP_CMAKE_OFF= -Daudacity_use_vamp:STRING=off VAMP_LIB_DEPENDS= libvamp-hostsdk.so:audio/vamp-plugin-sdk VORBIS_CMAKE_ON= -Daudacity_use_libvorbis:STRING=system VORBIS_CMAKE_OFF= -Daudacity_use_libvorbis:STRING=off VORBIS_LIB_DEPENDS= libogg.so:audio/libogg \ libvorbis.so:audio/libvorbis VST_CMAKE_BOOL= audacity_use_vst .include .if ${ARCH} != amd64 && ${ARCH} != i386 CMAKE_ARGS+= -DHAVE_MMX:BOOL=OFF \ -DHAVE_SSE:BOOL=OFF \ -DHAVE_SSE2:BOOL=OFF .endif +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1302508 +# Workarounds for buggy libc++ std::conjunction +EXTRA_PATCHES= ${PATCHDIR}/extra-libraries_lib-utility_TypeList.cpp \ + ${PATCHDIR}/extra-libraries_lib-utility_TypeList.h \ + ${PATCHDIR}/extra-libraries_lib-utility_TypeSwitch.h +.endif + post-install: @${RM} ${STAGEDIR}${DOCSDIR}/LICENSE.txt #delete empty directories: https://github.com/audacity/audacity/issues/808 @${FIND} ${STAGEDIR} -type d -empty -delete post-install-DEBUG-off: @${FIND} ${STAGEDIR}${PREFIX}/lib/audacity -name '*.so*' -exec ${STRIP_CMD} {} + post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} .include diff --git a/audio/audacity/files/extra-libraries_lib-utility_TypeList.cpp b/audio/audacity/files/extra-libraries_lib-utility_TypeList.cpp new file mode 100644 index 000000000000..2575d8f5f745 --- /dev/null +++ b/audio/audacity/files/extra-libraries_lib-utility_TypeList.cpp @@ -0,0 +1,23 @@ +--- libraries/lib-utility/TypeList.cpp.orig 2023-11-16 11:58:21 UTC ++++ libraries/lib-utility/TypeList.cpp +@@ -118,16 +118,16 @@ static_assert(Is_v); + static_assert(Is_v); + + static_assert(Every_v, Example>); +-static_assert(is_base_of_v, Example>>); ++static_assert(TypeList::is_base_of_v, Example>>); + static_assert(!Every_v, Example>); +-static_assert(is_base_of_v, ++static_assert(TypeList::is_base_of_v, + Every, Example>>); + + static_assert(Some_v, Example>); +-static_assert(is_base_of_v, ++static_assert(TypeList::is_base_of_v, + Some, Example>>); + static_assert(!Some_v, Example>); +-static_assert(is_base_of_v, Example>>); ++static_assert(TypeList::is_base_of_v, Example>>); + + static_assert(NotEvery_v, Example>); + static_assert(NotAny_v, Example>); diff --git a/audio/audacity/files/extra-libraries_lib-utility_TypeList.h b/audio/audacity/files/extra-libraries_lib-utility_TypeList.h new file mode 100644 index 000000000000..dfc77dc2be3d --- /dev/null +++ b/audio/audacity/files/extra-libraries_lib-utility_TypeList.h @@ -0,0 +1,39 @@ +--- libraries/lib-utility/TypeList.h.orig 2023-11-16 11:58:21 UTC ++++ libraries/lib-utility/TypeList.h +@@ -54,6 +54,18 @@ namespace TypeList { + can make compound predicates out of simpler ones. + */ + ++template ++struct conjunction : std::true_type {}; ++ ++template ++struct conjunction<_Arg> : _Arg {}; ++ ++template ++struct conjunction<_Arg, _Args...> : std::conditional_t> {}; ++ ++template ++inline constexpr bool is_base_of_v = __is_base_of(_Bp, _Dp); ++ + //! standard in C++20; add a level of indirection to a type + template struct type_identity { using type = T; }; + +@@ -429,7 +441,7 @@ struct And { (private) + static constexpr bool value = Is_v, T>; + }; + public: +- template using typemap = typename std::conjunction< ++ template using typemap = typename TypeList::conjunction< + typename Predicate::template typemap, Rest + >; + }; +@@ -437,7 +449,7 @@ struct And { (private) + //! Derived from the Predicate, applied to the first of the types (often boolean + //! constant types), for which the value is false; or std::true_type + template struct Every +- : Apply_t> {}; ++ : Apply_t> {}; + //! The constant value in the corresponding type + template constexpr auto Every_v = + Every::value; diff --git a/audio/audacity/files/extra-libraries_lib-utility_TypeSwitch.h b/audio/audacity/files/extra-libraries_lib-utility_TypeSwitch.h new file mode 100644 index 000000000000..f0291a0356a8 --- /dev/null +++ b/audio/audacity/files/extra-libraries_lib-utility_TypeSwitch.h @@ -0,0 +1,20 @@ +--- libraries/lib-utility/TypeSwitch.h.orig 2023-11-16 11:58:21 UTC ++++ libraries/lib-utility/TypeSwitch.h +@@ -127,7 +127,7 @@ struct Executor { + // Case 1: Compatible, and invocable on the next function, giving + // another function, that accepts BaseClass: + struct Case1_; +- using Case1 = std::conjunction; ++ using Case1 = TypeList::conjunction; + struct Case1_ { + static constexpr bool value = std::is_invocable_v< + std::invoke_result_t, BaseClass&, Args&&...>; +@@ -135,7 +135,7 @@ struct Executor { + }; + + // Case 2: Invocable directly on the object +- struct Case2 : std::conjunction< ++ struct Case2 : TypeList::conjunction< + Compatible, std::negation, + std::is_invocable + > {