blob: 29bcfe49f5ee5a18f150219caa03367a85c32805 [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
Brad Bishop26bdd442019-08-16 17:08:17 -040017SRCREV_mpv = "4db82f04502cbcd20d9a975df9dfde91d8c389e3"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050018SRC_URI = " \
Brad Bishop26bdd442019-08-16 17:08:17 -040019 git://github.com/mpv-player/mpv;name=mpv \
20 http://www.freehackers.org/~tnagy/release/waf-1.8.12;name=waf;downloadfilename=waf;subdir=git \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050021"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050022SRC_URI[waf.md5sum] = "cef4ee82206b1843db082d0b0506bf71"
23SRC_URI[waf.sha256sum] = "01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b"
24
Brad Bishop26bdd442019-08-16 17:08:17 -040025S = "${WORKDIR}/git"
26
Brad Bishop8410d612019-11-25 09:40:59 -050027inherit waf pkgconfig pythonnative features_check
Brad Bishopd7bf8c12018-02-25 22:55:05 -050028
Andrew Geissler1548c072019-02-22 16:03:50 -060029LUA ?= "lua"
30LUA_mips64 = ""
31LUA_aarch64 = ""
Brad Bishope42b3e32020-01-15 22:08:42 -050032LUA_powerpc64 = ""
33
Brad Bishopd7bf8c12018-02-25 22:55:05 -050034# Note: both lua and libass are required to get on-screen-display (controls)
35PACKAGECONFIG ??= " \
Andrew Geissler1548c072019-02-22 16:03:50 -060036 ${LUA} \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050037 libass \
38 ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)} \
39"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080040
41PACKAGECONFIG_remove_aarch64 = "lua"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050042PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,libdrm"
43PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/mesa"
44PACKAGECONFIG[lua] = "--enable-lua,--disable-lua,lua luajit"
45PACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass"
46PACKAGECONFIG[libarchive] = "--enable-libarchive,--disable-libarchive,libarchive"
47PACKAGECONFIG[jack] = "--enable-jack, --disable-jack, jack"
48PACKAGECONFIG[vaapi] = "--enable-vaapi, --disable-vaapi,libva"
49PACKAGECONFIG[vdpau] = "--enable-vdpau, --disable-vdpau,libvdpau"
50PACKAGECONFIG[wayland] = "--enable-wayland, --disable-wayland,wayland libxkbcommon"
51
52SIMPLE_TARGET_SYS = "${@'${TARGET_SYS}'.replace('${TARGET_VENDOR}', '')}"
53
54EXTRA_OECONF = " \
55 --prefix=${prefix} \
56 --target=${SIMPLE_TARGET_SYS} \
57 --confdir=${sysconfdir} \
58 --datadir=${datadir} \
59 --disable-manpage-build \
60 --disable-gl \
61 --disable-libsmbclient \
62 --disable-encoding \
63 --disable-libbluray \
64 --disable-dvdread \
65 --disable-dvdnav \
66 --disable-cdda \
67 --disable-uchardet \
68 --disable-rubberband \
69 --disable-lcms2 \
70 --disable-vapoursynth \
71 --disable-vapoursynth-lazy \
72 ${PACKAGECONFIG_CONFARGS} \
73"
74
Brad Bishop316dfdd2018-06-25 12:45:53 -040075adjust_waf_perms() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050076 chmod +x ${S}/waf
77}
78
Brad Bishop316dfdd2018-06-25 12:45:53 -040079do_patch[postfuncs] += "adjust_waf_perms"
80
Brad Bishopd7bf8c12018-02-25 22:55:05 -050081FILES_${PN} += "${datadir}/icons"