summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/mplayer/PKGBUILD
blob: e4129338742c85a0485507a3c36ac922d13f6457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# $Id: PKGBUILD 25315 2009-01-26 13:00:04Z giovanni $
# Maintainer: Hugo Doria <hugo@archlinux.org>

pkgname=mplayer
pkgver=28347
pkgrel=6
pkgdesc="A movie player for linux"
arch=('i686' 'x86_64')
depends=('libxxf86dga' 'libxv' 'libmad' 'giflib' 'cdparanoia' 'gtk2'
         'sdl' 'lame' 'libtheora' 'xvidcore' 'zlib' 'libmng' 'libxss'
         'libgl' 'smbclient' 'aalib' 'jack-audio-connection-kit'
         'x264>=20090108' 'faac' 'lirc-utils' 'ttf-dejavu' 'fribidi' )
license=('GPL')
url="http://www.mplayerhq.hu/"
makedepends=('libcaca' 'unzip' 'live-media' 'libdca' 'mesa')
backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf' 'etc/mplayer/mplayer.conf')
source=(ftp://ftp.archlinux.org/other/mplayer/${pkgname}-${pkgver}.tar.bz2
        http://www.mplayerhq.hu/MPlayer/skins/Blue-1.7.tar.bz2
	mplayer-svn-gnome-screensaver.patch.tar.gz)
md5sums=('41fb540025a51930d318e99728a19c66'
         'e4e2020d11b681aac898103b3ba723c4'
	 'c55b6eeb2b4071dd65226f2a08b9c07d')

build() {
  # Custom CFLAGS break the mplayer build
  unset CFLAGS

  cd ${srcdir}/${pkgname}
  patch -p1 < ../mplayer-svn-gnome-screensaver.patch

  ./configure --prefix=/usr --enable-gui --disable-arts --enable-x11 \
      --enable-runtime-cpudetection --confdir=/etc/mplayer --disable-nas \
      --enable-gl --enable-tv-v4l1 --enable-tv-v4l2 --enable-largefiles \
      --disable-liblzo --disable-speex --disable-openal \
      --enable-fribidi --disable-libdv --disable-musepack \
      --language=all --disable-dvdnav --disable-esd --disable-mga \
      --disable-libamr_nb --enable-lirc \
      --with-extraincdir=/usr/lib/live-media --enable-freetype --disable-directfb

  [ "$CARCH" = "i686" ] &&  sed 's|-march=i486|-march=i686|g' -i config.mak

  make || return 1
  make -j1 DESTDIR=${pkgdir} install || return 1
  cp etc/{codecs.conf,input.conf,example.conf} ${pkgdir}/etc/mplayer/
  if [ ! -e ${pkgdir}/etc/mplayer/mplayer.conf ]; then
     echo "# Write your default config options here" > ${pkgdir}/etc/mplayer/mplayer.conf
     echo "" >> ${pkgdir}/etc/mplayer/mplayer.conf
  fi

  ln -s /usr/share/fonts/TTF/DejaVuSans.ttf ${pkgdir}/usr/share/mplayer/subfont.ttf
  rm -rf ${pkgdir}/usr/share/mplayer/font
  mv ${srcdir}/Blue ${pkgdir}/usr/share/mplayer/skins/default
}