Skip to contentSkip to conversation

vlc: rework qt PACKAGECONFIG

PATCH In review Andreas Müller 3 participants 8 messages Apr 22, 2019 – Apr 23, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vlc: rework qt PACKAGECONFIG

* qt4 support is gone -> move to qt5
* enable qt5 gui in case meta-qt5 is in layers (it is more or less useless without gui)
* while at it remove noop libtool copy

---
V1 -> V2: Aargh again typo in commit messeage...

 .../recipes-multimedia/vlc/vlc.inc            | 25 ++++++++++++-------
 1 file changed, 16 insertions(+), 9 deletions(-)
meta-multimedia/recipes-multimedia/vlc/vlc.inc +16 -9
index 19ac8206c..6ba1444b5 100644
@@ -36,12 +36,18 @@ EXTRA_OECONF = "\
     --enable-realrtsp \
     --disable-libtar \
     --enable-avcodec \
-    ac_cv_path_MOC=${STAGING_BINDIR_NATIVE}/moc4 \
-    ac_cv_path_RCC=${STAGING_BINDIR_NATIVE}/rcc4 \
-    ac_cv_path_UIC=${STAGING_BINDIR_NATIVE}/uic4 \
+    ac_cv_path_MOC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/moc \
+    ac_cv_path_RCC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/rcc \
+    ac_cv_path_UIC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/uic \
 "
 
-PACKAGECONFIG ?= " live555 dc1394 dv1394 notify fontconfig freetype dvdread png ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG ?= " \
+    live555 dc1394 dv1394 notify fontconfig freetype dvdread png \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)} \
+"
+
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'qmake5_paths', '', d)}
 
 PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad"
 PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52"
@@ -54,7 +60,7 @@ PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv"
 PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex"
 PACKAGECONFIG[gstreamer] = "--enable-gst-decode,--disable-gst-decode,gstreamer1.0 gstreamer1.0-plugins-base gst-plugins-bad"
 PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx, libvpx"
-PACKAGECONFIG[qt4] = "--enable-qt,--disable-qt, qt4-x11-free"
+PACKAGECONFIG[qt5] = "--enable-qt,--disable-qt, qtbase-native qtx11extras qtsvg"
 PACKAGECONFIG[freerdp] = "--enable-freerdp,--disable-freerdp, freerdp"
 PACKAGECONFIG[dvbpsi] = "--enable-dvbpsi,--disable-dvbpsi, libdvbpsi"
 PACKAGECONFIG[samba] = "--enable-smbclient,--disable-smbclient, samba"
@@ -76,12 +82,13 @@ PACKAGECONFIG[x11] = "--with-x --enable-xcb,--without-x --disable-xcb,  xcb-util
 PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng"
 PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
 
-do_configure_prepend() {
-    cp ${STAGING_DATADIR}/libtool/config.* ${S}/autotools/ || true
-}
-
 do_configure_append() {
     sed -i -e s:'${top_builddir_slash}libtool':'${top_builddir_slash}'${TARGET_SYS}-libtool:g ${B}/doltlibtool
+
+    # moc needs support: precreate build paths
+    for qtpath in adapters components/epg components/playlist components/sout dialogs managers styles util/buttons; do
+        mkdir -p "${B}/modules/gui/qt/$qtpath"
+    done
 }
 
 # This recipe packages vlc as a library as well, so qt4 dependencies
Signature · 1 line
2.20.1
#1 lore raw
Quoted 22 lines · Andreas Müller

* qt4 support is gone -> move to qt5
* enable qt5 gui in case meta-qt5 is in layers (it is more or less useless without gui)
* while at it remove noop libtool copy

---
V1 -> V2: Aargh again typo in commit messeage...

  .../recipes-multimedia/vlc/vlc.inc            | 25 ++++++++++++-------
  1 file changed, 16 insertions(+), 9 deletions(-)
meta-multimedia/recipes-multimedia/vlc/vlc.inc +0 -3
index 19ac8206c..6ba1444b5 100644
@@ -36,12 +36,18 @@ EXTRA_OECONF = "\
      --enable-realrtsp \
      --disable-libtar \
      --enable-avcodec \
-    ac_cv_path_MOC=${STAGING_BINDIR_NATIVE}/moc4 \
-    ac_cv_path_RCC=${STAGING_BINDIR_NATIVE}/rcc4 \
-    ac_cv_path_UIC=${STAGING_BINDIR_NATIVE}/uic4 \

