1 | # $Id: Portfile 49969 2009-04-21 15:15:11Z acho@macports.org $ |
---|
2 | |
---|
3 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 |
---|
4 | |
---|
5 | PortSystem 1.0 |
---|
6 | |
---|
7 | name mplayer-devel |
---|
8 | version 29181 |
---|
9 | revision 1 |
---|
10 | categories multimedia |
---|
11 | maintainers acho openmaintainer |
---|
12 | platforms darwin |
---|
13 | |
---|
14 | set dvdnav_ver 1167 |
---|
15 | set ffmpeg_ver 18522 |
---|
16 | |
---|
17 | description The MPlayer movie player built from SVN. |
---|
18 | long_description ${description} It plays most MPEG/VOB, AVI, Ogg/OGM, \ |
---|
19 | VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, \ |
---|
20 | NUT, NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files, \ |
---|
21 | supported by many native, XAnim, and Win32 DLL codecs. \ |
---|
22 | You can watch VideoCD, SVCD, DVD, 3ivx, DivX 3/4/5, WMV \ |
---|
23 | and even H.264 movies. |
---|
24 | homepage http://www.mplayerhq.hu/ |
---|
25 | |
---|
26 | livecheck.check none |
---|
27 | |
---|
28 | depends_build port:pkgconfig port:yasm port:subversion |
---|
29 | depends_lib \ |
---|
30 | port:jpeg port:lame port:libiconv port:libmad \ |
---|
31 | port:libogg port:libpng port:libvorbis port:lzo2 \ |
---|
32 | port:ncurses port:zlib port:bzip2 port:liboil |
---|
33 | |
---|
34 | fetch.type svn |
---|
35 | #svn.tag ${version} |
---|
36 | #svn.url svn://svn.mplayerhq.hu/mplayer/trunk |
---|
37 | worksrcdir trunk |
---|
38 | |
---|
39 | fetch { |
---|
40 | system "svn export -r${version} --ignore-externals svn://svn.mplayerhq.hu/mplayer/trunk ${worksrcpath}/" |
---|
41 | system "svn export -r${dvdnav_ver} svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdnav/src ${worksrcpath}/libdvdnav/" |
---|
42 | system "svn export -r${dvdnav_ver} svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread/src ${worksrcpath}/libdvdread4/" |
---|
43 | system "svn export -r${ffmpeg_ver} svn://svn.ffmpeg.org/ffmpeg/trunk/libavcodec ${worksrcpath}/libavcodec/" |
---|
44 | system "svn export -r${ffmpeg_ver} svn://svn.ffmpeg.org/ffmpeg/trunk/libavutil ${worksrcpath}/libavutil/" |
---|
45 | system "svn export -r${ffmpeg_ver} svn://svn.ffmpeg.org/ffmpeg/trunk/libavformat ${worksrcpath}/libavformat/" |
---|
46 | system "svn export -r${ffmpeg_ver} svn://svn.ffmpeg.org/ffmpeg/trunk/libpostproc ${worksrcpath}/libpostproc/" |
---|
47 | } |
---|
48 | # Do not use the following environment variables, otherwise the build phase |
---|
49 | # will fail. |
---|
50 | configure.cflags {} |
---|
51 | configure.cppflags {} |
---|
52 | configure.cxxflags {} |
---|
53 | configure.ldflags {} |
---|
54 | |
---|
55 | # Do not use pipes, otherwise the build phase will fail. |
---|
56 | configure.pipe no |
---|
57 | |
---|
58 | configure.args \ |
---|
59 | --datadir=${prefix}/share/${name} \ |
---|
60 | --confdir=${prefix}/etc/${name} \ |
---|
61 | --mandir=${prefix}/share/man \ |
---|
62 | --extra-cflags="-I${prefix}/include" \ |
---|
63 | --extra-libs="-L${prefix}/lib -L${prefix}/lib/samba3" \ |
---|
64 | --enable-png --enable-jpeg --enable-liblzo \ |
---|
65 | --enable-libvorbis --enable-mad \ |
---|
66 | --enable-largefiles |
---|
67 | |
---|
68 | configure.args-append \ |
---|
69 | --disable-smb --disable-live --disable-dvdnav \ |
---|
70 | --disable-dvdread --disable-cdparanoia --disable-freetype \ |
---|
71 | --disable-fontconfig --disable-fribidi \ |
---|
72 | --disable-enca --disable-libcdio --disable-xvid \ |
---|
73 | --disable-x264 --disable-speex --disable-theora \ |
---|
74 | --disable-faac --disable-ladspa --disable-libdv \ |
---|
75 | --disable-toolame --disable-twolame --disable-xmms \ |
---|
76 | --disable-musepack --disable-sdl --disable-aa \ |
---|
77 | --disable-caca --disable-x11 --disable-arts \ |
---|
78 | --disable-esd --disable-lirc --disable-mng --disable-libdirac-lavc \ |
---|
79 | --disable-libschroedinger-lavc |
---|
80 | |
---|
81 | post-destroot { |
---|
82 | xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name} |
---|
83 | eval file copy [glob ${worksrcpath}/DOCS/*] \ |
---|
84 | ${destroot}${prefix}/share/doc/${name} |
---|
85 | xinstall -d -m 0755 ${destroot}${prefix}/etc/${name} |
---|
86 | foreach etcfile {codecs.conf dvb-menu.conf example.conf \ |
---|
87 | input.conf menu.conf} { |
---|
88 | xinstall -m 0644 ${worksrcpath}/etc/${etcfile} \ |
---|
89 | ${destroot}${prefix}/etc/${name}/${etcfile} |
---|
90 | } |
---|
91 | } |
---|
92 | |
---|
93 | universal_variant no |
---|
94 | |
---|
95 | variant man_all_lang \ |
---|
96 | description {Install all possible languages for man pages} { |
---|
97 | configure.args-append --language=all |
---|
98 | } |
---|
99 | |
---|
100 | # Bundle all the font deps into one onscreen display variant |
---|
101 | # Allow autodetect to pick up fontconfig & freetype |
---|
102 | variant osd \ |
---|
103 | description {Enable onscreen display and TrueType font support} { |
---|
104 | depends_lib-append port:fontconfig port:freetype |
---|
105 | configure.args-delete --disable-fontconfig |
---|
106 | configure.args-delete --disable-freetype |
---|
107 | configure.args-append --enable-menu |
---|
108 | } |
---|
109 | |
---|
110 | variant fribidi requires osd \ |
---|
111 | description {Enable FriBidi Unicode support} { |
---|
112 | depends_lib-append port:fribidi |
---|
113 | configure.args-delete --disable-fribidi |
---|
114 | } |
---|
115 | |
---|
116 | variant noappleremote \ |
---|
117 | description {Disable Apple Infrared Remote support} { |
---|
118 | configure.args-append --disable-apple-remote |
---|
119 | } |
---|
120 | |
---|
121 | variant lirc \ |
---|
122 | description {Enable Linux Infrared Remote Daemon support} { |
---|
123 | depends_lib-append port:lirc |
---|
124 | configure.args-delete --disable-lirc |
---|
125 | } |
---|
126 | |
---|
127 | variant live \ |
---|
128 | description {Enable live555 support} { |
---|
129 | depends_lib-append port:live555 |
---|
130 | } |
---|
131 | |
---|
132 | ##### |
---|
133 | |
---|
134 | variant nodvd \ |
---|
135 | description {Disable DVD and DeCSS support} { |
---|
136 | configure.args-append --disable-dvdread-internal --disable-libdvdcss-internal |
---|
137 | } |
---|
138 | |
---|
139 | variant samba description {Enable Samba support} { |
---|
140 | depends_lib-append port:samba3 |
---|
141 | configure.args-append --enable-smb |
---|
142 | configure.args-delete --disable-smb |
---|
143 | } |
---|
144 | |
---|
145 | ##### External codecs |
---|
146 | |
---|
147 | variant theora \ |
---|
148 | description {Enable OggTheora support} { |
---|
149 | depends_lib-append port:libtheora |
---|
150 | configure.args-delete --disable-theora |
---|
151 | configure.args-append --enable-theora |
---|
152 | } |
---|
153 | |
---|
154 | variant xvid \ |
---|
155 | description {Enable XviD encoding} { |
---|
156 | depends_lib-append port:XviD |
---|
157 | configure.args-delete --disable-xvid |
---|
158 | } |
---|
159 | |
---|
160 | variant x264 \ |
---|
161 | description {Enable H.264 encoding} { |
---|
162 | depends_lib-append port:x264 |
---|
163 | configure.args-delete --disable-x264 |
---|
164 | } |
---|
165 | |
---|
166 | variant speex \ |
---|
167 | description {Enable Speex playback} { |
---|
168 | depends_lib-append port:speex-devel |
---|
169 | configure.args-delete --disable-speex |
---|
170 | } |
---|
171 | |
---|
172 | variant faac \ |
---|
173 | description {Enable AAC encoding} { |
---|
174 | depends_lib-append port:faac |
---|
175 | configure.args-delete --disable-faac |
---|
176 | } |
---|
177 | |
---|
178 | variant dv \ |
---|
179 | description {Enable DV encoding} { |
---|
180 | depends_lib-append port:libdv |
---|
181 | configure.args-delete --disable-libdv |
---|
182 | } |
---|
183 | |
---|
184 | variant twolame \ |
---|
185 | description {Enable MPEG Audio Layer 2 encoding} { |
---|
186 | depends_lib-append port:twolame |
---|
187 | configure.args-delete --disable-twolame |
---|
188 | } |
---|
189 | |
---|
190 | variant dts \ |
---|
191 | description {Enable non-passthrough DTS playback} { |
---|
192 | depends_lib-append port:libdts |
---|
193 | configure.args-delete --disable-libdts |
---|
194 | } |
---|
195 | |
---|
196 | variant mng \ |
---|
197 | description {Enable mng codec support} { |
---|
198 | depends_lib-append port:libmng |
---|
199 | configure.args-delete --disable-mng |
---|
200 | } |
---|
201 | |
---|
202 | variant dirac \ |
---|
203 | description {Enable dirac codec support} { |
---|
204 | depends_lib-append port:dirac port:schroedinger |
---|
205 | configure.args-delete --disable-libdirac-lavc |
---|
206 | configure.args-delete --disable-libschroedinger-lavc |
---|
207 | } |
---|
208 | |
---|
209 | ##### Outputs |
---|
210 | |
---|
211 | variant sdl \ |
---|
212 | description {Enable SDL video output} { |
---|
213 | depends_lib-append port:libsdl |
---|
214 | configure.args-delete --disable-sdl |
---|
215 | } |
---|
216 | |
---|
217 | variant aa \ |
---|
218 | description {Enable animated ASCII art video output} { |
---|
219 | depends_lib-append port:aalib |
---|
220 | configure.args-delete --disable-aa |
---|
221 | } |
---|
222 | |
---|
223 | variant caca \ |
---|
224 | description {Enable animated ASCII art video output} { |
---|
225 | depends_lib-append port:libcaca |
---|
226 | configure.args-delete --disable-caca |
---|
227 | } |
---|
228 | |
---|
229 | variant x11 { |
---|
230 | depends_lib-append \ |
---|
231 | port:mesa \ |
---|
232 | port:xorg-libXinerama \ |
---|
233 | port:xorg-libXv \ |
---|
234 | port:xorg-libXxf86vm |
---|
235 | |
---|
236 | configure.args-delete --disable-x11 |
---|
237 | configure.env-append PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${x11prefix}/lib/pkgconfig |
---|
238 | } |
---|
239 | |
---|
240 | |
---|
241 | variant arts \ |
---|
242 | description {Enable aRts audio output} { |
---|
243 | depends_lib-append port:arts |
---|
244 | configure.args-delete --disable-arts |
---|
245 | } |
---|
246 | |
---|
247 | variant esd \ |
---|
248 | description {Enable EsounD audio output} { |
---|
249 | depends_lib-append port:esound |
---|
250 | configure.args-delete --disable-esd |
---|
251 | } |
---|
252 | |
---|
253 | platform macosx { |
---|
254 | configure.args-append --enable-macosx --enable-macosx-bundle \ |
---|
255 | --enable-qtx |
---|
256 | } |
---|
257 | |
---|
258 | platform darwin { |
---|
259 | build.env LD=cc |
---|
260 | } |
---|
261 | |
---|
262 | platform darwin 8 { |
---|
263 | # Need to force use of c++ for linking when Xcode 2.2 is used since some |
---|
264 | # bits of libstdc++ are needed during linking |
---|
265 | build.env LD=c++ |
---|
266 | } |
---|