Ticket #28935: ffmpeg-0.6.3_1-asflags-mmx_patch-Portfile.diff

File ffmpeg-0.6.3_1-asflags-mmx_patch-Portfile.diff, 1.9 KB (added by daitakahashi, 13 years ago)

proposed patch (updated for ffmpeg 0.6.3_1)

  • Portfile

    old new  
    33
    44PortSystem 1.0
    55PortGroup xcodeversion 1.0
     6PortGroup muniversal 1.0
    67
    78name            ffmpeg
    89conflicts       ffmpeg-devel
     
    5354                rmd160  623bf7c60ad7dd4febdac5ae5ef12566fb8dbf38
    5455
    5556patchfiles      patch-libswscale-swscale.h.diff \
    56                 patch-Makefile.diff
     57                patch-Makefile.diff \
     58                patch-ffmpeg-0.6-PIC_fix.diff
    5759
    5860depends_build   port:pkgconfig \
    5961                port:gmake \
     
    107109
    108110#add --enable-libopenjpeg when problems with openjpeg.h are resolved
    109111
    110 if {$build_arch != ""} {
    111     configure.args-append --arch=${build_arch}
    112 }
    113 
    114112test.run        yes
    115113
    116114#
    117115# configure isn't autoconf and they do use a dep cache
    118116#
    119117
    120 universal_variant no
     118if { [variant_isset universal] } {
     119    configure.universal_args-delete             --disable-dependency-tracking
     120
     121    foreach arch ${universal_archs_supported} {
     122        lappend merger_configure_args($arch)    --arch=${arch}
     123        lappend merger_configure_env($arch)     ASFLAGS='-arch ${arch}'
     124    }
     125} else {
     126    configure.args-append --arch=${configure.build_arch}
     127    configure.env-append  ASFLAGS='-arch ${configure.build_arch}'
     128}
    121129
    122130post-destroot {
    123131    file mkdir ${destroot}${prefix}/share/doc/${name}
     
    127135    }
    128136}
    129137
    130 platform darwin 10 {
    131     # ticket #20938 -- disable mmx for 32 bit intel only
    132     if { $build_arch == "i386" } {
    133         # swscale is no longer GPL only
    134         configure.args-delete --enable-swscale
    135         if { ![variant_isset no_mmx] } {
    136             configure.args-append --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3 --disable-amd3dnow --disable-amd3dnowext
    137         }
    138     }
    139 }
    140 
    141138platform powerpc {
    142139    # absence of altivec is not automatically detected
    143140    if {[exec sysctl -n hw.vectorunit] == 0} {