blob: c2e8e3d57482d5f4eb774712c414cda0ca7dbd91 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001SUMMARY = "Open Source multimedia player"
2DESCRIPTION = "mpv is a fork of mplayer2 and MPlayer. It shares some features with the former projects while introducing many more."
3SECTION = "multimedia"
4HOMEPAGE = "http://www.mpv.io/"
5DEPENDS = "zlib ffmpeg jpeg virtual/libx11 xsp libxv \
6 libxscrnsaver libv4l libxinerama \
7"
8
9REQUIRED_DISTRO_FEATURES = "x11"
10
11LICENSE = "GPLv2+"
12LIC_FILES_CHKSUM = "file://LICENSE;md5=91f1cb870c1cc2d31351a4d2595441cb"
13
14# While this item does not require it, it depends on ffmpeg which does
15LICENSE_FLAGS = "commercial"
16
17SRC_URI = " \
18 https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz;name=mpv \
Brad Bishop316dfdd2018-06-25 12:45:53 -040019 http://www.freehackers.org/~tnagy/release/waf-1.8.12;name=waf;downloadfilename=waf;subdir=${BPN}-${PV} \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050020"
21SRC_URI[mpv.md5sum] = "038d0b660de07ff645ad6a741704ecab"
22SRC_URI[mpv.sha256sum] = "daf3ef358d5f260f2269f7caabce27f446c291457ec330077152127133b71b46"
23SRC_URI[waf.md5sum] = "cef4ee82206b1843db082d0b0506bf71"
24SRC_URI[waf.sha256sum] = "01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b"
25
26inherit waf pkgconfig pythonnative distro_features_check
27
28# Note: both lua and libass are required to get on-screen-display (controls)
29PACKAGECONFIG ??= " \
30 lua \
31 libass \
32 ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)} \
33"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080034
35PACKAGECONFIG_remove_aarch64 = "lua"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050036PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,libdrm"
37PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/mesa"
38PACKAGECONFIG[lua] = "--enable-lua,--disable-lua,lua luajit"
39PACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass"
40PACKAGECONFIG[libarchive] = "--enable-libarchive,--disable-libarchive,libarchive"
41PACKAGECONFIG[jack] = "--enable-jack, --disable-jack, jack"
42PACKAGECONFIG[vaapi] = "--enable-vaapi, --disable-vaapi,libva"
43PACKAGECONFIG[vdpau] = "--enable-vdpau, --disable-vdpau,libvdpau"
44PACKAGECONFIG[wayland] = "--enable-wayland, --disable-wayland,wayland libxkbcommon"
45
46SIMPLE_TARGET_SYS = "${@'${TARGET_SYS}'.replace('${TARGET_VENDOR}', '')}"
47
48EXTRA_OECONF = " \
49 --prefix=${prefix} \
50 --target=${SIMPLE_TARGET_SYS} \
51 --confdir=${sysconfdir} \
52 --datadir=${datadir} \
53 --disable-manpage-build \
54 --disable-gl \
55 --disable-libsmbclient \
56 --disable-encoding \
57 --disable-libbluray \
58 --disable-dvdread \
59 --disable-dvdnav \
60 --disable-cdda \
61 --disable-uchardet \
62 --disable-rubberband \
63 --disable-lcms2 \
64 --disable-vapoursynth \
65 --disable-vapoursynth-lazy \
66 ${PACKAGECONFIG_CONFARGS} \
67"
68
Brad Bishop316dfdd2018-06-25 12:45:53 -040069adjust_waf_perms() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050070 chmod +x ${S}/waf
71}
72
Brad Bishop316dfdd2018-06-25 12:45:53 -040073do_patch[postfuncs] += "adjust_waf_perms"
74
Brad Bishopd7bf8c12018-02-25 22:55:05 -050075FILES_${PN} += "${datadir}/icons"