meta-multimedia/recipes-multimedia/vlc/vlc.inc EXTRA_OECONF = "\ · line 47

Quoted 10 lines
meta-multimedia/recipes-multimedia/vlc/vlc.inc +7 -1
+    ac_cv_path_MOC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/moc \
+    ac_cv_path_RCC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/rcc \
+    ac_cv_path_UIC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/uic \
  "
 
-PACKAGECONFIG ?= " live555 dc1394 dv1394 notify fontconfig freetype dvdread png ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG ?= " \
+    live555 dc1394 dv1394 notify fontconfig freetype dvdread png \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)} \

I don't like this change based on BBFILE_COLLECTIONS, it's just a different way of having things change when you add an extra layer. We wouldn't want an unconditional bbappend in meta-qt5 to set this and so we don't want to set it here when that layer is added.

Perhaps we should have qt5 as a distro feature instead?

Quoted 34 lines
meta-multimedia/recipes-multimedia/vlc/vlc.inc +9 -5
+"
+
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'qmake5_paths', '', d)}
 
  PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad"
  PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52"
@@ -54,7 +60,7 @@ PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv"
  PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex"
  PACKAGECONFIG[gstreamer] = "--enable-gst-decode,--disable-gst-decode,gstreamer1.0 gstreamer1.0-plugins-base gst-plugins-bad"
  PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx, libvpx"
-PACKAGECONFIG[qt4] = "--enable-qt,--disable-qt, qt4-x11-free"
+PACKAGECONFIG[qt5] = "--enable-qt,--disable-qt, qtbase-native qtx11extras qtsvg"
  PACKAGECONFIG[freerdp] = "--enable-freerdp,--disable-freerdp, freerdp"
  PACKAGECONFIG[dvbpsi] = "--enable-dvbpsi,--disable-dvbpsi, libdvbpsi"
  PACKAGECONFIG[samba] = "--enable-smbclient,--disable-smbclient, samba"
@@ -76,12 +82,13 @@ PACKAGECONFIG[x11] = "--with-x --enable-xcb,--without-x --disable-xcb,  xcb-util
  PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng"
  PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
 
-do_configure_prepend() {
-    cp ${STAGING_DATADIR}/libtool/config.* ${S}/autotools/ || true
-}
-
  do_configure_append() {
      sed -i -e s:'${top_builddir_slash}libtool':'${top_builddir_slash}'${TARGET_SYS}-libtool:g ${B}/doltlibtool
+
+    # moc needs support: precreate build paths
+    for qtpath in adapters components/epg components/playlist components/sout dialogs managers styles util/buttons; do
+        mkdir -p "${B}/modules/gui/qt/$qtpath"
+    done
  }
 
  # This recipe packages vlc as a library as well, so qt4 dependencies
Signature · 3 lines
Paul Barker
Managing Director & Principal Engineer
Beta Five Ltd
#2 lore raw
Quoted 40 lines · Paul Barker
Quoted 22 lines · Andreas Müller

* qt4 support is gone -> move to qt5
* enable qt5 gui in case meta-qt5 is in layers (it is more or less useless without gui)
* while at it remove noop libtool copy

---
V1 -> V2: Aargh again typo in commit messeage...

  .../recipes-multimedia/vlc/vlc.inc            | 25 ++++++++++++-------
  1 file changed, 16 insertions(+), 9 deletions(-)
meta-multimedia/recipes-multimedia/vlc/vlc.inc +0 -3
index 19ac8206c..6ba1444b5 100644
@@ -36,12 +36,18 @@ EXTRA_OECONF = "\
      --enable-realrtsp \
      --disable-libtar \
      --enable-avcodec \
-    ac_cv_path_MOC=${STAGING_BINDIR_NATIVE}/moc4 \
-    ac_cv_path_RCC=${STAGING_BINDIR_NATIVE}/rcc4 \
-    ac_cv_path_UIC=${STAGING_BINDIR_NATIVE}/uic4 \

meta-multimedia/recipes-multimedia/vlc/vlc.inc EXTRA_OECONF = "\ · line 47

Quoted 10 lines
meta-multimedia/recipes-multimedia/vlc/vlc.inc +7 -1
+    ac_cv_path_MOC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/moc \
+    ac_cv_path_RCC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/rcc \
+    ac_cv_path_UIC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/uic \
  "
 
