# Maintainer: cantabile <cantabile dot desu at gmail dot com>
# Contributor: extcake < extcake@gmail.com >
# Contributor: loonyphoenix < loonyphoenix at gmail >
pkgname=mplayer2-git
pkgver=20110404
pkgrel=1
pkgdesc="A movie player for linux"
arch=('i686' 'x86_64')
license=('GPL')
url="http://www.mplayer2.org/"
depends=('fontconfig' 'freetype2' 'libgl' 'libxss' 'libxxf86dga' 'sdl' 'ttf-dejavu' 'ffmpeg' 'libass' 'alsa-lib') #is sdl really needed? --loonyphoenix
makedepends=('git' 'mesa' 'python2' 'unzip' 'videoproto' 'yasm' 'libpulse' 'libvdpau') #live-media removed; libpulse and libvdpau so that the outputs be availabe --loonyphoenix
optdepends=('libvdpau: for vdpau output'
'pulseaudio: for pulse output') #I hope I handled this correctly. I have no idea if mplayer built with libpulse and libvdpau will be able to load without them in the system
backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf')
provides=('mplayer')
conflicts=('mplayer')
source=('mplayer.desktop')
md5sums=('af6ba58cc34322bf12e46e8d1d42d75f')
_gitroot="http://git.mplayer2.org/mplayer2/"
_gitname="mplayer2"
build() {
# Custom CFLAGS break the mplayer build
unset CFLAGS
unset LDFLAGS
cd "${srcdir}"
if [[ -d "${_gitname}" ]]; then
cd "${_gitname}"
git pull
else
git clone "${_gitroot}" "${_gitname}" && cd "${_gitname}"
fi
cd "${srcdir}"
rm -rf "${_gitname}-build"
cp -r "${_gitname}" "${_gitname}-build"
cd "${_gitname}-build"
./configure --prefix=/usr \
--disable-fribidi \
--language=all \
--confdir=/etc/mplayer
# Removed:
# --disable-libdv \
# --enable-xvmc \
# I think autodetection should take care of that --loonyphoenix
msg "Starting make..."
make
}
package() {
cd "${srcdir}/${_gitname}-build"
make DESTDIR="${pkgdir}" install
install -m644 etc/{codecs,input,example}.conf "${pkgdir}/etc/mplayer/"
install -d -m755 "${pkgdir}/usr/share/mplayer"
ln -s /usr/share/fonts/TTF/DejaVuSans.ttf "${pkgdir}/usr/share/mplayer/subfont.ttf"
# there is a desktop file where the xpm is, but we don't want that
install -Dm644 "${srcdir}/mplayer.desktop" "${pkgdir}/usr/share/applications/mplayer.desktop"
install -Dm644 "${srcdir}/${_gitname}/etc/mplayer.xpm" "${pkgdir}/usr/share/pixmaps/mplayer.xpm"
}