blob: 32aa4a5784324803252d71f044fae43faed88b32 [file] [log] [blame]
Patrick Williams8b8bc412016-08-17 15:02:23 -05001DESCRIPTION = "This repository contains the source code for the ARM side \
2libraries used on Raspberry Pi. These typically are installed in /opt/vc/lib \
3and includes source for the ARM side code to interface to: EGL, mmal, GLESv2,\
4vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG."
5LICENSE = "BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://LICENCE;md5=0448d6488ef8cc380632b1569ee6d196"
7
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08008PROVIDES += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "", "virtual/libgles2 virtual/egl", d)}"
Andrew Geissler062316f2020-05-15 14:19:14 -05009PROVIDES += "virtual/libomxil"
Patrick Williams8b8bc412016-08-17 15:02:23 -050010
Andrew Geissler1c349142019-02-19 19:49:56 -060011RPROVIDES_${PN} += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "", "libgles2 egl libegl libegl1 libglesv2-2", d)}"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050012COMPATIBLE_MACHINE = "^rpi$"
Patrick Williams8b8bc412016-08-17 15:02:23 -050013
14SRCBRANCH = "master"
15SRCFORK = "raspberrypi"
Andrew Geissler26e4bea2020-11-30 19:54:03 -060016SRCREV = "9f3f9054a692e53b60fca54221a402414e030335"
Brad Bishop316dfdd2018-06-25 12:45:53 -040017
18# Use the date of the above commit as the package version. Update this when
19# SRCREV is changed.
Andrew Geissler26e4bea2020-11-30 19:54:03 -060020PV = "20201027"
Patrick Williams8b8bc412016-08-17 15:02:23 -050021
22SRC_URI = "\
23 git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \
24 file://0001-Allow-applications-to-set-next-resource-handle.patch \
25 file://0002-wayland-Add-support-for-the-Wayland-winsys.patch \
26 file://0003-wayland-Add-Wayland-example.patch \
27 file://0004-wayland-egl-Add-bcm_host-to-dependencies.patch \
28 file://0005-interface-remove-faulty-assert-to-make-weston-happy-.patch \
29 file://0006-zero-out-wl-buffers-in-egl_surface_free.patch \
30 file://0007-initialize-front-back-wayland-buffers.patch \
31 file://0008-Remove-RPC_FLUSH.patch \
32 file://0009-fix-cmake-dependency-race.patch \
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060033 file://0010-Fix-for-framerate-with-nested-composition.patch \
34 file://0011-build-shared-library-for-vchostif.patch \
35 file://0012-implement-buffer-wrapping-interface-for-dispmanx.patch \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050036 file://0013-Implement-triple-buffering-for-wayland.patch \
37 file://0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch \
38 file://0015-EGL-glplatform.h-define-EGL_CAST.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040039 file://0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080040 file://0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch \
41 file://0018-Add-EGL_IMG_context_priority-related-defines.patch \
Brad Bishop26bdd442019-08-16 17:08:17 -040042 file://0019-libfdt-Undefine-__wordsize-if-already-defined.patch \
Andrew Geissler062316f2020-05-15 14:19:14 -050043 file://0020-openmaxil-add-pkg-config-file.patch \
44 file://0021-cmake-Disable-format-overflow-warning-as-error.patch \
Andrew Geissler26e4bea2020-11-30 19:54:03 -060045 file://0022-all-host_applications-remove-non-existent-projects.patch \
46 file://0023-hello_pi-optionally-build-wayland-specific-app.patch \
Patrick Williams8b8bc412016-08-17 15:02:23 -050047"
Andrew Geissler6454e372020-10-30 15:41:26 -050048
49SRC_URI_remove_toolchain-clang = "file://0021-cmake-Disable-format-overflow-warning-as-error.patch"
50
Patrick Williams8b8bc412016-08-17 15:02:23 -050051S = "${WORKDIR}/git"
52
53inherit cmake pkgconfig
54
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060055ASNEEDED = ""
56
Andrew Geissler26e4bea2020-11-30 19:54:03 -060057ALLAPPS = "${@bb.utils.contains('PACKAGECONFIG', 'allapps', '-DALL_APPS=true', '', d)}"
Patrick Williams8b8bc412016-08-17 15:02:23 -050058EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed' \
59 -DVMCS_INSTALL_PREFIX=${exec_prefix} \
Andrew Geissler26e4bea2020-11-30 19:54:03 -060060 ${ALLAPPS} \
Patrick Williams8b8bc412016-08-17 15:02:23 -050061"
62
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060063EXTRA_OECMAKE_append_aarch64 = " -DARM64=ON "
64
65
Patrick Williams8b8bc412016-08-17 15:02:23 -050066PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
67
68PACKAGECONFIG[wayland] = "-DBUILD_WAYLAND=TRUE -DWAYLAND_SCANNER_EXECUTABLE:FILEPATH=${STAGING_BINDIR_NATIVE}/wayland-scanner,,wayland-native wayland"
69
70CFLAGS_append = " -fPIC"
71
72do_install_append () {
73 for f in `find ${D}${includedir}/interface/vcos/ -name "*.h"`; do
74 sed -i 's/include "vcos_platform.h"/include "pthreads\/vcos_platform.h"/g' ${f}
75 sed -i 's/include "vcos_futex_mutex.h"/include "pthreads\/vcos_futex_mutex.h"/g' ${f}
76 sed -i 's/include "vcos_platform_types.h"/include "pthreads\/vcos_platform_types.h"/g' ${f}
77 done
Brad Bishop19323692019-04-05 15:28:33 -040078 rm -rf ${D}${prefix}${sysconfdir}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080079 if [ "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" = "1" ]; then
80 rm -rf ${D}${libdir}/libEGL*
81 rm -rf ${D}${libdir}/libGLES*
82 rm -rf ${D}${libdir}/libwayland-*
83 rm -rf ${D}${libdir}/pkgconfig/egl.pc ${D}${libdir}/pkgconfig/glesv2.pc \
84 ${D}${libdir}/pkgconfig/wayland-egl.pc
85 rm -rf ${D}${includedir}/EGL ${D}${includedir}/GLES* ${D}${includedir}/KHR
Andrew Geissler062316f2020-05-15 14:19:14 -050086 else
87 ln -sf brcmglesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc
88 ln -sf brcmegl.pc ${D}${libdir}/pkgconfig/egl.pc
89 ln -sf brcmvg.pc ${D}${libdir}/pkgconfig/vg.pc
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080090 fi
Patrick Williams8b8bc412016-08-17 15:02:23 -050091}
92
93# Shared libs from userland package build aren't versioned, so we need
94# to force the .so files into the runtime package (and keep them
95# out of -dev package).
96FILES_SOLIBSDEV = ""
97INSANE_SKIP_${PN} += "dev-so"
98
99FILES_${PN} += " \
100 ${libdir}/*.so \
101 ${libdir}/plugins"
102FILES_${PN}-dev += "${includedir} \
103 ${prefix}/src"
104FILES_${PN}-doc += "${datadir}/install"
105FILES_${PN}-dbg += "${libdir}/plugins/.debug"
106
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -0600107RDEPENDS_${PN} += "bash"
Andrew Geissler1c349142019-02-19 19:49:56 -0600108RDEPENDS_${PN} += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "libegl-mesa", "", d)}"