summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9f008b8d49b5c93af36ba9622b659e6498c025ab (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
# Maintainer: Daniel Bermond < gmail-com: danielbermond >

pkgname=xine-lib-hg
pkgver=1.2.9.r14420.88e48552a162
pkgrel=1
pkgdesc='A multimedia playback engine (mercurial version)'
arch=('x86_64')
url='https://www.xine-project.org/'
license=('GPL' 'LGPL')
depends=('libxvmc' 'ffmpeg' 'libxinerama' 'libnsl' 'libssh2')
makedepends=('mercurial'
             'wavpack' 'faad2' 'libmng' 'imagemagick' 'mesa' 'libmodplug'
             'vcdimager' 'jack' 'aalib' 'libdca' 'a52dec' 'libmad' 'libdvdnav'
             'libmpcdec' 'libcaca' 'libbluray' 'libvdpau' 'glu' 'gdk-pixbuf2')
optdepends=('imagemagick: for using the imagemagick plugin'
            'jack: for using the jack plugin'
            'vcdimager: for using the vcd plugin'
            'glu: for using the opengl plugin'
            'wavpack: for using the wavpack plugin'
            'faad2: for using the faad plugin'
            'libmng: for using the mng plugin'
            'aalib: for using the aalib plugin'
            'libmodplug: for using the modplug plugin'
            'libdca: for using the dca plugin'
            'a52dec: for using the a52 plugin'
            'libmad: for using the mp3 plugin'
            'libdvdnav: for using the dvd plugin'
            'libmpcdec: for using the musepack plugin'
            'libcaca: for using the caca plugin'
            'libbluray: for using the bluray plugin'
            'libvdpau: for using the VDPAU plugin'
            'smbclient: for using the samba plugin'
            'gdk-pixbuf2: for using the gdk-pixbuf plugin')
provides=('xine-lib')
conflicts=('xine-lib')
source=('hg+http://hg.code.sf.net/p/xine/xine-lib-1.2')
sha256sums=('SKIP')

pkgver() {
    cd xine-lib-1.2
    
    local _version_major
    local _version_minor
    local _version_sub
    local _version_patch
    local _version
    local _number
    _version_major="$(grep '^XINE_VERSION_MAJOR=' version.sh | sed 's/.*=//')"
    _version_minor="$(grep '^XINE_VERSION_MINOR=' version.sh | sed 's/.*=//')"
    _version_sub="$(  grep '^XINE_VERSION_SUB='   version.sh | sed 's/.*=//')"
    _version_patch="$(grep '^XINE_VERSION_PATCH=' version.sh | sed 's/.*=//')"
    _version="$_version_major"
    
    for _number in "$_version_minor" "$_version_sub" "$_version_patch"
    do
        [ -n "$_number" ] && _version+=".${_number}"
    done
    
    printf '%s.r%s.%s' "$_version" "$(hg identify -n)" "$(hg identify -i)"
}

build() {
    cd xine-lib-1.2
    ./autogen.sh \
        --prefix='/usr' \
        --with-wavpack \
        --enable-vdpau \
        --with-external-dvdnav \
        --disable-optimizations 
    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
    make
}

package() {
    cd xine-lib-1.2
    make DESTDIR="$pkgdir" install
}