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