1 | # $Id: Portfile,v 1.19 2006/08/29 05:44:05 markd Exp $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name MPlayer |
---|
5 | version 1.0rc1 |
---|
6 | categories multimedia |
---|
7 | maintainers ecronin@gizmolabs.org \ |
---|
8 | openmaintainer@macports.org |
---|
9 | description The Unix movie player |
---|
10 | long_description \ |
---|
11 | MPlayer can play most standard video formats out of the box and almost \ |
---|
12 | all others with the help of external codecs. MPlayer currently works \ |
---|
13 | best from the command line, but visual feedback for many functions is \ |
---|
14 | available from its onscreen status display (OSD), which is also used for \ |
---|
15 | displaying subtitles. MPlayer also has a GUI with skin support and \ |
---|
16 | several unofficial alternative graphical frontends are available. |
---|
17 | |
---|
18 | platforms darwin |
---|
19 | |
---|
20 | homepage http://www.mplayerhq.hu/ |
---|
21 | master_sites http://www1.mplayerhq.hu/MPlayer/releases/ \ |
---|
22 | http://www2.mplayerhq.hu/MPlayer/releases/ \ |
---|
23 | http://www4.mplayerhq.hu/MPlayer/releases/ \ |
---|
24 | http://studwww.ira.uni-karlsruhe.de/~s_doeffi/MPlayer/ \ |
---|
25 | http://equinox.campus.ltu.se/MPlayer/releases/ \ |
---|
26 | http://tranquillity.campus.ltu.se/~rtogni/ \ |
---|
27 | http://www.people.virginia.edu/~drf8f/MPlayer/releases/ \ |
---|
28 | http://www1.mplayerhq.hu/MPlayer/releases/codecs/:codecs \ |
---|
29 | http://www2.mplayerhq.hu/MPlayer/releases/codecs/:codecs |
---|
30 | use_bzip2 yes |
---|
31 | |
---|
32 | checksums ${distname}${extract.suffix} \ |
---|
33 | md5 18c05d88e22c3b815a43ca8d7152ccdc \ |
---|
34 | sha1 a450c0b0749c343a8496ba7810363c9d46dfa73c \ |
---|
35 | rmd160 8cea02e832aec5d9e090829d61d0f131dcc177a2 |
---|
36 | |
---|
37 | depends_lib port:libpng port:jpeg port:lzo port:libvorbis \ |
---|
38 | port:libmad port:lame port:libiconv port:zlib |
---|
39 | |
---|
40 | configure.args \ |
---|
41 | --with-extraincdir=${prefix}/include:${prefix}/include/cdparanoia/interface:${prefix}/include/cdparanoia/paranoia \ |
---|
42 | --with-extralibdir=${prefix}/lib:${prefix}/lib/samba3 \ |
---|
43 | --datadir=${prefix}/share/${name} \ |
---|
44 | --confdir=${prefix}/etc/${name} \ |
---|
45 | --mandir=${prefix}/share/man \ |
---|
46 | --enable-png --enable-jpeg \ |
---|
47 | --enable-liblzo --enable-libvorbis \ |
---|
48 | --enable-mad --disable-faad-external \ |
---|
49 | --enable-largefiles |
---|
50 | |
---|
51 | # MPlayer autodetects many support libs. To prevent undeclared |
---|
52 | # dependencies, explicitly disable everything optional first. |
---|
53 | # Later, let autodetect do its magic not explicit --enable |
---|
54 | configure.args-append \ |
---|
55 | --disable-smb --disable-live --disable-dvdnav \ |
---|
56 | --disable-dvdread --disable-mpdvdkit \ |
---|
57 | --disable-cdparanoia --disable-freetype \ |
---|
58 | --disable-fontconfig --disable-unrarlib \ |
---|
59 | --disable-fribidi --disable-enca \ |
---|
60 | --disable-gif --disable-libcdio --disable-xvid \ |
---|
61 | --disable-x264 --disable-nut --disable-libfame \ |
---|
62 | --disable-speex --disable-theora --disable-faac \ |
---|
63 | --disable-ladspa --disable-libdv --disable-toolame \ |
---|
64 | --disable-twolame --disable-xmms --disable-libdts \ |
---|
65 | --disable-musepack --disable-sdl --disable-aa \ |
---|
66 | --disable-caca --disable-x11 --disable-arts \ |
---|
67 | --disable-esd |
---|
68 | |
---|
69 | post-destroot { |
---|
70 | file mkdir ${destroot}${prefix}/share/doc/${name} |
---|
71 | eval file copy [glob ${worksrcpath}/DOCS/*] \ |
---|
72 | ${destroot}${prefix}/share/doc/${name} |
---|
73 | } |
---|
74 | |
---|
75 | ##### Mplayer features |
---|
76 | |
---|
77 | # Install all possible languages for man pages |
---|
78 | variant man_all_lang { |
---|
79 | configure.args-append --language=all |
---|
80 | } |
---|
81 | |
---|
82 | # configure doesn't fully build up necessary flags when --enable-fontconfig |
---|
83 | # is used, so use autodetect instead |
---|
84 | variant fontconfig { |
---|
85 | depends_lib-append port:fontconfig |
---|
86 | configure.args-delete --disable-fontconfig |
---|
87 | } |
---|
88 | |
---|
89 | variant freetype { |
---|
90 | depends_lib-append port:freetype |
---|
91 | configure.args-delete --disable-freetype |
---|
92 | configure.args-append --enable-freetype |
---|
93 | } |
---|
94 | |
---|
95 | variant fribidi { |
---|
96 | depends_lib-append port:fribidi |
---|
97 | configure.args-delete --disable-fribidi |
---|
98 | #configure.args-append --enable-fribidi |
---|
99 | } |
---|
100 | |
---|
101 | ##### Inputs |
---|
102 | |
---|
103 | ## Broken as of 10/25/06 (samba3 produces bad libsmbclient.dylib) |
---|
104 | #variant smb { |
---|
105 | # depends_lib-append port:samba3 |
---|
106 | # configure.args-delete --disable-smb |
---|
107 | # #configure.args-append --enable-smb |
---|
108 | #} |
---|
109 | |
---|
110 | variant dvdread { |
---|
111 | depends_lib-append port:libdvdread |
---|
112 | configure.args-delete --disable-dvdread |
---|
113 | } |
---|
114 | |
---|
115 | ## Broken as of 10/25/06 (version issue?) |
---|
116 | #variant cdparanoia { |
---|
117 | # depends_lib-append port:cdparanoia |
---|
118 | # configure.args-delete --disable-cdparanoia |
---|
119 | # #configure.args-append --enable-dvdread |
---|
120 | #} |
---|
121 | |
---|
122 | ##### External codecs |
---|
123 | |
---|
124 | variant gif { |
---|
125 | depends_lib-append port:libungif |
---|
126 | configure.args-delete --disable-gif |
---|
127 | } |
---|
128 | |
---|
129 | ## Broken as of 10/25/06 (undefined symbol _read_toc) |
---|
130 | #variant cdio { |
---|
131 | # depends_lib-append port:libcdio |
---|
132 | # configure.args-delete --disable-libcdio |
---|
133 | # #configure.args-append --enable-libcdio |
---|
134 | #} |
---|
135 | |
---|
136 | variant theora { |
---|
137 | depends_lib-append port:libtheora |
---|
138 | configure.args-delete --disable-theora |
---|
139 | configure.args-append --enable-theora |
---|
140 | } |
---|
141 | |
---|
142 | variant xvid { |
---|
143 | depends_lib-append port:XviD |
---|
144 | configure.args-delete --disable-xvid |
---|
145 | configure.args-append --enable-xvid |
---|
146 | } |
---|
147 | |
---|
148 | ## Broken as of 10/25/06 (need newer x264 snapshot) |
---|
149 | #variant x264 { |
---|
150 | # depends_lib-append port:x264 |
---|
151 | # configure.args-delete --disable-x264 |
---|
152 | # configure.args-append --enable-x264 |
---|
153 | #} |
---|
154 | |
---|
155 | # binary_codecs replaced 'variant real' |
---|
156 | variant real requires binary_codecs {} |
---|
157 | |
---|
158 | variant binary_codecs { |
---|
159 | if {[variant_isset darwin_powerpc]} { |
---|
160 | global mplayercodecs mplayercodecsfile |
---|
161 | set mplayercodecs rp9codecs-macosx-20041107.pkg |
---|
162 | set mplayercodecsfile ${mplayercodecs}.zip |
---|
163 | distfiles-append ${mplayercodecsfile}:codecs |
---|
164 | checksums-append ${mplayercodecsfile} \ |
---|
165 | md5 788cf4940280fd787c0a2141d88ce3c7 \ |
---|
166 | sha1 18abd6d0424c4682815a13b34695d37d2fda2a73 \ |
---|
167 | rmd160 c6f49012633bbb84ffa405b8881dc90605d26fc6 |
---|
168 | |
---|
169 | extract.only ${distname}${extract.suffix} |
---|
170 | |
---|
171 | depends_lib-append bin:unzip:unzip |
---|
172 | |
---|
173 | post-extract { |
---|
174 | cd ${worksrcpath} |
---|
175 | system "unzip -q ${distpath}/${mplayercodecsfile}" |
---|
176 | } |
---|
177 | |
---|
178 | configure.args-append --with-codecsdir=${prefix}/share/${name}/codecs |
---|
179 | |
---|
180 | post-destroot { |
---|
181 | xinstall -m 755 -d ${destroot}${prefix}/share/${name}/codecs |
---|
182 | cd ${destroot}${prefix}/share/${name}/codecs |
---|
183 | system "gunzip -c \ |
---|
184 | ${worksrcpath}/${mplayercodecs}/Contents/Archive.pax.gz | pax -r" |
---|
185 | } |
---|
186 | } |
---|
187 | if {[variant_isset darwin_i386]} { |
---|
188 | global mplayercodecs mplayercodecsfile |
---|
189 | set mplayercodecs "Essential Codecs Package (Intel).pkg" |
---|
190 | set mplayercodecsfile essential-macosx-x86-20060611.zip |
---|
191 | distfiles-append ${mplayercodecsfile}:codecs |
---|
192 | checksums-append ${mplayercodecsfile} \ |
---|
193 | md5 1e409d500336a8318cbe2a67bbf9d9ca \ |
---|
194 | sha1 4f8fee483b6c227d8cb774d2d30e1ef36a43e04a \ |
---|
195 | rmd160 87beaa40263deb0d0b9166f24d6f9dd686f594fd |
---|
196 | |
---|
197 | extract.only ${distname}${extract.suffix} |
---|
198 | |
---|
199 | depends_lib-append bin:unzip:unzip |
---|
200 | |
---|
201 | post-extract { |
---|
202 | cd ${worksrcpath} |
---|
203 | system "unzip -q ${distpath}/${mplayercodecsfile}" |
---|
204 | } |
---|
205 | |
---|
206 | configure.args-append --with-codecsdir=${prefix}/share/${name}/codecs |
---|
207 | |
---|
208 | post-destroot { |
---|
209 | xinstall -m 755 -d ${destroot}${prefix}/share/${name}/codecs |
---|
210 | cd ${destroot}${prefix}/share/${name}/codecs |
---|
211 | system "gunzip -c \ |
---|
212 | \"${worksrcpath}/${mplayercodecs}/Contents/Archive.pax.gz\" | pax -r" |
---|
213 | } |
---|
214 | } |
---|
215 | } |
---|
216 | |
---|
217 | variant speex { |
---|
218 | depends_lib-append port:speex-devel |
---|
219 | configure.args-delete --disable-speex |
---|
220 | #configure.args-append --enable-speex |
---|
221 | } |
---|
222 | |
---|
223 | variant faac { |
---|
224 | depends_lib-append port:faac |
---|
225 | configure.args-delete --disable-faac |
---|
226 | } |
---|
227 | |
---|
228 | variant dv { |
---|
229 | depends_lib-append port:libdv |
---|
230 | configure.args-delete --disable-libdv |
---|
231 | } |
---|
232 | |
---|
233 | variant twolame { |
---|
234 | depends_lib-append port:twolame |
---|
235 | configure.args-delete --disable-twolame |
---|
236 | } |
---|
237 | |
---|
238 | variant dts { |
---|
239 | depends_lib-append port:libdts |
---|
240 | configure.args-delete --disable-libdts |
---|
241 | } |
---|
242 | |
---|
243 | ##### Outputs |
---|
244 | |
---|
245 | variant sdl { |
---|
246 | depends_lib-append port:libsdl |
---|
247 | configure.args-delete --disable-sdl |
---|
248 | } |
---|
249 | |
---|
250 | variant aa { |
---|
251 | depends_lib-append port:aalib |
---|
252 | configure.args-delete --disable-aa |
---|
253 | } |
---|
254 | |
---|
255 | variant caca { |
---|
256 | depends_lib-append port:libcaca |
---|
257 | configure.args-delete --disable-caca |
---|
258 | } |
---|
259 | |
---|
260 | variant x11 requires freetype requires fontconfig { |
---|
261 | depends_lib-append lib:libX11.6:XFree86 |
---|
262 | configure.args-delete --disable-x11 |
---|
263 | configure.env-append PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${x11prefix}/lib/pkgconfig |
---|
264 | } |
---|
265 | |
---|
266 | variant arts { |
---|
267 | depends_lib-append port:arts |
---|
268 | configure.args-delete --disable-arts |
---|
269 | } |
---|
270 | |
---|
271 | variant esd { |
---|
272 | depends_lib-append port:esound |
---|
273 | configure.args-delete --disable-esd |
---|
274 | } |
---|
275 | |
---|
276 | |
---|
277 | platform macosx { |
---|
278 | configure.args-append --enable-macosx --enable-macosx-finder-support \ |
---|
279 | --enable-macosx-bundle --enable-qtx |
---|
280 | } |
---|
281 | |
---|
282 | platform darwin { |
---|
283 | patchfiles-append patch-Makefile |
---|
284 | build.env LD=cc |
---|
285 | } |
---|
286 | |
---|
287 | platform darwin 8 { |
---|
288 | # Need to force use of c++ for linking when Xcode 2.2 is used since some |
---|
289 | # bits of libstdc++ are needed during linking |
---|
290 | build.env LD=c++ |
---|
291 | } |
---|
292 | |
---|
293 | platform darwin i386 { |
---|
294 | configure.args-append --disable-win32 --disable-mp3lib |
---|
295 | } |
---|
296 | |
---|
297 | platform darwin powerpc {} |
---|