Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Open Source multimedia player" |
| 2 | DESCRIPTION = "mpv is a fork of mplayer2 and MPlayer. It shares some features with the former projects while introducing many more." |
| 3 | SECTION = "multimedia" |
| 4 | HOMEPAGE = "http://www.mpv.io/" |
| 5 | |
| 6 | DEPENDS = "zlib ffmpeg jpeg libv4l" |
| 7 | |
| 8 | DEPENDS += " \ |
| 9 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' virtual/libx11 xsp libxv libxscrnsaver libxinerama', '', d)} \ |
| 10 | " |
| 11 | |
| 12 | LICENSE = "GPLv2+" |
| 13 | LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=91f1cb870c1cc2d31351a4d2595441cb" |
| 14 | |
| 15 | # While this item does not require it, it depends on ffmpeg which does |
| 16 | LICENSE_FLAGS = "commercial" |
| 17 | |
| 18 | SRCREV_mpv = "70b991749df389bcc0a4e145b5687233a03b4ed7" |
| 19 | SRC_URI = " \ |
| 20 | git://github.com/mpv-player/mpv;name=mpv \ |
| 21 | " |
| 22 | |
| 23 | S = "${WORKDIR}/git" |
| 24 | |
Andrew Geissler | 89770b0 | 2020-06-13 10:40:47 -0500 | [diff] [blame^] | 25 | inherit waf pkgconfig mime-xdg |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 26 | |
| 27 | LUA ?= "lua" |
| 28 | LUA_mips64 = "" |
| 29 | LUA_aarch64 = "" |
| 30 | LUA_powerpc64 = "" |
| 31 | LUA_powerpc64le = "" |
| 32 | LUA_riscv64 = "" |
| 33 | LUA_riscv32 = "" |
| 34 | LUA_powerpc = "" |
| 35 | |
| 36 | # Note: both lua and libass are required to get on-screen-display (controls) |
| 37 | PACKAGECONFIG ??= " \ |
| 38 | ${LUA} \ |
| 39 | libass \ |
| 40 | ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)} \ |
| 41 | ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} \ |
| 42 | ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)} \ |
| 43 | " |
| 44 | |
| 45 | PACKAGECONFIG_remove_aarch64 = "lua" |
| 46 | PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11" |
| 47 | PACKAGECONFIG[xv] = "--enable-xv,--disable-xv,libxv" |
| 48 | PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl" |
| 49 | PACKAGECONFIG[egl] = "--enable-egl,--disable-egl," |
| 50 | PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,libdrm" |
| 51 | PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgbm" |
| 52 | PACKAGECONFIG[lua] = "--enable-lua,--disable-lua,lua luajit" |
| 53 | PACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass" |
| 54 | PACKAGECONFIG[libarchive] = "--enable-libarchive,--disable-libarchive,libarchive" |
| 55 | PACKAGECONFIG[jack] = "--enable-jack, --disable-jack, jack" |
| 56 | PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" |
| 57 | PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" |
| 58 | PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland wayland-native libxkbcommon" |
| 59 | |
| 60 | python __anonymous() { |
| 61 | packageconfig = (d.getVar("PACKAGECONFIG") or "").split() |
| 62 | extras = [] |
| 63 | if "x11" in packageconfig and "opengl" in packageconfig: |
| 64 | extras.append(" --enable-gl-x11") |
| 65 | if "x11" in packageconfig and "egl" in packageconfig: |
| 66 | extras.append(" --enable-egl-x11") |
| 67 | if "egl" in packageconfig and "drm" in packageconfig: |
| 68 | extras.append(" --enable-egl-drm") |
| 69 | if "vaapi" in packageconfig and "x11" in packageconfig: |
| 70 | extras.append(" --enable-vaapi-x11") |
| 71 | if "vaapi" in packageconfig and "drm" in packageconfig: |
| 72 | extras.append(" --enable-vaapi-drm") |
| 73 | if "vaapi" in packageconfig and "x11" in packageconfig and "egl" in packageconfig: |
| 74 | extras.append(" --enable-vaapi-x-egl") |
| 75 | if "vdpau" in packageconfig and "opengl" in packageconfig and "x11" in packageconfig: |
| 76 | extras.append(" --enable-vdpau-gl-x11") |
| 77 | if "wayland" in packageconfig and "opengl" in packageconfig: |
| 78 | extras.append(" --enable-gl-wayland") |
| 79 | if "wayland" in packageconfig and "vaapi" in packageconfig: |
| 80 | extras.append(" --enable-vaapi-wayland") |
| 81 | if extras: |
| 82 | d.appendVar("EXTRA_OECONF", "".join(extras)) |
| 83 | } |
| 84 | |
| 85 | SIMPLE_TARGET_SYS = "${@'${TARGET_SYS}'.replace('${TARGET_VENDOR}', '')}" |
| 86 | |
| 87 | EXTRA_OECONF = " \ |
| 88 | --prefix=${prefix} \ |
| 89 | --target=${SIMPLE_TARGET_SYS} \ |
| 90 | --confdir=${sysconfdir} \ |
| 91 | --datadir=${datadir} \ |
| 92 | --disable-manpage-build \ |
| 93 | --disable-libsmbclient \ |
| 94 | --disable-libbluray \ |
| 95 | --disable-dvdnav \ |
| 96 | --disable-cdda \ |
| 97 | --disable-uchardet \ |
| 98 | --disable-rubberband \ |
| 99 | --disable-lcms2 \ |
| 100 | --disable-vapoursynth \ |
| 101 | ${PACKAGECONFIG_CONFARGS} \ |
| 102 | " |
| 103 | |
| 104 | do_patch[postfuncs] += "get_waf" |
| 105 | |
| 106 | get_waf() { |
| 107 | cd ${S} |
| 108 | ./bootstrap.py |
| 109 | sed -i -e 's|/usr/bin/env python|/usr/bin/env python3|g' ${S}/waf |
| 110 | cd - |
| 111 | } |
| 112 | |
| 113 | FILES_${PN} += " \ |
| 114 | ${datadir}/icons \ |
| 115 | ${datadir}/zsh \ |
| 116 | ${datadir}/bash-completion \ |
| 117 | " |