summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 36ffb0d34100ba26f533f8d36c1d7d5cf4be1817 (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
# Maintainer: Foxe Chen <chen.foxe@gmail.com>
pkgname=libmpv-git
pkgver=v0.39.0.r929.gee07dcf
pkgrel=3
pkgdesc='a free, open source, and cross-platform media player (libmpv library only)'
arch=('x86_64')
license=('GPL-2.0-or-later')
url='https://mpv.io/'
depends=('alsa-lib' 'desktop-file-utils' 'ffmpeg' 'glibc' 'hicolor-icon-theme'
         'jack' 'lcms2' 'libarchive' 'libass' 'libbluray' 'libcdio'
         'libcdio-paranoia' 'libdrm' 'libdvdnav' 'libdvdread' 'libegl' 'libgl'
         'libglvnd' 'libjpeg-turbo' 'libplacebo' 'libpulse' 'libsixel' 'libva'
         'libvdpau' 'libx11' 'libxext' 'libxkbcommon' 'libxpresent' 'libxrandr'
         'libxss' 'libxv' 'luajit' 'mesa' 'mujs' 'libpipewire' 'rubberband'
         'openal' 'uchardet' 'vapoursynth' 'vulkan-icd-loader' 'wayland' 'zlib'
     )
makedepends=('git' 'meson' 'mesa' 'ladspa' 'vulkan-headers'
             'wayland-protocols' 'ffnvcodec-headers')
provides=('mpv' 'mpv-git' 'libmpv.so')
conflicts=('mpv')
options=('!emptydirs')
source=('git+https://github.com/mpv-player/mpv.git')
sha256sums=('SKIP')

pkgver() {
      cd "$srcdir/mpv"
      git describe --long --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    arch-meson mpv build \
        --auto-features auto \
        -Dgpl='true' \
        -Dcplayer='false' \
        -Dlibmpv='true' \
        -Dbuild-date='false' \
        -Dtests='false' \
        -Dfuzzers='false' \
        -Dgl-x11=enabled \
        -Dcaca=disabled \
        -Dcdda=enabled \
        -Ddvbin=enabled \
        -Ddvdnav=enabled \
        -Dlibarchive=enabled \
        -Dopenal=enabled \
        -Dhtml-build='disabled' \
        -Dmanpage-build='disabled' \
        -Dpdf-build='disabled'
    meson compile -C build
}

package() {
    meson install -C build --destdir "$pkgdir"

    # delete private entries only required for static linking
    sed -i -e '/Requires.private/d' -e '/Libs.private/d' "${pkgdir}/usr/lib/pkgconfig/mpv.pc"
}