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" |
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" |
| 9 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 10 | DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl libssh libomxil coreutils-native curl-native" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 11 | PR = "r4" |
| 12 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 13 | SRCREV_default = "b8ff59dccd9307f10dad71bec2525a95bd6c603b" |
| 14 | |
| 15 | # omxplayer builds its own copy of ffmpeg from source instead of using the |
| 16 | # system's ffmpeg library. This isn't ideal but it's ok for now. We do however |
| 17 | # want to keep control of the exact version of ffmpeg used instead of just |
| 18 | # fetching the latest commit on a release branch (which is what the checkout job |
| 19 | # in Makefile.ffmpeg in the omxplayer source tree does). |
| 20 | # |
| 21 | # This SRCREV corresponds to the v3.1.10 release of ffmpeg. |
| 22 | SRCREV_ffmpeg = "afa34cb36edca0ff809b7e58474bbce12271ecba" |
| 23 | |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 24 | SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 25 | git://source.ffmpeg.org/ffmpeg;branch=release/3.1;protocol=git;depth=1;name=ffmpeg;destsuffix=git/ffmpeg \ |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 26 | file://0001-Remove-Makefile.include-which-includes-hardcoded.patch \ |
| 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 \ |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 34 | " |
| 35 | S = "${WORKDIR}/git" |
| 36 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 37 | COMPATIBLE_MACHINE ?= "null" |
| 38 | COMPATIBLE_MACHINE_rpi_aarch64 = "null" |
| 39 | COMPATIBLE_MACHINE_rpi = "(.*)" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 40 | |
| 41 | inherit autotools-brokensep pkgconfig |
| 42 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 43 | # This isn't used directly by omxplayer, but applied to Makefile.ffmpeg which |
| 44 | # runs the ffmpeg configuration |
| 45 | PACKAGECONFIG ??= "" |
| 46 | PACKAGECONFIG[samba] = "--enable-libsmbclient,--disable-libsmbclient,samba" |
| 47 | |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 48 | # Needed in ffmpeg configure |
| 49 | export TEMPDIR = "${S}/tmp" |
| 50 | |
| 51 | # Needed in Makefile.ffmpeg |
| 52 | export HOST = "${HOST_SYS}" |
| 53 | export WORK = "${S}" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 54 | export FFMPEG_EXTRA_CFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}" |
| 55 | export FFMPEG_EXTRA_LDFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 56 | |
| 57 | # Needed in top Makefile |
| 58 | export LDFLAGS = "-L${S}/ffmpeg_compiled/usr/lib \ |
| 59 | -L${STAGING_DIR_HOST}/lib \ |
| 60 | -L${STAGING_DIR_HOST}/usr/lib \ |
| 61 | " |
| 62 | export INCLUDES = "-isystem${STAGING_DIR_HOST}/usr/include/interface/vcos/pthreads \ |
| 63 | -isystem${STAGING_DIR_HOST}/usr/include/freetype2 \ |
| 64 | -isystem${STAGING_DIR_HOST}/usr/include/interface/vmcs_host/linux \ |
| 65 | -isystem${STAGING_DIR_HOST}/usr/include/dbus-1.0 \ |
| 66 | -isystem${STAGING_DIR_HOST}/usr/lib/dbus-1.0/include \ |
| 67 | " |
| 68 | export DIST = "${D}" |
| 69 | |
| 70 | do_compile() { |
| 71 | # Needed for compiler test in ffmpeg's configure |
| 72 | mkdir -p tmp |
| 73 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 74 | sed -i 's/--enable-libsmbclient/${@bb.utils.contains("PACKAGECONFIG", "samba", "--enable-libsmbclient", "--disable-libsmbclient", d)}/g' Makefile.ffmpeg |
| 75 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 76 | oe_runmake -f Makefile.ffmpeg |
| 77 | oe_runmake -f Makefile.ffmpeg install |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 78 | oe_runmake |
| 79 | } |
| 80 | |
| 81 | do_install() { |
| 82 | oe_runmake STRIP='echo skipping strip' dist |
| 83 | mkdir -p ${D}${datadir}/fonts/truetype/freefont/ |
| 84 | install ${S}/fonts/* ${D}${datadir}/fonts/truetype/freefont/ |
| 85 | } |
| 86 | |
| 87 | FILES_${PN} = "${bindir}/omxplayer* \ |
| 88 | ${libdir}/omxplayer/lib*${SOLIBS} \ |
| 89 | ${datadir}/fonts" |
| 90 | |
| 91 | FILES_${PN}-dev += "${libdir}/omxplayer/*.so" |
| 92 | |
| 93 | RDEPENDS_${PN} += "bash procps" |