PKGBUILDs/community/mpv/PKGBUILD
2017-07-18 23:58:31 +00:00

69 lines
2 KiB
Bash

# $Id$
# Maintainer: Christian Hesse <mail@eworm.de>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Eivind Uggedal <eivind@uggedal.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - armv7/aarch64 needs to be built with fPIC
pkgname=mpv
epoch=1
pkgver=0.26.0
pkgrel=1
_waf_version=1.8.12
pkgdesc='a free, open source, and cross-platform media player'
arch=('i686' 'x86_64')
license=('GPL')
url='http://mpv.io'
depends=(
'ffmpeg' 'lcms2' 'libcdio-paranoia' 'libgl' 'libxss'
'libxinerama' 'libxv' 'libxkbcommon' 'libva' 'wayland' 'libcaca'
'desktop-file-utils' 'hicolor-icon-theme' 'xdg-utils' 'lua52' 'libdvdnav'
'libxrandr' 'jack' 'smbclient' 'rubberband' 'uchardet'
)
makedepends=('mesa' 'python-docutils' 'ladspa')
optdepends=('youtube-dl: for video-sharing websites playback')
options=('!emptydirs')
source=("$pkgname-$pkgver.tar.gz::https://github.com/mpv-player/$pkgname/archive/v$pkgver.tar.gz"
'0001-opengl-backend-support-multiple-backends.patch'
"http://www.freehackers.org/~tnagy/release/waf-${_waf_version}")
sha256sums=('daf3ef358d5f260f2269f7caabce27f446c291457ec330077152127133b71b46'
'609e0530f1b0cdb910dcffb5f62bf55936540e24105ce1b2daf1bd6291a7d58a'
'01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b')
prepare() {
cd ${pkgname}-${pkgver}
# --opengl-backend: support multiple backends (#4384) (FS#53962)
patch -Np1 < "${srcdir}"/0001-opengl-backend-support-multiple-backends.patch
install -m755 "${srcdir}"/waf-${_waf_version} waf
}
build() {
cd ${pkgname}-${pkgver}
[[ $CARCH == "armv7h" || $CARCH == "aarch64" ]] && CFLAGS+=" -fPIC" && CXXFLAGS+=" -fPIC"
./waf configure --prefix=/usr \
--confdir=/etc/mpv \
--enable-cdda \
--enable-cplugins \
--enable-dvdnav \
--enable-encoding \
--enable-libarchive \
--enable-libmpv-shared \
--enable-zsh-comp \
--enable-egl-x11
./waf build
}
package() {
cd ${pkgname}-${pkgver}
./waf install --destdir="$pkgdir"
install -m644 DOCS/{encoding.rst,tech-overview.txt} \
"$pkgdir"/usr/share/doc/mpv
}