# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup cmake 1.1 PortGroup codeberg 1.0 PortGroup wxWidgets 1.0 codeberg.setup tenacityteam tenacity 1.3.3 v set libnyquist_commit 3678ee6bfff9e0edc721a1b8865ab625e40f9ce4 revision 0 set tenacity_distfile ${name}-${version}${extract.suffix} set libnyquist_distfile libnyquist-${libnyquist_commit}${extract.suffix} checksums ${tenacity_distfile} \ rmd160 f55591e962598e30a2d86fbb12c26154401e09af \ sha256 36ed8c0078e448fe425837256c6a7489c5296c47e5d1b07bbbd0f281658ef4d3 \ size 49079572 \ ${libnyquist_distfile} \ rmd160 6e98e5a6a3a86e981006247f01bf3d8fca265ff2 \ sha256 86d9b2d753752a97e169d377da04e843e91131192e2b871c1e600effde032379 \ size 792232 description an easy-to-use, cross-platform multi-track audio editor/recorder long_description Tenacity is {*}${description} forked from Audacity. # The automatically-generated tarball does not contain the submodules so we have # to fetch them manually. # https://codeberg.org/tenacityteam/tenacity/issues/315 # But there is also a suggestion to replace the libnyquist submodule with an # external library at which point we won't need any submodules. # https://codeberg.org/tenacityteam/tenacity/issues/365 master_sites ${codeberg.master_sites}/[join ${codeberg.tag_prefix}]${codeberg.version}[join ${codeberg.tag_suffix}]${extract.suffix}?dummy=:tenacity \ [string map [list /${codeberg.project}/ /libnyquist/] ${codeberg.master_sites}]/${libnyquist_commit}${extract.suffix}?dummy=:libnyquist distfiles ${tenacity_distfile}:tenacity \ ${libnyquist_distfile}:libnyquist categories audio maintainers {ryandesign @ryandesign} openmaintainer license GPL-2+ # CMakeLists.txt sets macOS deployment target to 10.15 and src/CMakeLists.txt # sets the SDK to 10.13 when linking to fix high CPU use on 10.14 and later. # I haven't tried removing that yet. platforms {darwin >= 19} # CMakeLists.txt checks CMAKE_SIZEOF_VOID_P and WORDS_BIGENDIAN. I haven't tried # using the muniversal portgroup yet. universal_variant no patchfiles CMAKE_OSX_ARCHITECTURES.patch \ Cursors.h.patch \ FFmpeg.patch \ GIT_DESCRIBE.patch \ TenacityFunctions.cmake.patch post-patch { # https://codeberg.org/tenacityteam/tenacity/issues/397 reinplace "s|@GIT_DESCRIBE@|[join ${codeberg.tag_prefix}]${codeberg.version}[join ${codeberg.tag_suffix}]|g" ${worksrcpath}/CMakeLists.txt # https://codeberg.org/tenacityteam/tenacity/issues/401 reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/libraries/lib-ffmpeg-support/FFmpegFunctions.cpp # https://codeberg.org/tenacityteam/tenacity/issues/402 move ${worksrcpath}/help/tenacity.metainfo.xml.in ${worksrcpath}/help/Tenacity.metainfo.xml.in } # Python might not actually be required anymore. # https://codeberg.org/tenacityteam/tenacity/issues/393#issuecomment-1653304 set python_version 3.12 wxWidgets.use wxWidgets-3.2 depends_build-append port:gettext \ port:nasm \ path:bin/pkg-config:pkgconfig \ port:python[string map {. {}} ${python_version}] depends_lib-append port:ffmpeg \ port:flac \ port:expat \ port:lame \ port:libebml \ port:libid3tag \ port:libmad \ port:libmatroska \ port:libogg \ port:libsndfile \ port:libvorbis \ port:portaudio \ port:soundtouch \ port:soxr \ port:sqlite3 \ port:twolame \ port:${wxWidgets.port} \ port:zlib # The codeberg portgroup turns this on which doesn't work when using multiple # distfiles and it's better to set an accurate worksrcdir in the first place. extract.rename no worksrcdir ${name} post-extract { # Move the manually-downloaded git submodules where they need to go. foreach lib [list libnyquist] { delete ${worksrcpath}/lib-src/${lib} move ${workpath}/${lib} ${worksrcpath}/lib-src } } compiler.cxx_standard 2017 cmake.generator Ninja configure.python ${prefix}/bin/python${python_version} configure.args-append -DCCACHE=OFF \ -DPython3_EXECUTABLE=${configure.python} \ -DSCCACHE=OFF \ -DVCPKG=OFF \ -DwxWidgets_CONFIG_EXECUTABLE=${wxWidgets.wxconfig} # This option does not prevent Tenacity from needing to dynamically load the # FFmpeg libraries, it just hides the section of the Preferences window that # allows the user to choose a different location for the dynamically-loaded # FFmpeg libraries. We set the correct location using a patchfile. # https://codeberg.org/tenacityteam/tenacity/issues/401 configure.args-append -DDISABLE_DYNAMIC_LOADING_FFMPEG=ON # LV2 support requires lilv and lv2 (for which we have ports) and suil (for # which we don't). # https://github.com/lv2/suil configure.args-append -DLV2=OFF # MIDI support requires PortMidi (for which we have a port), PortTime (which is # part of PortMidi) and PortSMF (for which we don't have a port). # https://codeberg.org/tenacityteam/portsmf configure.args-append -DMIDI=OFF # sbsms support requires libsmsms for which we don't have a port. # https://github.com/claytonotey/libsbsms # However there is also an open suggestion to replace libsbsms with rubberband # for which we do already have a port. # https://codeberg.org/tenacityteam/tenacity/issues/377 configure.args-append -DSBSMS=OFF # Vamp plugin support requires vamp-plugin-sdk? for which we don't have a port. # https://github.com/vamp-plugins/vamp-plugin-sdk configure.args-append -DVAMP=OFF # The program's native localization is English so there aren't any separate # English localization resources, but if the English localization folder doesn't # exist then the interface will be in some other language. The build system does # create this folder but doesn't put anything in it, and MacPorts post destroot # processing and archiving does not preserve empty folders. destroot.keepdirs ${destroot}${applications_dir}/Tenacity.app/Contents/Resources/en.lproj post-destroot { # TODO: Figure out if some CMake flag can direct the app here. move ${destroot}${prefix}/Tenacity.app ${destroot}${applications_dir} # The installation process installs this library which is not needed because # the program has already been linked with it statically at build time. # https://codeberg.org/tenacityteam/tenacity/issues/394 delete ${destroot}${prefix}/lib/liblibnyquist.a }