Ticket #19314: patch-ffmpeg.diff

File patch-ffmpeg.diff, 2.1 KB (added by dbevans (David B. Evans), 15 years ago)

Proposed patch for Portfile

  • Portfile

     
    55
    66name            ffmpeg
    77version         0.5
    8 revision        1
     8revision        2
    99epoch           1
    1010categories      multimedia
    1111maintainers     devans openmaintainer
     
    7474build.cmd       gmake
    7575configure.compiler gcc-4.0
    7676
     77#
     78# enable auto configure of mmx and related Intel optimizations by default
     79# requires XCode 3.1.2 or better on Leopard
     80#
     81
     82pre-extract {
     83    if {"darwin" == ${os.platform} && 9 == ${os.major}} {
     84        set minimum_xcodeversion 3.1.2
     85        set current_xcodeversion [exec defaults read /Developer/Applications/Xcode.app/Contents/Info CFBundleShortVersionString]
     86        if {[rpm-vercomp ${current_xcodeversion} ${minimum_xcodeversion}] < 0} {
     87            ui_error "On Mac OS X ${macosx_version}, ${name} ${version} requires Xcode ${minimum_xcodeversion} or later but you have Xcode ${current_xcodeversion}."
     88            return -code error "incompatible Xcode version"
     89        }
     90    }
     91}
     92
    7793configure.cflags-append    -DHAVE_LRINTF ${configure.cppflags}
    7894configure.args \
    7995        --disable-vhook \
     
    90106        --enable-libx264 \
    91107        --mandir=${prefix}/share/man \
    92108        --enable-shared --enable-pthreads \
    93         --disable-mmx \
    94109        --cc=gcc-4.0
    95110
    96111#add --enable-libopenjpeg when problems with openjpeg.h are resolved
     
    111126    }
    112127}
    113128
    114 #
    115 # comments concerning mmx problems may be out of date
    116 # needs testing on i386 platform to verify
    117 #
    118 
    119 variant mmx description {enable mmx optimizations ; may not build in gcc-4.2 or xcode 3.0 gcc-4.0} {
    120 # make no-mmx default and allow mmx enabling for the brave.
    121     configure.args-delete --disable-mmx
    122 # Fix Leopard problems by disabling the cavs decoder for now (is this still required?)
    123     configure.args-append --disable-decoder=cavs
     129variant no_mmx description {disable mmx optimizations} {
     130    configure.args-append --disable-mmx
    124131}
    125132
    126133variant no_gpl description {disallow use of GPL code, license will be LGPL} {