blob: b7eaf40802639faea12c23b91c81550cd32e5f0f [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
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007LICENSE = "GPL-2.0-only"
Brad Bishop26bdd442019-08-16 17:08:17 -04008LIC_FILES_CHKSUM = "file://COPYING;md5=00a27da7ac0f9bcd17320ec29ef4bbf6"
Patrick Williams8b8bc412016-08-17 15:02:23 -05009
Patrick Williamsde0582f2022-04-08 10:23:27 -050010DEPENDS = "alsa-lib libpcre virtual/egl boost freetype dbus openssl libssh virtual/libomxil coreutils-native curl-native userland"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080011
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050012PR = "r6"
Patrick Williams8b8bc412016-08-17 15:02:23 -050013
Andrew Geissler2edf0642023-09-11 08:24:07 -040014SRCREV_FORMAT = "_ffmpeg"
15
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050016SRCREV_default = "1f1d0ccd65d3a1caa86dc79d2863a8f067c8e3f8"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050017
18# omxplayer builds its own copy of ffmpeg from source instead of using the
19# system's ffmpeg library. This isn't ideal but it's ok for now. We do however
20# want to keep control of the exact version of ffmpeg used instead of just
21# fetching the latest commit on a release branch (which is what the checkout job
22# in Makefile.ffmpeg in the omxplayer source tree does).
23#
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080024# This SRCREV corresponds to the v4.0.3 release of ffmpeg.
25SRCREV_ffmpeg = "fcbd117df3077bad495e99e20f01cf93737bce76"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050026
Andrew Geissler595f6302022-01-24 19:11:47 +000027SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=https;branch=master \
28 git://github.com/FFmpeg/FFmpeg;branch=release/4.0;protocol=https;depth=1;name=ffmpeg;destsuffix=git/ffmpeg \
Patrick Williams8b8bc412016-08-17 15:02:23 -050029 file://0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch \
30 file://0003-Remove-strip-step-in-Makefile.patch \
31 file://0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch \
32 file://fix-tar-command-with-DIST.patch \
33 file://use-native-pkg-config.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050034 file://0005-Don-t-require-internet-connection-during-build.patch \
35 file://0006-Prevent-ffmpeg-configure-compile-race-condition.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080036 file://0001-Specify-cc-cxx-and-ld-variables-from-environment.patch \
37 file://cross-crompile-ffmpeg.patch \
Brad Bishopf3fd2882019-06-21 08:06:37 -040038 file://0007-Remove-Makefile-hardcoded-arch-tune.patch \
Patrick Williams8b8bc412016-08-17 15:02:23 -050039 "
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080040
Patrick Williams213cb262021-08-07 19:21:33 -050041SRC_URI:append = "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " file://0001-Fix-build-with-vc4-driver.patch ", "", d)}"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080042
Patrick Williams8b8bc412016-08-17 15:02:23 -050043S = "${WORKDIR}/git"
44
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080045COMPATIBLE_MACHINE = "^rpi$"
Patrick Williams213cb262021-08-07 19:21:33 -050046COMPATIBLE_HOST:aarch64 = "null"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080047
48def cpu(d):
49 for arg in (d.getVar('TUNE_CCARGS') or '').split():
50 if arg.startswith('-mcpu='):
51 return arg[6:]
52 return 'generic'
53
54export CPU = "${@cpu(d)}"
Patrick Williams8b8bc412016-08-17 15:02:23 -050055
56inherit autotools-brokensep pkgconfig
57
Brad Bishop316dfdd2018-06-25 12:45:53 -040058# This isn't used directly by omxplayer, but applied to Makefile.ffmpeg which
59# runs the ffmpeg configuration
60PACKAGECONFIG ??= ""
61PACKAGECONFIG[samba] = "--enable-libsmbclient,--disable-libsmbclient,samba"
62
Patrick Williams8b8bc412016-08-17 15:02:23 -050063# Needed in ffmpeg configure
64export TEMPDIR = "${S}/tmp"
65
66# Needed in Makefile.ffmpeg
67export HOST = "${HOST_SYS}"
68export WORK = "${S}"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050069export FFMPEG_EXTRA_CFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}"
70export FFMPEG_EXTRA_LDFLAGS = "${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}"
Patrick Williams8b8bc412016-08-17 15:02:23 -050071
72# Needed in top Makefile
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080073
Patrick Williams8b8bc412016-08-17 15:02:23 -050074export LDFLAGS = "-L${S}/ffmpeg_compiled/usr/lib \
75 -L${STAGING_DIR_HOST}/lib \
76 -L${STAGING_DIR_HOST}/usr/lib \
77 "
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080078export INCLUDES = "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " -D__GBM__", "", d)} \
79 -isystem${STAGING_DIR_HOST}/usr/include/interface/vcos/pthreads \
Patrick Williams8b8bc412016-08-17 15:02:23 -050080 -isystem${STAGING_DIR_HOST}/usr/include/freetype2 \
81 -isystem${STAGING_DIR_HOST}/usr/include/interface/vmcs_host/linux \
82 -isystem${STAGING_DIR_HOST}/usr/include/dbus-1.0 \
83 -isystem${STAGING_DIR_HOST}/usr/lib/dbus-1.0/include \
84 "
85export DIST = "${D}"
86
87do_compile() {
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050088 bbwarn "omxplayer is being deprecated and resources are directed at improving vlc."
89
Patrick Williams8b8bc412016-08-17 15:02:23 -050090 # Needed for compiler test in ffmpeg's configure
91 mkdir -p tmp
92
Brad Bishop316dfdd2018-06-25 12:45:53 -040093 sed -i 's/--enable-libsmbclient/${@bb.utils.contains("PACKAGECONFIG", "samba", "--enable-libsmbclient", "--disable-libsmbclient", d)}/g' Makefile.ffmpeg
94
Brad Bishopd7bf8c12018-02-25 22:55:05 -050095 oe_runmake -f Makefile.ffmpeg
96 oe_runmake -f Makefile.ffmpeg install
Patrick Williams8b8bc412016-08-17 15:02:23 -050097 oe_runmake
98}
99
100do_install() {
101 oe_runmake STRIP='echo skipping strip' dist
102 mkdir -p ${D}${datadir}/fonts/truetype/freefont/
103 install ${S}/fonts/* ${D}${datadir}/fonts/truetype/freefont/
104}
105
Patrick Williams213cb262021-08-07 19:21:33 -0500106FILES:${PN} = "${bindir}/omxplayer* \
Patrick Williams8b8bc412016-08-17 15:02:23 -0500107 ${libdir}/omxplayer/lib*${SOLIBS} \
108 ${datadir}/fonts"
109
Patrick Williams213cb262021-08-07 19:21:33 -0500110FILES:${PN}-dev += "${libdir}/omxplayer/*.so"
Patrick Williams8b8bc412016-08-17 15:02:23 -0500111
Patrick Williams213cb262021-08-07 19:21:33 -0500112RDEPENDS:${PN} += "bash procps userland"