# Contributor: Leonardo Arena # Maintainer: Natanael Copa pkgname=vlc pkgver=2.1.0 _pkgver=${pkgver/_/-} _ver=${_pkgver%[a-z]} pkgrel=4 pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player" pkgusers="vlc" pkggroups="vlc" url="http://www.videolan.org/vlc/" arch="all" license="GPL-2" triggers="$pkgname.trigger=/usr/lib/vlc/plugins" subpackages="$pkgname-dev $pkgname-doc $pkgname-qt $pkgname-xorg $pkgname-daemon" depends="ttf-dejavu" 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 vlc.trigger fix-waitpid-usage.patch uclibc-define-fminf.patch uclibc-fix-idn.patch" _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 () { cd "$_builddir" sed -i -e 's:/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf:/usr/share/fonts/TTF/DejaVuSerif-Bold.ttf:' modules/misc/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" LUA=lua5.2 \ LUAC=luac5.2 \ ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --disable-mmx \ --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 \ || 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 } _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 } md5sums="8c77bda671821f5b9ede96b6816e2ade vlc-2.1.0.tar.xz 350b30698eb784def7d19446eb1d6c81 vlc.trigger 8facb4e18f2c72afbaa94e2dee21bbf6 fix-waitpid-usage.patch 34bacc70c150bdbe19476d84a76f2849 uclibc-define-fminf.patch a57ecdeb28b93c2ac0ade2adff2da2b4 uclibc-fix-idn.patch" sha256sums="d2177daa31786acf1e961b2f63429797a8c62c090e5359bcc7929a1ba5fe41f7 vlc-2.1.0.tar.xz 0639c022dc844fad95eb0246b1d24557641939bbda91af0c700374378d8f054a vlc.trigger bf9ca2b2f1f4d29ee5e929227e2be0567048902bf8cd1bafdbec008a2768ab3a fix-waitpid-usage.patch b16801cca70c0f13830a27146025cc55b947897744d9da1ab713c5f5ce0460a0 uclibc-define-fminf.patch 8e15a1c29fed29eeafef4dd37c73cc0da578b40d9d94713ac12a69c101040901 uclibc-fix-idn.patch" sha512sums="abf397e1382289d579fec3dc540885c45ba055f158f7c248c5de27a7c50dac5a4c317145c4a786ed3819a9199fc304fa8f43ccde8c33c2938d40c805e7e9b124 vlc-2.1.0.tar.xz a081dd93248b63724ffb65cde0a00db0e1f3b9a1d47074800d898e39dc71c074b3dd3fa18e5fbc45fa90376e7df6d7ef8689c4253c1d9405868a3f8bbd76adcc vlc.trigger ef239b6f0ff497c7e2b290044de1164a17aec9b72205158cbb6b309bee19e843953eb63092026390a3ff2dff7ba290151ec3e124b8a5b4ccc2ac8c2d4ce2ed8d fix-waitpid-usage.patch 0d9310afef1afbf15a19bcc8aa1835416830666d79a5461b45df900afde5b115ec7c18d4bc15d36efe45b912ebb51ceb91cc20ebd0be0ecc4ff3fd0e06dd4a55 uclibc-define-fminf.patch 24d7ae347a81e05aa2273c180ed76dfb0c8140ef1e4f877a88326fdf37acec0ac8bf1bde98845e40cd57c93fe6e5c186623a6f6f66ed6fe94386826260d88738 uclibc-fix-idn.patch"