blob: 1df41a5b1aa48601c4719567f4acb16702f22dad [file] [log] [blame]
Patrick Williams8b8bc412016-08-17 15:02:23 -05001SUMMARY = "A commandline OMX player for the Raspberry Pi"
2DESCRIPTION = "This player was developed as a testbed for the XBMC \
3Raspberry PI implementation and is quite handy to use standalone"
4HOMEPAGE = "https://github.com/popcornmix/omxplayer"
5SECTION = "console/utils"
6
7LICENSE = "GPLv2"
8LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
9
Brad Bishop316dfdd2018-06-25 12:45:53 -040010DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl libssh libomxil coreutils-native curl-native"
Patrick Williams8b8bc412016-08-17 15:02:23 -050011PR = "r4"
12
Brad Bishopd7bf8c12018-02-25 22:55:05 -050013SRCREV_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.
22SRCREV_ffmpeg = "afa34cb36edca0ff809b7e58474bbce12271ecba"
23
Patrick Williams8b8bc412016-08-17 15:02:23 -050024SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050025 git://source.ffmpeg.org/ffmpeg;branch=release/3.1;protocol=git;depth=1;name=ffmpeg;destsuffix=git/ffmpeg \
Patrick Williams8b8bc412016-08-17 15:02:23 -050026 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 Bishopd7bf8c12018-02-25 22:55:05 -050032 file://0005-Don-t-require-internet-connection-during-build.patch \
33 file://0006-Prevent-ffmpeg-configure-compile-race-condition.patch \
Patrick Williams8b8bc412016-08-17 15:02:23 -050034 "
35S = "${WORKDIR}/git"
36
Brad Bishop6e60e8b2018-02-01 10:27:11 -050037COMPATIBLE_MACHINE ?= "null"
38COMPATIBLE_MACHINE_rpi_aarch64 = "null"
39COMPATIBLE_MACHINE_rpi = "(.*)"
Patrick Williams8b8bc412016-08-17 15:02:23 -050040
41inherit autotools-brokensep pkgconfig
42
Brad Bishop316dfdd2018-06-25 12:45:53 -040043# This isn't used directly by omxplayer, but applied to Makefile.ffmpeg which
44# runs the ffmpeg configuration
45PACKAGECONFIG ??= ""
46PACKAGECONFIG[samba] = "--enable-libsmbclient,--disable-libsmbclient,samba"
47
Patrick Williams8b8bc412016-08-17 15:02:23 -050048# Needed in ffmpeg configure
49export TEMPDIR = "${S}/tmp"
50
51# Needed in Makefile.ffmpeg
52export HOST = "${HOST_SYS}"
53export WORK = "${S}"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050054export FFMPEG_EXTRA_CFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}"
55export FFMPEG_EXTRA_LDFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}"
Patrick Williams8b8bc412016-08-17 15:02:23 -050056
57# Needed in top Makefile
58export LDFLAGS = "-L${S}/ffmpeg_compiled/usr/lib \
59 -L${STAGING_DIR_HOST}/lib \
60 -L${STAGING_DIR_HOST}/usr/lib \
61 "
62export 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 "
68export DIST = "${D}"
69
70do_compile() {
71 # Needed for compiler test in ffmpeg's configure
72 mkdir -p tmp
73
Brad Bishop316dfdd2018-06-25 12:45:53 -040074 sed -i 's/--enable-libsmbclient/${@bb.utils.contains("PACKAGECONFIG", "samba", "--enable-libsmbclient", "--disable-libsmbclient", d)}/g' Makefile.ffmpeg
75
Brad Bishopd7bf8c12018-02-25 22:55:05 -050076 oe_runmake -f Makefile.ffmpeg
77 oe_runmake -f Makefile.ffmpeg install
Patrick Williams8b8bc412016-08-17 15:02:23 -050078 oe_runmake
79}
80
81do_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
87FILES_${PN} = "${bindir}/omxplayer* \
88 ${libdir}/omxplayer/lib*${SOLIBS} \
89 ${datadir}/fonts"
90
91FILES_${PN}-dev += "${libdir}/omxplayer/*.so"
92
93RDEPENDS_${PN} += "bash procps"