summaryrefslogtreecommitdiff
path: root/libre/mplayer-vaapi-libre/PKGBUILD
blob: e06c9a9b12399f36fe98e47aa34f53b225ae045f (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# $Id: PKGBUILD 32760 2010-11-18 03:40:37Z foutrelis $
# Maintainer (Parabola): fauno <fauno@kiwwwi.com.ar>
# Maintainer: Evangelos Foutras <foutrelis@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Hugo Doria <hugo@archlinux.org>

_pkgname=mplayer-vaapi
pkgname=mplayer-vaapi-libre
pkgver=33161
_vaapi_version=20110127
pkgrel=3
pkgdesc="A movie player, compiled with vaapi support, without faac dependency, added speex support"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.splitted-desktop.com/~gbeauchesne/mplayer-vaapi/"
license=('GPL')
depends=('libxxf86dga' 'libxxf86vm' 'libmad' 'cdparanoia' 'libxinerama' 'sdl'
         'lame' 'libtheora' 'xvidcore' 'libmng' 'libxss' 'mesa' 'smbclient'
         'aalib' 'jack' 'libcaca' 'x264' 'lirc-utils' 'ttf-dejavu' 'speex'
         'libxvmc' 'enca' 'opencore-amr' 'libdca' 'a52dec' 'schroedinger'
         'libvpx' 'libpulse' 'fribidi' 'faad2' 'libva' 'libass'
         'desktop-file-utils')
makedepends=('unzip' 'live-media' 'yasm' 'ladspa')
provides=("$_pkgname=$pkgver" 'mplayer')
conflicts=('mplayer' "$_pkgname")
replaces=('mplayer-vaapi')
backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf')
source=(http://pkgbuild.com/~foutrelis/mplayer-$pkgver.tar.xz
        http://www.splitted-desktop.com/~gbeauchesne/mplayer-vaapi/mplayer-vaapi-$_vaapi_version.tar.bz2
        mplayer.desktop
        mplayer.png
        patch-fixes.patch
        gcc-4.6-mp3lib-sse-code-miscompilation.patch)
options=('!buildflags' '!emptydirs')
install=mplayer-vaapi.install
md5sums=('b8b2842ba3fff04a9b64a94bd2b0a667'
         'b39bd73ae8241dcb21dd1a8fa5eb87eb'
         '647b9f4ab5284a7fef3f84f992214e77'
         'd00874ccc644b7f43d6ef1c942fcef28'
         'c7a1df1c1d0f1e51ee400d96b0f34195'
         'd56174335d3c5bcdf3732f4a869f01dd')

build() {
  cd "$srcdir/mplayer-$pkgver"

  # Update vaapi patches for changes introduced in mplayer/ffmpeg
  patch -d "$srcdir/mplayer-vaapi-$_vaapi_version" -p1 -i \
    "$srcdir/patch-fixes.patch"

  # Workaround mp3lib SSE code miscompilation with gcc 4.6 (r33469 upstream)
  # Patch by Jindrich Makovicka <makovick <at> gmail>
  patch -Np0 -i "$srcdir/gcc-4.6-mp3lib-sse-code-miscompilation.patch"

  for patch in mplayer-{vaapi{,-{gma500-workaround,0.29}},vdpau}; do
    patch -Np1 -i "$srcdir/mplayer-vaapi-$_vaapi_version/patches/$patch.patch"
  done

  ./configure --prefix=/usr \
    --enable-runtime-cpudetection \
    --disable-gui \
    --disable-arts \
    --disable-liblzo \
    --enable-speex \
    --disable-openal \
    --disable-libdv \
    --disable-musepack \
    --disable-esd \
    --disable-mga \
    --disable-faac \
    --enable-xvmc \
    --disable-vdpau \
    --enable-vaapi \
    --language=all \
    --confdir=/etc/mplayer

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

  make
}

package() {
  cd "$srcdir/mplayer-$pkgver"

  make -j1 DESTDIR="$pkgdir" install-mplayer install-mplayer-man
  install -Dm644 etc/{codecs.conf,input.conf,example.conf} "$pkgdir/etc/mplayer/"
  install -dm755 "$pkgdir/usr/share/mplayer/"
  ln -s /usr/share/fonts/TTF/DejaVuSans.ttf "$pkgdir/usr/share/mplayer/subfont.ttf"
  rm -rf "$pkgdir/usr/share/mplayer/font"
  # Desktop file (FS#14770)
  install -Dm644 "$srcdir/mplayer.desktop" "$pkgdir/usr/share/applications/mplayer.desktop"
  install -Dm644 "$srcdir/mplayer.png" "$pkgdir/usr/share/pixmaps/mplayer.png"
}

# vim:set ts=2 sw=2 et: