source: trunk/dports/multimedia/MPlayer/Portfile @ 32231

Last change on this file since 32231 was 32231, checked in by ecronin@…, 13 years ago

Batch update of my maintainer address

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 10.8 KB
Line 
1# $Id: Portfile 32231 2007-12-21 05:43:22Z ecronin@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
5PortSystem          1.0
6
7name                MPlayer
8version             1.0rc2
9revision            1
10categories          multimedia
11maintainers         ecronin \
12                    openmaintainer
13description         The Unix movie player
14long_description \
15    MPlayer can play most standard video formats out of the box and almost \
16    all others with the help of external codecs.  MPlayer currently works \
17    best from the command line, but visual feedback for many functions is \
18    available from its onscreen status display (OSD), which is also used for \
19    displaying subtitles. MPlayer also has a GUI with skin support and \
20    several unofficial alternative graphical frontends are available.
21
22platforms       darwin
23
24homepage        http://www.mplayerhq.hu/
25master_sites    ftp://ftp1.mplayerhq.hu/MPlayer/releases/ \
26                http://www2.mplayerhq.hu/MPlayer/releases/ \
27                ftp://ftp2.mplayerhq.hu/MPlayer/releases/ \
28                ftp://ftp5.mplayerhq.hu/MPlayer/releases/ \
29                ftp://ftp.fu-berlin.de/unix/X11/multimedia/MPlayer/releases/ \
30                http://www1.mplayerhq.hu/MPlayer/releases/ \
31                http://www.people.virginia.edu/~drf8f/MPlayer/releases/ \
32                http://www1.mplayerhq.hu/MPlayer/releases/codecs/:codecs \
33                http://www2.mplayerhq.hu/MPlayer/releases/codecs/:codecs
34use_bzip2       yes
35checksums       ${distname}${extract.suffix} \
36                    md5 7e27e535c2d267637df34898f1b91707 \
37                    sha1 e9b496f3527c552004ec6d01d6b43f196b43ce2d \
38                    rmd160 3b5cba1529856a177a5191e22f8dcc00b5a83c52
39
40livecheck.check     regex
41livecheck.url       http://www1.mplayerhq.hu/MPlayer/releases/
42livecheck.regex     MPlayer-(1.0rc\[0-9\]+)\.tar\.bz2
43
44
45depends_lib     port:jpeg port:lame port:libiconv port:libmad \
46                port:libogg port:libpng port:libungif \
47                port:libvorbis port:lzo2 port:ncurses port:zlib
48depends_build   port:pkgconfig
49
50# MPlayer's ./configure REALLY does not want you to use ENV for this
51configure.cflags    {}
52configure.cxxflags  {}
53configure.cppflags  {}
54configure.ldflags   {}
55# And the assembler has issues with -pipe
56#configure.pipe      no
57
58configure.args \
59        --with-extraincdir=${prefix}/include/lzo:${prefix}/include \
60        --with-extralibdir=${prefix}/lib:${prefix}/lib/samba3 \
61        --datadir=${prefix}/share/${name} \
62        --confdir=${prefix}/etc/${name} \
63        --mandir=${prefix}/share/man \
64        --enable-gif --enable-png --enable-jpeg --enable-liblzo \
65        --enable-libvorbis --enable-mad --disable-faad-external \
66        --enable-largefiles
67
68# MPlayer autodetects many support libs.  To prevent undeclared
69# dependencies, explicitly disable everything optional first.
70# Later, let autodetect do its magic not explicit --enable
71configure.args-append \
72        --disable-smb --disable-live --disable-dvdnav \
73        --disable-dvdread --disable-cdparanoia --disable-freetype \
74        --disable-fontconfig --disable-unrarlib --disable-fribidi \
75        --disable-enca --disable-libcdio --disable-xvid \
76        --disable-x264 --disable-speex --disable-theora \
77        --disable-faac --disable-ladspa --disable-libdv \
78        --disable-toolame --disable-twolame --disable-xmms \
79        --disable-musepack --disable-sdl --disable-aa \
80        --disable-caca --disable-x11 --disable-arts \
81        --disable-esd --disable-lirc
82
83post-destroot {
84    xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
85    eval file copy [glob ${worksrcpath}/DOCS/*] \
86        ${destroot}${prefix}/share/doc/${name}
87    xinstall -d -m 0755 ${destroot}${prefix}/etc/${name}
88    foreach etcfile {codecs.conf dvb-menu.conf example.conf \
89                     input.conf menu.conf} {
90        xinstall -m 0644 ${worksrcpath}/etc/${etcfile} \
91            ${destroot}${prefix}/etc/${name}/${etcfile}
92    }
93}
94
95##### Mplayer features
96
97variant man_all_lang \
98    description {Install all possible languages for man pages} {
99    configure.args-append --language=all
100}
101
102# Bundle all the font deps into one onscreen display variant
103# configure doesn't fully build up necessary flags when --enable-fontconfig
104# is used, so use autodetect instead
105variant osd \
106    description {Enable onscreen display and font support} {
107    depends_lib-append      port:fontconfig port:freetype
108    configure.args-delete   --disable-fontconfig
109    configure.args-delete   --disable-freetype
110    configure.args-append   --enable-freetype --enable-menu
111}
112
113variant fribidi requires osd \
114    description {Enable FriBidi Unicode support} {
115    depends_lib-append      port:fribidi
116    configure.args-delete   --disable-fribidi
117    #configure.args-append   --enable-fribidi
118}
119
120variant noappleremote \
121    description {Disable Apple Remote support} {
122    configure.args-append   --disable-apple-remote
123}
124
125variant lirc \
126    description {Enable Linux Infrared Remote Daemon support} {
127    depends_lib-append      port:lirc
128    configure.args-delete   --disable-lirc
129}
130
131##### Inputs
132
133variant nodvd \
134    description {Disable DVD and DeCSS support} {
135    configure.args-append   --disable-dvdread-internal --disable-libdvdcss-internal
136}
137
138variant smb \
139    description {Enable smb:// network support} {
140    depends_lib-append      port:samba3
141    configure.args-delete   --disable-smb
142    configure.args-append   --enable-smb
143}
144
145## Broken as of 10/25/06 (version issue?)
146#variant cdparanoia
147#    description {Enable CDDA support} {
148#    depends_lib-append      port:cdparanoia
149#    configure.args-delete   --disable-cdparanoia
150#    #configure.args-append   --enable-dvdread
151#}
152
153##### External codecs
154
155variant theora \
156    description {Enable OggTheora support} {
157    depends_lib-append      port:libtheora
158    configure.args-delete   --disable-theora
159    configure.args-append   --enable-theora
160}
161
162variant xvid \
163    description {Enable XviD encoding} {
164    depends_lib-append      port:XviD
165    configure.args-delete   --disable-xvid
166}
167
168## Needs 20070316 snapshot of x264 or later
169variant x264 \
170    description {Enable H.264 encoding} {
171    depends_lib-append      port:x264
172    configure.args-delete   --disable-x264
173}
174
175variant binary_codecs \
176    description {Enable platform-specific binary codecs} {
177    if {[variant_isset darwin_powerpc]} {
178        global mplayercodecs mplayercodecsfile
179        set mplayercodecs       rp9codecs-macosx-20041107.pkg
180        set mplayercodecsfile   ${mplayercodecs}.zip
181        distfiles-append        ${mplayercodecsfile}:codecs
182        checksums-append        ${mplayercodecsfile} \
183                                    md5 788cf4940280fd787c0a2141d88ce3c7 \
184                                    sha1 18abd6d0424c4682815a13b34695d37d2fda2a73 \
185                                    rmd160 c6f49012633bbb84ffa405b8881dc90605d26fc6
186
187        extract.only            ${distname}${extract.suffix}
188
189        depends_build-append    bin:unzip:unzip
190
191        post-extract {
192            system "unzip -q -d ${worksrcpath} ${distpath}/${mplayercodecsfile}"
193        }
194
195        configure.args-append   --with-codecsdir=${prefix}/share/${name}/codecs
196
197        post-destroot {
198            xinstall -m 755 -d ${destroot}${prefix}/share/${name}/codecs
199            system "cd ${destroot}${prefix}/share/${name}/codecs && \
200                pax -r -z -f \"${worksrcpath}/${mplayercodecs}/Contents/Archive.pax.gz\""
201        }
202    }
203    if {[variant_isset darwin_i386]} {
204        global mplayercodecs mplayercodecsfile
205        set mplayercodecs       "Essential Codecs Package (Intel).pkg"
206        set mplayercodecsfile   essential-macosx-x86-20060611.zip
207        distfiles-append        ${mplayercodecsfile}:codecs
208        checksums-append        ${mplayercodecsfile} \
209                                    md5 1e409d500336a8318cbe2a67bbf9d9ca \
210                                    sha1 4f8fee483b6c227d8cb774d2d30e1ef36a43e04a \
211                                    rmd160 87beaa40263deb0d0b9166f24d6f9dd686f594fd
212
213        extract.only            ${distname}${extract.suffix}
214
215        depends_build-append    bin:unzip:unzip
216
217        post-extract {
218            system "unzip -q -d ${worksrcpath} ${distpath}/${mplayercodecsfile}"
219        }
220
221        configure.args-append   --with-codecsdir=${prefix}/share/${name}/codecs
222
223        post-destroot {
224            xinstall -m 755 -d ${destroot}${prefix}/share/${name}/codecs
225            system "cd ${destroot}${prefix}/share/${name}/codecs" && \
226                pax -r -z -f \"${worksrcpath}/${mplayercodecs}/Contents/Archive.pax.gz\""
227        }
228    }
229}
230
231variant speex \
232    description {Enable Speex playback} {
233    depends_lib-append      port:speex-devel
234    configure.args-delete   --disable-speex
235}
236
237variant faac \
238    description {Enable AAC encoding} {
239    depends_lib-append      port:faac
240    configure.args-delete   --disable-faac
241}
242
243variant dv \
244    description {Enable DV encoding} {
245    depends_lib-append      port:libdv
246    configure.args-delete   --disable-libdv
247}
248
249variant twolame \
250    description {Enable MPEG Audio Layer 2 encoding} {
251    depends_lib-append      port:twolame
252    configure.args-delete   --disable-twolame
253}
254
255variant dts \
256    description {Enable non-passthrough DTS playback} {
257    depends_lib-append      port:libdts
258    configure.args-delete   --disable-libdts
259}
260
261##### Outputs
262
263variant sdl \
264    description {Enable SDL video output} {
265    depends_lib-append      port:libsdl
266    configure.args-delete   --disable-sdl
267}
268
269variant aa \
270    description {Enable animated ASCII art video output} {
271    depends_lib-append      port:aalib
272    configure.args-delete   --disable-aa
273}
274
275variant caca \
276    description {Enable animated ASCII art video output} {
277    depends_lib-append      port:libcaca
278    configure.args-delete   --disable-caca
279}
280
281variant x11 {
282    depends_lib-append      lib:libX11.6:XFree86
283    configure.args-delete   --disable-x11
284    configure.env-append    PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${x11prefix}/lib/pkgconfig
285}
286
287variant arts \
288    description {Enable aRts audio output} {
289    depends_lib-append      port:arts
290    configure.args-delete   --disable-arts
291}
292
293variant esd \
294    description {Enable EsounD audio output} {
295    depends_lib-append      port:esound
296    configure.args-delete   --disable-esd
297}
298
299
300platform macosx {
301    configure.args-append   --enable-macosx --enable-macosx-finder-support \
302                            --enable-macosx-bundle --enable-qtx
303}
304
305platform darwin {
306    post-patch {
307        reinplace "s|\$\(CC\) \$\(CFLAGS\) -o|\$\(LD\) \$\(CFLAGS\) -o|g" \
308            ${worksrcpath}/Makefile
309        reinplace "s|-isysroot /Developer/SDKs/MacOSX10.4u.sdk||g" \
310            ${worksrcpath}/configure
311    }
312    build.env           LD=cc
313}
314
315platform darwin 8 {
316    # Need to force use of c++ for linking when Xcode 2.2 is used since some
317    # bits of libstdc++ are needed during linking
318    build.env           LD=c++
319}
Note: See TracBrowser for help on using the repository browser.