Ticket #28401: Portfile

File Portfile, 8.9 KB (added by i+macports@…, 14 years ago)

Patched portfile

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 75204 2011-01-18 02:51:26Z jmr@macports.org $
4
5PortSystem          1.0
6
7name                VLC
8version             1.0.6
9revision            3
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
50
51use_parallel_build no
52use_autoreconf yes
53autoreconf.args -fvi
54
55# VLC needs to be compiled with llvm-gcc frontend
56configure.compiler llvm-gcc-4.2
57
58build.target    all
59destroot.target install
60
61livecheck.url   http://download.videolan.org/pub/videolan/vlc/
62livecheck.regex <a href=\"(\\d\[\\d|\.|\\w\]+).*/\">
63
64# live555 and possibly others are not universal, so disabling for now
65universal_variant   no
66
67# VLC currently doesn't build with 10.6sdk, force 10.5sdk (#21487)
68configure.args-append   --disable-macosx-defaults \
69    --enable-release --enable-macosx --enable-macosx-audio --enable-a52 --enable-cddax \
70    --enable-dvdnav --enable-dvdread --enable-faad --enable-flac --enable-live555 \
71    --enable-vorbis --enable-ogg --enable-mad --disable-libass --enable-asademux \
72    --enable-dca --enable-gnutls --enable-ncurses --enable-png --enable-realrtsp \
73    --with-macosx-version-min=10.5 \
74    --with-macosx-sdk=/Developer/SDKs/MacOSX10.5.sdk \
75    --with-live555-tree=${prefix}/lib/live \
76    --disable-debug --disable-x11 --disable-xvideo --disable-glx --disable-xinerama \
77    --disable-xcb --disable-xvmc --disable-qt4 --disable-quicktime \
78    --disable-skins2 --disable-notify --disable-telepathy --disable-twolame \
79    --disable-speex --disable-theora --disable-x264 --disable-dvbpsi \
80    --disable-vcdx  --disable-fontconfig --disable-freetype \
81    --disable-dbus --disable-bonjour --disable-fribidi --disable-goom \
82    --disable-growl --disable-sdl --disable-caca --disable-smb \
83    --disable-update-check --without-x
84
85variant x264 description {Enable H.264 en/decoding} {
86    depends_lib-append      port:x264
87    configure.args-delete   --disable-x264
88    configure.args-append   --enable-x264
89}
90
91variant theora description {Enable OggTheora support} {
92    depends_lib-append      port:libtheora
93    configure.args-delete   --disable-theora
94    configure.args-append   --enable-theora
95}
96
97variant twolame description {Enable MPEG Audio Layer 2 encoding} {
98    depends_lib-append      port:twolame
99    configure.args-delete   --disable-twolame
100    configure.args-append   --enable-twolame
101}
102
103variant speex description {Enable Speex decoder support} {
104    depends_lib-append      path:lib/libspeex.dylib:speex
105    configure.args-delete   --disable-speex
106    configure.args-append   --enable-speex
107}
108
109variant svg description {Enable SVG support} {
110    depends_lib-append      port:librsvg
111    configure.args-append   --enable-svg
112}
113
114variant shout description {Enable Shoutcast support} {
115    depends_lib-append      port:libshout2
116    configure.args-append   --enable-shout
117}
118
119variant vcd description {Enable VCD support} {
120    depends_lib-append      port:vcdimager
121    configure.args-delete   --disable-vcdx
122    configure.args-append   --enable-vcdx
123}
124
125variant mod description {Enable MOD demuxer support} {
126    depends_lib-append      port:libmodplug
127    configure.args-delete   --disable-mod
128    configure.args-append   --enable-mod
129}
130
131variant mpc description {enable Musepack Decoder library support} {
132    depends_lib-append      port:libmpcdec
133    configure.args-delete   --disable-mpc
134    configure.args-append   --enable-mpc
135}
136
137variant dvb description {enable DVB Program Specific Information support} {
138    depends_lib-append      port:libdvbpsi
139    configure.args-delete   --disable-dvbpsi
140    configure.args-append   --enable-dvbpsi
141}
142
143variant osd description {Enable onscreen display and TrueType font support} {
144    depends_lib-append      port:fontconfig port:freetype
145    configure.args-delete   --disable-fontconfig
146    configure.args-delete   --disable-freetype
147    configure.args-append   --enable-freetype
148}
149
150variant fribidi requires osd description {Enable FriBidi Unicode support} {
151    depends_lib-append      port:fribidi
152    configure.args-delete   --disable-fribidi
153    configure.args-append   --enable-fribidi
154}
155
156# avahi port is currently broken, so this variant is removed
157# from +huge
158variant bonjour description {Enable Bonjour support} {
159    depends_lib-append      port:avahi
160    configure.args-delete   --disable-dbus --disable-bonjour
161    configure.args-append   --enable-dbus --enable-bonjour
162}
163
164variant sdl description {Enable SDL/SDL-Image support} {
165    depends_lib-append          path:lib/pkgconfig/sdl.pc:libsdl port:libsdl_image
166    configure.args-delete       --disable-sdl
167    configure.args-append       --enable-sdl
168}
169
170variant smb description {Enable Samba 3 support} {
171    depends_lib-append      port:samba3
172    configure.args-delete   --disable-smb
173    configure.args-append   --enable-smb
174    configure.ldflags-append    -L${prefix}/lib/samba3
175}
176
177variant no_dvd description {disable DVD and DeCSS support} {
178    depends_lib-delete      port:libdvdnav port:libdvdread
179    configure.args-append   --disable-dvdnav --disable-dvdread
180}
181
182variant no_ffmpeg description {disable FFmpeg support} {
183    depends_lib-delete      port:ffmpeg
184    configure.args-append   --disable-avcodec --disable-avformat \
185                            --disable-postproc --disable-swscale
186}
187
188variant x11 description {Build support for X11} {
189    depends_lib-append \
190    port:mesa \
191    port:xorg-libXinerama \
192    port:xorg-libXv \
193    port:xorg-libXxf86vm
194
195    configure.args-delete   --disable-x11 --disable-xvideo --disable-glx --disable-xinerama --disable-xcb
196    configure.args-append   --enable-x11 --enable-xvideo --enable-glx --enable-xinerama --enable-xcb
197    patchfiles-delete       patch-configure.ac-xcb.diff
198}
199
200variant qt4 description {Build using QT4 UI.  This will use qt4-x11 if +x11 and qt4-mac otherwise.} {
201    configure.args-delete --disable-qt4
202    configure.args-append --enable-qt4
203
204    if {[variant_isset x11]} {
205        depends_lib-append port:qt4-x11
206        patchfiles-append patch-qt4-x11.diff
207        set qt_dir ${prefix}/libexec/qt4-x11
208        configure.cppflags-append -D__USE_WS_X11__
209        configure.env-append QTDIR=${qt_dir}
210        set env(PATH) "${qt_dir}/bin:$env(PATH)"
211        configure.pkg_config_path "${configure.pkg_config_path}:${qt_dir}/lib/pkgconfig"
212    } else {
213        PortGroup qt4 1.0
214    }
215}
216
217platform macosx {
218    destroot.target-append  VLC.app
219    post-destroot {
220        file rename ${worksrcpath}/VLC.app ${destroot}${applications_dir}/VLC.app
221    }
222}
223
224platform darwin 10 {
225    patchfiles-append patch-fdatasync_sl.diff
226}
227
228variant minimal description {VLC Mac OS X minimal configuration} {}
229
230variant huge conflicts minimal \
231    requires svg vcd speex dvb fribidi sdl shout \
232    description {Enable all variants except x11, qt4, smb and no_*} {}
233
234variant full requires huge qt4 smb \
235    description {Enable all variants except x11 and no_*} {}
236
237# Unless minimal variant is set compile with default Mac OS X configuration
238if {![variant_isset minimal]} {
239    default_variants +x264 +theora +twolame +mod +mpc +osd
240}
241
242if {[variant_isset x11]} {
243    default_variants-append +qt4
244}