# -*- 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 # $Id$ PortSystem 1.0 name VLC version 2.0.8 revision 2 categories multimedia maintainers jeremyhu openmaintainer description VLC is a cross-platform media player and streaming server long_description VLC media player is a highly portable multimedia player for \ various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, \ mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. \ It can also be used as a server to stream in unicast or multicast \ in IPv4 or IPv6 on a high-bandwidth network. license GPL platforms darwin conflicts VLC-devel homepage http://www.videolan.org # http://git.videolan.org/?p=vlc.git;a=forks #fetch.type git #git.url git://git.videolan.org/vlc/vlc-2.0.git #git.branch a4e92ec8b5ed0cd01478111a80c8f2be19503e92 master_sites http://download.videolan.org/pub/videolan/vlc/${version}/ distname vlc-${version} use_xz yes checksums md5 6445eb55aa087f30abe27423535e1ab8 \ sha1 8937ed30412bef49db77d2187a9e4734866f8ab7 \ rmd160 cd2483e4447b8bc4a91dbcf95ff1213244dcf40f depends_build port:pkgconfig depends_lib port:lame port:a52dec port:libogg port:flac \ port:libdca port:libcddb port:libcdio port:libmad \ port:libopus port:libvorbis port:libmatroska port:libid3tag \ port:ncurses port:lua port:libpng port:jpeg port:tiff port:libebml \ port:gnutls port:taglib port:libxml2 port:faad2 \ port:x264 port:libtheora port:twolame port:libssh2 \ port:libdvdnav port:libdvdread port:libproxy \ port:fluidsynth port:libsamplerate port:libupnp \ port:avahi path:lib/libavcodec.dylib:ffmpeg \ port:openjpeg15 port:libbluray port:libgcrypt # TODO: port:live555 pre-fetch { if {"darwin" == ${os.platform} && ${os.major} < 9} { ui_error "${name} ${version} requires Mac OS X 10.5 or greater." return -code error "incompatible Mac OS X version" } } patchfiles \ buildfix-package.mak.patch \ configure.ac-no-arch.patch \ PR-34741-no__clang_version__.patch \ qtkit.patch \ no-sparkle.patch post-patch { reinplace "s:librsvg-2/librsvg:librsvg:" \ ${worksrcpath}/modules/text_renderer/svg.c } pre-configure { system "cd ${worksrcpath}/modules && find . -name Modules.am | sed 's|Modules.am||' | xargs ./genmf" } use_autoreconf yes autoreconf.args -fvi configure.env-append CXXCPP="${configure.cxx} -E" build.args-append DESTDIR=${worksrcpath}/dest_ignore # Fix a build error in modules/lua due to deprecated functionality configure.cppflags-append -DLUA_COMPAT_ALL build.target all destroot.target install livecheck.url http://download.videolan.org/pub/videolan/vlc/ livecheck.regex # live555 and possibly others are not universal, so disabling for now universal_variant no # Older gcc fail at register allocation if {[lsearch [get_canonical_archs] i386] != -1} { compiler.blacklist gcc-4.0 gcc-4.2 llvm-gcc-4.2 apple-gcc-4.2 macports-llvm-gcc-4.2 } # Other configure.args-append \ --with-macosx-version-min=$macosx_deployment_target \ --with-contrib=${worksrcpath}/contrib \ --disable-debug --disable-update-check --enable-gnutls \ --disable-notify --disable-telepathy --disable-dbus \ --disable-growl --disable-macosx-vlc-app \ --enable-libproxy --enable-lua # Input Plugins configure.args-append \ --enable-dvdnav --enable-dvdread --disable-smb --disable-vcdx \ --disable-macosx-qtkit --disable-macosx-eyetv --disable-realrtsp \ --enable-sftp # Mux/Demux Plugins configure.args-append \ --disable-dvbpsi --enable-ogg --enable-mux_ogg \ --enable-mkv --disable-mod --disable-mpc --disable-shout # Codec Plugins configure.args-append \ --enable-a52 --enable-faad --enable-flac --disable-live555 \ --enable-opus --enable-vorbis --enable-ogg --enable-mad --disable-libass \ --enable-dca --enable-png --disable-quicktime --enable-twolame \ --disable-speex --enable-theora --enable-x264 --enable-postproc \ --enable-avcodec --enable-avformat --enable-swscale \ --enable-fluidsynth # Video Plugins configure.args-append \ --disable-caca --disable-sdl --disable-macosx-vout \ --without-x --disable-xcb --disable-xvideo --disable-glx \ --disable-fontconfig --disable-freetype --disable-fribidi \ --disable-svg # Audio Plugins configure.args-append \ --disable-macosx-audio --disable-jack --enable-samplerate # Interface Plugins configure.args-append \ --disable-macosx --disable-macosx-dialog-provider \ --disable-qt4 --enable-ncurses --disable-skins2 # Visualisations and Video Filter Plugins configure.args-append \ --disable-goom # Service Discovery Plugins configure.args-append \ --enable-bonjour --enable-upnp variant jack description {Enable jack plugin for audio output} { depends_lib-append port:jack configure.args-delete --disable-jack configure.args-append --enable-jack } variant qtkit description {Enable qtcapture and qtaudio} { configure.args-delete --disable-macosx-qtkit configure.args-append --enable-macosx-qtkit if {${os.major} < 10} { ui_error "The +qtkit variant requires Snow Leopard or greater" return -code error "incompatible Mac OS X version" } } variant eyetv description {Enable eyetv plugin} { configure.args-delete --disable-macosx-eyetv configure.args-append --enable-macosx-eyetv } variant speex description {Enable Speex decoder support} { depends_lib-append path:lib/libspeex.dylib:speex configure.args-delete --disable-speex configure.args-append --enable-speex } variant svg description {Enable SVG support} { depends_lib-append port:librsvg configure.args-delete --disable-svg configure.args-append --enable-svg } variant shout description {Enable Shoutcast support} { depends_lib-append port:libshout2 configure.args-delete --disable-shout configure.args-append --enable-shout } variant vcd description {Enable VCD support} { depends_lib-append port:vcdimager configure.args-delete --disable-vcdx configure.args-append --enable-vcdx } variant mod description {Enable MOD demuxer support} { depends_lib-append port:libmodplug configure.args-delete --disable-mod configure.args-append --enable-mod } variant mpc description {enable Musepack Decoder library support} { depends_lib-append port:libmpcdec configure.args-delete --disable-mpc configure.args-append --enable-mpc } variant dvb description {enable DVB Program Specific Information support} { depends_lib-append port:libdvbpsi configure.args-delete --disable-dvbpsi configure.args-append --enable-dvbpsi } variant osd description {Enable onscreen display and TrueType font support} { depends_lib-append port:fontconfig port:freetype configure.args-delete --disable-freetype --disable-fontconfig configure.args-append --enable-freetype --enable-fontconfig } variant fribidi requires osd description {Enable FriBidi Unicode support} { depends_lib-append port:fribidi configure.args-delete --disable-fribidi configure.args-append --enable-fribidi } variant sdl description {Enable SDL/SDL-Image support} { depends_lib-append path:lib/pkgconfig/sdl.pc:libsdl port:libsdl_image configure.args-delete --disable-sdl configure.args-append --enable-sdl } variant smb description {Enable Samba 3 support} { depends_lib-append port:samba3 configure.args-delete --disable-smb configure.args-append --enable-smb configure.ldflags-append -L${prefix}/lib/samba3 } variant x11 { depends_lib-append \ port:mesa \ port:xorg-libXinerama \ port:xorg-libXv \ port:xorg-libXxf86vm \ port:xorg-xcb-util \ port:xorg-xcb-util-keysyms configure.args-delete --without-x --disable-xvideo --disable-glx --disable-xcb configure.args-append --with-x --x-include=${prefix}/include --x-lib=${prefix}/lib \ --enable-xvideo --enable-glx --enable-xcb } variant qt4 description {Build using QT4 UI. This will use qt4-mac} { configure.args-delete --disable-qt4 configure.args-append --enable-qt4 PortGroup qt4 1.0 post-activate { if {![variant_isset quartz]} { ui_info "The qt4 interface module for VLC is not very stable. If you encounter bugs with it, please file them with VLC and not MacPorts." } } } variant quartz { depends_lib-append port:BGHUDAppKit configure.args-delete --disable-macosx --disable-macosx-dialog-provider configure.args-append --enable-macosx --enable-macosx-dialog-provider } default_variants +mod +mpc +osd +quartz variant huge \ requires dvb eyetv fribidi jack mod mpc osd sdl shout speex svg vcd \ description {Enable all variants except quartz, qt4, smb, and x11} {} variant full \ requires huge qt4 quartz smb x11 \ description {Enable all variants} {} platform macosx { if {${os.major} > 9} { default_variants-append +qtkit } if {${os.major} == 9} { # FIXME: x86_64 segfaults on Leopard on dlclose() ... not sure why supported_archs i386 ppc } configure.args-delete \ --disable-macosx-vout --disable-macosx-audio \ configure.args-append \ --enable-macosx-vout --enable-macosx-audio \ --with-macosx-sdk=/ if {[variant_isset qt4] || [variant_isset quartz]} { configure.args-delete --disable-macosx-vlc-app configure.args-append --enable-macosx-vlc-app } post-patch { reinplace "/Sparkle.framework/d" \ ${worksrcpath}/extras/package/macosx/vlc.xcodeproj/project.pbxproj reinplace "/SDKROOT/d" \ ${worksrcpath}/extras/package/macosx/vlc.xcodeproj/project.pbxproj reinplace "/Growl.framework/d" \ ${worksrcpath}/extras/package/macosx/package.mak reinplace "s:LD_LIBRARY_PATH:DYLD_LIBRARY_PATH:g" \ ${worksrcpath}/Makefile.am reinplace "/argv/s/environ/*_NSGetEnviron()/" \ ${worksrcpath}/modules/misc/inhibit/xdg.c \ ${worksrcpath}/modules/misc/inhibit/xscreensaver.c reinplace "s/extern char \\*\\*environ;/#include /" \ ${worksrcpath}/modules/misc/inhibit/xdg.c \ ${worksrcpath}/modules/misc/inhibit/xscreensaver.c ln -s ${frameworks_dir}/BGHUDAppKit.framework ${worksrcpath}/contrib/BGHUDAppKit.framework # To trick configure file mkdir "${worksrcpath}/contrib/lib" } post-destroot { eval file delete [glob ${destroot}${prefix}/lib/vlc/plugins/*.la] if {[variant_isset qt4] || [variant_isset quartz]} { file rename ${worksrcpath}/VLC.app ${destroot}${applications_dir}/VLC.app # These are already in ${prefix}, so we don't need to bundle them as well file delete -force ${destroot}${applications_dir}/VLC.app/Contents/Frameworks file delete -force ${destroot}${applications_dir}/VLC.app/Contents/lib # There's no need to install these into the bundle and the prefix file delete -force ${destroot}${applications_dir}/VLC.app/Contents/MacOS/include file delete -force ${destroot}${applications_dir}/VLC.app/Contents/MacOS/lib file delete -force ${destroot}${applications_dir}/VLC.app/Contents/MacOS/plugins # http://trac.macports.org/ticket/35131 ln -s ${prefix}/lib ${destroot}${applications_dir}/VLC.app/Contents/MacOS/lib ln -s ${prefix}/lib/vlc/plugins ${destroot}${applications_dir}/VLC.app/Contents/MacOS/plugins } } }