omxplayer_git.bb 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. SUMMARY = "A commandline OMX player for the Raspberry Pi"
  2. DESCRIPTION = "This player was developed as a testbed for the XBMC \
  3. Raspberry PI implementation and is quite handy to use standalone"
  4. HOMEPAGE = "https://github.com/popcornmix/omxplayer"
  5. SECTION = "console/utils"
  6. LICENSE = "GPL-2.0-only"
  7. LIC_FILES_CHKSUM = "file://COPYING;md5=00a27da7ac0f9bcd17320ec29ef4bbf6"
  8. DEPENDS = "alsa-lib libpcre virtual/egl boost freetype dbus openssl libssh virtual/libomxil coreutils-native curl-native userland"
  9. PR = "r6"
  10. SRCREV_FORMAT = "_ffmpeg"
  11. SRCREV_default = "1f1d0ccd65d3a1caa86dc79d2863a8f067c8e3f8"
  12. # omxplayer builds its own copy of ffmpeg from source instead of using the
  13. # system's ffmpeg library. This isn't ideal but it's ok for now. We do however
  14. # want to keep control of the exact version of ffmpeg used instead of just
  15. # fetching the latest commit on a release branch (which is what the checkout job
  16. # in Makefile.ffmpeg in the omxplayer source tree does).
  17. #
  18. # This SRCREV corresponds to the v4.0.3 release of ffmpeg.
  19. SRCREV_ffmpeg = "fcbd117df3077bad495e99e20f01cf93737bce76"
  20. SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=https;branch=master \
  21. git://github.com/FFmpeg/FFmpeg;branch=release/4.0;protocol=https;depth=1;name=ffmpeg;destsuffix=git/ffmpeg \
  22. file://0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch \
  23. file://0003-Remove-strip-step-in-Makefile.patch \
  24. file://0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch \
  25. file://fix-tar-command-with-DIST.patch \
  26. file://use-native-pkg-config.patch \
  27. file://0005-Don-t-require-internet-connection-during-build.patch \
  28. file://0006-Prevent-ffmpeg-configure-compile-race-condition.patch \
  29. file://0001-Specify-cc-cxx-and-ld-variables-from-environment.patch \
  30. file://cross-crompile-ffmpeg.patch \
  31. file://0007-Remove-Makefile-hardcoded-arch-tune.patch \
  32. "
  33. SRC_URI:append = "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " file://0001-Fix-build-with-vc4-driver.patch ", "", d)}"
  34. S = "${WORKDIR}/git"
  35. COMPATIBLE_MACHINE = "^rpi$"
  36. COMPATIBLE_HOST:aarch64 = "null"
  37. def cpu(d):
  38. for arg in (d.getVar('TUNE_CCARGS') or '').split():
  39. if arg.startswith('-mcpu='):
  40. return arg[6:]
  41. return 'generic'
  42. export CPU = "${@cpu(d)}"
  43. inherit autotools-brokensep pkgconfig
  44. # This isn't used directly by omxplayer, but applied to Makefile.ffmpeg which
  45. # runs the ffmpeg configuration
  46. PACKAGECONFIG ??= ""
  47. PACKAGECONFIG[samba] = "--enable-libsmbclient,--disable-libsmbclient,samba"
  48. # Needed in ffmpeg configure
  49. export TEMPDIR = "${S}/tmp"
  50. # Needed in Makefile.ffmpeg
  51. export HOST = "${HOST_SYS}"
  52. export WORK = "${S}"
  53. export FFMPEG_EXTRA_CFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}"
  54. export FFMPEG_EXTRA_LDFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}"
  55. # Needed in top Makefile
  56. export LDFLAGS = "-L${S}/ffmpeg_compiled/usr/lib \
  57. -L${STAGING_DIR_HOST}/lib \
  58. -L${STAGING_DIR_HOST}/usr/lib \
  59. "
  60. export INCLUDES = "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " -D__GBM__", "", d)} \
  61. -isystem${STAGING_DIR_HOST}/usr/include/interface/vcos/pthreads \
  62. -isystem${STAGING_DIR_HOST}/usr/include/freetype2 \
  63. -isystem${STAGING_DIR_HOST}/usr/include/interface/vmcs_host/linux \
  64. -isystem${STAGING_DIR_HOST}/usr/include/dbus-1.0 \
  65. -isystem${STAGING_DIR_HOST}/usr/lib/dbus-1.0/include \
  66. "
  67. export DIST = "${D}"
  68. do_compile() {
  69. bbwarn "omxplayer is being deprecated and resources are directed at improving vlc."
  70. # Needed for compiler test in ffmpeg's configure
  71. mkdir -p tmp
  72. sed -i 's/--enable-libsmbclient/${@bb.utils.contains("PACKAGECONFIG", "samba", "--enable-libsmbclient", "--disable-libsmbclient", d)}/g' Makefile.ffmpeg
  73. oe_runmake -f Makefile.ffmpeg
  74. oe_runmake -f Makefile.ffmpeg install
  75. oe_runmake
  76. }
  77. do_install() {
  78. oe_runmake STRIP='echo skipping strip' dist
  79. mkdir -p ${D}${datadir}/fonts/truetype/freefont/
  80. install ${S}/fonts/* ${D}${datadir}/fonts/truetype/freefont/
  81. }
  82. FILES:${PN} = "${bindir}/omxplayer* \
  83. ${libdir}/omxplayer/lib*${SOLIBS} \
  84. ${datadir}/fonts"
  85. FILES:${PN}-dev += "${libdir}/omxplayer/*.so"
  86. RDEPENDS:${PN} += "bash procps userland"