Skip to content

Commit

Permalink
qt4-config: Make the .pc files usable by other components
Browse files Browse the repository at this point in the history
- Fix up the generated .pc files so that they have the sysroot-relative
  settings that OE-core expects. Note that qmake configures the
  Makefiles to install files under the root of the sysroot instead of
  under the more usual /usr -- hence the corrected prefix is empty and
  includedir is /include. However, in order for pkg-config to find the
  files, they have to be under /usr, so that's where the modified ones
  are written.

- Pass -v to install so that there's a record of the installations in
  log.do_install .

- Update QTDIR in webkit-supplemental.bb for the change to
  qt4-webos's PR.

Open-webOS-DCO-1.0-Signed-off-by: Herb Kuta <herb.kuta@palm.com>
Change-Id: Iaba1c994aae22bc3e5d4966292e460b10c33abdf
  • Loading branch information
Herb Kuta committed Sep 27, 2012
1 parent 5d5923d commit 2899f46
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
33 changes: 24 additions & 9 deletions recipes-webos/qt4/qt4-webos.bb
Expand Up @@ -12,7 +12,7 @@ SECTION = "webos/libs"
DEPENDS = "freetype jpeg libpng zlib glib-2.0 nyx-lib"

# Please update QTDIR in webkit-supplemental.bb file with the below value(r<n>), when ever it changes
PR = "r5"
PR = "r6"

inherit autotools
inherit pkgconfig
Expand Down Expand Up @@ -169,21 +169,36 @@ do_install() {

install -d ${D}/usr/plugins
install -d ${D}/usr/plugins/imageformats
install -m 555 ${PALM_BUILD_DIR}/plugins/imageformats/*.so ${D}/usr/plugins/imageformats
install -v -m 555 ${PALM_BUILD_DIR}/plugins/imageformats/*.so ${D}/usr/plugins/imageformats

if [ "${MACHINE}" != "qemux86" || "${MACHINE}" != "qemuarm"]; then
if [ "${MACHINE}" != "qemux86" -o "${MACHINE}" != "qemuarm"]; then
oe_libinstall -C ${PALM_BUILD_DIR}/lib/ -so libQtOpenGL ${D}/usr/lib
fi
export STAGING_INCDIR="${STAGING_INCDIR}"
export STAGING_LIBDIR="${STAGING_LIBDIR}"
cd ${PALM_BUILD_DIR}

oe_runmake install
install -m 644 ${S}/src/opengl/gl2paintengineex/qglcustomshaderstage_p.h ${STAGING_INCDIR}/QtOpenGL
install -v -m 644 ${S}/src/opengl/gl2paintengineex/qglcustomshaderstage_p.h ${STAGING_INCDIR}/QtOpenGL

# install qtlib pkgconfigs
# Install the pkgconfigs for the Qt libraries in the correct place.
install -d ${D}/usr/lib/pkgconfig
install -m 644 ${PALM_BUILD_DIR}/lib/pkgconfig/*.pc ${D}/usr/lib/pkgconfig

# Fix up the generated .pc files so that they have the sysroot-relative
# settings that OE-core expects. Note that qmake configures the Makefiles
# to install files under the root of the sysroot instead of under the more
# usual /usr -- hence the corrected prefix is empty and includedir is /include.
# However, in order for pkg-config to find the files, they have to be under
# /usr, so that's where the modified ones are written.
for pc in ${STAGING_DIR_HOST}/lib/pkgconfig/Qt*.pc; do
outf=${D}/usr/lib/pkgconfig/$(basename $pc)
echo "Fix up $pc -> $outf"
sed -e 's:^prefix=.*$:prefix=:' \
-e 's:^includedir=.*:includedir=/include:' \
-e '/^Libs\.private:/ s: -L/[^ ]* : -L@{libdir} :g' \
-e '/^Cflags:/ s: -I/[^ ]* : :g' $pc \
| tr @ '$' > $outf
done
}

do_install_append() {
Expand All @@ -194,13 +209,13 @@ do_install_append() {
oe_libinstall -C ${PALM_BUILD_DIR}/plugins/platforms -so libqpalm ${D}/usr/lib

install -d ${D}/usr/plugins/platforms
install -m 555 ${PALM_BUILD_DIR}/plugins/platforms/*.so ${D}/usr/plugins/platforms/
install -v -m 555 ${PALM_BUILD_DIR}/plugins/platforms/*.so ${D}/usr/plugins/platforms/

install -m 555 ${PALM_BUILD_DIR}/plugins/platforms/libqpalm.so ${STAGING_LIBDIR}/libqpalm.so
install -v -m 555 ${PALM_BUILD_DIR}/plugins/platforms/libqpalm.so ${STAGING_LIBDIR}/libqpalm.so

if [ "${MACHINE}" = "opal" -o "${MACHINE}" = "topaz" ]; then
install -d ${D}/usr/plugins/imports/Qt/labs/shaders
install -m 555 ${PALM_BUILD_DIR}/imports/Qt/labs/shaders/* ${D}/usr/plugins/imports/Qt/labs/shaders/
install -v -m 555 ${PALM_BUILD_DIR}/imports/Qt/labs/shaders/* ${D}/usr/plugins/imports/Qt/labs/shaders/
fi
}

Expand Down
2 changes: 1 addition & 1 deletion recipes-webos/webkit-supplemental/webkit-supplemental.bb
Expand Up @@ -39,7 +39,7 @@ export LD_TMP="${LD}"
export QMAKE="${STAGING_BINDIR_NATIVE}/qmake-palm"
# The QTDIR needs to be changed everytime qt4-webos recipe revision number(PR) changes
# Also, it's known to cause problems when shared state for qt4-webos is used instead of a fresh build
export QTDIR="${WORKDIR}/../qt4-webos-${PREFERRED_VERSION_qt4-webos}-r5/qt-build-${MACHINE}"
export QTDIR="${WORKDIR}/../qt4-webos-${PREFERRED_VERSION_qt4-webos}-r6/qt-build-${MACHINE}"

do_configure() {
export STAGING_DIR="${STAGING_DIR}"
Expand Down

0 comments on commit 2899f46

Please sign in to comment.