1 | # -*- 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 |
---|
2 | # $Id: $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup github 1.0 |
---|
6 | PortGroup waf 1.0 |
---|
7 | |
---|
8 | github.setup mpv-player mpv 0.4.2 v |
---|
9 | revision 0 |
---|
10 | categories multimedia |
---|
11 | license GPL-2+ |
---|
12 | maintainers ionic.de:ionic |
---|
13 | platforms darwin |
---|
14 | |
---|
15 | description mpv is a movie player based on MPlayer and mplayer2. |
---|
16 | long_description ${description} It plays most MPEG/VOB, AVI, Ogg/OGM, \ |
---|
17 | VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, \ |
---|
18 | NUT, NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files, \ |
---|
19 | supported by many native, XAnim, and Win32 DLL codecs. \ |
---|
20 | You can watch VideoCD, SVCD, DVD, 3ivx, DivX 3/4/5, WMV \ |
---|
21 | and even H.264 movies. |
---|
22 | homepage http://www.mpv.io/ |
---|
23 | |
---|
24 | checksums rmd160 700dc2d620040b9a65fbd57fd9d047d35b8bc4f9 \ |
---|
25 | sha256 948fbfd5d51c69224a39b8030333078c7acfac5bd35b511453797b2989975068 |
---|
26 | |
---|
27 | depends_build path:bin/pkg-config:pkgconfig \ |
---|
28 | port:py32-docutils |
---|
29 | depends_lib path:lib/libavcodec.dylib:ffmpeg \ |
---|
30 | path:bin/perl:perl5 \ |
---|
31 | port:libiconv \ |
---|
32 | port:ncurses \ |
---|
33 | port:zlib \ |
---|
34 | port:libass \ |
---|
35 | port:libbluray \ |
---|
36 | port:libdvdread \ |
---|
37 | port:libdvdnav \ |
---|
38 | port:lcms2 \ |
---|
39 | port:ossp-uuid \ |
---|
40 | port:icu |
---|
41 | |
---|
42 | patchfiles patch-py32-docutils.diff |
---|
43 | |
---|
44 | universal_variant no |
---|
45 | |
---|
46 | default_variants +bundle +network +osd +mp3 +opengl |
---|
47 | |
---|
48 | |
---|
49 | # Default configuration options. Mostly Mac OS X specific. |
---|
50 | configure.args-append --enable-libass \ |
---|
51 | --enable-coreaudio \ |
---|
52 | --enable-cocoa \ |
---|
53 | --enable-corevideo \ |
---|
54 | --disable-vda-hwaccel \ |
---|
55 | --disable-vda-gl |
---|
56 | |
---|
57 | # mpv autodetects many support libs. To prevent undeclared |
---|
58 | # dependencies, explicitly disable everything optional first. |
---|
59 | # This list should be expanded each time the port is updated to a |
---|
60 | # new version, disabling any newly added options. |
---|
61 | configure.args-append --disable-pdf-build \ |
---|
62 | --disable-macosx-bundle \ |
---|
63 | --disable-debug-build \ |
---|
64 | --disable-libsmbclient \ |
---|
65 | --disable-libass-osd \ |
---|
66 | --disable-libquvi \ |
---|
67 | --disable-lirc \ |
---|
68 | --disable-cdda \ |
---|
69 | --disable-enca \ |
---|
70 | --disable-mpg123 \ |
---|
71 | --disable-pulse \ |
---|
72 | --disable-portaudio \ |
---|
73 | --disable-jack \ |
---|
74 | --disable-openal \ |
---|
75 | --disable-gl-cocoa \ |
---|
76 | --disable-x11 \ |
---|
77 | --disable-xss \ |
---|
78 | --disable-xext \ |
---|
79 | --disable-xv \ |
---|
80 | --disable-gl-x11 \ |
---|
81 | --disable-xinerama \ |
---|
82 | --disable-xf86vm \ |
---|
83 | --disable-xf86xk \ |
---|
84 | --disable-caca \ |
---|
85 | --disable-jpeg \ |
---|
86 | --disable-tv \ |
---|
87 | --disable-lua |
---|
88 | |
---|
89 | # Fix picking up the correct talloc version. |
---|
90 | # -isystem has the added benefit of moving the include |
---|
91 | # directory specified to the end of the include path list. |
---|
92 | # This will help the build system respect custom include |
---|
93 | # paths correctly (i.e., searching them before the MP include |
---|
94 | # directory.) |
---|
95 | configure.cppflags-replace -I${prefix}/include -isystem${prefix}/include |
---|
96 | |
---|
97 | platform darwin { |
---|
98 | # VDA (video hardware acceleration, mostly H264) is only supported on 10.6.3+ |
---|
99 | if {${os.major} > 10 || {${os.major} == 10 && ${os.minor} >= 3}} { |
---|
100 | configure.args-delete --disable-vda-hwaccel \ |
---|
101 | --disable-vda-gl |
---|
102 | configure.args-append --enable-vda-hwaccel \ |
---|
103 | --enable-vda-gl |
---|
104 | } |
---|
105 | } |
---|
106 | |
---|
107 | pre-configure { |
---|
108 | system -W "${worksrcpath}" "${waf.python} bootstrap.py" |
---|
109 | } |
---|
110 | |
---|
111 | post-destroot { |
---|
112 | xinstall -d -m 0755 ${destroot}${prefix}/etc/${name} |
---|
113 | foreach etcfile {encoding-profiles.conf example.conf input.conf} { |
---|
114 | xinstall -m 0644 ${worksrcpath}/etc/${etcfile} \ |
---|
115 | ${destroot}${prefix}/etc/${name}/${etcfile} |
---|
116 | } |
---|
117 | xinstall -d -m 0755 ${destroot}${prefix}/share/examples/${name} |
---|
118 | eval file copy [glob ${worksrcpath}/TOOLS/lua ${worksrcpath}/TOOLS/*.pl \ |
---|
119 | ${worksrcpath}/TOOLS/*.sh ${worksrcpath}/TOOLS/*.py \ |
---|
120 | ${worksrcpath}/TOOLS/umpv ${worksrcpath}/TOOLS/lib] \ |
---|
121 | ${destroot}${prefix}/share/examples/${name} |
---|
122 | |
---|
123 | if {[variant_isset bundle]} { |
---|
124 | xinstall -d -m 0755 ${destroot}${applications_dir} |
---|
125 | file rename ${destroot}${prefix}/bin/mpv.app ${destroot}${applications_dir} |
---|
126 | } |
---|
127 | } |
---|
128 | |
---|
129 | |
---|
130 | # When enabling features, make sure to replace the "disable" flags with |
---|
131 | # "enable" flags in order to make the waf build system error out in case |
---|
132 | # a feature cannot be used/found. Problems like that indicate a missing |
---|
133 | # runtime dependency. |
---|
134 | # libquvi is a special case. We just add libquvi-scripts as a dependency |
---|
135 | # and hope for waf to autodetect this version. Do not explicitly enable |
---|
136 | # libquvi, as mpv supports multiple versions and we don't want waf to |
---|
137 | # throw an error if some other version wasn't found. |
---|
138 | |
---|
139 | variant bundle description {Enable the optional Mac OS X bundle of mpv} { |
---|
140 | configure.args-replace --disable-macosx-bundle \ |
---|
141 | --enable-macosx-bundle |
---|
142 | } |
---|
143 | |
---|
144 | variant screenshot description {Enable optional screenshot support} { |
---|
145 | depends_lib-append port:jpeg |
---|
146 | configure.args-replace --disable-jpeg \ |
---|
147 | --enable-jpeg |
---|
148 | } |
---|
149 | |
---|
150 | variant network description {Enable networking support via libquvi-scripts} { |
---|
151 | depends_lib-append port:libquvi \ |
---|
152 | port:libquvi-scripts |
---|
153 | configure.args-delete --disable-libquvi |
---|
154 | } |
---|
155 | |
---|
156 | variant lirc description {Enable Linux Infrared Remote Daemon support} { |
---|
157 | depends_lib-append port:lirc |
---|
158 | configure.args-replace --disable-lirc \ |
---|
159 | --enable-lirc |
---|
160 | } |
---|
161 | |
---|
162 | variant nodvd description {Disable DVD and DeCSS support} { |
---|
163 | depends_lib-delete port:libdvdread \ |
---|
164 | port:libdvdnav |
---|
165 | configure.args-append --disable-dvdread --disable-dvdnav |
---|
166 | } |
---|
167 | |
---|
168 | variant audiocd description {Enable Audio CD support via libcdio-paranoia (currently unsupported!)} { |
---|
169 | #depends_lib-append port:libcdio-paranoia |
---|
170 | #configure.args-replace --disable-cdda \ |
---|
171 | --enable-cdda |
---|
172 | ui_error "Audio CD support is currently disabled due to a missing libcdio-paranoia port." |
---|
173 | error "audiocd variant not supported" |
---|
174 | } |
---|
175 | |
---|
176 | variant enca description {Enable encoding support via ENCA} { |
---|
177 | depends_lib-append port:enca |
---|
178 | configure.args-replace --disable-enca \ |
---|
179 | --enable-enca |
---|
180 | } |
---|
181 | |
---|
182 | variant mp3 description {Enable mp3 support via mpg123} { |
---|
183 | depends_lib-append port:mpg123 |
---|
184 | configure.args-replace --disable-mpg123 \ |
---|
185 | --enable-mpg123 |
---|
186 | } |
---|
187 | |
---|
188 | variant pulseaudio description {Enable PulseAudio support} { |
---|
189 | depends_lib-append port:pulseaudio |
---|
190 | configure.args-replace --disable-pulse \ |
---|
191 | --enable-pulse |
---|
192 | } |
---|
193 | |
---|
194 | variant portaudio description {Enable portaudio support} { |
---|
195 | depends_lib-append port:portaudio |
---|
196 | configure.args-replace --disable-portaudio \ |
---|
197 | --enable-portaudio |
---|
198 | } |
---|
199 | |
---|
200 | variant jack description {Enable Jack Audio Connection Kit support} { |
---|
201 | depends_lib-append port:jack |
---|
202 | configure.args-replace --disable-jack \ |
---|
203 | --enable-jack |
---|
204 | } |
---|
205 | |
---|
206 | # TODO: switch that to openal-soft? Leave it as-is? |
---|
207 | variant openal description {Enable OpenAL support} { |
---|
208 | depends_lib-append port:openal |
---|
209 | configure.args-replace --disable-openal \ |
---|
210 | --enable-openal |
---|
211 | } |
---|
212 | |
---|
213 | variant x11 { |
---|
214 | depends_lib-append port:xorg-libXext \ |
---|
215 | port:xorg-libXScrnSaver \ |
---|
216 | port:xorg-libXinerama \ |
---|
217 | port:xorg-libXv \ |
---|
218 | port:xorg-libXxf86vm |
---|
219 | |
---|
220 | configure.args-delete --disable-x11 \ |
---|
221 | --disable-xss \ |
---|
222 | --disable-xext \ |
---|
223 | --disable-xinerama \ |
---|
224 | --disable-xv \ |
---|
225 | --disable-xf86vm |
---|
226 | configure.args-append --enable-x11 \ |
---|
227 | --enable-xss \ |
---|
228 | --enable-xext \ |
---|
229 | --enable-xv \ |
---|
230 | --enable-xinerama \ |
---|
231 | --enable-xf86vm |
---|
232 | } |
---|
233 | |
---|
234 | variant opengl description {Enable glx output support. Both the CoreVideo and X11 outputs are supported} { |
---|
235 | configure.args-replace --disable-gl-cocoa \ |
---|
236 | --enable-gl-cocoa |
---|
237 | |
---|
238 | if {[variant_isset x11]} { |
---|
239 | depends_lib-append port:mesa |
---|
240 | configure.args-replace --disable-gl-x11 \ |
---|
241 | --enable-gl-x11 |
---|
242 | } |
---|
243 | } |
---|
244 | |
---|
245 | variant caca description {Enable animated ASCII art video output} { |
---|
246 | depends_lib-append port:libcaca |
---|
247 | configure.args-replace --disable-caca \ |
---|
248 | --enable-caca |
---|
249 | } |
---|
250 | |
---|
251 | variant osd description {Enable onscreen display and TrueType font support} { |
---|
252 | depends_lib-append port:lua |
---|
253 | configure.args-delete --disable-lua \ |
---|
254 | --disable-libass-osd |
---|
255 | configure.args-append --enable-lua \ |
---|
256 | --lua=52 \ |
---|
257 | --enable-libass-osd |
---|
258 | } |
---|
259 | |
---|
260 | variant smb description {Enable Samba support} { |
---|
261 | depends_lib-append path:lib/pkgconfig/smbclient.pc:samba3 |
---|
262 | configure.args-replace --disable-libsmbclient \ |
---|
263 | --enable-libsmbclient |
---|
264 | } |
---|
265 | |
---|
266 | variant debug description {Compile with debugging symbols} { |
---|
267 | configure.args-replace --disable-debug-build \ |
---|
268 | --enable-debug-build |
---|
269 | } |
---|
270 | |
---|
271 | variant printable_doc description {Generate printable documents (PDF help)} { |
---|
272 | # py27-pdfrw and py27-Pillow are needed by rst2pdf. |
---|
273 | depends_build-append port:rst2pdf \ |
---|
274 | port:py27-pdfrw \ |
---|
275 | port:py27-Pillow |
---|
276 | configure.args-replace --disable-pdf-build \ |
---|
277 | --enable-pdf-build |
---|
278 | } |
---|