Patchwork qt: package examples

login
register
mail settings
Submitter Eric BENARD
Date May 24, 2013, 9:45 a.m.
Message ID <1369388734-15750-1-git-send-email-eric@eukrea.com>
Download mbox | patch
Permalink /patch/50483/
State Superseded
Headers show

Comments

Eric BENARD - May 24, 2013, 9:45 a.m.
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 recipes-qt/qt5/qt5.inc          |    9 ++++++++-
 recipes-qt/qt5/qtbase.inc       |    1 +
 recipes-qt/qt5/qtmultimedia.inc |    4 ++++
 3 files changed, 13 insertions(+), 1 deletion(-)

\ No newline at end of file
Martin Jansa - May 24, 2013, 11:36 a.m.
On Fri, May 24, 2013 at 11:45:34AM +0200, Eric Bénard wrote:
> Signed-off-by: Eric Bénard <eric@eukrea.com>
> ---
>  recipes-qt/qt5/qt5.inc          |    9 ++++++++-
>  recipes-qt/qt5/qtbase.inc       |    1 +
>  recipes-qt/qt5/qtmultimedia.inc |    4 ++++
>  3 files changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/recipes-qt/qt5/qt5.inc b/recipes-qt/qt5/qt5.inc
> index d370844..018c9ad 100644
> --- a/recipes-qt/qt5/qt5.inc
> +++ b/recipes-qt/qt5/qt5.inc
> @@ -20,7 +20,7 @@ OE_QMAKE_PATH_SETTINGS = "${OE_QMAKE_PATH_QT_SETTINGS}"
>  OE_QMAKE_PATH_EXAMPLES = "${OE_QMAKE_PATH_QT_EXAMPLES}"
>  OE_QMAKE_PATH_TESTS = "${OE_QMAKE_PATH_QT_TESTS}"
>  
> -PACKAGES =. "${PN}-qmlplugins-dbg ${PN}-tools-dbg ${PN}-plugins-dbg ${PN}-qmlplugins ${PN}-tools ${PN}-plugins ${PN}-mkspecs "
> +PACKAGES =. "${PN}-qmlplugins-dbg ${PN}-tools-dbg ${PN}-plugins-dbg ${PN}-qmlplugins ${PN}-tools ${PN}-plugins ${PN}-mkspecs ${PN}-examples-staticdev ${PN}-examples-dbg ${PN}-examples "
>  
>  # extra -dbg packages
>  FILES_${PN}-qmlplugins-dbg = " \
> @@ -98,3 +98,10 @@ FILES_${PN}-dbg += " \
>  FILES_${PN}-staticdev += " \
>      ${OE_QMAKE_PATH_LIBS}/*.a \
>  "
> +
> +FILES_${PN}-examples             = "${datadir}/${QT_DIR_NAME}/examples/*"
> +
> +FILES_${PN}-examples-dbg         = "${datadir}/${QT_DIR_NAME}/examples/.debug ${datadir}/${QT_DIR_NAME}/examples/*/.debug ${datadir}/${QT_DIR_NAME}/examples/*/*/.debug ${datadir}/${QT_DIR_NAME}/examples/*/*/*/.debug ${datadir}/${QT_DIR_NAME}/examples/*/*/*/*/.debug ${datadir}/${QT_DIR_NAME}/examples/*/*/*/*/*/.debug"

Please wrap it to multiple lines so it's easier to see that it's just
multiple levels of .debug directories.

> +ALLOW_EMPTY_${PN}-examples = "1"
> +ALLOW_EMPTY_${PN}-examples-staticdev = "1"
> +ALLOW_EMPTY_${PN}-examples-dbg = "1"

Do we need to always create them?

