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$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup xcodeversion 1.0 |
---|
6 | PortGroup muniversal 1.0 |
---|
7 | |
---|
8 | name ffmbc |
---|
9 | conflicts ffmpeg-devel ffmpeg |
---|
10 | version 0.7-rc7 |
---|
11 | revision 1 |
---|
12 | license GPL-2+ |
---|
13 | categories multimedia |
---|
14 | maintainers deric openmaintainer |
---|
15 | |
---|
16 | description FFmbc is FFmpeg customized for broadcast and professional usage. |
---|
17 | |
---|
18 | long_description ... |
---|
19 | |
---|
20 | platforms darwin |
---|
21 | homepage http://code.google.com/p/ffmbc/ |
---|
22 | master_sites googlecode:ffmbc |
---|
23 | distname FFmbc-${version} |
---|
24 | |
---|
25 | use_bzip2 yes |
---|
26 | |
---|
27 | checksums rmd160 477bb0632358ebdd3be389fb9ac3ecd28d7643e2 \ |
---|
28 | sha256 08e1b4a7abe6f9493bd5905ece1cecd291bdb1efbd2af6dd830a42273238f3c7 |
---|
29 | |
---|
30 | depends_build port:pkgconfig \ |
---|
31 | port:gmake \ |
---|
32 | port:texi2html |
---|
33 | |
---|
34 | depends_lib port:lame \ |
---|
35 | port:libvorbis \ |
---|
36 | port:libogg \ |
---|
37 | port:libtheora \ |
---|
38 | port:dirac \ |
---|
39 | port:schroedinger \ |
---|
40 | port:openjpeg \ |
---|
41 | path:lib/libspeex.dylib:speex \ |
---|
42 | port:XviD \ |
---|
43 | port:x264 \ |
---|
44 | port:libvpx \ |
---|
45 | path:lib/pkgconfig/sdl.pc:libsdl \ |
---|
46 | port:bzip2 \ |
---|
47 | port:zlib |
---|
48 | |
---|
49 | patchfiles patch-configure.diff |
---|
50 | |
---|
51 | build.cmd ${prefix}/bin/gmake |
---|
52 | build.env-append V=1 |
---|
53 | |
---|
54 | # |
---|
55 | # enable auto configure of mmx and related Intel optimizations by default |
---|
56 | # requires Xcode 3.1 or better on Leopard |
---|
57 | # |
---|
58 | minimum_xcodeversions {9 3.1} |
---|
59 | |
---|
60 | # And similarly, disable mmx on Tiger |
---|
61 | platform darwin { |
---|
62 | if {${os.major} < 9} { |
---|
63 | default_variants -mmx |
---|
64 | } else { |
---|
65 | default_variants +mmx |
---|
66 | } |
---|
67 | } |
---|
68 | |
---|
69 | # Under some conditions, llvm-gcc-4.2 drops some "unused" code even though it is used. |
---|
70 | # This is fixed in llvm-gcc trunk, but not in Apple's shipped llvm-gccs. |
---|
71 | if {${configure.compiler} == "llvm-gcc-4.2"} { |
---|
72 | configure.compiler clang |
---|
73 | } |
---|
74 | |
---|
75 | # Xcode 4.1's clang has issues with ffmpeg |
---|
76 | # See https://trac.macports.org/ticket/30137 |
---|
77 | if {$xcodeversion == "4.1"} { |
---|
78 | pre-configure { |
---|
79 | error "XCode 4.1 cannot compile ${name}; please upgrade" |
---|
80 | } |
---|
81 | } |
---|
82 | |
---|
83 | configure.cflags-append -DHAVE_LRINTF ${configure.cppflags} |
---|
84 | configure.args \ |
---|
85 | --enable-gpl \ |
---|
86 | --enable-postproc \ |
---|
87 | --enable-swscale --enable-avfilter \ |
---|
88 | --enable-libmp3lame \ |
---|
89 | --enable-libvorbis \ |
---|
90 | --enable-libtheora \ |
---|
91 | --enable-libdirac --enable-libschroedinger \ |
---|
92 | --enable-libopenjpeg \ |
---|
93 | --enable-libxvid \ |
---|
94 | --enable-libx264 \ |
---|
95 | --enable-libvpx \ |
---|
96 | --enable-libspeex \ |
---|
97 | --disable-mmx \ |
---|
98 | --disable-mmx2 \ |
---|
99 | --disable-sse \ |
---|
100 | --disable-ssse3 \ |
---|
101 | --disable-amd3dnow \ |
---|
102 | --disable-amd3dnowext \ |
---|
103 | --mandir=${prefix}/share/man \ |
---|
104 | --enable-shared --enable-pthreads \ |
---|
105 | --cc=${configure.cc} |
---|
106 | |
---|
107 | test.run yes |
---|
108 | |
---|
109 | # |
---|
110 | # configure isn't autoconf and they do use a dep cache |
---|
111 | # |
---|
112 | |
---|
113 | post-destroot { |
---|
114 | file mkdir ${destroot}${prefix}/share/doc/ffmpeg |
---|
115 | file copy ${worksrcpath}/doc/APIchanges ${destroot}${prefix}/share/doc/ffmpeg |
---|
116 | file copy ${worksrcpath}/doc/RELEASE_NOTES ${destroot}${prefix}/share/doc/ffmpeg |
---|
117 | foreach f [glob ${worksrcpath}/doc/*.txt] { |
---|
118 | file copy $f ${destroot}${prefix}/share/doc/ffmpeg |
---|
119 | } |
---|
120 | } |
---|
121 | |
---|
122 | platform powerpc { |
---|
123 | # absence of altivec is not automatically detected |
---|
124 | if {[catch {sysctl hw.vectorunit} result] || $result == 0} { |
---|
125 | configure.args-append --disable-altivec |
---|
126 | } |
---|
127 | } |
---|
128 | |
---|
129 | configure.universal_args-delete --disable-dependency-tracking |
---|
130 | |
---|
131 | if {[variant_isset universal]} { |
---|
132 | foreach arch ${configure.universal_archs} { |
---|
133 | set merger_host($arch) "" |
---|
134 | lappend merger_configure_args($arch) --arch=${arch} |
---|
135 | lappend merger_configure_env($arch) ASFLAGS='-arch ${arch}' |
---|
136 | } |
---|
137 | if {[string match "*86*" ${configure.universal_archs}]} { |
---|
138 | depends_build-append port:yasm |
---|
139 | } |
---|
140 | lappend merger_configure_args(i386) --enable-yasm |
---|
141 | lappend merger_configure_args(x86_64) --enable-yasm |
---|
142 | } else { |
---|
143 | configure.args-append --arch=${configure.build_arch} |
---|
144 | configure.env-append ASFLAGS='[get_canonical_archflags]' |
---|
145 | if {$build_arch == "i386" || $build_arch == "x86_64"} { |
---|
146 | depends_build-append port:yasm |
---|
147 | configure.args-append --enable-yasm |
---|
148 | } |
---|
149 | } |
---|
150 | |
---|
151 | variant mmx description {enable all supported x86 asm optimizations} { |
---|
152 | configure.args-delete --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3 --disable-amd3dnow --disable-amd3dnowext |
---|
153 | } |
---|
154 | |
---|
155 | variant no_gpl conflicts nonfree description {disallow use of GPL code, license will be LGPL} { |
---|
156 | configure.args-delete --enable-gpl \ |
---|
157 | --enable-postproc \ |
---|
158 | --enable-libx264 \ |
---|
159 | --enable-libxvid |
---|
160 | depends_lib-delete port:XviD \ |
---|
161 | port:x264 |
---|
162 | license-delete GPL-2+ |
---|
163 | license-append LGPL-2.1+ |
---|
164 | } |
---|
165 | |
---|
166 | # the build server uses the default variants, and we want distributable binaries |
---|
167 | # nonfree code is disabled by default but can be enabled using the +nonfree variant |
---|
168 | |
---|
169 | variant nonfree conflicts no_gpl description {enable nonfree code, libraries and binaries will not be redistributable} { |
---|
170 | configure.args-append --enable-nonfree \ |
---|
171 | --enable-libfaac |
---|
172 | depends_lib-append port:faac |
---|
173 | license-delete GPL-2+ |
---|
174 | license-append Restrictive |
---|
175 | } |
---|
176 | |
---|
177 | if {[variant_isset nonfree]} { |
---|
178 | notes " |
---|
179 | ******* |
---|
180 | ******* This build of ${name} includes nonfree code as follows: |
---|
181 | ******* |
---|
182 | ******* libfaac |
---|
183 | ******* |
---|
184 | ******* The following libraries and binaries may not be redistributed: |
---|
185 | ******* |
---|
186 | ******* ffmpeg |
---|
187 | ******* libavcodec |
---|
188 | ******* libavdevice |
---|
189 | ******* libavfilter |
---|
190 | ******* libavformat |
---|
191 | ******* libavutil |
---|
192 | ******* |
---|
193 | ******* To remove this restriction remove the variant +nonfree |
---|
194 | ******* |
---|
195 | " |
---|
196 | } elseif {![variant_isset no_gpl]} { |
---|
197 | notes " |
---|
198 | ******* |
---|
199 | ******* This build of ${name} includes GPLed code and |
---|
200 | ******* is therefore licensed under GPL v2 or later. |
---|
201 | ******* |
---|
202 | ******* The following modules are GPLed: |
---|
203 | ******* |
---|
204 | ******* postproc |
---|
205 | ******* libx264 |
---|
206 | ******* libxvid |
---|
207 | ******* |
---|
208 | ******* To include all nonfree, GPLed and LGPL code use variant +nonfree |
---|
209 | ******* To remove nonfree and GPLed code leaving only LGPL code use variant +no_gpl |
---|
210 | ******* |
---|
211 | " |
---|
212 | } else { |
---|
213 | notes " |
---|
214 | ******* |
---|
215 | ******* This build of ${name} includes no GPLed or nonfree |
---|
216 | ******* code and is therefore licensed under LGPL v2.1 or later. |
---|
217 | ******* |
---|
218 | " |
---|
219 | } |
---|
220 | |
---|
221 | livecheck.regex FFmbc-(\[0-9\]+\.\[0-9\]+-rc\[0-9\]) |
---|