Skip to contentSkip to conversation

qt4(-embedded).inc: create variables to ease overriding

PATCH In review Andreas Oberritter 2 participants 7 messages May 22, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 qt4(-embedded).inc: create variables to ease overriding

* No functional change besides ordering of configure arguments.

---
* This doesn't cover all possible flags, but only those that I need to customize in my layer. Other flags may be added later if need arises.

 meta/recipes-qt/qt4/qt4-embedded.inc |   12 +++++++++---
 meta/recipes-qt/qt4/qt4.inc          |   17 ++++++++++++++---
 2 files changed, 23 insertions(+), 6 deletions(-)
meta/recipes-qt/qt4/qt4-embedded.inc +9 -3
index 8c15352..158ee17 100644
@@ -9,12 +9,18 @@ QT_BASE_LIB  ?= "libqt-embedded"
 # Set necessary variables in the profile
 SRC_URI += "file://qte.sh"
 
+QT_DECORATION_FLAGS ?= ""
+QT_GFX_DRIVER_FLAGS ?= "-plugin-gfx-transformed -plugin-gfx-qvfb -plugin-gfx-vnc -plugin-gfx-directfb"
+QT_KBD_DRIVER_FLAGS ?= "-qt-kbd-tty"
+QT_MOUSE_DRIVER_FLAGS ?= "-plugin-mouse-tslib -qt-mouse-pc -qt-mouse-qvfb -qt-mouse-linuxinput"
+
 QT_CONFIG_FLAGS += " \
     -embedded ${QT_ARCH} \
     -qtlibinfix ${QT_LIBINFIX} \
-    -plugin-gfx-transformed -plugin-gfx-qvfb -plugin-gfx-vnc -plugin-gfx-directfb \
-    -plugin-mouse-tslib -qt-mouse-pc -qt-mouse-qvfb -qt-mouse-linuxinput \
-    -qt-kbd-tty \
+    ${QT_DECORATION_FLAGS} \
+    ${QT_GFX_DRIVER_FLAGS} \
+    ${QT_KBD_DRIVER_FLAGS} \
+    ${QT_MOUSE_DRIVER_FLAGS} \
     -DQT_KEYPAD_NAVIGATION \
     "
 
meta/recipes-qt/qt4/qt4.inc +14 -3
index 468a46f..c70b335 100644
@@ -10,17 +10,28 @@ QT_ENDIAN = "${@qt_endian(d)}"
 QT_DISTRO_FLAGS ?= "-no-accessibility -no-sm"
 QT_DISTRO_FLAGS_linuxstdbase = "-sm"
 
+QT_GLIB_FLAGS ?= "-glib"
+QT_IMAGEFORMAT_FLAGS ?= "-system-libjpeg -system-libpng -system-libtiff -system-zlib"
+QT_PHONON_FLAGS ?= "-phonon"
+QT_QDBUS_FLAGS ?= "-qdbus"
+QT_QT3SUPPORT_FLAGS ?= "-qt3support"
 QT_SQL_DRIVER_FLAGS ?= "-no-sql-ibase -no-sql-mysql -no-sql-psql -no-sql-odbc -plugin-sql-sqlite"
+QT_WEBKIT_FLAGS ?= "-webkit"
 
 QT_GLFLAGS ?= ""
 
 QT_CONFIG_FLAGS += "-release -no-cups -reduce-relocations \
                     -shared -no-nas-sound -no-nis \
-                    -system-libjpeg -system-libpng -system-libtiff -system-zlib \
-                    -no-pch -qdbus -stl -glib -phonon -webkit \
-                    -xmlpatterns -no-rpath -qt3support -silent \
+                    -no-pch -stl \
+                    -xmlpatterns -no-rpath -silent \
                     ${@base_contains('DISTRO_FEATURES', 'pulseaudio', '--enable-pulseaudio', '--disable-pulseaudio', d)} \
+                    ${QT_GLIB_FLAGS} \
+                    ${QT_IMAGEFORMAT_FLAGS} \
+                    ${QT_PHONON_FLAGS} \
+                    ${QT_QDBUS_FLAGS} \
+                    ${QT_QT3SUPPORT_FLAGS} \
                     ${QT_SQL_DRIVER_FLAGS} \
+                    ${QT_WEBKIT_FLAGS} \
                     ${QT_DISTRO_FLAGS} \
                     ${QT_GLFLAGS}"
 
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 2/2 qt4.inc: package keyboard drivers

