# Contributor: Leonardo Arena # Maintainer: Natanael Copa pkgname=vlc pkgver=2.1.5 _pkgver=${pkgver/_/-} _ver=${_pkgver%[a-z]} pkgrel=4 pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player" triggers="vlc-libs.trigger=/usr/lib/vlc/plugins" pkgusers="vlc" pkggroups="vlc" url="http://www.videolan.org/vlc/" arch="all" license="GPL2+" subpackages="$pkgname-dev $pkgname-doc $pkgname-qt $pkgname-xorg $pkgname-daemon $pkgname-libs $pkgname-plugins $pkgname-plugins-access:plugins_access $pkgname-plugins-access_output:plugins_access_output $pkgname-plugins-audio_filter:plugins_audio_filter $pkgname-plugins-audio_mixer:plugins_audio_mixer $pkgname-plugins-audio_output:plugins_audio_output $pkgname-plugins-codec:plugins_codec $pkgname-plugins-control:plugins_control $pkgname-plugins-demux:plugins_demux $pkgname-plugins-gui:plugins_gui $pkgname-plugins-lua:plugins_lua $pkgname-plugins-meta_engine:plugins_meta_engine $pkgname-plugins-misc:plugins_misc $pkgname-plugins-mux:plugins_mux $pkgname-plugins-notify:plugins_notify $pkgname-plugins-packetizer:plugins_packetizer $pkgname-plugins-services_discovery:plugins_services_discovery $pkgname-plugins-stream_filter:plugins_stream_filter $pkgname-plugins-stream_out:plugins_stream_out $pkgname-plugins-text_renderer:plugins_text_renderer $pkgname-plugins-video_chroma:plugins_video_chroma $pkgname-plugins-video_filter:plugins_video_filter $pkgname-plugins-video_output:plugins_video_output $pkgname-plugins-visualization:plugins_visualization" depends="ttf-dejavu $pkgname-plugins" makedepends=" a52dec-dev alsa-lib-dev automake autoconf avahi-dev libtool dbus-dev faad2-dev ffmpeg-dev flac-dev freetype-dev fribidi-dev gtk+-dev libbluray-dev>=0.2.1 libbluray-dev<20100000 libavc1394-dev libcddb-dev libdc1394-dev>=2.1.0 libdvbpsi-dev libdvdnav-dev libdvdread-dev libgcrypt-dev libice-dev libiconv-dev libmad-dev libmatroska-dev libmpeg2-dev libnotify-dev libogg-dev libraw1394-dev>=2.0.1 libshout-dev libsm-dev libtheora-dev libva-dev libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxinerama-dev libxml2-dev libxpm-dev libxv-dev live-media-dev>=2012.01.26 lua5.2-dev ncurses-dev mesa-dev pkgconfig qt-dev sdl-dev speex-dev sysfsutils-dev taglib-dev udev-dev v4l-utils-dev x264-dev xcb-util-renderutil-dev xcb-util-keysyms-dev xdg-utils " source="http://download.videolan.org/pub/videolan/$pkgname/${_ver}/$pkgname-$_pkgver.tar.xz fix-waitpid-usage.patch sout-transcode-monosrc.patch 0001-omxil-Release-picture-in-direct-rendering-mode.patch 0002-omxil-vout-Handle-dynamic-aspect-changes.patch 0003-omxil-rpi-Fetch-pixel-aspect-ratio-from-decoder.patch 0004-omxil-bcm-h264-Don-t-wait-for-error-free-frame.patch 0010-omxil-rpi-codecs.patch vlc-libs.trigger" _builddir="$srcdir"/$pkgname-$_ver prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg "Applying $i" patch -p1 -i "$srcdir"/$i || return 1 ;; esac; done sed -i -e "/^libxscreensaver_plugin_la_SOURCES/s/^/#/" modules/misc/Modules.am ./bootstrap } build() { local _arch_opts= cd "$_builddir" sed -e 's:/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf:/usr/share/fonts/TTF/DejaVuSerif-Bold.ttf:' \ -i modules/text_renderer/freetype.c # -fpermissive is needed due to zlib 1.2.6 changing # void* to gzFile on gz*() functions export CFLAGS="$CFLAGS -D_GNU_SOURCE" export CXXFLAGS="$CXXFLAGS -fpermissive" case "$CARCH" in arm*) _arch_opts="--enable-omxil --enable-omxil-vout --enable-rpi-omxil" ;; esac LUA=lua5.2 \ LUAC=luac5.2 \ ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --disable-mmx \ --disable-sse \ --disable-nls \ --disable-optimizations \ --disable-rpath \ --enable-a52 \ --enable-avcodec \ --enable-avformat \ --enable-bluray \ --enable-dbus \ --enable-dc1394 \ --enable-dvbpsi \ --enable-dvdread \ --enable-dvdnav \ --enable-faad \ --enable-flac \ --enable-httpd \ --enable-libcddb \ --enable-libva \ --enable-live555 \ --enable-merge-ffmpeg \ --enable-ncurses \ --enable-realrtsp \ --enable-sdl \ --enable-shout \ --enable-skins2 \ --enable-speex \ --enable-sout \ --enable-taglib \ --enable-theora \ --enable-v4l2 \ --enable-vdpau \ --enable-vlm \ --enable-vorbis \ --enable-wma-fixed \ --enable-x264 \ --enable-xvideo \ $_arch_opts \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 # for res in 16 32 48 128; do # install -D -m644 share/vlc${res}x${res}.png \ # "$pkgdir"/usr/share/icons/hicolor/${res}x${res}/apps/vlc.png || return 1 # done # delete cache as it's autocreated by trigger rm -rf "$pkgdir"/usr/lib/vlc/plugins/plugins.dat # delete unneeded mozilla and kde support files rm -rf "$pkgdir"/usr/lib/mozilla rm -rf "$pkgdir"/usr/share/kde4 find "$pkgdir" -name '*.la' -delete } plugins() { pkgdesc="$pkgname all plugins meta package" depends="$pkgname-plugins-access $pkgname-plugins-access_output $pkgname-plugins-audio_filter $pkgname-plugins-audio_mixer $pkgname-plugins-audio_output $pkgname-plugins-codec $pkgname-plugins-control $pkgname-plugins-demux $pkgname-plugins-gui $pkgname-plugins-lua $pkgname-plugins-meta_engine $pkgname-plugins-misc $pkgname-plugins-mux $pkgname-plugins-notify $pkgname-plugins-packetizer $pkgname-plugins-services_discovery $pkgname-plugins-stream_filter $pkgname-plugins-stream_out $pkgname-plugins-text_renderer $pkgname-plugins-video_chroma $pkgname-plugins-video_filter $pkgname-plugins-video_output $pkgname-plugins-visualization" mkdir -p "$subpkgdir" } _mv() { local dir=${1%/*} mkdir -p "$subpkgdir"/$dir mv "$1" "$subpkgdir"/$dir/ } qt() { pkgdesc="Qt frontend for VLC" depends="vlc-xorg=$pkgver-r$pkgrel" cd "$pkgdir" # scan for elf files that directly or indirectly depends on # libQt* libraries cd "$pkgdir" for i in $(find . -type f ); do if ldd $i 2>/dev/null | grep -q "libQt"; then _mv "$i" || return 1 fi done mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/qvlc \ "$subpkgdir"/usr/bin/ } xorg() { pkgdesc="Video LAN X.org support" depends="xdg-utils vlc=$pkgver-r$pkgrel" # scan for elf files that directly or indirectly depends on # libX* libraries cd "$pkgdir" for i in $(find . -type f ); do if ldd $i 2>/dev/null | grep -E -q "libX|x11|libxcb|libGL"; then echo $i | grep libavcodec_plugin.so || _mv "$i" || return 1 fi done mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/svlc \ "$subpkgdir"/usr/bin mkdir -p "$subpkgdir"/usr/share/vlc mv "$pkgdir"/usr/share/applications \ "$pkgdir"/usr/share/icons \ "$subpkgdir"/usr/share/ mv "$pkgdir"/usr/share/vlc/skins2 \ "$subpkgdir"/usr/share/vlc } daemon() { pkgdesc="Support for running VLC as a daemon" install="vlc-daemon.pre-install" arch="noarch" depends="vlc=$pkgver-r$pkgrel" mkdir -p "$subpkgdir" cd "$pkgdir" install -D -m755 ../../vlc.initd $subpkgdir/etc/init.d/vlc install -D -m664 ../../vlc.confd $subpkgdir/etc/conf.d/vlc install -d -o vlc -g vlc "$subpkgdir"/var/log/vlc } libs() { depends= mkdir -p "$subpkgdir"/usr/lib/vlc mv "$pkgdir"/usr/lib/vlc/vlc-cache-gen \ "$subpkgdir"/usr/lib/vlc/ default_libs } _mv_plugins() { local plugin=$1 pkgdesc="$pkgname $plugin plugin" depends= mkdir -p "$subpkgdir"/usr/lib/vlc/plugins mv "$pkgdir"/usr/lib/vlc/plugins/"$plugin" \ "$subpkgdir"/usr/lib/vlc/plugins } plugins_access() { _mv_plugins access; } plugins_access_output() { _mv_plugins access_output; } plugins_audio_filter() { _mv_plugins audio_filter; } plugins_audio_mixer() { _mv_plugins audio_mixer; } plugins_audio_output() { _mv_plugins audio_output; } plugins_codec() { _mv_plugins codec; } plugins_control() { _mv_plugins control; } plugins_demux() { _mv_plugins demux; } plugins_gui() { _mv_plugins gui; } plugins_lua() { _mv_plugins lua; } plugins_meta_engine() { _mv_plugins meta_engine; } plugins_misc() { _mv_plugins misc; } plugins_mux() { _mv_plugins mux; } plugins_notify() { _mv_plugins notify; } plugins_packetizer() { _mv_plugins packetizer; } plugins_services_discovery() { _mv_plugins services_discovery; } plugins_stream_filter() { _mv_plugins stream_filter; } plugins_stream_out() { _mv_plugins stream_out; } plugins_text_renderer() { _mv_plugins text_renderer; } plugins_video_chroma() { _mv_plugins video_chroma; } plugins_video_filter() { _mv_plugins video_filter; } plugins_video_output() { _mv_plugins video_output; } plugins_visualization() { _mv_plugins visualization; } md5sums="3941b561f590cc95ca5e795213cba2f2 vlc-2.1.5.tar.xz 7b1a482e521b9d6dcdb6710aff51894f fix-waitpid-usage.patch 4ba0ed24327f342e1f52dff14ca38faf sout-transcode-monosrc.patch 76ab721e5d303158201293c4ae5b5ba9 0001-omxil-Release-picture-in-direct-rendering-mode.patch 3d39249940b63e20ac6c84c68ee67677 0002-omxil-vout-Handle-dynamic-aspect-changes.patch 4209dd3c03001a921ece0f8647ecb1c5 0003-omxil-rpi-Fetch-pixel-aspect-ratio-from-decoder.patch 616a2e6dc58810732146ea922819aea2 0004-omxil-bcm-h264-Don-t-wait-for-error-free-frame.patch d43b448ee0ba6980ecfc5fdfa655f473 0010-omxil-rpi-codecs.patch dd899a9926ad84db9446d92890a5aa3e vlc-libs.trigger" sha256sums="6f6566ab6cd90d381395b7f0e401060b044cd3843e50ceb252b558a88e5d1f72 vlc-2.1.5.tar.xz 0c802698c215dd2d2ad9a4889b1d46dfd5d6c304d4cd1b34bacb2bacc35dd3c9 fix-waitpid-usage.patch 7e04144f61444e455ba1b6c8d6529506a122983764d55e0f6d4ba9884d7654a3 sout-transcode-monosrc.patch 3ff97e9c1b4055ac9a0981fa90b6f55abe72e44d5606a963f9b66f6274672822 0001-omxil-Release-picture-in-direct-rendering-mode.patch f9e5d27aa46cc4ebb929afaa30f53343eb40347915ec827cf461a42745fa525a 0002-omxil-vout-Handle-dynamic-aspect-changes.patch 7709d3fa0090e4aa8fb21eff55320fa11b681e6b7a8faab24b4473645cda3112 0003-omxil-rpi-Fetch-pixel-aspect-ratio-from-decoder.patch fe0b937e0b0a05b7d2cccd27dab49df77e84928e49fb148bae3d0effeb261d2f 0004-omxil-bcm-h264-Don-t-wait-for-error-free-frame.patch 11db39f206ddb968d6a4411c75bfa6102189cb8e784316c491dd964ee9a3dfaf 0010-omxil-rpi-codecs.patch 1c93af2feb217a06f6adc3cd51def8f00eea431f9d26ace7b90c377f7e85fc7a vlc-libs.trigger" sha512sums="37c6b82b4e89f4a14ed391cc677d9325a032e04bcc51a3e0d7d2ccf9e17a7a0deb90d9129e9dc3baf05a1ea9dae9c05e3177ab17a31098aafa6a2cb23388fa32 vlc-2.1.5.tar.xz 3c6ff4f25b7e1f0041bc47872a2b59b6c4f8bc1747d6830e9f2d9c35ee75cd2581558a12225070dede37d6a2287b0fc5c089c8f4f8ae26784aa6aded7177bed0 fix-waitpid-usage.patch 2ee570e9a3ccd6deef7d0a2084a4e50e844fb102a7a5865266b1774f9c80668f6a5a5cc57c319c42feb1f2eda581213b486367b4a92b35c18adb974cf6219b97 sout-transcode-monosrc.patch 0dc1c827af73f29fe715e3d75812ca916d0feac355d7c5f7ac1696bfbf3aca31dabbdd0ec05174a1c15713c530748f9dcb1b4b87819f3a6570c86c71ac503954 0001-omxil-Release-picture-in-direct-rendering-mode.patch c276962f33c38ad64caa6c4f8ca673c4367635b8998ee8a1003047f89e652c535027c68a836822d9b762d1b76ad04bd04dc0d19bbfabc5c3b7d14a7ee1cdd744 0002-omxil-vout-Handle-dynamic-aspect-changes.patch db15b7488768b429f26e4e7fdf82259ffc834fa2bdf1461b297b36111aad87603f7b015b0855afb8bc797fb351311dee555bbef0dc0a5d029748b057a3c23f92 0003-omxil-rpi-Fetch-pixel-aspect-ratio-from-decoder.patch a9bd6f622a9868de3e0a9f6643b906a73cabcfbc79ffebafbac00a45e3eec31cbb7bc9c9ec2748c58c928e95f45b29878ac78f654e5e658413687b60aaf52683 0004-omxil-bcm-h264-Don-t-wait-for-error-free-frame.patch 6fb242c37bd9af224b7bcd78702ac1b5612748c7363405e594c509288940a18ae4334f032497e9d6e11f83e870b9437a5c3197db0271123c95de24db63b8802e 0010-omxil-rpi-codecs.patch b67b6e21e9d4027aef1006e6057f9ba8e65ce3895b08f7b911b1675cff9bc423f64ee2c187c584860e9e5d4635a30408a7781add9694d9bba753eac37f357406 vlc-libs.trigger"