-PACKAGECONFIG ?= " live555 dc1394 dv1394 notify fontconfig freetype dvdread png ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG ?= " \
+    live555 dc1394 dv1394 notify fontconfig freetype dvdread png \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)} \

I don't like this change based on BBFILE_COLLECTIONS, it's just a different way of having things change when you add an extra layer. We wouldn't want an unconditional bbappend in meta-qt5 to set this and so we don't want to set it here when that layer is added.

Quoted 1 line

Perhaps we should have qt5 as a distro feature instead?

Isn't that a different naming for the same thing not working properly if you don't have meta-qt5 in layers?

Andreas

#3 lore raw
Quoted 41 lines · Andreas Müller
Quoted 40 lines · Paul Barker
Quoted 22 lines · Andreas Müller

* qt4 support is gone -> move to qt5
* enable qt5 gui in case meta-qt5 is in layers (it is more or less useless without gui)
* while at it remove noop libtool copy

---
V1 -> V2: Aargh again typo in commit messeage...

   .../recipes-multimedia/vlc/vlc.inc            | 25 ++++++++++++-------
   1 file changed, 16 insertions(+), 9 deletions(-)
meta-multimedia/recipes-multimedia/vlc/vlc.inc +0 -3
index 19ac8206c..6ba1444b5 100644
@@ -36,12 +36,18 @@ EXTRA_OECONF = "\
       --enable-realrtsp \
       --disable-libtar \
       --enable-avcodec \
-    ac_cv_path_MOC=${STAGING_BINDIR_NATIVE}/moc4 \
-    ac_cv_path_RCC=${STAGING_BINDIR_NATIVE}/rcc4 \
-    ac_cv_path_UIC=${STAGING_BINDIR_NATIVE}/uic4 \

meta-multimedia/recipes-multimedia/vlc/vlc.inc EXTRA_OECONF = "\ · line 47

Quoted 10 lines
meta-multimedia/recipes-multimedia/vlc/vlc.inc +7 -1
+    ac_cv_path_MOC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/moc \
+    ac_cv_path_RCC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/rcc \
+    ac_cv_path_UIC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/uic \
   "
 
-PACKAGECONFIG ?= " live555 dc1394 dv1394 notify fontconfig freetype dvdread png ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG ?= " \
+    live555 dc1394 dv1394 notify fontconfig freetype dvdread png \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)} \

I don't like this change based on BBFILE_COLLECTIONS, it's just a different way of having things change when you add an extra layer. We wouldn't want an unconditional bbappend in meta-qt5 to set this and so we don't want to set it here when that layer is added.

Quoted 4 lines
Quoted 1 line

Perhaps we should have qt5 as a distro feature instead?

Isn't that a different naming for the same thing not working properly if you don't have meta-qt5 in layers?

Agreed, we shouldn't give people more opportunities to shoot themselves in the foot!

For my builds I have all layers added all the time and just enable/disable features as needed. So just because meta-qt5 is included as a layer doesn't mean I'm even building an x11 or weston configuration, it could be command line only in which case I wouldn't want this extra PACKAGECONFIG creeping in.

meta-virtualization handles this by gating overrides on a 'virtualization' distro feature and adding a sanity check that you enabled that distro feature when adding the layer (http://git.yoctoproject.org/cgit/cgit.cgi/meta-virtualization/tree/classes/sanity-meta-virt.bbclass). The sanity check can be disabled by setting SKIP_META_VIRT_SANITY_CHECK. I find it a bit messy but it does work.

What would work for this case is a bbappend in meta-qt5 which checks for the 'qt5' distro feature. The benefit of using a distro feature is that we can gate changes to other recipes on the same configuration setting so that we don't need to set lots of PACKAGECONFIG values explicitly in a distro or local.conf.

Forgive my 01:40 AM brain if any of that doesn't make sense.

Quoted 2 lines

Andreas

Signature · 3 lines
Paul Barker
Managing Director & Principal Engineer
Beta Five Ltd
#4 lore raw
In reply to Andreas Müller
Quoted 14 lines · Andreas Müller
Quoted 1 line · Paul Barker

On 23/04/2019 00:46, Andreas Müller wrote:

...

Quoted 11 lines

meta-multimedia/recipes-multimedia/vlc/vlc.inc EXTRA_OECONF = "\ · line 47

Quoted 5 lines
meta-multimedia/recipes-multimedia/vlc/vlc.inc +4 -1
-PACKAGECONFIG ?= " live555 dc1394 dv1394 notify fontconfig freetype dvdread png ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG ?= " \
+    live555 dc1394 dv1394 notify fontconfig freetype dvdread png \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)} \

