meta-raspberrypi/recipes-graphics/userland/userland_git.bb
Khem Raj 58806f6552 userland: Adjust include location for pthreads-headers
vcos headers include headers like "vcos_platform.h" "vcos_futex_mutex.h"
"vcos_platform_types.h" and these headers are different based on
platform/OSes. e.g. OS targets that support pthreads these headers
should come from pthreads/ folder but not for others. So one would add
right -I option for every package that accesses them directly or
indirectly. so if a software does #include <EGL/egl.h> then it will
break

| In file included from
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspberrypi2/usr/include/interface/vcos/vcos_assert.h:149:0,
|                  from
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspberrypi2/usr/include/interface/vcos/vcos.h:114,
|                  from
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspberrypi2/usr/include/interface/vmcs_host/vc_dispmanx.h:33,
|                  from
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspberrypi2/usr/include/EGL/eglplatform.h:110,
|                  from
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspberrypi2/usr/include/EGL/egl.h:36,
|                  from
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/weston/1.8.0-r0/weston-1.8.0/clients/../shared/platform.h:29,
|                  from
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/weston/1.8.0-r0/weston-1.8.0/clients/window.h:33,
|                  from
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/weston/1.8.0-r0/weston-1.8.0/clients/eventdemo.c:40:
|
/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspberrypi2/usr/include/interface/vcos/vcos_types.h:38:33:
fatal error: vcos_platform_types.h: No such file or directory
|  #include "vcos_platform_types.h"
|                                  ^
| compilation terminated.

This is wrong, it should not happen since doing simple #include
<EGL/egl.h> should not demand manual addition of some internal paths
tobe added to -I flags.

This patch fixes the headers which refer to headers inside pthreads/
folder to prefix them with pthreads/ so we dont have to specify
additional paths

This fixes weston on rpi and I believe there are more patches now to

recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
recipes-multimedia/omxplayer/omxplayer_git.bb

which can be removed as well

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2015-10-24 22:00:48 +02:00

57 lines
1.9 KiB
BlitzBasic

DESCRIPTION = "This repository contains the source code for the ARM side \
libraries used on Raspberry Pi. These typically are installed in /opt/vc/lib \
and includes source for the ARM side code to interface to: EGL, mmal, GLESv2,\
vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG."
LICENSE = "Broadcom"
LIC_FILES_CHKSUM = "file://LICENCE;md5=957f6640d5e2d2acfce73a36a56cb32f"
PR = "r5"
PROVIDES = "virtual/libgles2 \
virtual/egl"
COMPATIBLE_MACHINE = "raspberrypi"
SRCBRANCH = "master"
SRCFORK = "raspberrypi"
SRCREV = "40e377862410371a9962db79b81fd4f0f266430a"
SRC_URI = "\
git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \
file://0001-fix-gcc-5.x-inlines.patch \
file://0002-fix-musl-build.patch \
file://0003-fix-alloc-size-uninitialized.patch \
file://0002-set-VMCS_INSTALL_PREFIX-to-usr.patch \
file://0003-cmake-generate-and-install-pkgconfig-files.patch \
"
S = "${WORKDIR}/git"
inherit cmake pkgconfig
EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed'"
CFLAGS_append = " -fPIC"
do_install_append () {
for f in `find ${D}${includedir}/interface/vcos/ -name "*.h"`; do
sed -i 's/include "vcos_platform.h"/include "pthreads\/vcos_platform.h"/g' ${f}
sed -i 's/include "vcos_futex_mutex.h"/include "pthreads\/vcos_futex_mutex.h"/g' ${f}
sed -i 's/include "vcos_platform_types.h"/include "pthreads\/vcos_platform_types.h"/g' ${f}
done
}
# Shared libs from userland package build aren't versioned, so we need
# to force the .so files into the runtime package (and keep them
# out of -dev package).
FILES_SOLIBSDEV = ""
FILES_${PN} += " \
${libdir}/*.so \
${libdir}/plugins"
FILES_${PN}-dev += "${includedir} \
${prefix}/src"
FILES_${PN}-doc += "${datadir}/install"
FILES_${PN}-dbg += "${libdir}/plugins/.debug"
PACKAGE_ARCH = "${MACHINE_ARCH}"