aboutsummaryrefslogblamecommitdiffstats
path: root/community/mpv/APKBUILD
blob: 80b17432715c2cf4e8b465e0f881fe62551a8731 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                              
                                                   
                                                    
                                                            

                                                   
             
        
                                                
                     
          
                          

                    
                      



                    
                


                  
                            
                     











                         
                  

                

                    





                         


                         
                      
                    
         


                     
                    
                                                

                                              
                                       
                                                                                      
 



                     
           
                       
                            


         
                                               
                                             
                                         
                                    
                               
                               
                                
                                        
                                  
                              
                               
                                 
                                   

                               
                         

 
         


                                                  
           
                                               
 
                                                 
                                                                    
                                                 
 
                                                          
                                                     
                                               
                                                     

 







                                                                               
           

                                                  
 
                                          

 
                                                                                                                                                                
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Jakub Skrzypnik <j.skrzypnik@openmailbox.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mpv
pkgver=0.33.0
pkgrel=1
pkgdesc="Video player based on MPlayer/mplayer2"
url="https://mpv.io/"
arch="all"
license="GPL-2.0-or-later"
makedepends="
	alsa-lib-dev
	pulseaudio-dev
	cmocka-dev
	faac-dev
	ffmpeg-dev
	freetype-dev
	jack-dev
	lame-dev
	libao-dev
	libass-dev
	libcdio-paranoia-dev
	libdvdnav-dev
	libmad-dev
	libtheora-dev
	libva-dev>=2.4.1
	libvdpau-dev
	libxext-dev
	libxinerama-dev
	libxkbcommon-dev
	libxrandr-dev
	libxscrnsaver-dev
	libxv-dev
	libxvmc-dev
	libxxf86dga-dev
	lua5.2-dev
	mesa-dev
	perl
	py3-docutils
	python3
	ttf-dejavu
	wayland-dev
	wayland-protocols
	x264-dev
	xvidcore-dev
	zlib-dev
	vulkan-headers
	vulkan-loader-dev
	shaderc-dev
	libplacebo-dev
	uchardet-dev
	"
subpackages="
	$pkgname-doc
	$pkgname-libs
	$pkgname-dev
	$pkgname-bash-completion:bashcomp:noarch
	$pkgname-zsh-completion:zshcomp:noarch
	"
options="net" # downloads a waf tarball
source="mpv-$pkgver.tar.gz::https://github.com/mpv-player/mpv/archive/v$pkgver.tar.gz"

# secfixes:
#   0.27.0-r3:
#     - CVE-2018-6360

prepare() {
	default_prepare
	python3 bootstrap.py
}

build() {
	RST2HTML=rst2html-3 RST2MAN=rst2man-3 \
	python3 waf configure --prefix=/usr \
		--mandir=/usr/share/man \
		--confdir=/etc/mpv \
		--enable-alsa \
		--enable-jack \
		--enable-pulse \
		--enable-libmpv-shared \
		--enable-wayland \
		--enable-lua \
		--enable-test \
		--enable-vulkan \
		--enable-uchardet \
		--enable-cdda \
		--enable-dvdnav
	python3 waf build
}

check() {
	find build/test/ -perm -111 -exec '{}' ';'
}

package() {
	python3 waf install --destdir="$pkgdir"

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
	install -m644 "$builddir"/DOCS/*.rst "$builddir"/DOCS/*.md \
		"$pkgdir"/usr/share/doc/$pkgname/

	# Move example configuration files to subdirectory
	mkdir -p "$pkgdir"/usr/share/doc/mpv/examples
	mv "$pkgdir"/usr/share/doc/mpv/*.conf \
		"$pkgdir"/usr/share/doc/mpv/examples/
}

# NOTE(maxice8): Remove these 2 functions once the default functions as defined
# in https://gitlab.alpinelinux.org/alpine/abuild/merge_requests/16 are merged
bashcomp() {
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
	amove usr/share/bash-completion
}

zshcomp() {
	pkgdesc="Zsh completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel zsh"

	amove usr/share/zsh/site-functions
}

sha512sums="5a4af74ba2c9656c6b61adcf944c734923c7b4527a49cd79ec63a0617911629438a138d887dfbd4b6c0c9c53e2c68c18839d98d9765179e52cc5675d0682e077  mpv-0.33.0.tar.gz"