Ticket #56097: audacity.diff

File audacity.diff, 7.9 KB (added by RJVB (René Bertin), 6 years ago)
  • audio/audacity/Portfile

    diff --git a/audio/audacity/Portfile b/audio/audacity/Portfile
    index 528a16f98c..3dcf93f3b0 100644
    a b  
    22
    33PortSystem          1.0
    44
    5 PortGroup           active_variants 1.1
    6 PortGroup           cxx11 1.1
    75PortGroup           github 1.0
    86PortGroup           wxWidgets 1.0
     7PortGroup           active_variants 1.1
     8
     9platform darwin {
     10    if {${os.major} < 13} {
     11        PortGroup   cxx11 1.1
     12    }
     13}
    914
    1015name                audacity
    1116
    long_description Audacity is a free, easy-to-use, multi-track audio editor an 
    2227                    Numerous effects including change the speed or pitch of a recording. \n\
    2328                    And more!
    2429
    25 subport audacity-devel {
     30subport             audacity-devel {
    2631    long_description A port of the Audacity audio editor aimed at development purposes.
    2732}
    2833
    2934
    3035if {${subport} eq "${name}"} {
    31     conflicts       ${name}-devel
     36    conflicts       "${name}-devel"
    3237    # get the source tarball from github because it contains all required external libs
    3338    # incl. those not in MacPorts.
    3439    github.setup    audacity audacity 2.2.2 Audacity-
    if {${subport} eq "${name}"} { 
    3742                    size    25941576
    3843    set PPREFIX     ./
    3944} else {
    40     conflicts       ${name}
    41     # git describe --tags : Audacity-2.2.2-336-g49eb7ddb6
    42     github.setup    audacity audacity 49eb7ddb61cf7d2d9468932ac340550ef48a8828
    43     version         2.2.2.336
     45    conflicts       "${name}"
     46    # git describe --tags : Audacity-2.2.2-407-g56bca7427
     47    github.setup    audacity audacity 56bca7427218ab9bdd9a54f4eb7d7490c07657bb
     48    version         2.2.2.407
    4449    # this port is intended to facilitate development efforts shared with "upstreams"
    4550    # so using git instead of a tarball fetch type is more appropriate.
    46     fetch.type      git
    47     distname        audacity-git
     51    # fetch.type      git
     52    # distname        audacity-git
     53    checksums       rmd160  43b66fdbe873d5f64059f5b58b20b676d9540d20 \
     54                    sha256  9231238cfe468b7b0531853564cfc19dea635f50b1acd5c9b468c5795d6e767b
    4855    set PPREFIX     devel/
    4956
    5057    variant wx32 description {Use wxWidgets 3.2 - experimental!} {}
    depends_build-append \ 
    9299                    port:cmake \
    93100                    port:pkgconfig \
    94101                    port:python27
    95 depends_lib-append  port:expat \
    96                     path:lib/libavcodec.dylib:ffmpeg \
    97                     port:flac \
    98                     port:freetype \
     102depends_lib-append  port:freetype \
    99103                    port:harfbuzz \
    100                     port:lame \
    101104                    port:libid3tag \
    102105                    port:libmad \
    103                     port:libogg \
    104                     port:libsndfile \
    105                     port:libvorbis \
    106106                    port:soundtouch \
    107107                    port:soxr \
    108                     port:twolame
     108                    port:twolame \
     109                    port:expat \
     110                    path:lib/libavcodec.dylib:ffmpeg \
     111                    port:flac \
     112                    port:lame \
     113                    port:libogg \
     114                    port:libsndfile \
     115                    port:libvorbis
    109116# audacity could use port:lv2 and port:lilv but would also require a port:suil for that to be possible.
    110117
    111118patch.pre_args      -Np1
    platform darwin { 
    141148                    patch-implement-progdial=beep.diff
    142149    patchfiles-append \
    143150                    patch-temp-fixes.diff
    144     if {[variant_exists wx32] && [variant_isset wx32]} {
    145         patchfiles-append \
     151}
     152if {[variant_exists wx32] && [variant_isset wx32]} {
     153    patchfiles-append \
    146154                    ${PPREFIX}patch-wxw-31x.diff
    147     }
    148155}
    149156
     157# quelch a huge number of warnings
     158configure.cxxflags-append \
     159                    -Wno-inconsistent-missing-override \
     160                    -Wno-overloaded-virtual
     161
     162configure.args-append \
     163                    --disable-dependency-tracking \
     164                    --disable-quicktime \
     165                    --disable-static \
     166                    --disable-universal_binary \
     167                    --enable-audiounits \
     168                    --enable-shared \
     169                    --enable-sse \
     170                    --with-ffmpeg \
     171                    --with-lame \
     172                    --with-libflac \
     173                    --with-libmad \
     174                    --with-libsoxr \
     175                    --with-libvamp=local \
     176                    --with-libvorbis \
     177                    --with-lv2=local \
     178                    --with-portmixer \
     179                    --with-sbsms=local \
     180                    --with-soundtouch \
     181                    --with-twolame \
     182                    --with-widgetextra=local \
     183                    --with-portmidi=system \
     184                    CPPFLAGS=-I${prefix}/include \
     185                    WX_CONFIG=${wxWidgets.wxconfig}
     186
     187# Since version 2.2.0 we need to use the embedded (modified) Portaudio version.
     188configure.args-append \
     189                    --with-portaudio=local
     190configure.env-append \
     191                    PORTMIDI_CFLAGS=-I${prefix}/include \
     192                    PORTMIDI_LIBS=${prefix}/lib/libportmidi.dylib
     193depends_lib-append \
     194                    port:portmidi
     195
     196# make sure the C++ stdlib argument is added to the LDFLAGS too
     197if {${configure.cxx_stdlib} ne "" && [string match *clang* ${configure.cxx}]} {
     198    configure.ldflags-append \
     199                    -stdlib=${configure.cxx_stdlib}
     200}
     201
     202build.args-append   V=1 VERBOSE=1
     203
     204# with everything defined/declared as intended we can now
     205# handle the post-patch step with its reinplace statements.
    150206post-patch {
    151207    set python_bin ${prefix}/bin/python2.7
    152208    reinplace -W ${worksrcpath} "s|@@PYTHON@@|${python_bin}|g" \
    post-patch { 
    164220    reinplace -W ${worksrcpath} "s| -Werror||g" \
    165221                                lib-src/portaudio-v19/configure.in \
    166222                                lib-src/portaudio-v19/configure
     223    reinplace -W ${worksrcpath} "s|@LDFLAGS@|${configure.ldflags}|g" \
     224                                lib-src/libvamp/Makefile.in
    167225    platform darwin {
    168226        # audacity 2.1.2 contains C++ files that include system SDK headers and ObjC code on OS X;
    169227        # they must thus be built as ObjC++
    post-patch { 
    192250    }
    193251}
    194252
    195 # quelch a huge number of warnings
    196 configure.cxxflags-append \
    197                     -Wno-inconsistent-missing-override \
    198                     -Wno-overloaded-virtual
    199 
    200 configure.args-append \
    201                     --disable-dependency-tracking \
    202                     --disable-quicktime \
    203                     --disable-static \
    204                     --disable-universal_binary \
    205                     --enable-audiounits \
    206                     --enable-shared \
    207                     --enable-sse \
    208                     --with-ffmpeg \
    209                     --with-lame \
    210                     --with-libflac \
    211                     --with-libmad \
    212                     --with-libsoxr \
    213                     --with-libvamp=local \
    214                     --with-libvorbis \
    215                     --with-lv2=local \
    216                     --with-portmixer \
    217                     --with-sbsms=local \
    218                     --with-soundtouch \
    219                     --with-twolame \
    220                     --with-widgetextra=local \
    221                     --with-portmidi=system \
    222                     CPPFLAGS=-I${prefix}/include \
    223                     WX_CONFIG=${wxWidgets.wxconfig}
    224 
    225 # Since version 2.2.0 we need to use the embedded (modified) Portaudio version.
    226 configure.args-append \
    227                     --with-portaudio=local
    228 configure.env-append \
    229                     PORTMIDI_CFLAGS=-I${prefix}/include \
    230                     PORTMIDI_LIBS=${prefix}/lib/libportmidi.dylib
    231 depends_lib-append \
    232                     port:portmidi
    233 
    234 build.args-append   V=1 VERBOSE=1
    235 
    236253platform darwin {
    237254    set aud_app_path    ${applications_dir}/Audacity.app
    238255    destroot.keepdirs   ${destroot}${aud_app_path}/Contents/Resources/en.lproj