Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 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 | |
| 7 | LICENSE = "GPLv2" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=00a27da7ac0f9bcd17320ec29ef4bbf6" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 9 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 10 | DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl libssh libomxil coreutils-native curl-native userland" |
| 11 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 12 | PR = "r5" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 13 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 14 | SRCREV_default = "f543a0d0e707ab56415f17b0ca6d397394ee8b63" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 15 | |
| 16 | # omxplayer builds its own copy of ffmpeg from source instead of using the |
| 17 | # system's ffmpeg library. This isn't ideal but it's ok for now. We do however |
| 18 | # want to keep control of the exact version of ffmpeg used instead of just |
| 19 | # fetching the latest commit on a release branch (which is what the checkout job |
| 20 | # in Makefile.ffmpeg in the omxplayer source tree does). |
| 21 | # |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 22 | # This SRCREV corresponds to the v4.0.3 release of ffmpeg. |
| 23 | SRCREV_ffmpeg = "fcbd117df3077bad495e99e20f01cf93737bce76" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 24 | |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 25 | SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 26 | git://github.com/FFmpeg/FFmpeg;branch=release/4.0;protocol=git;depth=1;name=ffmpeg;destsuffix=git/ffmpeg \ |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 27 | file://0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch \ |
| 28 | file://0003-Remove-strip-step-in-Makefile.patch \ |
| 29 | file://0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch \ |
| 30 | file://fix-tar-command-with-DIST.patch \ |
| 31 | file://use-native-pkg-config.patch \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 32 | file://0005-Don-t-require-internet-connection-during-build.patch \ |
| 33 | file://0006-Prevent-ffmpeg-configure-compile-race-condition.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 34 | file://0001-Specify-cc-cxx-and-ld-variables-from-environment.patch \ |
| 35 | file://cross-crompile-ffmpeg.patch \ |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 36 | file://0007-Remove-Makefile-hardcoded-arch-tune.patch \ |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 37 | " |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 38 | |
| 39 | SRC_URI_append = "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " file://0001-Fix-build-with-vc4-driver.patch ", "", d)}" |
| 40 | |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 41 | S = "${WORKDIR}/git" |
| 42 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 43 | COMPATIBLE_MACHINE = "^rpi$" |
| 44 | |
| 45 | def cpu(d): |
| 46 | for arg in (d.getVar('TUNE_CCARGS') or '').split(): |
| 47 | if arg.startswith('-mcpu='): |
| 48 | return arg[6:] |
| 49 | return 'generic' |
| 50 | |
| 51 | export CPU = "${@cpu(d)}" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 52 | |
| 53 | inherit autotools-brokensep pkgconfig |
| 54 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 55 | # This isn't used directly by omxplayer, but applied to Makefile.ffmpeg which |
| 56 | # runs the ffmpeg configuration |
| 57 | PACKAGECONFIG ??= "" |
| 58 | PACKAGECONFIG[samba] = "--enable-libsmbclient,--disable-libsmbclient,samba" |
| 59 | |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 60 | # Needed in ffmpeg configure |
| 61 | export TEMPDIR = "${S}/tmp" |
| 62 | |
| 63 | # Needed in Makefile.ffmpeg |
| 64 | export HOST = "${HOST_SYS}" |
| 65 | export WORK = "${S}" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 66 | export FFMPEG_EXTRA_CFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}" |
| 67 | export FFMPEG_EXTRA_LDFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 68 | |
| 69 | # Needed in top Makefile |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 70 | |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 71 | export LDFLAGS = "-L${S}/ffmpeg_compiled/usr/lib \ |
| 72 | -L${STAGING_DIR_HOST}/lib \ |
| 73 | -L${STAGING_DIR_HOST}/usr/lib \ |
| 74 | " |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 75 | export INCLUDES = "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " -D__GBM__", "", d)} \ |
| 76 | -isystem${STAGING_DIR_HOST}/usr/include/interface/vcos/pthreads \ |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 77 | -isystem${STAGING_DIR_HOST}/usr/include/freetype2 \ |
| 78 | -isystem${STAGING_DIR_HOST}/usr/include/interface/vmcs_host/linux \ |
| 79 | -isystem${STAGING_DIR_HOST}/usr/include/dbus-1.0 \ |
| 80 | -isystem${STAGING_DIR_HOST}/usr/lib/dbus-1.0/include \ |
| 81 | " |
| 82 | export DIST = "${D}" |
| 83 | |
| 84 | do_compile() { |
| 85 | # Needed for compiler test in ffmpeg's configure |
| 86 | mkdir -p tmp |
| 87 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 88 | sed -i 's/--enable-libsmbclient/${@bb.utils.contains("PACKAGECONFIG", "samba", "--enable-libsmbclient", "--disable-libsmbclient", d)}/g' Makefile.ffmpeg |
| 89 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 90 | oe_runmake -f Makefile.ffmpeg |
| 91 | oe_runmake -f Makefile.ffmpeg install |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 92 | oe_runmake |
| 93 | } |
| 94 | |
| 95 | do_install() { |
| 96 | oe_runmake STRIP='echo skipping strip' dist |
| 97 | mkdir -p ${D}${datadir}/fonts/truetype/freefont/ |
| 98 | install ${S}/fonts/* ${D}${datadir}/fonts/truetype/freefont/ |
| 99 | } |
| 100 | |
| 101 | FILES_${PN} = "${bindir}/omxplayer* \ |
| 102 | ${libdir}/omxplayer/lib*${SOLIBS} \ |
| 103 | ${datadir}/fonts" |
| 104 | |
| 105 | FILES_${PN}-dev += "${libdir}/omxplayer/*.so" |
| 106 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 107 | RDEPENDS_${PN} += "bash procps userland" |