source: trunk/dports/multimedia/VLC/Portfile @ 76937

Last change on this file since 76937 was 76937, checked in by jeremyhu@…, 7 years ago

VLC: BuildFix for xcb and fix default_variants for Tiger/Leopard

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 10.1 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
3# $Id: Portfile 76937 2011-03-14 03:48:31Z jeremyhu@macports.org $
4
5PortSystem          1.0
6
7name                VLC
8version             1.0.6
9revision            4
10
11categories          multimedia
12
13maintainers         mnick openmaintainer
14description         VLC is a cross-platform media player and streaming server
15long_description    VLC media player is a highly portable multimedia player for \
16                    various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, \
17                    mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. \
18                    It can also be used as a server to stream in unicast or multicast \
19                    in IPv4 or IPv6 on a high-bandwidth network.
20license             GPL
21
22platforms           darwin
23conflicts           VLC09
24
25homepage            http://www.videolan.org
26master_sites        http://download.videolan.org/pub/videolan/vlc/${version}/
27distname            vlc-${version}
28use_bzip2           yes
29
30checksums           md5     246a3865ec037f8f5757ef6b973a80fc \
31                    sha1    834346a84a71d915440b7741e04b6e02de451786 \
32                    rmd160  2185eb418748f2aadfce5e61b7a9de66a62ef2d1
33
34depends_lib     port:lame port:a52dec port:libogg port:flac \
35                port:libdca port:libcddb port:libcdio port:libmad \
36                port:libvorbis port:libmatroska port:libid3tag \
37                port:ncurses port:lua port:libpng port:jpeg \
38                port:libdvdplay port:libdvdnav path:lib/libavcodec.dylib:ffmpeg \
39                port:gnutls port:taglib port:libxml2 port:faad2 \
40                port:live555
41
42pre-fetch {
43    if {"darwin" == ${os.platform} && ${os.major} < 9} {
44        ui_error "${name} ${version} requires Mac OS X 10.5 or greater, use port 'VLC09' instead"
45        return -code error "incompatible Mac OS X version"
46    }
47}
48
49patchfiles      patch-Makefile.am.diff patch-configure.ac-xcb.diff patch-png.c.diff patch-configure.ac-no_qtcapture.diff patch-configure.ac-macosx_audio.diff patch-noKaxTagMulti.diff
50
51post-patch {
52    reinplace "s:librsvg-2/librsvg:librsvg:" ${worksrcpath}/modules/misc/svg.c
53    reinplace "s:HOST_NAME_MAX:_POSIX_HOST_NAME_MAX:" ${worksrcpath}/modules/video_output/xcb/window.c
54}
55
56use_parallel_build no
57use_autoreconf yes
58autoreconf.args -fvi
59
60# VLC needs to be compiled with llvm-gcc frontend
61configure.compiler llvm-gcc-4.2
62configure.env-append CXXCPP="${configure.cxx} -E"
63
64build.target    all
65destroot.target install
66
67livecheck.url   http://download.videolan.org/pub/videolan/vlc/
68livecheck.regex <a href=\"(\\d\[\\d|\.|\\w\]+).*/\">
69
70# live555 and possibly others are not universal, so disabling for now
71universal_variant   no
72
73configure.args-append   --disable-macosx-defaults \
74    --enable-release --enable-macosx --disable-macosx-audio --enable-a52 --enable-cddax \
75    --enable-dvdnav --enable-dvdread --enable-faad --enable-flac --enable-live555 \
76    --enable-vorbis --enable-ogg --enable-mad --disable-libass --enable-asademux \
77    --enable-dca --enable-gnutls --enable-ncurses --enable-png --enable-realrtsp \
78    --with-live555-tree=${prefix}/lib/live \
79    --disable-jack --disable-portaudio \
80    --disable-debug --disable-x11 --disable-xvideo --disable-glx --disable-xinerama \
81    --disable-xcb --disable-xvmc --disable-qt4 --disable-quicktime \
82    --disable-skins2 --disable-notify --disable-telepathy --disable-twolame \
83    --disable-speex --disable-theora --disable-x264 --disable-dvbpsi \
84    --disable-vcdx  --disable-fontconfig --disable-freetype \
85    --disable-dbus --disable-bonjour --disable-fribidi --disable-goom \
86    --disable-growl --disable-sdl --disable-caca --disable-smb \
87    --disable-update-check --without-x
88
89variant jack description {Enable jack plugin for audio output} {
90    depends_lib-append      port:jack
91    configure.args-delete   --disable-jack
92    configure.args-append   --enable-jack
93}
94
95variant jack description {Enable portaudio module for audio output} {
96    depends_lib-append      port:portaudio
97    configure.args-delete   --disable-portaudio
98    configure.args-append   --enable-portaudio
99}
100
101variant auhal description {Enable CoreAudio module for audio output (doesn't work on Snow Leopard)} {
102    configure.args-delete   --disable-macosx-audio
103    configure.args-append   --enable-macosx-audio
104}
105
106variant qtcapture description {Enable qtcapture module (doesn't work on Snow Leopard)} {
107    patchfiles-delete       patch-configure.ac-no_qtcapture.diff
108}
109
110variant x264 description {Enable H.264 en/decoding} {
111    depends_lib-append      port:x264
112    configure.args-delete   --disable-x264
113    configure.args-append   --enable-x264
114}
115
116variant theora description {Enable OggTheora support} {
117    depends_lib-append      port:libtheora
118    configure.args-delete   --disable-theora
119    configure.args-append   --enable-theora
120}
121
122variant twolame description {Enable MPEG Audio Layer 2 encoding} {
123    depends_lib-append      port:twolame
124    configure.args-delete   --disable-twolame
125    configure.args-append   --enable-twolame
126}
127
128variant speex description {Enable Speex decoder support} {
129    depends_lib-append      path:lib/libspeex.dylib:speex
130    configure.args-delete   --disable-speex
131    configure.args-append   --enable-speex
132}
133
134variant svg description {Enable SVG support} {
135    depends_lib-append      port:librsvg
136    configure.args-append   --enable-svg
137}
138
139variant shout description {Enable Shoutcast support} {
140    depends_lib-append      port:libshout2
141    configure.args-append   --enable-shout
142}
143
144variant vcd description {Enable VCD support} {
145    depends_lib-append      port:vcdimager
146    configure.args-delete   --disable-vcdx
147    configure.args-append   --enable-vcdx
148}
149
150variant mod description {Enable MOD demuxer support} {
151    depends_lib-append      port:libmodplug
152    configure.args-delete   --disable-mod
153    configure.args-append   --enable-mod
154}
155
156variant mpc description {enable Musepack Decoder library support} {
157    depends_lib-append      port:libmpcdec
158    configure.args-delete   --disable-mpc
159    configure.args-append   --enable-mpc
160}
161
162variant dvb description {enable DVB Program Specific Information support} {
163    depends_lib-append      port:libdvbpsi
164    configure.args-delete   --disable-dvbpsi
165    configure.args-append   --enable-dvbpsi
166}
167
168variant osd description {Enable onscreen display and TrueType font support} {
169    depends_lib-append      port:fontconfig port:freetype
170    configure.args-delete   --disable-fontconfig
171    configure.args-delete   --disable-freetype
172    configure.args-append   --enable-freetype
173}
174
175variant fribidi requires osd description {Enable FriBidi Unicode support} {
176    depends_lib-append      port:fribidi
177    configure.args-delete   --disable-fribidi
178    configure.args-append   --enable-fribidi
179}
180
181# avahi port is currently broken, so this variant is removed
182# from +huge
183variant bonjour description {Enable Bonjour support} {
184    depends_lib-append      port:avahi
185    configure.args-delete   --disable-dbus --disable-bonjour
186    configure.args-append   --enable-dbus --enable-bonjour
187}
188
189variant sdl description {Enable SDL/SDL-Image support} {
190    depends_lib-append          path:lib/pkgconfig/sdl.pc:libsdl port:libsdl_image
191    configure.args-delete       --disable-sdl
192    configure.args-append       --enable-sdl
193}
194
195variant smb description {Enable Samba 3 support} {
196    depends_lib-append      port:samba3
197    configure.args-delete   --disable-smb
198    configure.args-append   --enable-smb
199    configure.ldflags-append    -L${prefix}/lib/samba3
200}
201
202variant no_dvd description {disable DVD and DeCSS support} {
203    depends_lib-delete      port:libdvdnav port:libdvdread
204    configure.args-append   --disable-dvdnav --disable-dvdread
205}
206
207variant no_ffmpeg description {disable FFmpeg support} {
208    depends_lib-delete      port:ffmpeg
209    configure.args-append   --disable-avcodec --disable-avformat \
210                            --disable-postproc --disable-swscale
211}
212
213variant x11 description {Build support for X11} {
214    depends_lib-append \
215    port:mesa \
216    port:xorg-libXinerama \
217    port:xorg-libXv \
218    port:xorg-libXxf86vm \
219    port:xorg-xcb-util
220
221    configure.args-delete   --disable-x11 --disable-xvideo --disable-glx --disable-xinerama --disable-xcb
222    configure.args-append   --enable-x11 --enable-xvideo --enable-glx --enable-xinerama --enable-xcb
223    patchfiles-delete       patch-configure.ac-xcb.diff
224}
225
226variant qt4 description {Build using QT4 UI.  This will use qt4-x11 if +x11 and qt4-mac otherwise.} {
227    configure.args-delete --disable-qt4
228    configure.args-append --enable-qt4
229
230    if {[variant_isset x11]} {
231        depends_lib-append port:qt4-x11
232        patchfiles-append patch-qt4-x11.diff
233        set qt_dir ${prefix}/libexec/qt4-x11
234        configure.cppflags-append -D__USE_WS_X11__
235        configure.env-append QTDIR=${qt_dir}
236        set env(PATH) "${qt_dir}/bin:$env(PATH)"
237        configure.pkg_config_path "${configure.pkg_config_path}:${qt_dir}/lib/pkgconfig"
238    } else {
239        PortGroup qt4 1.0
240    }
241}
242
243variant minimal description {VLC Mac OS X minimal configuration} {}
244
245variant huge conflicts minimal \
246    requires svg vcd speex dvb fribidi sdl shout jack \
247    description {Enable all variants except x11, qt4, smb and no_*} {}
248
249variant full requires huge qt4 smb \
250    description {Enable all variants except x11 and no_*} {}
251
252# Unless minimal variant is set compile with default Mac OS X configuration
253if {![variant_isset minimal]} {
254    default_variants +x264 +theora +twolame +mod +mpc +osd +portaudio
255}
256
257if {[variant_isset x11]} {
258    default_variants-append +qt4
259}
260
261platform macosx {
262    destroot.target-append  VLC.app
263    post-destroot {
264        file rename ${worksrcpath}/VLC.app ${destroot}${applications_dir}/VLC.app
265    }
266}
267
268platform darwin 8 {
269    if {![variant_isset minimal]} {
270        default_variants-append +qtcapture +auhal
271    }
272}
273
274platform darwin 9 {
275    if {![variant_isset minimal]} {
276        default_variants-append +qtcapture +auhal
277    }
278}
279
280platform darwin 10 {
281    patchfiles-append patch-fdatasync_sl.diff
282}
Note: See TracBrowser for help on using the repository browser.