updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / mplayer-vidix-svn / PKGBUILD
blobafa96c8b180c0c1788b291cde1e5edc7bbc56688
1 # Contributor: Benjamin Bukowski <benjamin.bukowski@googlemail.com>
2 # Maintainer: Alessandro Pezzoni <alessandro_pezzoni@lavabit.com>
4 pkgname=mplayer-vidix-svn
5 pkgver=32897
6 pkgrel=1
7 pkgdesc="A movie player for linux, compiled with VIDIX video output"
8 arch=('i686' 'x86_64')
9 url="http://www.mplayerhq.hu/"
10 license=('GPL2')
11 depends=('ttf-dejavu' 'svgalib-helper')
12 makedepends=('subversion' 'yasm')
13 provides=("mplayer=$pkgver" "mplayer-svn=$pkgver")
14 conflicts=('mplayer')
15 backup=("etc/mplayer/mplayer.conf"
16                                 "etc/mplayer/codecs.conf"
17                                 "etc/mplayer/input.conf"
18                                 "etc/mplayer/menu.conf"
19                                 "etc/mplayer/dvb-menu.conf")
20 install=mplayer-svn.install
21 _svgalib_version=1.9.25
22 source=("http://my.arava.co.il/~matan/svgalib/svgalib-${_svgalib_version}.tar.gz"
23         'configure-copy-disabled-features.patch'
24         'mplayer.conf')
26 md5sums=('4dda7e779e550b7404cfe118f1d74222'
27          'db50b7f27969045172ed7d1eebca47cf'
28          'd82577aa11f1077dea79ccdda27d0641')
30 _svntrunk=svn://svn.mplayerhq.hu/mplayer/trunk
31 _svnmod=mplayer
32 _svgalib_installed_version=`pacman -Qs svgalib-helper |\
33          grep "local" |\
34          sed 's@local/svgalib-helper @@' |\
35          sed 's/-.*//'`
37 build() {
38   if [ ! "$_svgalib_installed_version" = "$_svgalib_version" ]; then
39     echo "Installed svgalib-helper and source versions differ."
40     echo "Aborting."
41     exit 1
42   fi
44   cd "$srcdir"
46   if [ -d $_svnmod/.svn  ]; then
47     (cd $_svnmod && svn up -r $pkgver) || return 1
48   else
49     svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod || return 1
50   fi
52   msg "SVN checkout done or server timeout"
55         rm -rf "$srcdir/$_svnmod-build"
56         cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
57   cd "$srcdir/$_svnmod-build"
59   # Applying some patches...
60   for patch in ../*.patch; do
61     msg "Applying $patch..."
62     patch -Np1 -i $patch
63   done
65   # Use the mplayer's configure script autodetection.
66   # GUI is disabled by default,most options are autodetected.
67   # Make sure you have the related package (ex: lirc) before building.
68   # go in souce and run ./configure --help to see what's disabled by default
69   # for GUI add '--enable-gui'
70   # for Joystick add '--enable-joystick'  
72   # Custom FLAGS break the mplayer build
73   unset CFLAGS LDFLAGS
75   # If you experience problems with mkvs, try to add the following option
76   # to configure '--extra-cflags=-fno-strict-aliasing'
78   echo "\n" | ./configure --prefix=/usr \
79       --confdir=/etc/mplayer \
80       --language=all \
81       --disable-gui \
82       --enable-svgalib_helper \
83       --extra-cflags="-I$srcdir/svgalib-${_svgalib_version}/kernel/svgalib_helper/" || return 1
85   [ "$CARCH" == "i686" ] && sed 's|-march=i484|-march=i686|g' -i config.mak
87   msg "Starting make..."
89   make || return 1
90   make DESTDIR="$pkgdir/" install || return 1
92   install -Dm644 etc/{codecs.conf,dvb-menu.conf,example.conf,input.conf,menu.conf} $pkgdir/etc/mplayer/ || return 1
93   install -dm755 $pkgdir/usr/share/mplayer/ || return 1
94         install -m644 etc/{mplayer.desktop,mplayer.ico,mplayer.xpm} $pkgdir/usr/share/mplayer/ || return 1
95   install -m644 disabled_features $pkgdir/etc/mplayer/ || return 1
96         install -m644 $srcdir/mplayer.conf $pkgdir/etc/mplayer/ || return 1
99 # vim:set ts=2 sw=2 et: