userland: Fix install prefix and generate pkgconfigs

several userspace libraries like libepoxy poke for pkgconfigs ( .pc )
files to detect egl support, and comes out to fail in configure stage,
one of the patches now adds support to generate .pc files for some known
cases. it could be further extended if needed for other libraries too

Secondly, the default CMAKE_INSTALL_PREFIX is /opt/vc but in OE we use
proper /usr so lets make this change as well, it simplifies do_install()

.so are not versioned so we need to grapple with OE's defaults of
expecting versioned .so files.

Adjust packages for -dev package such that it can automatically package
pkgconfig files and inherit pkgconfig because in cmake code we are not
looking for pkgconfig so we need the dependency also put in place for
consistent builds

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj
2015-10-03 16:37:34 +00:00
committed by Andrei Gherzan
parent 7cff0a0a9e
commit dba20cbb0a
3 changed files with 152 additions and 12 deletions
+9 -12
View File
@@ -21,31 +21,28 @@ SRC_URI = "\
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
inherit cmake pkgconfig
EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed'"
CFLAGS_append = " -fPIC"
# The compiled binaries don't provide sonames.
SOLIBS = "${SOLIBSDEV}"
do_install_append() {
mkdir -p ${D}/${prefix}
mv ${D}/opt/vc/* ${D}/${prefix}
rm -rf ${D}/opt
}
# 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}/*${SOLIBS} \
${libdir}/*.so \
${libdir}/plugins"
FILES_${PN}-dev = "${includedir} \
FILES_${PN}-dev += "${includedir} \
${prefix}/src"
FILES_${PN}-doc += "${datadir}/install"
FILES_${PN}-dbg += "${libdir}/plugins/.debug"
PACKAGE_ARCH = "${MACHINE_ARCH}"