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

File ffmpeg-asflags-mmx_patch-Portfile.diff, 1.9 KB (added by fran6co@…, 14 years ago)

The Portfile that worked for me

  • Portfile

    old new  
    33
    44PortSystem 1.0
    55PortGroup xcodeversion 1.0
     6PortGroup muniversal 1.0
    67
    78name            ffmpeg
    89conflicts       ffmpeg-devel
     
    5556
    5657patchfiles      patch-libswscale-Makefile.diff \
    5758                patch-libswscale-swscale.h.diff \
    58                 patch-Makefile.diff
     59                patch-Makefile.diff \
     60                patch-ffmpeg-0.6-PIC_fix.diff
    5961
    6062depends_build   port:pkgconfig \
    6163                port:gmake \
     
    119121
    120122#add --enable-libopenjpeg when problems with openjpeg.h are resolved
    121123
    122 if {$build_arch != ""} {
    123     configure.args-append --arch=${build_arch}
    124 }
    125 
    126124test.run        yes
    127125
    128126#
    129127# configure isn't autoconf and they do use a dep cache
    130128#
    131129
    132 universal_variant no
     130if { [variant_isset universal] } {
     131    configure.universal_args-delete             --disable-dependency-tracking
    133132
     133    foreach arch ${universal_archs_supported} {
     134        lappend merger_configure_args($arch)    --arch=${arch}
     135        lappend merger_configure_env($arch)     ASFLAGS='-arch ${arch}'
     136    }
     137} else {
     138    configure.args-append --arch=${configure.build_arch}
     139    configure.env-append  ASFLAGS='-arch ${configure.build_arch}'
     140}
    134141post-destroot {
    135142    file mkdir ${destroot}${prefix}/share/doc/${name}
    136143    file copy ${worksrcpath}/doc/TODO ${destroot}${prefix}/share/doc/${name}
     
    139146    }
    140147}
    141148
    142 platform darwin 10 {
    143     # ticket #20938 -- disable mmx for 32 bit intel only
    144     if { $build_arch == "i386" } {
    145         # swscale is no longer GPL only
    146         configure.args-delete --enable-swscale
    147         if { ![variant_isset no_mmx] } {
    148             configure.args-append --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3 --disable-amd3dnow --disable-amd3dnowext
    149         }
    150     }
    151 }
    152 
    153149platform powerpc {
    154150    # absence of altivec is not automatically detected
    155151    if {[exec sysctl -n hw.vectorunit] == 0} {