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