1SUMMARY = "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/" 5 6DEPENDS = " \ 7 zlib \ 8 ffmpeg \ 9 jpeg \ 10 libv4l \ 11 libass \ 12" 13 14LICENSE = "GPL-2.0-or-later" 15LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263" 16 17SRCREV_mpv = "140ec21c89d671d392877a7f3b91d67e7d7b9239" 18SRC_URI = "git://github.com/mpv-player/mpv;name=mpv;branch=release/0.35;protocol=https \ 19 https://waf.io/waf-2.0.25;name=waf;subdir=git \ 20 " 21SRC_URI[waf.sha256sum] = "21199cd220ccf60434133e1fd2ab8c8e5217c3799199c82722543970dc8e38d5" 22 23S = "${WORKDIR}/git" 24 25inherit waf pkgconfig mime-xdg 26 27LDFLAGS:append:riscv64 = " -latomic" 28 29LUA ?= "lua" 30LUA:mips64 = "" 31LUA:powerpc64 = "" 32LUA:powerpc64le = "" 33LUA:riscv64 = "" 34LUA:riscv32 = "" 35LUA:powerpc = "" 36 37# Note: lua is required to get on-screen-display (controls) 38PACKAGECONFIG ??= " \ 39 ${LUA} \ 40 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \ 41 ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} \ 42 ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)} \ 43" 44 45PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 xsp libxv libxscrnsaver libxinerama libxpresent libxext" 46PACKAGECONFIG[xv] = "--enable-xv,--disable-xv,libxv" 47PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl" 48PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl" 49PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,libdrm" 50PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgbm" 51PACKAGECONFIG[lua] = "--enable-lua,--disable-lua,lua luajit" 52PACKAGECONFIG[libarchive] = "--enable-libarchive,--disable-libarchive,libarchive" 53PACKAGECONFIG[jack] = "--enable-jack, --disable-jack, jack" 54PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" 55PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" 56PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland wayland-native libxkbcommon" 57 58python __anonymous() { 59 packageconfig = (d.getVar("PACKAGECONFIG") or "").split() 60 extras = [] 61 if "x11" in packageconfig and "opengl" in packageconfig: 62 extras.append(" --enable-gl-x11") 63 if "x11" in packageconfig and "egl" in packageconfig: 64 extras.append(" --enable-egl-x11") 65 if "egl" in packageconfig and "drm" in packageconfig: 66 extras.append(" --enable-egl-drm") 67 if "vaapi" in packageconfig and "x11" in packageconfig: 68 extras.append(" --enable-vaapi-x11") 69 if "vaapi" in packageconfig and "drm" in packageconfig: 70 extras.append(" --enable-vaapi-drm") 71 if "vaapi" in packageconfig and "x11" in packageconfig and "egl" in packageconfig: 72 extras.append(" --enable-vaapi-x-egl") 73 if "vdpau" in packageconfig and "opengl" in packageconfig and "x11" in packageconfig: 74 extras.append(" --enable-vdpau-gl-x11") 75 if "wayland" in packageconfig and "opengl" in packageconfig: 76 extras.append(" --enable-gl-wayland") 77 if "wayland" in packageconfig and "vaapi" in packageconfig: 78 extras.append(" --enable-vaapi-wayland") 79 if extras: 80 d.appendVar("EXTRA_OECONF", "".join(extras)) 81} 82 83SIMPLE_TARGET_SYS = "${@'${TARGET_SYS}'.replace('${TARGET_VENDOR}', '')}" 84 85EXTRA_OECONF = " \ 86 --prefix=${prefix} \ 87 --target=${SIMPLE_TARGET_SYS} \ 88 --confdir=${sysconfdir} \ 89 --datadir=${datadir} \ 90 --disable-manpage-build \ 91 --disable-libbluray \ 92 --disable-dvdnav \ 93 --disable-cdda \ 94 --disable-uchardet \ 95 --disable-rubberband \ 96 --disable-lcms2 \ 97 --disable-vapoursynth \ 98 ${PACKAGECONFIG_CONFARGS} \ 99" 100 101do_configure:append() { 102 sed -i -e 's#${WORKDIR}#<WORKDIR>#g' ${B}/config.h 103} 104 105link_waf() { 106 ln -s waf-2.0.25 ${S}/waf 107} 108do_unpack[postfuncs] += "link_waf" 109 110FILES:${PN} += " \ 111 ${datadir}/icons \ 112 ${datadir}/zsh \ 113 ${datadir}/bash-completion \ 114 ${datadir}/metainfo \ 115 " 116EXCLUDE_FROM_WORLD = "${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "0", "1", d)}" 117