blob: 1ba9f0f6c8612ecf734f664863b74fab37e9fdcb [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 Bishopd7bf8c12018-02-25 22:55:05 -050032# Note: both lua and libass are required to get on-screen-display (controls)
33PACKAGECONFIG ??= " \
Andrew Geissler1548c072019-02-22 16:03:50 -060034 ${LUA} \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050035 libass \
36 ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)} \
37"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038
39PACKAGECONFIG_remove_aarch64 = "lua"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050040PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,libdrm"
41PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/mesa"
42PACKAGECONFIG[lua] = "--enable-lua,--disable-lua,lua luajit"
43PACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass"
44PACKAGECONFIG[libarchive] = "--enable-libarchive,--disable-libarchive,libarchive"
45PACKAGECONFIG[jack] = "--enable-jack, --disable-jack, jack"
46PACKAGECONFIG[vaapi] = "--enable-vaapi, --disable-vaapi,libva"
47PACKAGECONFIG[vdpau] = "--enable-vdpau, --disable-vdpau,libvdpau"
48PACKAGECONFIG[wayland] = "--enable-wayland, --disable-wayland,wayland libxkbcommon"
49
50SIMPLE_TARGET_SYS = "${@'${TARGET_SYS}'.replace('${TARGET_VENDOR}', '')}"
51
52EXTRA_OECONF = " \
53 --prefix=${prefix} \
54 --target=${SIMPLE_TARGET_SYS} \
55 --confdir=${sysconfdir} \
56 --datadir=${datadir} \
57 --disable-manpage-build \
58 --disable-gl \
59 --disable-libsmbclient \
60 --disable-encoding \
61 --disable-libbluray \
62 --disable-dvdread \
63 --disable-dvdnav \
64 --disable-cdda \
65 --disable-uchardet \
66 --disable-rubberband \
67 --disable-lcms2 \
68 --disable-vapoursynth \
69 --disable-vapoursynth-lazy \
70 ${PACKAGECONFIG_CONFARGS} \
71"
72
Brad Bishop316dfdd2018-06-25 12:45:53 -040073adjust_waf_perms() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050074 chmod +x ${S}/waf
75}
76
Brad Bishop316dfdd2018-06-25 12:45:53 -040077do_patch[postfuncs] += "adjust_waf_perms"
78
Brad Bishopd7bf8c12018-02-25 22:55:05 -050079FILES_${PN} += "${datadir}/icons"