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 82651 2011-08-17 16:08:11Z ryandesign@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup xcodeversion 1.0 |
---|
6 | PortGroup muniversal 1.0 |
---|
7 | |
---|
8 | name ffmpeg |
---|
9 | conflicts ffmpeg-devel |
---|
10 | epoch 1 |
---|
11 | version 0.10.4 |
---|
12 | # this Portfile has been tested with 0.11.1, just change the version and checksum to update |
---|
13 | license nonfree GPL-2+ LGPL-2.1+ |
---|
14 | categories multimedia |
---|
15 | maintainers devans openmaintainer |
---|
16 | |
---|
17 | description FFmpeg is a complete solution to play, record, convert and \ |
---|
18 | stream audio and video. |
---|
19 | |
---|
20 | long_description FFmpeg is a complete solution to record, convert and \ |
---|
21 | stream audio and video. It includes libavcodec, the \ |
---|
22 | leading audio/video codec library. \ |
---|
23 | \ |
---|
24 | The project is made of several components: \ |
---|
25 | \ |
---|
26 | ffmpeg is a command line tool to convert one video \ |
---|
27 | file format to another. It also supports grabbing and \ |
---|
28 | encoding in real time from a TV card. \ |
---|
29 | \ |
---|
30 | ffserver is an HTTP (RTSP is being developped) \ |
---|
31 | multimedia streaming server for live broadcasts. Time \ |
---|
32 | shifting of live broadcast is also supported. \ |
---|
33 | \ |
---|
34 | ffplay is a simple media player based on SDL and on \ |
---|
35 | the ffmpeg libraries. \ |
---|
36 | \ |
---|
37 | ffprobe gathers information from multimedia streams and \ |
---|
38 | prints it in human- and machine-readable fashion. \ |
---|
39 | \ |
---|
40 | libavcodec is a library containing all the ffmpeg \ |
---|
41 | audio/video encoders and decoders. Most codecs were \ |
---|
42 | developped from scratch to ensure best performances \ |
---|
43 | and high code reusability. \ |
---|
44 | \ |
---|
45 | libavformat is a library containing parsers and \ |
---|
46 | generators for all common audio/video formats. |
---|
47 | |
---|
48 | platforms darwin |
---|
49 | homepage http://www.ffmpeg.org/ |
---|
50 | master_sites http://www.ffmpeg.org/releases/ |
---|
51 | |
---|
52 | use_bzip2 yes |
---|
53 | |
---|
54 | checksums rmd160 97ec2a7690cf610a72f4198da91a59191cee3f4a \ |
---|
55 | sha256 82932716a8c01a6840a2f20c1ee093e04b1d8a27c2d6318ddf21a5f95f3c581b |
---|
56 | |
---|
57 | depends_build port:pkgconfig \ |
---|
58 | port:gmake \ |
---|
59 | port:texi2html |
---|
60 | |
---|
61 | depends_lib port:lame \ |
---|
62 | port:libvorbis \ |
---|
63 | port:libogg \ |
---|
64 | port:libtheora \ |
---|
65 | port:dirac \ |
---|
66 | port:schroedinger \ |
---|
67 | port:faac \ |
---|
68 | port:faad2 \ |
---|
69 | path:lib/libspeex.dylib:speex \ |
---|
70 | port:XviD \ |
---|
71 | port:x264 \ |
---|
72 | port:libvpx \ |
---|
73 | path:lib/pkgconfig/sdl.pc:libsdl \ |
---|
74 | port:bzip2 \ |
---|
75 | port:zlib |
---|
76 | |
---|
77 | build.cmd ${prefix}/bin/gmake |
---|
78 | build.env-append V=1 |
---|
79 | |
---|
80 | # |
---|
81 | # enable auto configure of mmx and related Intel optimizations by default |
---|
82 | # requires Xcode 3.1 or better on Leopard |
---|
83 | # |
---|
84 | minimum_xcodeversions {9 3.1} |
---|
85 | |
---|
86 | # Under some conditions, llvm-gcc-4.2 drops some "unused" code even though it is used |
---|
87 | # fixed in llvm-gcc trunk, but not in Apple's shipped llvm-gccs. |
---|
88 | if {${configure.compiler} == "llvm-gcc-4.2"} { |
---|
89 | configure.compiler clang |
---|
90 | } |
---|
91 | |
---|
92 | #/configure --prefix=/opt/local --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/gcc-4.2 --arch=i386 --enable-yasm --disable-asm --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3 --disable-amd3dnow --disable-amd3dnowext |
---|
93 | configure.cflags-append -DHAVE_LRINTF ${configure.cppflags} |
---|
94 | configure.args \ |
---|
95 | --mandir=${prefix}/share/man \ |
---|
96 | --enable-shared --enable-pthreads \ |
---|
97 | --disable-indevs \ |
---|
98 | --cc=${configure.cc} \ |
---|
99 | --disable-doc |
---|
100 | |
---|
101 | #add --enable-libopenjpeg when problems with openjpeg.h are resolved |
---|
102 | |
---|
103 | test.run yes |
---|
104 | |
---|
105 | # |
---|
106 | # configure isn't autoconf and they do use a dep cache |
---|
107 | # |
---|
108 | |
---|
109 | post-destroot { |
---|
110 | file mkdir ${destroot}${prefix}/share/doc/${name} |
---|
111 | # file copy ${worksrcpath}/doc/TODO ${destroot}${prefix}/share/doc/${name} |
---|
112 | foreach f [glob ${worksrcpath}/doc/*.txt ${worksrcpath}/doc/*.html] { |
---|
113 | file copy $f ${destroot}${prefix}/share/doc/${name} |
---|
114 | } |
---|
115 | } |
---|
116 | |
---|
117 | platform powerpc { |
---|
118 | # absence of altivec is not automatically detected |
---|
119 | if {[catch {sysctl hw.vectorunit} result] || $result == 0} { |
---|
120 | configure.args-append --disable-altivec |
---|
121 | } |
---|
122 | } |
---|
123 | |
---|
124 | configure.universal_args-delete --disable-dependency-tracking |
---|
125 | |
---|
126 | if {[variant_isset universal]} { |
---|
127 | foreach arch ${configure.universal_archs} { |
---|
128 | lappend merger_configure_args($arch) --arch=${arch} |
---|
129 | lappend merger_configure_env($arch) ASFLAGS='-arch ${arch}' |
---|
130 | } |
---|
131 | if {[string match "*86*" ${configure.universal_archs}]} { |
---|
132 | depends_build-append port:yasm |
---|
133 | } |
---|
134 | lappend merger_configure_args(i386) --enable-yasm |
---|
135 | lappend merger_configure_args(x86_64) --enable-yasm |
---|
136 | } else { |
---|
137 | configure.args-append --arch=${configure.build_arch} |
---|
138 | configure.env-append ASFLAGS='[get_canonical_archflags]' |
---|
139 | if {$build_arch == "i386" || $build_arch == "x86_64"} { |
---|
140 | depends_build-append port:yasm |
---|
141 | configure.args-append --enable-yasm |
---|
142 | } |
---|
143 | } |
---|
144 | |
---|
145 | #variant no_mmx description {disable all x86 asm optimizations} { |
---|
146 | configure.args-append --disable-asm --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3 --disable-amd3dnow --disable-amd3dnowext |
---|
147 | #} |
---|
148 | |
---|
149 | variant no_gpl description {disallow use of GPL code, license will be LGPL} { |
---|
150 | configure.args-delete --enable-gpl \ |
---|
151 | --enable-postproc \ |
---|
152 | --enable-libfaad \ |
---|
153 | --enable-libx264 \ |
---|
154 | --enable-libxvid |
---|
155 | depends_lib-delete port:faad2 \ |
---|
156 | port:XviD |
---|
157 | depends_build-delete port:x264 |
---|
158 | license-delete GPL-2+ |
---|
159 | } |
---|
160 | |
---|
161 | variant no_nonfree description {disallow use of nonfree code, libraries and binaries will be redistributable under GPL/LGPL} { |
---|
162 | configure.args-delete --enable-nonfree \ |
---|
163 | --enable-libfaac |
---|
164 | depends_lib-delete port:faac |
---|
165 | license-delete nonfree |
---|
166 | } |
---|
167 | # the build server uses the default variants, and we want distributable binaries |
---|
168 | default_variants +no_nonfree |
---|
169 | |
---|
170 | # |
---|
171 | # jack indev support is currently broken |
---|
172 | # since Darwin doesn't support memory based POSIX semaphores |
---|
173 | # only named ones |
---|
174 | # |
---|
175 | |
---|
176 | variant jack description {Enable jack input device support (currently broken)} { |
---|
177 | configure.args-delete --disable-indevs |
---|
178 | depends_lib-append port:jack |
---|
179 | } |
---|
180 | |
---|
181 | if {![variant_isset no_nonfree]} { |
---|
182 | notes " |
---|
183 | ******* |
---|
184 | ******* This build of ${name} includes nonfree code as follows: |
---|
185 | ******* |
---|
186 | ******* libfaac |
---|
187 | ******* |
---|
188 | ******* The following libraries and binaries may not be redistributed: |
---|
189 | ******* |
---|
190 | ******* ffmpeg |
---|
191 | ******* libavcodec |
---|
192 | ******* libavdevice |
---|
193 | ******* libavfilter |
---|
194 | ******* libavformat |
---|
195 | ******* libavutil |
---|
196 | ******* |
---|
197 | ******* To remove this restriction use variant +no_nonfree |
---|
198 | ******* |
---|
199 | " |
---|
200 | } elseif {![variant_isset no_gpl]} { |
---|
201 | notes " |
---|
202 | ******* |
---|
203 | ******* This build of ${name} includes GPLed code and |
---|
204 | ******* is therefore licensed under GPL v2 or later. |
---|
205 | ******* |
---|
206 | ******* The following modules are GPLed: |
---|
207 | ******* |
---|
208 | ******* postproc |
---|
209 | ******* libfaad |
---|
210 | ******* libx264 |
---|
211 | ******* libxvid |
---|
212 | ******* |
---|
213 | ******* To include only LGPLed code use variant +no_gpl +no_nonfree |
---|
214 | ******* |
---|
215 | " |
---|
216 | } else { |
---|
217 | notes " |
---|
218 | ******* |
---|
219 | ******* This build of ${name} includes no GPLed or nonfree |
---|
220 | ******* code and is therefore licensed under LGPL v2.1 or later. |
---|
221 | ******* |
---|
222 | " |
---|
223 | } |
---|
224 | |
---|
225 | livecheck.type regex |
---|
226 | livecheck.url ${master_sites} |
---|
227 | livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}" |
---|