qtserialport: Adds initial recipe.
PATCH 1/1 qtserialport: Adds initial recipe.
--- meta-oe/recipes-qt/qtserialport/qtserialport.inc | 34 ++++++++++++++++++++ .../recipes-qt/qtserialport/qtserialport_5.1.0.bb | 6 ++++ 2 files changed, 40 insertions(+) create mode 100644 meta-oe/recipes-qt/qtserialport/qtserialport.inc create mode 100644 meta-oe/recipes-qt/qtserialport/qtserialport_5.1.0.bb
meta-oe/recipes-qt/qtserialport/qtserialport.inc new file +34 -0
@@ -0,0 +1,34 @@ +DESCRIPTION = "Qt Serial Port Library" +SECTION = "qt/libs" +HOMEPAGE = "http://qt-project.org/wiki/QtSerialPort" + +LICENSE = "LGPL FDL GPL " +LIC_FILES_CHKSUM = " \ + file://LICENSE.FDL;md5=3801d7932fdc07fd9efe89f9854a6caa \ + file://LICENSE.GPL;md5=d32239bcb673463ab874e80d47fae504 \ + file://LICENSE.LGPL;md5=4fbd65380cdd255951079008b364516c \ + " + +inherit qt4e pkgconfig + +SRC_URI = " \ + git://gitorious.org/qt/qtserialport.git \ +" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/${BPN}-${PV}" + +QMAKE_PROFILES="${S}/qtserialport.pro" +EXTRA_QMAKEVARS_PRE += "PREFIX=/usr" +EXTRA_OEMAKE += "INSTALL_ROOT=${D}" + +do_compile_append() { + BOGUS_PREFIX=`qmake2 -query QT_INSTALL_PREFIX` + for f in `find ${B} -name "Makefile"` ;do + sed -i -e "s|\(\$(INSTALL_ROOT)\)${BOGUS_PREFIX}|\1${prefix}|g" ${f} + done +} + +do_install() { + oe_runmake install DESTDIR=${D} INCLUDEDIR=${includedir} +}
meta-oe/recipes-qt/qtserialport/qtserialport_5.1.0.bb new file +6 -0
@@ -0,0 +1,6 @@ +require qtserialport.inc + +PR = "r0" + +SRCREV="22e45f0b0f956c025339d72ad53dca57ef684858" +
Signature · 1 line
1.7.9.5
Hi Wayne,
Some of this feedback is a little bit pedantic I'm afraid, but it's probably best to get everything right.
Quoted 1 line · On Friday 19 April 2013 08:09:43 Wayne Warren wrote:
---
Please include Signed-off-by.
Quoted 13 lines
meta-oe/recipes-qt/qtserialport/qtserialport.inc | 34 ++++++++++++++++++++ .../recipes-qt/qtserialport/qtserialport_5.1.0.bb | 6 ++++ 2 files changed, 40 insertions(+) create mode 100644 meta-oe/recipes-qt/qtserialport/qtserialport.inc create mode 100644 meta-oe/recipes-qt/qtserialport/qtserialport_5.1.0.bb(quoted diff) +0
-0b/meta-oe/recipes-qt/qtserialport/qtserialport.inc new file mode 100644 index 0000000..09f2f9a
meta-oe/recipes-qt/qtserialport/qtserialport.inc line 1
Quoted 1 line
meta-oe/recipes-qt/qtserialport/qtserialport.inc new file +1
-0@@ -0,0 +1,34 @@ +DESCRIPTION = "Qt Serial Port Library"
Would you mind using SUMMARY instead of DESCRIPTION here? (DESCRIPTION will be set from SUMMARY as well).
meta-oe/recipes-qt/qtserialport/qtserialport.inc line 5
Quoted 4 lines
meta-oe/recipes-qt/qtserialport/qtserialport.inc new file +4
-0+SECTION = "qt/libs" +HOMEPAGE = "http://qt-project.org/wiki/QtSerialPort" + +LICENSE = "LGPL FDL GPL "
I'm not 100% sure, but I think for this particular piece of software, this should actually be "(LGPL-2.1 | GPL-3.0) & GFDL-1.3"
meta-oe/recipes-qt/qtserialport/qtserialport.inc line 12
Quoted 7 lines
meta-oe/recipes-qt/qtserialport/qtserialport.inc new file +7
-0+LIC_FILES_CHKSUM = " \ + file://LICENSE.FDL;md5=3801d7932fdc07fd9efe89f9854a6caa \ + file://LICENSE.GPL;md5=d32239bcb673463ab874e80d47fae504 \ + file://LICENSE.LGPL;md5=4fbd65380cdd255951079008b364516c \ + " + +inherit qt4e pkgconfig
If this is to be built against Qt Embedded, the recipe should be named qtserialport-e; in fact I'd suggest replacing this with just "inherit pkgconfig" and then adding "inherit qt4e" to the .bb file and then it would be possible for someone else to create a qtserialport-x11 recipe that used the same inc file.
meta-oe/recipes-qt/qtserialport/qtserialport.inc line 22
Quoted 9 lines
meta-oe/recipes-qt/qtserialport/qtserialport.inc new file +9
-0+SRC_URI = " \ + git://gitorious.org/qt/qtserialport.git \ +" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/${BPN}-${PV}" + +QMAKE_PROFILES="${S}/qtserialport.pro" +EXTRA_QMAKEVARS_PRE += "PREFIX=/usr"
I think this should be ${prefix} rather than hardcoding /usr.
meta-oe/recipes-qt/qtserialport/qtserialport.inc line 30
Quoted 8 lines
meta-oe/recipes-qt/qtserialport/qtserialport.inc new file +8
-0+EXTRA_OEMAKE += "INSTALL_ROOT=${D}" + +do_compile_append() { + BOGUS_PREFIX=`qmake2 -query QT_INSTALL_PREFIX` + for f in `find ${B} -name "Makefile"` ;do + sed -i -e "s|\(\$(INSTALL_ROOT)\)${BOGUS_PREFIX}|\1${prefix}|g" ${f} + done +}
It seems a bit extreme to me that this should be necessary; googling suggests that qt.conf is supposed to be used to override QT_INSTALL_PREFIX. My build is still running so I haven't been able to check if this can work yet or if there's an alternative method but I'll let you know.
Quoted 11 lines
meta-oe/recipes-qt/qtserialport/qtserialport.inc new file +4
-0+ +do_install() { + oe_runmake install DESTDIR=${D} INCLUDEDIR=${includedir} +}(quoted diff) +0
-0b/meta-oe/recipes-qt/qtserialport/qtserialport_5.1.0.bb new file mode 100644
index 0000000..d903eb3
meta-oe/recipes-qt/qtserialport/qtserialport_5.1.0.bb line 3
Quoted 3 lines
meta-oe/recipes-qt/qtserialport/qtserialport_5.1.0.bb new file +3
-0@@ -0,0 +1,6 @@ +require qtserialport.inc + +PR = "r0"
This doesn't need to be set this since it's the default value (and we're no longer incrementing this value manually).
meta-oe/recipes-qt/qtserialport/qtserialport_5.1.0.bb line 6
Quoted 3 lines
meta-oe/recipes-qt/qtserialport/qtserialport_5.1.0.bb new file +3
-0+ +SRCREV="22e45f0b0f956c025339d72ad53dca57ef684858" +
This is really pedantic, but we usually prefer spaces around the assignment (as you have elsewhere.)
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Paul,
Thanks much for the feedback, I have made the changes you suggest with the exception of the changes to do_compile_append().
I did try setting "Prefix" in qt.conf yesterday to no effect, but as it turns out qmake2 uses the qt.conf either in /qt/etc/qt.conf or in the same directory as it for this binary (I verified this with strace). I read a suggestion on stackoverflow that says to symlink the qt.conf into the bin directory--in this case ${STAGING_BINDIR_NATIVE}--but that seems like it could lead to parallel build problems since it could inject Prefix values into qmake2 during concurrent build of another qt project.
Something else I tried was "qmake2 -set QT_INSTALL_PREFIX ${D}" in do_configure_prepend() and "qmake2 -unset QT_INSTALL_PREFIX" in do_compile_append() which did not work. Anyway, this might be just as bad as symlinking qt.conf into ${STAGING_BINDIR_NATIVE} in terms of the effect it would have on parallel builds.
So right now I am trying to symlink the qmake2 binary into ${WORKDIR} and use that during the build.
wayne
Quoted 115 lines · Paul Eggleton
Hi Wayne,
Some of this feedback is a little bit pedantic I'm afraid, but it's probably
best to get everything right.Quoted 1 line · On Friday 19 April 2013 08:09:43 Wayne Warren wrote:
---
Please include Signed-off-by.
Quoted 6 lines
meta-oe/recipes-qt/qtserialport/qtserialport.inc | 34 ++++++++++++++++++++ .../recipes-qt/qtserialport/qtserialport_5.1.0.bb | 6 ++++ 2 files changed, 40 insertions(+) create mode 100644 meta-oe/recipes-qt/qtserialport/qtserialport.inc create mode 100644 meta-oe/recipes-qt/qtserialport/qtserialport_5.1.0.bb
meta-oe/recipes-qt/qtserialport/qtserialport.inc line 1
Quoted 8 lines
(quoted diff) +0
-0b/meta-oe/recipes-qt/qtserialport/qtserialport.inc new file mode 100644 index 0000000..09f2f9a
meta-oe/recipes-qt/qtserialport/qtserialport.inc new file +1
-0@@ -0,0 +1,34 @@ +DESCRIPTION = "Qt Serial Port Library"Would you mind using SUMMARY instead of DESCRIPTION here? (DESCRIPTION will be
set from SUMMARY as well).meta-oe/recipes-qt/qtserialport/qtserialport.inc line 5
Quoted 4 lines
meta-oe/recipes-qt/qtserialport/qtserialport.inc new file +4
-0+SECTION = "qt/libs" +HOMEPAGE = "http://qt-project.org/wiki/QtSerialPort" + +LICENSE = "LGPL FDL GPL "I'm not 100% sure, but I think for this particular piece of software, this should actually be "(LGPL-2.1 | GPL-3.0) & GFDL-1.3"
meta-oe/recipes-qt/qtserialport/qtserialport.inc line 12
Quoted 7 lines
meta-oe/recipes-qt/qtserialport/qtserialport.inc new file +7
-0+LIC_FILES_CHKSUM = " \ + file://LICENSE.FDL;md5=3801d7932fdc07fd9efe89f9854a6caa \ + file://LICENSE.GPL;md5=d32239bcb673463ab874e80d47fae504 \ + file://LICENSE.LGPL;md5=4fbd65380cdd255951079008b364516c \ + " + +inherit qt4e pkgconfigIf this is to be built against Qt Embedded, the recipe should be named qtserialport-e; in fact I'd suggest replacing this with just "inherit pkgconfig" and then adding "inherit qt4e" to the .bb file and then it would be
possible for someone else to create a qtserialport-x11 recipe that used the same inc file.meta-oe/recipes-qt/qtserialport/qtserialport.inc line 22
Quoted 9 lines
meta-oe/recipes-qt/qtserialport/qtserialport.inc new file +9
-0+SRC_URI = " \ + git://gitorious.org/qt/qtserialport.git \ +" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/${BPN}-${PV}" + +QMAKE_PROFILES="${S}/qtserialport.pro" +EXTRA_QMAKEVARS_PRE += "PREFIX=/usr"I think this should be ${prefix} rather than hardcoding /usr.
meta-oe/recipes-qt/qtserialport/qtserialport.inc
Quoted 6 lines
meta-oe/recipes-qt/qtserialport/qtserialport.inc new file +6
-0+EXTRA_OEMAKE += "INSTALL_ROOT=${D}" + +do_compile_append() { + BOGUS_PREFIX=`qmake2 -query QT_INSTALL_PREFIX` + for f in `find ${B} -name "Makefile"` ;do + sed -i -e"s|\(\$(INSTALL_ROOT)\)${BOGUS_PREFIX}|\1${prefix}|g" ${f}
meta-oe/recipes-qt/qtserialport/qtserialport.inc line 29
Quoted 2 lines
meta-oe/recipes-qt/qtserialport/qtserialport.inc new file +2
-0+ done +}It seems a bit extreme to me that this should be necessary; googling suggests
that qt.conf is supposed to be used to overrideQT_INSTALL_PREFIX. My build is
still running so I haven't been able to check if this can work yet or if there's an alternative method but I'll let you know.Quoted 11 lines
meta-oe/recipes-qt/qtserialport/qtserialport.inc new file +4
-0+ +do_install() { + oe_runmake install DESTDIR=${D} INCLUDEDIR=${includedir} +}(quoted diff) +0
-0b/meta-oe/recipes-qt/qtserialport/qtserialport_5.1.0.bb new file mode 100644
index 0000000..d903eb3meta-oe/recipes-qt/qtserialport/qtserialport_5.1.0.bb line 3
Quoted 3 lines
meta-oe/recipes-qt/qtserialport/qtserialport_5.1.0.bb new file +3
-0@@ -0,0 +1,6 @@ +require qtserialport.inc + +PR = "r0"This doesn't need to be set this since it's the default value (and we're no longer incrementing this value manually).
meta-oe/recipes-qt/qtserialport/qtserialport_5.1.0.bb line 6
Quoted 3 lines
meta-oe/recipes-qt/qtserialport/qtserialport_5.1.0.bb new file +3
-0+ +SRCREV="22e45f0b0f956c025339d72ad53dca57ef684858" +This is really pedantic, but we usually prefer spaces around the assignment (as you have elsewhere.)
Cheers,
Paul--
Paul Eggleton
Intel Open Sourcewill