> diff --git a/recipes-qt/qt5/qtbase.inc b/recipes-qt/qt5/qtbase.inc
> index 5d4334a..be6f10a 100644
> --- a/recipes-qt/qt5/qtbase.inc
> +++ b/recipes-qt/qt5/qtbase.inc
> @@ -167,3 +167,4 @@ do_install_append() {
>  
>  PACKAGES =. "${PN}-fonts "
>  FILES_${PN}-fonts = "${libdir}/${QT_DIR_NAME}/fonts ${libdir}/fonts"
> +FILES_${PN}-examples-staticdev   = "${datadir}/${QT_DIR_NAME}/examples/tools/plugandpaint/plugins/libpnp_basictools.a"

Shouldn't this go to qt5.inc (with * and *.a)

> diff --git a/recipes-qt/qt5/qtmultimedia.inc b/recipes-qt/qt5/qtmultimedia.inc
> index d9fdf79..e773ad1 100644
> --- a/recipes-qt/qt5/qtmultimedia.inc
> +++ b/recipes-qt/qt5/qtmultimedia.inc
> @@ -3,3 +3,7 @@ require qt5.inc
>  DEPENDS += "qtdeclarative gstreamer alsa-lib "
>  
>  INC_PR = "r0"
> +
> +do_install_append() {
> +    rm -f ${D}/${datadir}/${QT_DIR_NAME}/examples/multimedia/spectrum/*.so
> +}
> \ No newline at end of file
> -- 
> 1.7.10.4
> 

Please use OE_QMAKE_PATH_EXAMPLES variable everywhere and add some comment explaining
why examples/multimedia/spectrum needs to be removed.

Patch

diff --git a/recipes-qt/qt5/qt5.inc b/recipes-qt/qt5/qt5.inc
index d370844..018c9ad 100644
--- a/recipes-qt/qt5/qt5.inc
+++ b/recipes-qt/qt5/qt5.inc
@@ -20,7 +20,7 @@  OE_QMAKE_PATH_SETTINGS = "${OE_QMAKE_PATH_QT_SETTINGS}"
 OE_QMAKE_PATH_EXAMPLES = "${OE_QMAKE_PATH_QT_EXAMPLES}"
 OE_QMAKE_PATH_TESTS = "${OE_QMAKE_PATH_QT_TESTS}"
 
-PACKAGES =. "${PN}-qmlplugins-dbg ${PN}-tools-dbg ${PN}-plugins-dbg ${PN}-qmlplugins ${PN}-tools ${PN}-plugins ${PN}-mkspecs "
+PACKAGES =. "${PN}-qmlplugins-dbg ${PN}-tools-dbg ${PN}-plugins-dbg ${PN}-qmlplugins ${PN}-tools ${PN}-plugins ${PN}-mkspecs ${PN}-examples-staticdev ${PN}-examples-dbg ${PN}-examples "
 
 # extra -dbg packages
 FILES_${PN}-qmlplugins-dbg = " \
@@ -98,3 +98,10 @@  FILES_${PN}-dbg += " \
 FILES_${PN}-staticdev += " \
     ${OE_QMAKE_PATH_LIBS}/*.a \
 "
+
+FILES_${PN}-examples             = "${datadir}/${QT_DIR_NAME}/examples/*"
+
+FILES_${PN}-examples-dbg         = "${datadir}/${QT_DIR_NAME}/examples/.debug ${datadir}/${QT_DIR_NAME}/examples/*/.debug ${datadir}/${QT_DIR_NAME}/examples/*/*/.debug ${datadir}/${QT_DIR_NAME}/examples/*/*/*/.debug ${datadir}/${QT_DIR_NAME}/examples/*/*/*/*/.debug ${datadir}/${QT_DIR_NAME}/examples/*/*/*/*/*/.debug"
+ALLOW_EMPTY_${PN}-examples = "1"
+ALLOW_EMPTY_${PN}-examples-staticdev = "1"
+ALLOW_EMPTY_${PN}-examples-dbg = "1"
diff --git a/recipes-qt/qt5/qtbase.inc b/recipes-qt/qt5/qtbase.inc
index 5d4334a..be6f10a 100644
--- a/recipes-qt/qt5/qtbase.inc
+++ b/recipes-qt/qt5/qtbase.inc
@@ -167,3 +167,4 @@  do_install_append() {
 
 PACKAGES =. "${PN}-fonts "
 FILES_${PN}-fonts = "${libdir}/${QT_DIR_NAME}/fonts ${libdir}/fonts"
+FILES_${PN}-examples-staticdev   = "${datadir}/${QT_DIR_NAME}/examples/tools/plugandpaint/plugins/libpnp_basictools.a"
diff --git a/recipes-qt/qt5/qtmultimedia.inc b/recipes-qt/qt5/qtmultimedia.inc
index d9fdf79..e773ad1 100644
--- a/recipes-qt/qt5/qtmultimedia.inc
+++ b/recipes-qt/qt5/qtmultimedia.inc
@@ -3,3 +3,7 @@  require qt5.inc
 DEPENDS += "qtdeclarative gstreamer alsa-lib "
 
 INC_PR = "r0"
+
+do_install_append() {
+    rm -f ${D}/${datadir}/${QT_DIR_NAME}/examples/multimedia/spectrum/*.so
+}