blob: 6586e352eacf3311217dca8966a9363515051d76 [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
Andrew Geissler1548c072019-02-22 16:03:50 -060028LUA ?= "lua"
29LUA_mips64 = ""
30LUA_aarch64 = ""
Brad Bishopd7bf8c12018-02-25 22:55:05 -050031# Note: both lua and libass are required to get on-screen-display (controls)
32PACKAGECONFIG ??= " \
Andrew Geissler1548c072019-02-22 16:03:50 -060033 ${LUA} \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050034 libass \
35 ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)} \
36"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080037
38PACKAGECONFIG_remove_aarch64 = "lua"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050039PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,libdrm"
40PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/mesa"
41PACKAGECONFIG[lua] = "--enable-lua,--disable-lua,lua luajit"
42PACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass"
43PACKAGECONFIG[libarchive] = "--enable-libarchive,--disable-libarchive,libarchive"
44PACKAGECONFIG[jack] = "--enable-jack, --disable-jack, jack"
45PACKAGECONFIG[vaapi] = "--enable-vaapi, --disable-vaapi,libva"
46PACKAGECONFIG[vdpau] = "--enable-vdpau, --disable-vdpau,libvdpau"
47PACKAGECONFIG[wayland] = "--enable-wayland, --disable-wayland,wayland libxkbcommon"
48
49SIMPLE_TARGET_SYS = "${@'${TARGET_SYS}'.replace('${TARGET_VENDOR}', '')}"
50
51EXTRA_OECONF = " \
52 --prefix=${prefix} \
53 --target=${SIMPLE_TARGET_SYS} \
54 --confdir=${sysconfdir} \
55 --datadir=${datadir} \
56 --disable-manpage-build \
57 --disable-gl \
58 --disable-libsmbclient \
59 --disable-encoding \
60 --disable-libbluray \
61 --disable-dvdread \
62 --disable-dvdnav \
63 --disable-cdda \
64 --disable-uchardet \
65 --disable-rubberband \
66 --disable-lcms2 \
67 --disable-vapoursynth \
68 --disable-vapoursynth-lazy \
69 ${PACKAGECONFIG_CONFARGS} \
70"
71
Brad Bishop316dfdd2018-06-25 12:45:53 -040072adjust_waf_perms() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050073 chmod +x ${S}/waf
74}
75
Brad Bishop316dfdd2018-06-25 12:45:53 -040076do_patch[postfuncs] += "adjust_waf_perms"
77
Brad Bishopd7bf8c12018-02-25 22:55:05 -050078FILES_${PN} += "${datadir}/icons"