# Contributor: Leonardo Arena # Maintainer: Natanael Copa pkgname=vlc pkgver=2.0.7 _pkgver=${pkgver/_/-} pkgrel=0 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 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 libvorbis-dev libx11-dev libxext-dev libxinerama-dev libxpm-dev libxv-dev live-media-dev>=2012.01.26 lua-dev ncurses-dev mesa-dev pkgconfig qt-dev sdl-dev speex-dev sysfsutils-dev taglib-dev v4l-utils-dev x264-dev xcb-util-renderutil-dev xcb-util-keysyms-dev " source="http://download.videolan.org/pub/videolan/$pkgname/$_pkgver/$pkgname-$_pkgver.tar.xz uclibc-inhibit-spawn.patch uclibc-no-xscreensaver.patch uclibc3.patch flac-1.3.patch vlc.trigger " _builddir="$srcdir"/$pkgname-$_pkgver 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" ./configure --prefix=/usr \ --disable-mmx \ --disable-nls \ --disable-optimizations \ --disable-rpath \ --enable-a52 \ --enable-avcodec \ --enable-avformat \ --enable-bluray \ --enable-dbus \ --enable-dbus-control \ --enable-dc1394 \ --enable-dv \ --enable-dvbpsi \ --enable-dvdread \ --enable-dvdnav \ --enable-faad \ --enable-flac \ --enable-httpd \ --enable-live555 \ --enable-matroska \ --enable-merge-ffmpeg \ --enable-ncurses \ --enable-qt4 \ --enable-realrtsp \ --enable-sdl \ --enable-shout \ --enable-skins2 \ --enable-speex \ --enable-sout \ --enable-taglib \ --enable-theora \ --enable-v4l2 \ --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>=2.0.0-r1" 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>=2.0.0_rc1-r4" # 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"; 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>=2.0.0_rc1-r0" 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="3b0e465b0990097b65abaf3e25589957 vlc-2.0.7.tar.xz 28349b8239fdd6987fbe0ca2c758517f uclibc-inhibit-spawn.patch b84c5a9121440b6a1dcf28792d783eb8 uclibc-no-xscreensaver.patch 94f11ec8394775018222781a0c875444 uclibc3.patch f46cd60450e25f764c66b8713a8546b1 flac-1.3.patch 350b30698eb784def7d19446eb1d6c81 vlc.trigger" sha256sums="243107d59e4bd0b942cb4ce10292eab8233394f8109ff4fde44e64d0ee745314 vlc-2.0.7.tar.xz e645f2b7457aaa18d7215225a3db116dac6312f2853933d58330d6053fba969f uclibc-inhibit-spawn.patch 1ecd057c4f6cc02c9a98b48b96c03968d44a8a1d92cb6a62afe4dc48446614a1 uclibc-no-xscreensaver.patch 6eaa71e580ea5357f10cc6ffb281d38b22b0e88f30915d028079c0c93a4bc32c uclibc3.patch 7b5c5a8e4198642f7da3210a038a1ac60b41b93439f0c582304ec2efb448b83e flac-1.3.patch 0639c022dc844fad95eb0246b1d24557641939bbda91af0c700374378d8f054a vlc.trigger" sha512sums="6e8e55e40425cc9d48a174374a6b690f50d0a7cfed9a1b253786c9e7e52658fcd4feda94a5d4f66c58260b517248041b3f393af5171a42bf3a3e1475828b1ab2 vlc-2.0.7.tar.xz 2fa65852a18d4bf0cb0cfd92282b3242b7dfec6a5d1e4550fb8a119a444d174bf97781bd90a3ada31a37a0988e7332aa1692a84a6cf5f1f46747d5fd08d4421f uclibc-inhibit-spawn.patch 66765557f40ec5a48507c2c3a0f82a3245ac19a83b2aa5b4b4b66335b4ca12a3d359a0c9b7a981039fb9ecf842c97ec11633c9c2fa1834f2c7c98ac088a2c891 uclibc-no-xscreensaver.patch 14a01f2cf686903c03c4f3b2783487baa0c4ccb89d570c7201f829b00a8e1a0531f7267f28364f6c5f5e52c694183b9b8d0f514f16803e7bace61b5d7cfacd50 uclibc3.patch 359660a3cff988899f09b2f34b833280f2749bead81589d9a387e1e7ca4c1a5f595016c36e0da95c595e7f53e3c4bb30a56db6145640fabbc3556b20ef3a7c6d flac-1.3.patch a081dd93248b63724ffb65cde0a00db0e1f3b9a1d47074800d898e39dc71c074b3dd3fa18e5fbc45fa90376e7df6d7ef8689c4253c1d9405868a3f8bbd76adcc vlc.trigger"