# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 # kate: backspace-indents true; indent-pasted-text true; indent-width 4; keep-extra-spaces true; remove-trailing-spaces modified; replace-tabs true; replace-tabs-save true; syntax Tcl/Tk; tab-indents true; tab-width 4; PortSystem 1.0 PortGroup wxWidgets 1.0 # use the release tarball from github because it contains all required external libs # incl. those not in MacPorts. PortGroup github 1.0 github.setup audacity audacity 2.1.2 Audacity- github.tarball_from releases revision 2 master_sites https://github.com/audacity/audacity/archive/ distname Audacity-${version} checksums rmd160 4e0c508b8edd24935a235c0b1a636c4ef1ae59a9 \ sha256 90007b50cdc3885607b1afef2f158777a61c1658e869a88ec4d98c59c133f9bd post-extract { file rename ${workpath}/audacity-Audacity-${version} ${workpath}/${distname} } categories audio description A Free, Cross-Platform Digital Audio Editor long_description Audacity is a free, easy-to-use, multi-track audio editor and recorder \ for Windows, Mac OS X, GNU/Linux and other operating systems. The interface is translated \ into many languages. You can use Audacity to: \n\ Record live audio. \n\ Record computer playback on any Windows Vista or later machine. \n\ Convert tapes and records into digital recordings or CDs. \n\ Edit WAV, AIFF, FLAC, MP2, MP3 or Ogg Vorbis sound files. \n\ AC3, M4A/M4R (AAC), WMA and other formats supported using optional libraries. \n\ Cut, copy, splice or mix sounds together. \n\ Numerous effects including change the speed or pitch of a recording. \n\ And more! platforms darwin license GPL-2+ # openssl is a dependency of curl in cmake license_noconflict openssl maintainers gmail.com:rjvbertin openmaintainer universal_variant no use_parallel_build no homepage http://www.audacityteam.org/ wxWidgets.use wxWidgets-3.0 depends_build-append \ port:cmake \ port:pkgconfig \ port:python27 depends_lib-append port:expat \ path:lib/libavcodec.dylib:ffmpeg \ port:flac \ port:freetype \ port:harfbuzz \ port:lame \ port:libid3tag \ port:libmad \ port:libogg \ port:libsndfile \ port:libvorbis \ port:portaudio \ port:soundtouch \ port:soxr \ port:twolame \ port:${wxWidgets.port} # audacity could use port:lv2 and port:lilv but would also require a port:suil for that to be possible. patch.pre_args -Np1 patchfiles-append debian/patches/fix-minsrc-autoreconf.patch \ add_missing_newline.diff \ libvamp-Makefile-for-osx.diff \ src-Makefile-for-osx.diff \ FFmpeg_build_against_ffmpeg.diff \ portaudio-no-universal-build.diff \ buildinfo-clarify-no-gstreamer.diff \ add_enGB_translation.diff \ patch-avoid-clang-choke-on-confbase.diff \ patch-no-rtld_deepbind.diff \ patch-more-decent-font-sizes.diff \ patch-python.diff # address issues in the build system: # - build and link VSTControlOSX.mm instead of the GTk interface # - address a visibility issue with the slider_array variable in libnyquist # - make the AudioUnits plugin support build; on 64bit and also include AUControl.mm patchfiles-append patch-vstcontrolosx.diff \ patch-libnyquist-symbol-visibility.diff \ patch-fix-audiounits.diff post-patch { set python_bin ${prefix}/bin/python2.7 reinplace -W ${worksrcpath} "s|@@PYTHON@@|${python_bin}|g" \ lib-src/lv2/build \ lib-src/lv2/configure reinplace -W ${worksrcpath} "s|/usr/local|${prefix}|g" \ src/effects/ladspa/LadspaEffect.cpp \ src/export/ExportMP3.cpp \ lib-src/lv2/lilv/wscript \ lib-src/lv2/lilv/test/lilv_test.c reinplace -W ${worksrcpath} "s|/Library/Audio/Plug-Ins/Vamp|/Library/Audio/Plug-Ins/Vamp:${prefix}/lib/vamp|g" \ lib-src/libvamp/src/vamp-hostsdk/PluginHostAdapter.cpp reinplace -W ${worksrcpath} "s|/Library/Application Support/audacity/libs|${prefix}/lib|g" \ src/FFmpeg.h reinplace -W ${worksrcpath} "s| -Werror||g" \ lib-src/portaudio-v19/configure.in \ lib-src/portaudio-v19/configure # audacity 2.1.2 contains C++ files that include system SDK headers and ObjC code on OS X; # they must thus be built as ObjC++ set make_objcpp { \ {CommandManager src/commands {src/Makefile.in src/Makefile.am}} \ {Effect src/effects {src/Makefile.in src/Makefile.am}} \ {LV2Effect src/effects/lv2 {src/Makefile.in src/Makefile.am}} \ } foreach mm ${make_objcpp} { set f [lindex ${mm} 0] set d [lindex ${mm} 1] set mk [lindex ${mm} 2] foreach m ${mk} { reinplace -W ${worksrcpath} "s|/${f}.cpp|/${f}.mm|g" ${m} } # it's easiest to symlink f.mm to f.cpp; clang++ will do the rest. if {![file exists ${worksrcpath}/${d}/${f}.mm]} { ln -s ${f}.cpp ${worksrcpath}/${d}/${f}.mm } reinplace -W ${worksrcpath} "s|/VSTControlGTK.cpp|/VSTControlOSX.mm|g" \ src/Makefile.in src/Makefile.am } } configure.args-append \ --disable-dependency-tracking \ --disable-quicktime \ --disable-static \ --disable-universal_binary \ --enable-audiounits \ --enable-shared \ --enable-sse \ --with-ffmpeg \ --with-lam \ --with-libflac \ --with-libmad \ --with-libsoxr \ --with-libvamp=local \ --with-libvorbis \ --with-lv2=local \ --with-portmixer \ --with-sbsms=local \ --with-soundtouch \ --with-twolame \ --with-widgetextra=local \ CPPFLAGS=-I${prefix}/include \ WX_CONFIG=${wxWidgets.wxconfig} set aud_app_path ${applications_dir}/Audacity.app # the following causes an empty directory to be created and preserved at installation # to allow the default en language localization to function properly (#50724) destroot.keepdirs ${destroot}${aud_app_path}/Contents/Resources/en.lproj post-destroot { # create the app bundle infrastructure xinstall -m 755 -d ${destroot}${aud_app_path}/Contents/MacOS xinstall -m 755 -d ${destroot}${aud_app_path}/Contents/Resources # the BundleExec: file rename ${destroot}${prefix}/bin/audacity ${destroot}${aud_app_path}/Contents/MacOS/Audacity # install the Info.plist provided by Audacity xinstall -m 644 ${worksrcpath}/mac/Info.plist ${destroot}${aud_app_path}/Contents/ # adapt the provided Info.plist reinplace "s|AUDACITY_EXECUTABLE|Audacity|g" ${destroot}${aud_app_path}/Contents/Info.plist reinplace "s|AUDACITY_INFO_VERSION|${version} (MacPorts)|g" ${destroot}${aud_app_path}/Contents/Info.plist # install the provided icons into the Resources directory foreach r [glob -nocomplain ${worksrcpath}/mac/Resources/*.icns] { xinstall -m 644 ${r} ${destroot}${aud_app_path}/Contents/Resources/ } # allow the application to find certain things where it expects them on OS X (= inside the app bundle) foreach r [glob -nocomplain ${destroot}${prefix}/share/audacity/*] { ln -s ${prefix}/share/audacity/[file tail ${r}] ${destroot}${aud_app_path}/Contents/Resources } # install translation resources foreach l [glob -nocomplain ${destroot}${prefix}/share/locale/*] { set lang [file tail ${l}] xinstall -m 755 -d ${destroot}${aud_app_path}/Contents/Resources/${lang}.lproj ln -s ${prefix}/share/locale/${lang}/LC_MESSAGES/audacity.mo ${destroot}${aud_app_path}/Contents/Resources/${lang}.lproj/ } foreach l [glob -nocomplain ${wxWidgets.prefix}/share/locale/*] { set lang [file tail ${l}] xinstall -m 755 -d ${destroot}${aud_app_path}/Contents/Resources/${lang}.lproj ln -s ${l}/LC_MESSAGES/wxstd.mo ${destroot}${aud_app_path}/Contents/Resources/${lang}.lproj/ } # install a wrapper script in ${prefix}/bin system "echo \"#!/bin/sh\nexec \\\"${aud_app_path}/Contents/MacOS/Audacity\\\" \\\"\\\$\@\\\"\" > ${destroot}${prefix}/bin/audacity" system "chmod 755 ${destroot}${prefix}/bin/audacity" }