Ticket #28935: ffmpeg-Portfile.2.diff

File ffmpeg-Portfile.2.diff, 2.5 KB (added by daitakahashi, 10 years ago)

Update platform darwin 10

  • Portfile

    old new  
    33
    44PortSystem 1.0
    55PortGroup xcodeversion 1.0
     6PortGroup muniversal 1.0
    67
    78name            ffmpeg
    89conflicts       ffmpeg-devel
     
    119120
    120121#add --enable-libopenjpeg when problems with openjpeg.h are resolved
    121122
    122 if {$build_arch != ""} {
    123     configure.args-append --arch=${build_arch}
    124 }
    125 
    126123test.run        yes
    127124
    128125#
    129126# configure isn't autoconf and they do use a dep cache
    130127#
    131128
    132 universal_variant no
     129if { [variant_isset universal] } {
     130    configure.universal_args-delete             --disable-dependency-tracking
     131
     132    foreach arch ${universal_archs_supported} {
     133        lappend merger_configure_args($arch)    --arch=${arch}
     134    }
     135} else {
     136    configure.args-append --arch=${configure.build_arch}
     137}
    133138
    134139post-destroot {
    135140    file mkdir ${destroot}${prefix}/share/doc/${name}
     
    139144    }
    140145}
    141146
     147set disable_mmx_config_args {--disable-mmx --disable-mmx2 \
     148                             --disable-sse --disable-ssse3 \
     149                             --disable-amd3dnow --disable-amd3dnowext}
     150
    142151platform darwin 10 {
    143152    # ticket #20938 -- disable mmx for 32 bit intel only
    144     if { $build_arch == "i386" } {
     153    # universal variant implicitly includes 32 bit intel
     154    if { [variant_isset universal] || ${configure.build_arch} == "i386" } {
    145155        # swscale is no longer GPL only
    146156        configure.args-delete --enable-swscale
     157
     158        # restore swscale for architectures other than 32 bit intel
     159        foreach arch ${universal_archs_supported} {
     160            if { $arch != "i386" } {
     161                lappend merger_configure_args($arch) --enable-swscale
     162            }
     163        }
     164
    147165        if { ![variant_isset no_mmx] } {
    148             configure.args-append --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3 --disable-amd3dnow --disable-amd3dnowext
     166            if { [variant_isset universal] } {
     167                eval lappend merger_configure_args(i386)     ${disable_mmx_config_args}
     168            } else {
     169                eval configure.args-append                   ${disable_mmx_config_args}
     170            }
    149171        }
    150172    }
    151173}
     
    158180}
    159181
    160182variant no_mmx description {disable all x86 asm optimizations} {
    161     configure.args-append --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3 --disable-amd3dnow --disable-amd3dnowext
     183    eval configure.args-append ${disable_mmx_config_args}
    162184}
    163185
    164186variant no_gpl description {disallow use of GPL code, license will be LGPL} {