blob: c327c45e6696490daa684cd8b8471ee88ee1f968 [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 = ""
Brad Bishop0e2770c2020-01-21 07:31:46 -050033LUA_powerpc = ""
Brad Bishope42b3e32020-01-15 22:08:42 -050034
Brad Bishopd7bf8c12018-02-25 22:55:05 -050035# Note: both lua and libass are required to get on-screen-display (controls)
36PACKAGECONFIG ??= " \
Andrew Geissler1548c072019-02-22 16:03:50 -060037 ${LUA} \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038 libass \
39 ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)} \
40"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080041
42PACKAGECONFIG_remove_aarch64 = "lua"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050043PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,libdrm"
44PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/mesa"
45PACKAGECONFIG[lua] = "--enable-lua,--disable-lua,lua luajit"
46PACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass"
47PACKAGECONFIG[libarchive] = "--enable-libarchive,--disable-libarchive,libarchive"
48PACKAGECONFIG[jack] = "--enable-jack, --disable-jack, jack"
49PACKAGECONFIG[vaapi] = "--enable-vaapi, --disable-vaapi,libva"
50PACKAGECONFIG[vdpau] = "--enable-vdpau, --disable-vdpau,libvdpau"
51PACKAGECONFIG[wayland] = "--enable-wayland, --disable-wayland,wayland libxkbcommon"
52
53SIMPLE_TARGET_SYS = "${@'${TARGET_SYS}'.replace('${TARGET_VENDOR}', '')}"
54
55EXTRA_OECONF = " \
56 --prefix=${prefix} \
57 --target=${SIMPLE_TARGET_SYS} \
58 --confdir=${sysconfdir} \
59 --datadir=${datadir} \
60 --disable-manpage-build \
61 --disable-gl \
62 --disable-libsmbclient \
63 --disable-encoding \
64 --disable-libbluray \
65 --disable-dvdread \
66 --disable-dvdnav \
67 --disable-cdda \
68 --disable-uchardet \
69 --disable-rubberband \
70 --disable-lcms2 \
71 --disable-vapoursynth \
72 --disable-vapoursynth-lazy \
73 ${PACKAGECONFIG_CONFARGS} \
74"
75
Brad Bishop316dfdd2018-06-25 12:45:53 -040076adjust_waf_perms() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050077 chmod +x ${S}/waf
78}
79
Brad Bishop316dfdd2018-06-25 12:45:53 -040080do_patch[postfuncs] += "adjust_waf_perms"
81
Brad Bishopd7bf8c12018-02-25 22:55:05 -050082FILES_${PN} += "${datadir}/icons"