I don't like this change based on BBFILE_COLLECTIONS, it's just a different way of having things change when you add an extra layer. We wouldn't want an unconditional bbappend in meta-qt5 to set this and so we don't want to set it here when that layer is added.

Quoted 3 lines
Quoted 1 line

Perhaps we should have qt5 as a distro feature instead?

Isn't that a different naming for the same thing not working properly if you don't have meta-qt5 in layers?

Isn't this a reason for moving vlc out of meta-openembedded? Or alternatively moving qt5 to meta-openembedded.

Quoted 1 line

Andreas

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#5 lore raw
Quoted 11 lines · Adrian Bunk
Quoted 3 lines
Quoted 1 line

Perhaps we should have qt5 as a distro feature instead?

Isn't that a different naming for the same thing not working properly if you don't have meta-qt5 in layers?

Isn't this a reason for moving vlc out of meta-openembedded? Or alternatively moving qt5 to meta-openembedded.

Quoted 1 line

Andreas

cu
Adrian

This discussion turns into the same direction as seen before on other occasions:

My priority is building images where things work out of the box and it seems this expectation is not common here. There are several default configurations around reducing things down to death to save build time and make yocto script happy. I disagree completely but won't discuss further. So I will

* send V3 of this patch not enabling qt5 if meta-qt5 is in layers
* add a bbappend to my meta-mortsgna because that's what distro layers are for

Andreas

#6 lore raw
Quoted 20 lines · Andreas Müller
Quoted 11 lines · Adrian Bunk
Quoted 3 lines
Quoted 1 line

Perhaps we should have qt5 as a distro feature instead?

Isn't that a different naming for the same thing not working properly if you don't have meta-qt5 in layers?

Isn't this a reason for moving vlc out of meta-openembedded? Or alternatively moving qt5 to meta-openembedded.

Quoted 1 line

Andreas

cu
Adrian

This discussion turns into the same direction as seen before on other occasions:

My priority is building images where things work out of the box and it seems this expectation is not common here. There are several default configurations around reducing things down to death to save build time and make yocto script happy. I disagree completely but won't discuss further. So I will

Quoted 5 lines

* send V3 of this patch not enabling qt5 if meta-qt5 is in layers
* add a bbappend to my meta-mortsgna because that's what distro layers are for

Andreas

The issue here is the different 'out of the box' situations Yocto needs to support. Some of the boards I've deployed images on have 16MB flash for the rootfs (with a greatly reduced write speed to the volume due to hardware bugs), others currently have a 16GB SD card in them.

Distro layers are the right place for making cut off decisions on the minimum you'll support. A distro config that produces 'out of the box' working images for a subset of the boards Yocto Project supports is definitely a good thing to have.

Thanks,

Signature · 3 lines
Paul Barker
Managing Director & Principal Engineer
Beta Five Ltd
#7 lore raw
In reply to Andreas Müller
Quoted 12 lines · Andreas Müller
Quoted 11 lines · Adrian Bunk
Quoted 3 lines
Quoted 1 line

Perhaps we should have qt5 as a distro feature instead?

Isn't that a different naming for the same thing not working properly if you don't have meta-qt5 in layers?

Isn't this a reason for moving vlc out of meta-openembedded? Or alternatively moving qt5 to meta-openembedded.

Quoted 1 line

Andreas

cu
Adrian

Quoted 8 lines

This discussion turns into the same direction as seen before on other occasions:

My priority is building images where things work out of the box and it seems this expectation is not common here. There are several default configurations around reducing things down to death to save build time and make yocto script happy. I disagree completely but won't discuss further.
...

That's not what I was talking about.

My point is that there is no point in shipping it in meta-openembedded if it is mostly useless without an additional layer.

This means vlc should be in the same layer as qt5.[1]
Which means one of the two recipes should be moved to a different layer.

Quoted 1 line

Andreas

cu
Adrian

[1] or vlc should be in a layer depending on meta-qt5

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed