Ticket #18256: patch-ffmpeg.diff

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

Patch for Portfile (rev 4) (corrected language in ui_msgs)

  • Portfile

     
    55
    66name            ffmpeg
    77version         15261
    8 revision        1
     8revision        2
    99categories      multimedia
    1010maintainers     acho@macports.org openmaintainer
    1111description     Digital VCR and streaming server
     
    4343
    4444use_parallel_build  yes
    4545worksrcdir     trunk
    46 depends_build  bin:svn:subversion port:gmake
    4746
    48 depends_lib     port:libsdl \
     47depends_build   bin:svn:subversion \
     48                port:gmake \
     49                port:x264
     50
     51depends_lib     port:lame \
     52                port:libvorbis \
     53                port:libogg \
     54                port:libtheora \
     55                port:faac \
     56                port:faad2 \
     57                port:XviD \
     58                port:libsdl \
    4959                port:bzip2 \
    5060                port:zlib
    5161
     
    7787}
    7888
    7989platforms       darwin
     90
    8091configure.cflags-append -DHAVE_LRINTF ${configure.cppflags}
    8192configure.args  --disable-vhook \
     93                --enable-gpl \
     94                --enable-nonfree \
     95                --enable-swscale --enable-avfilter --enable-avfilter-lavf \
     96                --enable-postproc \
     97                --enable-libmp3lame \
     98                --enable-libvorbis \
     99                --enable-libtheora \
     100                --enable-libfaac \
     101                --enable-libfaad \
     102                --enable-libx264 \
     103                --enable-libxvid \
    82104                --mandir=${prefix}/share/man \
    83105                --enable-shared --enable-pthreads \
    84106                --disable-mmx --cc=gcc-4.0
    85107
    86108test.run        yes
    87109
    88 default_variants        +a52
     110default_variants +a52
    89111
    90112# configure isn't autoconf and they do use a dep cache
    91113universal_variant no
     
    111133        configure.args-append --disable-decoder=cavs
    112134}
    113135
    114 variant gpl description {allow use of GPL code, the resulting libav* and ffmpeg will be under GPL} {
    115         configure.args-append --enable-gpl
    116 }
    117 
    118 variant postproc requires gpl description {enable GPLed postprocessing support} {
    119         configure.args-append --enable-postproc
    120 }
    121 
    122 # Adds MP3 support
    123 variant lame description {enable MP3 encoding via libmp3lame} {
    124         depends_lib-append port:lame
    125         configure.args-append --enable-libmp3lame
    126 }
    127 
    128 variant extvorbis description {enable Vorbis encoding via libvorbis, native implementation exists} {
    129         depends_lib-append port:libvorbis port:libogg
    130         configure.args-append --enable-libvorbis
    131 }
    132 
    133 variant theora description {enable Theora encoding via libtheora} {
    134         depends_lib-append port:libtheora port:libogg
    135         configure.args-append --enable-libtheora
    136 }
    137 
    138 variant faac requires gpl description {enable FAAC support via libfaac} {
    139         depends_lib-append port:faac
    140         configure.args-append --enable-libfaac
    141 }
    142 
    143 variant faad requires gpl description {enable FAAD support via libfaad} {
    144         depends_lib-append port:faad2
    145         configure.args-append --enable-libfaad
    146 }
    147 
    148 variant xvid requires gpl description {enable Xvid encoding via xvidcore, native MPEG-4/Xvid encoder exists} {
    149         depends_lib-append port:XviD
    150         configure.args-append --enable-libxvid
    151 }
    152 
    153 # depends build until x264 port supports shared libraries
    154 variant x264 requires gpl description {enable H.264 encoding via x264} {
    155         depends_build-append port:x264
    156         configure.args-append --enable-libx264
    157 }
    158 
    159 variant a52 requires gpl description {enable GPLed liba52 support} {
     136variant a52 description {enable GPLed liba52 support} {
    160137        depends_lib-append port:a52dec
    161138        configure.args-append --enable-liba52
    162139        post-destroot {
     
    169146        }
    170147}
    171148
    172 variant avfilter requires gpl description {video filter support (replaces vhook)} {
    173         configure.args-append --enable-swscale --enable-avfilter
     149variant no_gpl conflicts a52 description {disallow use of GPL code, license will be LGPL if +no_nonfree is selected} {
     150    configure.args-delete   --enable-gpl
     151    configure.args-delete   --enable-postproc
     152    configure.args-delete   --enable-swscale
     153    configure.args-delete   --enable-libfaad
     154    depends_lib-delete      port:faad2
     155    configure.args-delete   --enable-libx264
     156    depends_build-delete      port:x264
     157    configure.args-delete   --enable-libxvid
     158    depends_lib-delete      port:XviD
     159}
    174160
    175         # keep vhook as long as avfilter isnt working fully
    176         configure.args-delete --disable-vhook
     161variant no_nonfree description {disallow use of nonfree code, libraries and binaries will be redistributable under GPL/LGPL} {
     162    configure.args-delete --enable-nonfree
    177163}
    178164
     165post-activate {
     166    if {![variant_isset no_nonfree]} {
     167        ui_msg "
     168*******
     169******* This build of ${name} includes nonfree code.
     170*******
     171******* The following libraries and binaries may not be redistributed:
     172*******
     173*******     ffmpeg
     174*******     libavcodec
     175*******     libavdevice
     176*******     libavfilter
     177*******     libavformat
     178*******     libavutil
     179*******
     180******* To remove this restriction use variant +no_nonfree
     181*******
     182"
     183    } elseif {![variant_isset no_gpl]} {
     184        ui_msg "
     185*******
     186******* This build of ${name} includes GPLed code and
     187******* is therefore licensed under GPL.
     188*******
     189******* The following modules are GPLed:
     190*******
     191*******      postproc
     192*******      swscale
     193*******      liba52
     194*******      libfaad
     195*******      libx264
     196*******      libxvid
     197*******
     198******* To include only LGPLed code use variants +no_nonfree +no_gpl -a52
     199*******
     200"
     201    } else {
     202        ui_msg "
     203*******
     204******* This build of ${name} includes no GPLed or nonfree
     205******* code and is therefore licensed under LGPL.
     206*******
     207"
     208    }
     209}
     210
     211#
    179212#disable livecheck
     213#
     214
    180215livecheck.check none