* Fixes the following packaging error, if compiled with -plugin-kbd-linuxinput:

| WARNING: For recipe qt4-embedded, the following files/directories were installed but not shipped in any package:
| WARNING:   /usr/lib/qtopia/plugins/kbddrivers/.debug
| WARNING:   /usr/lib/qtopia/plugins/kbddrivers/.debug/libqlinuxinputkbddriver.so

* No PR bump, because -plugin-kbd-linuxinput is not enabled by default.

---
 meta/recipes-qt/qt4/qt4.inc |    1 +
 1 file changed, 1 insertion(+)
meta/recipes-qt/qt4/qt4.inc +1 -0
index c70b335..3a30942 100644
@@ -328,6 +328,7 @@ python populate_packages_prepend() {
         qtopia_split('designer',      'designer',      '^lib(.*)\.so$')
         qtopia_split('gfxdrivers',    'gfxdriver',     '^libq(.*)\.so$')
         qtopia_split('graphicssystems','graphicssystems', '^libq(.*)\.so$')
+        qtopia_split('kbddrivers',    'kbddriver',     '^libq(.*)kbddriver\.so$')
         qtopia_split('mousedrivers',  'mousedriver',   '^libq(.*)mousedriver\.so$')
         qtopia_split('iconengines',   'iconengine',    '^libq(.*)\.so$')
         qtopia_split('imageformats',  'imageformat',   '^libq(.*)\.so$')
Signature · 1 line
1.7.9.5
#2 lore raw
In reply to Andreas Oberritter
Quoted 67 lines · On Tuesday 22 May 2012 13:37:25 Andreas Oberritter wrote:

* No functional change besides ordering of configure arguments.

---
* This doesn't cover all possible flags, but only those that I need to customize in my layer. Other flags may be added later if need arises.

 meta/recipes-qt/qt4/qt4-embedded.inc |   12 +++++++++---
 meta/recipes-qt/qt4/qt4.inc          |   17 ++++++++++++++---
 2 files changed, 23 insertions(+), 6 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-qt/qt4/qt4-embedded.inc index 8c15352..158ee17 100644

meta/recipes-qt/qt4/qt4-embedded.inc +7 -5
@@ -9,12 +9,18 @@ QT_BASE_LIB  ?= "libqt-embedded"
 # Set necessary variables in the profile
 SRC_URI += "file://qte.sh"
 
+QT_DECORATION_FLAGS ?= ""
+QT_GFX_DRIVER_FLAGS ?= "-plugin-gfx-transformed -plugin-gfx-qvfb
-plugin-gfx-vnc -plugin-gfx-directfb" +QT_KBD_DRIVER_FLAGS ?= "-qt-kbd-tty"
+QT_MOUSE_DRIVER_FLAGS ?= "-plugin-mouse-tslib -qt-mouse-pc -qt-mouse-qvfb
-qt-mouse-linuxinput" +
 QT_CONFIG_FLAGS += " \
     -embedded ${QT_ARCH} \
     -qtlibinfix ${QT_LIBINFIX} \
-    -plugin-gfx-transformed -plugin-gfx-qvfb -plugin-gfx-vnc
-plugin-gfx-directfb \ -    -plugin-mouse-tslib -qt-mouse-pc -qt-mouse-qvfb
-qt-mouse-linuxinput \ -    -qt-kbd-tty \
+    ${QT_DECORATION_FLAGS} \
+    ${QT_GFX_DRIVER_FLAGS} \
+    ${QT_KBD_DRIVER_FLAGS} \
+    ${QT_MOUSE_DRIVER_FLAGS} \
     -DQT_KEYPAD_NAVIGATION \
     "
meta/recipes-qt/qt4/qt4.inc +6 -6
index 468a46f..c70b335 100644
@@ -10,17 +10,28 @@ QT_ENDIAN = "${@qt_endian(d)}"
 QT_DISTRO_FLAGS ?= "-no-accessibility -no-sm"
 QT_DISTRO_FLAGS_linuxstdbase = "-sm"
 
+QT_GLIB_FLAGS ?= "-glib"
+QT_IMAGEFORMAT_FLAGS ?= "-system-libjpeg -system-libpng -system-libtiff
-system-zlib" +QT_PHONON_FLAGS ?= "-phonon"
+QT_QDBUS_FLAGS ?= "-qdbus"
+QT_QT3SUPPORT_FLAGS ?= "-qt3support"
 QT_SQL_DRIVER_FLAGS ?= "-no-sql-ibase -no-sql-mysql -no-sql-psql
-no-sql-odbc -plugin-sql-sqlite" +QT_WEBKIT_FLAGS ?= "-webkit"
 
 QT_GLFLAGS ?= ""
 
 QT_CONFIG_FLAGS += "-release -no-cups -reduce-relocations \
                     -shared -no-nas-sound -no-nis \
-                    -system-libjpeg -system-libpng -system-libtiff
-system-zlib \ -                    -no-pch -qdbus -stl -glib -phonon
-webkit \
-                    -xmlpatterns -no-rpath -qt3support -silent \
+                    -no-pch -stl \
+                    -xmlpatterns -no-rpath -silent \
                     ${@base_contains('DISTRO_FEATURES', 'pulseaudio',

'--enable-pulseaudio', '--disable-pulseaudio', d)} \ + ${QT_GLIB_FLAGS} \

meta/recipes-qt/qt4/qt4.inc QT_ENDIAN = "${@qt_endian(d)}" · line 36

Quoted 8 lines
meta/recipes-qt/qt4/qt4.inc +5 -0
+                    ${QT_IMAGEFORMAT_FLAGS} \
+                    ${QT_PHONON_FLAGS} \
+                    ${QT_QDBUS_FLAGS} \
+                    ${QT_QT3SUPPORT_FLAGS} \
                     ${QT_SQL_DRIVER_FLAGS} \
+                    ${QT_WEBKIT_FLAGS} \
                     ${QT_DISTRO_FLAGS} \
                     ${QT_GLFLAGS}"

I think when we start getting to this level, especially because some of these options imply extra DEPENDS, we should try to use PACKAGECONFIG rather than specific variables.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#3 lore raw
Quoted 72 lines · Paul Eggleton
Quoted 71 lines · On Tuesday 22 May 2012 13:37:25 Andreas Oberritter wrote:

* No functional change besides ordering of configure arguments.

---
* This doesn't cover all possible flags, but only those that I need to customize in my layer. Other flags may be added later if need arises.

 meta/recipes-qt/qt4/qt4-embedded.inc |   12 +++++++++---
 meta/recipes-qt/qt4/qt4.inc          |   17 ++++++++++++++---
 2 files changed, 23 insertions(+), 6 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-qt/qt4/qt4-embedded.inc index 8c15352..158ee17 100644

meta/recipes-qt/qt4/qt4-embedded.inc +7 -5
@@ -9,12 +9,18 @@ QT_BASE_LIB  ?= "libqt-embedded"
 # Set necessary variables in the profile
 SRC_URI += "file://qte.sh"
 
+QT_DECORATION_FLAGS ?= ""
+QT_GFX_DRIVER_FLAGS ?= "-plugin-gfx-transformed -plugin-gfx-qvfb
-plugin-gfx-vnc -plugin-gfx-directfb" +QT_KBD_DRIVER_FLAGS ?= "-qt-kbd-tty"
+QT_MOUSE_DRIVER_FLAGS ?= "-plugin-mouse-tslib -qt-mouse-pc -qt-mouse-qvfb
-qt-mouse-linuxinput" +
 QT_CONFIG_FLAGS += " \
     -embedded ${QT_ARCH} \
     -qtlibinfix ${QT_LIBINFIX} \
-    -plugin-gfx-transformed -plugin-gfx-qvfb -plugin-gfx-vnc
-plugin-gfx-directfb \ -    -plugin-mouse-tslib -qt-mouse-pc -qt-mouse-qvfb
-qt-mouse-linuxinput \ -    -qt-kbd-tty \
+    ${QT_DECORATION_FLAGS} \
+    ${QT_GFX_DRIVER_FLAGS} \
+    ${QT_KBD_DRIVER_FLAGS} \
+    ${QT_MOUSE_DRIVER_FLAGS} \
     -DQT_KEYPAD_NAVIGATION \
     "
meta/recipes-qt/qt4/qt4.inc +6 -6
index 468a46f..c70b335 100644
@@ -10,17 +10,28 @@ QT_ENDIAN = "${@qt_endian(d)}"
 QT_DISTRO_FLAGS ?= "-no-accessibility -no-sm"
 QT_DISTRO_FLAGS_linuxstdbase = "-sm"
 
+QT_GLIB_FLAGS ?= "-glib"
+QT_IMAGEFORMAT_FLAGS ?= "-system-libjpeg -system-libpng -system-libtiff
-system-zlib" +QT_PHONON_FLAGS ?= "-phonon"
+QT_QDBUS_FLAGS ?= "-qdbus"
+QT_QT3SUPPORT_FLAGS ?= "-qt3support"
 QT_SQL_DRIVER_FLAGS ?= "-no-sql-ibase -no-sql-mysql -no-sql-psql
-no-sql-odbc -plugin-sql-sqlite" +QT_WEBKIT_FLAGS ?= "-webkit"
 
 QT_GLFLAGS ?= ""
 
 QT_CONFIG_FLAGS += "-release -no-cups -reduce-relocations \
                     -shared -no-nas-sound -no-nis \
-                    -system-libjpeg -system-libpng -system-libtiff
-system-zlib \ -                    -no-pch -qdbus -stl -glib -phonon
-webkit \
-                    -xmlpatterns -no-rpath -qt3support -silent \
+                    -no-pch -stl \
+                    -xmlpatterns -no-rpath -silent \
                     ${@base_contains('DISTRO_FEATURES', 'pulseaudio',

'--enable-pulseaudio', '--disable-pulseaudio', d)} \ + ${QT_GLIB_FLAGS} \

meta/recipes-qt/qt4/qt4.inc +4 -0
+                    ${QT_IMAGEFORMAT_FLAGS} \
+                    ${QT_PHONON_FLAGS} \
+                    ${QT_QDBUS_FLAGS} \
+                    ${QT_QT3SUPPORT_FLAGS} \
Quoted 8 lines
Quoted 4 lines
                     ${QT_SQL_DRIVER_FLAGS} \
+                    ${QT_WEBKIT_FLAGS} \
                     ${QT_DISTRO_FLAGS} \
                     ${QT_GLFLAGS}"

I think when we start getting to this level, especially because some of these options imply extra DEPENDS, we should try to use PACKAGECONFIG rather than specific variables.

Introducing PACKAGECONFIG is a more complex change. It can still be done in a later patch. This patch just follows the semantics introduced by QT_SQL_DRIVER_FLAGS and doesn't even require a PR bump.

Regards,
Andreas

#4 lore raw
Quoted 7 lines · On Tuesday 22 May 2012 15:28:17 you wrote:
Quoted 3 lines · Paul Eggleton

I think when we start getting to this level, especially because some of these options imply extra DEPENDS, we should try to use PACKAGECONFIG rather than specific variables.

Introducing PACKAGECONFIG is a more complex change. It can still be done in a later patch.

It could be, but then we're introducing variables that will potentially go into people's distro configs only to take them away in the near future. I'm not especially keen on doing that.

Quoted 2 lines

This patch just follows the semantics introduced by QT_SQL_DRIVER_FLAGS

Right, and when that was introduced some time ago we did not have PACKAGECONFIG at all.

I realise this puts extra burden upon you, sorry about that. I can perhaps offer to do the PACKAGECONFIG changes for you, but I won't be able to get to them until next week at the earliest.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#5 lore raw
Quoted 16 lines · Paul Eggleton
Quoted 7 lines · On Tuesday 22 May 2012 15:28:17 you wrote:
Quoted 3 lines · Paul Eggleton

I think when we start getting to this level, especially because some of these options imply extra DEPENDS, we should try to use PACKAGECONFIG rather than specific variables.

Introducing PACKAGECONFIG is a more complex change. It can still be done in a later patch.

It could be, but then we're introducing variables that will potentially go into people's distro configs only to take them away in the near future. I'm not especially keen on doing that.

Quoted 2 lines

This patch just follows the semantics introduced by QT_SQL_DRIVER_FLAGS

Quoted 6 lines

Right, and when that was introduced some time ago we did not have PACKAGECONFIG at all.

I realise this puts extra burden upon you, sorry about that. I can perhaps offer to do the PACKAGECONFIG changes for you, but I won't be able to get to them until next week at the earliest.

No need to hurry. I'll keep using my patch in my denzil-based branch anyway, because denzil-next is unlikely to include either variant.

I'm not a big fan of PACKAGECONFIG. Its syntax is hard to read and hard to write, maybe unless you're the inventor of it.

Looking for users of PACKAGECONFIG in OE-Core denzil, I saw it's used in only 6 recipes. Even less in meta-openembedded (exactly 1). It looks like it's not going to get adopted by many. So your statement about taking away newly created variables in the near future is not necessarily going to become true.

Besides that, introducing a new PACKAGECONFIG variable for Qt, that includes new flags for basically everything already in QT_CONFIG_FLAGS, doesn't seem to be an improvement.

Furthermore, as I understand it, PACKAGECONFIG handles only simple on/off switches, but QT_CONFIG_FLAGS has switches for on/off/plugin/system etc., and not everything you can build into qt can be built as a plugin and vice versa, so the resulting set of PACKAGECONFIG flags will likely become quite huge in order to be able to express all options.

Regards,
Andreas

#6 lore raw
Quoted 5 lines · On Tuesday 22 May 2012 16:10:52 Andreas Oberritter wrote:

No need to hurry. I'll keep using my patch in my denzil-based branch anyway, because denzil-next is unlikely to include either variant.

I'm not a big fan of PACKAGECONFIG. Its syntax is hard to read and hard to write, maybe unless you're the inventor of it.

Can you suggest an alternative syntax that we could have consistent across multiple recipes and handles adding/removing DEPENDS as well as configure options? That is what it attempts to provide.

Quoted 5 lines

Looking for users of PACKAGECONFIG in OE-Core denzil, I saw it's used in only 6 recipes. Even less in meta-openembedded (exactly 1). It looks like it's not going to get adopted by many. So your statement about taking away newly created variables in the near future is not necessarily going to become true.

It's still pretty new. Besides, we haven't exactly gone out on a program of adding it everywhere there is a configuration option for something - we only add it on an as-needed basis.

Quoted 3 lines

Besides that, introducing a new PACKAGECONFIG variable for Qt, that includes new flags for basically everything already in QT_CONFIG_FLAGS, doesn't seem to be an improvement.

It is now our standard way of switching on and off features particularly where those features imply a change to DEPENDS.

Quoted 6 lines

Furthermore, as I understand it, PACKAGECONFIG handles only simple on/off switches, but QT_CONFIG_FLAGS has switches for on/off/plugin/system etc., and not everything you can build into qt can be built as a plugin and vice versa, so the resulting set of PACKAGECONFIG flags will likely become quite huge in order to be able to express all options.

So this might present a problem I agree. Perhaps PACKAGECONFIG is not going to work here. I dislike however that we would have the ability to configure these options and yet there is no management of DEPENDS to match.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre