PKGBUILDs/community/mpv/PKGBUILD

85 lines
2.7 KiB
Bash
Raw Normal View History

2015-02-18 00:15:12 +00:00
# $Id$
2015-05-17 23:38:34 +00:00
# Maintainer: Christian Hesse <mail@eworm.de>
2016-02-27 15:12:31 +00:00
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
2015-02-18 00:15:12 +00:00
# Contributor: Eivind Uggedal <eivind@uggedal.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2016-02-27 19:18:29 +00:00
# - armv7/aarch64 needs to be built with fPIC
2017-12-16 00:19:29 +00:00
# - disable retarded rpi detection
2015-02-18 00:15:12 +00:00
pkgname=mpv
2015-09-05 00:01:29 +00:00
epoch=1
2017-09-13 12:35:30 +00:00
pkgver=0.27.0
2018-01-14 16:35:37 +00:00
pkgrel=6
2017-12-15 20:02:34 +00:00
_waf_version=1.9.8
2016-04-11 21:41:35 +00:00
pkgdesc='a free, open source, and cross-platform media player'
2017-12-15 20:02:34 +00:00
arch=('x86_64')
# We link against libraries that are licensed GPLv3 explicitly, libsmbclient
# being one of these. So our package is GPLv3 only as well.
license=('GPL3')
url='https://mpv.io/'
2015-02-18 00:15:12 +00:00
depends=(
2017-01-08 17:00:45 +00:00
'ffmpeg' 'lcms2' 'libcdio-paranoia' 'libgl' 'libxss'
2015-06-17 13:18:55 +00:00
'libxinerama' 'libxv' 'libxkbcommon' 'libva' 'wayland' 'libcaca'
2015-05-17 01:39:07 +00:00
'desktop-file-utils' 'hicolor-icon-theme' 'xdg-utils' 'lua52' 'libdvdnav'
2017-12-15 20:02:34 +00:00
'libxrandr' 'jack' 'rubberband' 'uchardet' 'libarchive' 'smbclient'
2015-02-18 00:15:12 +00:00
)
2017-07-11 12:54:47 +00:00
makedepends=('mesa' 'python-docutils' 'ladspa')
2015-02-18 00:15:12 +00:00
optdepends=('youtube-dl: for video-sharing websites playback')
2017-07-11 18:25:51 +00:00
options=('!emptydirs')
2016-04-03 20:41:52 +00:00
source=("$pkgname-$pkgver.tar.gz::https://github.com/mpv-player/$pkgname/archive/v$pkgver.tar.gz"
2017-07-18 23:58:31 +00:00
'0001-opengl-backend-support-multiple-backends.patch'
2017-11-11 03:45:30 +00:00
'0002-vaapi-Use-libva2-message-callbacks.patch'
'0003-demux_lavf-return-AVERROR_EOF-on-file-end.patch'
2017-12-15 20:02:34 +00:00
"https://waf.io/waf-${_waf_version}")
2017-09-13 12:35:30 +00:00
sha256sums=('341d8bf18b75c1f78d5b681480b5b7f5c8b87d97a0d4f53a5648ede9c219a49c'
2017-07-18 23:58:31 +00:00
'609e0530f1b0cdb910dcffb5f62bf55936540e24105ce1b2daf1bd6291a7d58a'
2017-11-11 03:45:30 +00:00
'3c3517f4f4c71e39e1e04ea440688fc8d7b3dc55e6bc0a9398d11a9b75bde07d'
'5de6c616428c87cf9b39d8ba24446d65d175050c083e1054194d93cf03d5816a'
2017-12-15 20:02:34 +00:00
'167dc42bab6d5bd823b798af195420319cb5c9b571e00db7d83df2a0fe1f4dbf')
2015-02-18 00:15:12 +00:00
prepare() {
2015-09-05 00:01:29 +00:00
cd ${pkgname}-${pkgver}
2015-05-19 12:34:45 +00:00
2017-07-18 23:58:31 +00:00
# --opengl-backend: support multiple backends (#4384) (FS#53962)
patch -Np1 < "${srcdir}"/0001-opengl-backend-support-multiple-backends.patch
2017-11-11 03:45:30 +00:00
# vaapi: Use libva2 message callbacks
patch -Np1 < "${srcdir}"/0002-vaapi-Use-libva2-message-callbacks.patch
# demux_lavf: return AVERROR_EOF on file end
patch -Np1 < "${srcdir}"/0003-demux_lavf-return-AVERROR_EOF-on-file-end.patch
2016-04-03 20:41:52 +00:00
install -m755 "${srcdir}"/waf-${_waf_version} waf
2015-02-18 00:15:12 +00:00
}
build() {
2015-09-05 00:01:29 +00:00
cd ${pkgname}-${pkgver}
2015-02-18 00:15:12 +00:00
2016-02-27 19:18:29 +00:00
[[ $CARCH == "armv7h" || $CARCH == "aarch64" ]] && CFLAGS+=" -fPIC" && CXXFLAGS+=" -fPIC"
2015-02-18 00:15:12 +00:00
./waf configure --prefix=/usr \
--confdir=/etc/mpv \
2015-09-28 11:44:09 +00:00
--enable-cdda \
2017-07-19 23:41:35 +00:00
--enable-dvb \
2017-05-06 18:58:51 +00:00
--enable-dvdnav \
2016-04-14 18:02:50 +00:00
--enable-encoding \
2017-12-15 20:02:34 +00:00
--enable-libsmbclient \
2017-07-18 23:58:31 +00:00
--enable-libarchive \
2016-04-14 18:02:50 +00:00
--enable-libmpv-shared \
--enable-zsh-comp \
2017-12-16 00:19:29 +00:00
--enable-egl-x11 \
--disable-rpi
2015-02-18 00:15:12 +00:00
./waf build
}
package() {
2015-09-05 00:01:29 +00:00
cd ${pkgname}-${pkgver}
2015-02-18 00:15:12 +00:00
./waf install --destdir="$pkgdir"
install -m644 DOCS/{encoding.rst,tech-overview.txt} \
"$pkgdir"/usr/share/doc/mpv
}