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

Last change on this file since 70077 was 70077, checked in by devans@…, 9 years ago

ffmpeg: update to stable version 0.6

  • add license information
  • update variants to reflect changes in licensing
  • add speex support by default
  • disable broken jack indev
  • update long description
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.1 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 70077 2010-07-29 15:54:02Z devans@macports.org $
3
4PortSystem 1.0
5PortGroup xcodeversion 1.0
6
7name            ffmpeg
8conflicts       ffmpeg-devel
9epoch           1
10version         0.6
11license         nonfree GPLv2.1+ LGPLv2.1+
12categories      multimedia
13maintainers     devans openmaintainer
14
15description     FFmpeg is a complete solution to play, record, convert and \
16                stream audio and video.
17
18long_description        FFmpeg is a complete solution to record, convert and \
19                        stream audio and video. It includes libavcodec, the \
20                        leading audio/video codec library. \
21                        \
22                        The project is made of several components: \
23                        \
24                        ffmpeg is a command line tool to convert one video \
25                        file format to another. It also supports grabbing and \
26                        encoding in real time from a TV card. \
27                        \
28                        ffserver is an HTTP (RTSP is being developped) \
29                        multimedia streaming server for live broadcasts. Time \
30                        shifting of live broadcast is also supported. \
31                        \
32                        ffplay is a simple media player based on SDL and on \
33                        the ffmpeg libraries. \
34                        \
35                        ffprobe gathers information from multimedia streams and \
36                        prints it in human- and machine-readable fashion. \
37                        \
38                        libavcodec is a library containing all the ffmpeg \
39                        audio/video encoders and decoders. Most codecs were \
40                        developped from scratch to ensure best performances \
41                        and high code reusability. \
42                        \
43                        libavformat is a library containing parsers and \
44                        generators for all common audio/video formats.
45
46platforms       darwin
47homepage        http://www.ffmpeg.org/
48master_sites    http://www.ffmpeg.org/releases/
49
50use_bzip2       yes
51
52checksums       md5     d6142a9a5821d6a6262a6edb903faa24 \
53                sha1    c130e3bc368251b9130ce6eafb44fe8c3993ff5c \
54                rmd160  1ff6a8f419239a03d84f67cc954f60f73632432a
55
56patchfiles      patch-libswscale-Makefile.diff \
57                patch-libswscale-swscale.h.diff
58
59use_parallel_build yes
60
61depends_build   port:gmake
62
63depends_lib     port:lame \
64                port:libvorbis \
65                port:libogg \
66                port:libtheora \
67                port:dirac \
68                port:schroedinger \
69                port:faac \
70                port:faad2 \
71                port:speex \
72                port:XviD \
73                port:x264 \
74                path:lib/pkgconfig/sdl.pc:libsdl \
75                port:bzip2 \
76                port:zlib
77
78build.cmd       gmake
79
80#
81# enable auto configure of mmx and related Intel optimizations by default
82# requires Xcode 3.1 or better on Leopard
83#
84minimum_xcodeversions {9 3.1}
85
86configure.cflags-append    -DHAVE_LRINTF ${configure.cppflags}
87configure.args \
88        --enable-gpl \
89        --enable-postproc \
90        --enable-swscale --enable-avfilter --enable-avfilter-lavf \
91        --enable-libmp3lame \
92        --enable-libvorbis \
93        --enable-libtheora \
94        --enable-libdirac --enable-libschroedinger \
95        --enable-libfaac \
96        --enable-libfaad \
97        --enable-libxvid \
98        --enable-libx264 \
99        --enable-libspeex \
100        --enable-nonfree \
101        --mandir=${prefix}/share/man \
102        --enable-shared --enable-pthreads \
103        --disable-indevs \
104        --cc=${configure.cc}
105
106#add --enable-libopenjpeg when problems with openjpeg.h are resolved
107
108if {$build_arch != ""} {
109    configure.args-append --arch=${build_arch}
110}
111
112test.run        yes
113
114#
115# configure isn't autoconf and they do use a dep cache
116#
117
118universal_variant no
119
120post-destroot {
121    file mkdir ${destroot}${prefix}/share/doc/${name}
122    file copy ${worksrcpath}/doc/TODO ${destroot}${prefix}/share/doc/${name}
123    foreach f [glob ${worksrcpath}/doc/*.txt ${worksrcpath}/doc/*.html] {
124        file copy $f ${destroot}${prefix}/share/doc/${name}
125    }
126}
127
128platform darwin 10 {
129    # ticket #20938 -- disable mmx for 32 bit intel only
130    if { $build_arch == "i386" } {
131        # swscale is no longer GPL only
132        configure.args-delete --enable-swscale
133        if { ![variant_isset no_mmx] } {
134            configure.args-append --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3 --disable-amd3dnow --disable-amd3dnowext
135        }
136    }
137}
138
139platform powerpc {
140    # absence of altivec is not automatically detected
141    if {[exec sysctl -n hw.vectorunit] == 0} {
142        configure.args-append --disable-altivec
143    }
144}
145
146variant no_mmx description {disable all x86 asm optimizations} {
147    configure.args-append --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3 --disable-amd3dnow --disable-amd3dnowext
148}
149
150variant no_gpl description {disallow use of GPL code, license will be LGPL} {
151    configure.args-delete   --enable-gpl
152    configure.args-delete   --enable-postproc
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}
160
161variant no_nonfree description {disallow use of nonfree code, libraries and binaries will be redistributable under GPL/LGPL} {
162    configure.args-delete   --enable-nonfree
163    configure.args-delete   --enable-libfaac
164    depends_lib-delete      port:faac
165}
166
167#
168# jack indev support is currently broken
169# since Darwin doesn't support memory based POSIX semaphores
170# only named ones
171#
172
173variant jack description {Enable jack input device support (currently broken)} {
174    configure.args-delete --disable-indevs
175    depends_lib-append port:jack
176}
177
178post-activate {
179    if {![variant_isset no_nonfree]} {
180        ui_msg "
181*******
182******* This build of ${name} includes nonfree code as follows:
183*******
184*******     libfaac
185*******
186******* The following libraries and binaries may not be redistributed:
187*******
188*******     ffmpeg
189*******     libavcodec
190*******     libavdevice
191*******     libavfilter
192*******     libavformat
193*******     libavutil
194*******
195******* To remove this restriction use variant +no_nonfree
196*******
197"
198    } elseif {![variant_isset no_gpl]} {
199        ui_msg "
200*******
201******* This build of ${name} includes GPLed code and
202******* is therefore licensed under GPL v2.1 or later.
203*******
204******* The following modules are GPLed:
205*******
206*******      postproc
207*******      libfaad
208*******      libx264
209*******      libxvid
210*******
211******* To include only LGPLed code use variant +no_gpl +no_nonfree
212*******
213"
214    } else {
215        ui_msg "
216*******
217******* This build of ${name} includes no GPLed or nonfree
218******* code and is therefore licensed under LGPL v2.1 or later.
219*******
220"
221    }
222}
223
224livecheck.type  regex
225livecheck.url   ${master_sites}
226livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.