Ticket #50660: Portfile.diff

File Portfile.diff, 6.9 KB (added by mcg@…, 8 years ago)
  • Portfile

    old new  
    66PortGroup               waf 1.0
    77
    88# Please revbump mpv whenever ffmpeg{,-devel} is updated!
    9 github.setup            mpv-player mpv 0.11.0 v
     9github.setup            mpv-player mpv 0.15.0 v
    1010revision                2
    1111categories              multimedia
    1212license                 GPL-2+
     
    3131extract.only-delete     ${waf_distfile}
    3232
    3333checksums               ${mpv_distfile} \
    34                         rmd160  47d625b899b7bbe3867845e9710fef14d41d5249 \
    35                         sha256  7d0598a0f5f5825143e2678f058d6305683c82ff36702235703e8d54048132fe \
     34                        rmd160  78569931a3bf6bfe18154da8eaf9f3623d543957 \
     35                        sha256  c2011c9c9a9e22cf84d16dcb5f23572bbbcf414b51955b5e095af274e51351c1 \
    3636                        ${waf_distfile} \
    3737                        rmd160  bb1dcd10a0c336a5497bb1247a301c27f997078c \
    3838                        sha256  01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b
     
    6161                        --enable-libass \
    6262                        --enable-coreaudio \
    6363                        --enable-cocoa \
    64                         --disable-vda-hwaccel \
    6564                        --disable-videotoolbox-hwaccel \
    66                         --disable-vda-gl \
    6765                        --disable-videotoolbox-gl
    6866
    6967# mpv autodetects many support libs. To prevent undeclared
     
    10098                        --disable-jpeg \
    10199                        --disable-tv \
    102100                        --disable-lua \
    103                         --disable-apple-remote
     101                        --disable-apple-remote \
     102                        --disable-libmpv-shared
    104103
    105104# Fix picking up the correct talloc version.
    106105# -isystem has the added benefit of moving the include
     
    145144                            --enable-apple-remote
    146145}
    147146
    148 set has_vda 0
    149147set has_vtb 0
    150148
    151149platform darwin {
     
    159157                    and adjust it to your needs.
    160158    }]
    161159
    162     # Note: VDA support has already been removed on master. The next update will probably not include it anymore.
    163 
    164     # VDA (video hardware acceleration, mostly H264) is only supported on 10.6.3+ up to (excluding) 10.11.
    165     #if {(${os.major} > 10 || (${os.major} == 10 && ${os.minor} >= 3)) && (${os.major} < 15)}
    166     # Due to a bug in ffmpeg(?), we have to enable VDA on 10.11 as well, even though it shouldn't be supported.
    167     # More information: https://github.com/mpv-player/mpv/issues/2299
    168     if {${os.major} > 10 || (${os.major} == 10 && ${os.minor} >= 3)} {
    169         set has_vda 1
    170         configure.args-delete   --disable-vda-hwaccel \
    171                                 --disable-vda-gl
    172         configure.args-append   --enable-vda-hwaccel \
    173                                 --enable-vda-gl
    174     }
    175 
    176160    # VideotoolBox, a new hardware acceleration framework, is supported on 10.8+ and "here to stay".
    177161    # It provides support for H264, H263, MPEG1, MPEG2 and MPEG4.
    178162    if {${os.major} > 11} {
     
    183167                                --enable-videotoolbox-gl
    184168    }
    185169
    186     if {(${has_vtb}) || (${has_vda})} {
     170    if {${has_vtb}} {
    187171        notes-append {
    188172                        This config file already defines the necessary video output settings to make \
    189173                        use of the hardware acceleration features provided by your operating system.
    190174        }
    191 
    192         if {(${has_vtb}) && (${has_vda})} {
    193             notes-append [subst {
    194                             While the default configuration file makes use of the newer and preferred \
    195                             VideoToolBox framework, a separate config file set up for the old VDA \
    196                             framework has been installed as
    197                             * ${prefix}/share/examples/${name}/config-maintainer-vda.
    198             }]
    199         }
    200175    } else {
    201176        notes-append {
    202177                        Sadly, your system is incapable of utilizing mpv's hardware decoding features.
     
    229204                            patch-video_out_opengl_cocoa.c-hardcode-OpenGL-2.diff \
    230205                            patch-osdep_macosx_compat.m-add-subscripting-implementation.diff \
    231206                            patch-audio_out_ao_coreaudio_utils.c-add-missing-header-for-getpid.diff \
    232                             patch-video_decode_vda.c-disable-HAVE_VDA_DEFAULT_INIT2.diff \
    233                             patch-video_out_opengl_hwdec_vda.c-disable-NV12.diff
    234 
    235207                            # Let's hope this is actually unneeded...
    236208                            #patch-video_out_cocoa_common.m-use-deprecated-ColorSync-functions.diff
    237209
     
    246218    }
    247219
    248220    post-extract {
    249         xinstall -m 0644 -W "${filespath}" config-maintainer-vda config-maintainer-vtb "${worksrcpath}/TOOLS/"
     221        xinstall -m 0644 -W "${filespath}" config-maintainer "${worksrcpath}/TOOLS/"
    250222    }
    251223
    252224    pre-configure {
    253225        if {[variant_isset network]} {
    254             reinplace -W "${worksrcpath}/TOOLS" "s|@@NETWORK@@||" config-maintainer-vda
    255             reinplace -W "${worksrcpath}/TOOLS" "s|@@NETWORK@@||" config-maintainer-vtb
     226            reinplace -W "${worksrcpath}/TOOLS" "s|@@NETWORK@@||" config-maintainer
    256227        } else {
    257             reinplace -W "${worksrcpath}/TOOLS" "|@@NETWORK@@|d" config-maintainer-vda
    258             reinplace -W "${worksrcpath}/TOOLS" "|@@NETWORK@@|d" config-maintainer-vtb
     228            reinplace -W "${worksrcpath}/TOOLS" "|@@NETWORK@@|d" config-maintainer
    259229        }
    260230    }
    261231}
     
    312282
    313283post-destroot {
    314284    xinstall -d -m 0755 ${destroot}${prefix}/etc/${name}
    315     foreach etcfile {encoding-profiles.conf example.conf input.conf} {
     285    foreach etcfile {encoding-profiles.conf mpv.conf input.conf} {
    316286        xinstall -m 0644 ${worksrcpath}/etc/${etcfile} \
    317287            ${destroot}${prefix}/etc/${name}/${etcfile}
    318288    }
     
    324294
    325295    if {${os.platform} eq "darwin"} {
    326296        if {(${has_vtb})} {
    327             xinstall -m 0644 ${worksrcpath}/TOOLS/config-maintainer-vtb \
     297            xinstall -m 0644 ${worksrcpath}/TOOLS/config-maintainer \
    328298                             ${destroot}${prefix}/share/examples/${name}/config-maintainer
    329299
    330             if {(${has_vda})} {
    331                 xinstall -m 0644 ${worksrcpath}/TOOLS/config-maintainer-vda \
    332                                  ${destroot}${prefix}/share/examples/${name}/
    333             }
    334         } else {
    335             xinstall -m 0644 ${worksrcpath}/TOOLS/config-maintainer-vda \
    336                              ${destroot}${prefix}/share/examples/${name}/config-maintainer
    337300        }
    338301    }
    339302}
     
    496459    configure.args-replace  --disable-pdf-build \
    497460                            --enable-pdf-build
    498461}
     462
     463variant api description {Enable C API} {
     464    configure.args-replace  --disable-libmpv-shared \
     465                            --enable-libmpv-shared
     466}