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

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

ffmpeg, ffmpeg-devel: fix license

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.5 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 77351 2011-03-28 05:25:18Z ryandesign@macports.org $
3
4PortSystem 1.0
5PortGroup xcodeversion 1.0
6
7name            ffmpeg
8conflicts       ffmpeg-devel
9epoch           1
10version         0.6.1
11license         nonfree GPL-2+ LGPL-2.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     4f5d732d25eedfb072251b5314ba2093 \
53                sha1    24ada1d35fc000980090e773101e101ca45f85e5 \
54                rmd160  b85d513c11b0ee30aecb77f4e4c0b94ddd72f7d9
55
56patchfiles      patch-libswscale-Makefile.diff \
57                patch-libswscale-swscale.h.diff \
58                patch-Makefile.diff
59
60depends_build   port:pkgconfig \
61                port:gmake \
62                port:texi2html
63
64depends_lib     port:lame \
65                port:libvorbis \
66                port:libogg \
67                port:libtheora \
68                port:dirac \
69                port:schroedinger \
70                port:faac \
71                port:faad2 \
72                path:lib/libspeex.dylib:speex \
73                port:XviD \
74                port:x264 \
75                port:libvpx \
76                path:lib/pkgconfig/sdl.pc:libsdl \
77                port:bzip2 \
78                port:zlib
79
80#
81# temporary empirical counter-intuitive hack to enable building on
82# single processor/core machines see #25926
83# TODO: understand the root cause, why this works and/or apply a better fix
84#
85
86if {${build.jobs} < 2} {
87    build.jobs 2
88}
89
90build.cmd       ${prefix}/bin/gmake
91build.env-append V=1
92
93#
94# enable auto configure of mmx and related Intel optimizations by default
95# requires Xcode 3.1 or better on Leopard
96#
97minimum_xcodeversions {9 3.1}
98
99configure.cflags-append    -DHAVE_LRINTF ${configure.cppflags}
100configure.args \
101        --enable-gpl \
102        --enable-postproc \
103        --enable-swscale --enable-avfilter --enable-avfilter-lavf \
104        --enable-libmp3lame \
105        --enable-libvorbis \
106        --enable-libtheora \
107        --enable-libdirac --enable-libschroedinger \
108        --enable-libfaac \
109        --enable-libfaad \
110        --enable-libxvid \
111        --enable-libx264 \
112        --enable-libvpx \
113        --enable-libspeex \
114        --enable-nonfree \
115        --mandir=${prefix}/share/man \
116        --enable-shared --enable-pthreads \
117        --disable-indevs \
118        --cc=${configure.cc}
119
120#add --enable-libopenjpeg when problems with openjpeg.h are resolved
121
122if {$build_arch != ""} {
123    configure.args-append --arch=${build_arch}
124}
125
126test.run        yes
127
128#
129# configure isn't autoconf and they do use a dep cache
130#
131
132universal_variant no
133
134post-destroot {
135    file mkdir ${destroot}${prefix}/share/doc/${name}
136    file copy ${worksrcpath}/doc/TODO ${destroot}${prefix}/share/doc/${name}
137    foreach f [glob ${worksrcpath}/doc/*.txt ${worksrcpath}/doc/*.html] {
138        file copy $f ${destroot}${prefix}/share/doc/${name}
139    }
140}
141
142platform 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
153platform powerpc {
154    # absence of altivec is not automatically detected
155    if {[exec sysctl -n hw.vectorunit] == 0} {
156        configure.args-append --disable-altivec
157    }
158}
159
160variant no_mmx description {disable all x86 asm optimizations} {
161    configure.args-append --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3 --disable-amd3dnow --disable-amd3dnowext
162}
163
164variant no_gpl description {disallow use of GPL code, license will be LGPL} {
165    configure.args-delete   --enable-gpl
166    configure.args-delete   --enable-postproc
167    configure.args-delete   --enable-libfaad
168    depends_lib-delete      port:faad2
169    configure.args-delete   --enable-libx264
170    depends_build-delete    port:x264
171    configure.args-delete   --enable-libxvid
172    depends_lib-delete      port:XviD
173}
174
175variant no_nonfree description {disallow use of nonfree code, libraries and binaries will be redistributable under GPL/LGPL} {
176    configure.args-delete   --enable-nonfree
177    configure.args-delete   --enable-libfaac
178    depends_lib-delete      port:faac
179}
180
181#
182# jack indev support is currently broken
183# since Darwin doesn't support memory based POSIX semaphores
184# only named ones
185#
186
187variant jack description {Enable jack input device support (currently broken)} {
188    configure.args-delete --disable-indevs
189    depends_lib-append port:jack
190}
191
192post-activate {
193    if {![variant_isset no_nonfree]} {
194        ui_msg "
195*******
196******* This build of ${name} includes nonfree code as follows:
197*******
198*******     libfaac
199*******
200******* The following libraries and binaries may not be redistributed:
201*******
202*******     ffmpeg
203*******     libavcodec
204*******     libavdevice
205*******     libavfilter
206*******     libavformat
207*******     libavutil
208*******
209******* To remove this restriction use variant +no_nonfree
210*******
211"
212    } elseif {![variant_isset no_gpl]} {
213        ui_msg "
214*******
215******* This build of ${name} includes GPLed code and
216******* is therefore licensed under GPL v2 or later.
217*******
218******* The following modules are GPLed:
219*******
220*******      postproc
221*******      libfaad
222*******      libx264
223*******      libxvid
224*******
225******* To include only LGPLed code use variant +no_gpl +no_nonfree
226*******
227"
228    } else {
229        ui_msg "
230*******
231******* This build of ${name} includes no GPLed or nonfree
232******* code and is therefore licensed under LGPL v2.1 or later.
233*******
234"
235    }
236}
237
238livecheck.type  regex
239livecheck.url   ${master_sites}
240livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.