source: trunk/dports/multimedia/ffmpeg/Portfile @ 36393

Last change on this file since 36393 was 36393, checked in by ryandesign@…, 12 years ago

ffmpeg: fixing this warning shown in debug mode:
Error: Unable to process mirror sites for: , ignoring.
Warning: No mirror sites on file for class

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.6 KB
Line 
1# $Id: Portfile 36393 2008-04-29 20:40:08Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name            ffmpeg
6version         0.4.9-pre1
7revision        8
8categories      multimedia
9maintainers     acho@macports.org openmaintainer
10description     Digital VCR and streaming server
11long_description        FFmpeg is a complete solution to record, convert and \
12                        stream audio and video. It includes libavcodec, the \
13                        leading audio/video codec library. \
14                        \
15                        The project is made of several components: \
16                        \
17                        ffmpeg is a command line tool to convert one video \
18                        file format to another. It also supports grabbing and \
19                        encoding in real time from a TV card. \
20                        \
21                        ffserver is an HTTP (RTSP is being developped) \
22                        multimedia streaming server for live broadcasts. Time \
23                        shifting of live broadcast is also supported. \
24                        \
25                        ffplay is a simple media player based on SDL and on \
26                        the ffmpeg libraries. \
27                        \
28                        libavcodec is a library containing all the ffmpeg \
29                        audio/video encoders and decoders. Most codecs were \
30                        developped from scratch to ensure best performances \
31                        and high code reusability. \
32                        \
33                        libavformat is a library containing parsers and \
34                        generators for all common audio/video formats.
35homepage        http://ffmpeg.sourceforge.net/
36master_sites
37distfiles
38worksrcdir     trunk
39depends_build  bin:svn:subversion
40
41fetch {
42    system "svn export -r12276 --ignore-externals svn://svn.mplayerhq.hu/ffmpeg/trunk ${worksrcpath}/"
43    system "svn export -r26183 svn://svn.mplayerhq.hu/mplayer/trunk/libswscale ${worksrcpath}/libswscale"
44}
45
46extract {}
47
48platforms       darwin
49configure.cflags-append -DHAVE_LRINTF ${configure.cppflags}
50configure.args  --prefix=${prefix} --disable-vhook \
51                --mandir=${prefix}/share/man \
52                --enable-shared --enable-pthreads
53
54default_variants        +a52
55
56pre-configure {
57        if {[variant_isset universal]} {
58                configure.args-delete --disable-dependency-tracking
59        }
60}
61post-destroot {
62        file mkdir ${destroot}${prefix}/share/doc/${name}
63        file copy ${worksrcpath}/doc/TODO ${destroot}${prefix}/share/doc/${name}
64        foreach f [glob ${worksrcpath}/doc/*.txt ${worksrcpath}/doc/*.html] {
65                file copy $f ${destroot}${prefix}/share/doc/${name}
66        }
67}
68
69platform darwin i386 {
70        # Fix Leopard problems by disabling assembly for now; see #13019.
71        configure.args-append --disable-mmx
72        post-patch {
73                reinplace "s|defined\(ARCH_X86\) \&\& defined\(CONFIG_GPL\)|defined\(ARCH_X86\) \\\&\\\& defined\(CONFIG_GPL\) \\\&\\\& \\\!defined\(__APPLE__\)|g" ${worksrcpath}/libswscale/rgb2rgb.c
74        }
75}
76
77variant gpl description {allow use of GPL code, the resulting libav* and ffmpeg will be under GPL} {
78        configure.args-append --enable-gpl
79}
80
81variant postproc requires gpl description {enable GPLed postprocessing support} {
82        configure.args-append --enable-pp
83}
84
85# Adds MP3 support
86variant lame description {enable MP3 encoding via libmp3lame} {
87        depends_lib-append port:lame
88        configure.args-append --enable-libmp3lame
89}
90
91variant extvorbis description {enable Vorbis encoding via libvorbis, native implementation exists} {
92        depends_lib-append port:libvorbis port:libogg
93        configure.args-append --enable-libvorbis
94}
95
96variant theora description {enable Theora encoding via libtheora} {
97        depends_lib-append port:libtheora port:libogg
98        configure.args-append --enable-libtheora
99}
100
101variant faac requires gpl description {enable FAAC support via libfaac} {
102        depends_lib-append port:faac
103        configure.args-append --enable-libfaac
104}
105
106variant faad requires gpl description {enable FAAD support via libfaad} {
107        depends_lib-append port:faad2
108        configure.args-append --enable-libfaad
109}
110
111variant xvid requires gpl description {enable Xvid encoding via xvidcore, native MPEG-4/Xvid encoder exists} {
112        depends_lib-append port:XviD
113        configure.args-append --enable-libxvid
114}
115
116# depends build until x264 port supports shared libraries
117variant x264 requires gpl description {enable H.264 encoding via x264} {
118        depends_build-append port:x264
119        configure.args-append --enable-libx264
120}
121
122variant a52 requires gpl description {enable GPLed liba52 support} {
123        depends_lib-append port:a52dec
124        configure.args-append --enable-liba52
125        post-destroot {
126                file mkdir ${destroot}${prefix}/include/ffmpeg
127                foreach f [glob ${destroot}${prefix}/include/libavcodec/*.h ${destroot}${prefix}/include/libavformat/*.h ${destroot}${prefix}/include/libavutil/*.h] {
128        regsub -all $destroot ${f} "" srclink
129        ln -s ${srclink} ${destroot}${prefix}/include/ffmpeg/[lindex [split ${f} /] end]
130                }
131               
132        }
133}
134variant avfilter requires gpl description {video filter support (replaces vhook)} {
135        patchfiles-append patch-libswscale-Makefile.diff \
136                patch-Makefile.diff patch-libavfilter-Makefile.diff
137        configure.args-append --enable-swscaler --enable-avfilter
138
139        # keep vhook as long as avfilter isnt working fully
140        configure.args-delete --disable-vhook
141}
Note: See TracBrowser for help on using the repository browser.