Skip to contentSkip to conversation

package/qt5/qt5webengine: fix options and dependencies (branch yem/qt5webengine-options)

PATCH New Yann E. MORIN 5 participants 14 messages Sep 16, 2020 – Jan 11, 2021 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

v4 cover package/qt5/qt5webengine: fix options and dependencies (branch yem/qt5webengine-options)

Hello All!

This series is a refresh and respin of the commits by Nathan, which got reviewed by Peter.

I (Yann) merely did the following changes:

1. refresh on top of master, now that we no longer have a version choice for qt5,

2. split the first patch in two: the first to switch to the new options instead of defines, the second to add the missing dependency

As such, I did not carry Peter's review on the first patch, since I split it.

Note: this is not even build-tested; it's just a refresh-n-respin.

Regards,
Yann E. MORIN.

The following changes since commit e5f92758ff52ff713c9b45a52f4fdb1bfabdfc2f

package/qt5/qt5webengine: fix build with Bison 3.7 (2020-09-16 22:13:20 +0200)

are available in the git repository at:

https://git.busybox.net/~ymorin/git/buildroot

for you to fetch changes up to 6efc39e9d97769fae93be2bcb91f56b050dda219

package/qt5/qt5webengine: fix build dependencies for autodetected packages (2020-09-16 23:01:16 +0200)

----------------------------------------------------------------
Nathan Ford (3):
package/qt5/qt5webengine: fix ffmpeg/codec/alsa option handling for latest package/qt5/qt5webengine: ffmpeg supports needs webp mux package/qt5/qt5webengine: fix build dependencies for autodetected packages

 package/qt5/qt5webengine/Config.in       |  1 +
 package/qt5/qt5webengine/qt5webengine.mk | 34 +++++++++++++++++++++++++++++---
 2 files changed, 32 insertions(+), 3 deletions(-)
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH v4 1/3 package/qt5/qt5webengine: fix ffmpeg/codec/alsa option handling for latest

From: Nathan Ford <[email protected]>

As of qt 5.10, options are handled as arguments to qmake instead of defines:

qt5webengine-5.12.2$ vi dist/changes-5.9.0

Important Changes
-----------------

- Configure options are now handled by the global configure script. This means options previously controlled by WEBENGINE_CONFIG options should now use configure flags. For instance the configure command-line option -proprietary-codecs replaces WEBENGINE_CONFIG+=use_proprietary_codecs.

qt5webengine-5.12.2$ vi dist/changes-5.10.0

Important Changes
-----------------

* WebEngine Features are now configured as Qt features and WEBENGINE_CONFIG has been removed.

Fixes #12416 (which was an inspiration for this patch)

[yann.morin.1998 at free.fr:
- refresh on top of master, as we no longer have the version choice
- extend commit log
- mocve the new dependency to its own commit
]

---
 package/qt5/qt5webengine/qt5webengine.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/qt5/qt5webengine/qt5webengine.mk +3 -3
index 9101f35937..5df6942977 100644
@@ -29,16 +29,16 @@ endif
 
 QT5WEBENGINE_DEPENDENCIES += host-libpng host-libnss libnss
 
-QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_system_ffmpeg
+QT5WEBENGINE_CONF_OPTS = -webengine-ffmpeg
 
 ifeq ($(BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS),y)
-QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_proprietary_codecs
+QT5WEBENGINE_CONF_OPTS += -webengine-proprietary-codecs
 endif
 
 ifeq ($(BR2_PACKAGE_QT5WEBENGINE_ALSA),y)
 QT5WEBENGINE_DEPENDENCIES += alsa-lib
 else
-QT5WEBENGINE_CONF_OPTS += QT_CONFIG-=alsa
+QT5WEBENGINE_CONF_OPTS += -no-webengine-alsa
 endif
 
 # QtWebengine's build system uses python, but only supports python2. We work
Signature · 1 line
2.20.1
#2 lore raw

PATCH v4 1/3 package/qt5/qt5webengine: fix ffmpeg/codec/alsa option handling for latest

Hello,

Quoted 12 lines · On Wed, 16 Sep 2020 23:11:32 +0200 "Yann E. MORIN" <[email protected]>…
package/qt5/qt5webengine/qt5webengine.mk +1 -1
index 9101f35937..5df6942977 100644
@@ -29,16 +29,16 @@ endif
 
 QT5WEBENGINE_DEPENDENCIES += host-libpng host-libnss libnss
 
-QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_system_ffmpeg
+QT5WEBENGINE_CONF_OPTS = -webengine-ffmpeg
 
 ifeq ($(BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS),y)

package/qt5/qt5webengine/qt5webengine.mk endif · line 42

Quoted 10 lines
package/qt5/qt5webengine/qt5webengine.mk +2 -2
-QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_proprietary_codecs
+QT5WEBENGINE_CONF_OPTS += -webengine-proprietary-codecs
 endif
 
 ifeq ($(BR2_PACKAGE_QT5WEBENGINE_ALSA),y)
 QT5WEBENGINE_DEPENDENCIES += alsa-lib
 else
-QT5WEBENGINE_CONF_OPTS += QT_CONFIG-=alsa
+QT5WEBENGINE_CONF_OPTS += -no-webengine-alsa
 endif

In the original patch, there was a "--" that was added to separate these webengine options from the main options. You have not kept that. Are you sure this is OK ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH v4 1/3 package/qt5/qt5webengine: fix ffmpeg/codec/alsa option handling for latest

Thomas, All,

On 2020-09-17 14:55 +0200, Thomas Petazzoni spake thusly:

Quoted 18 lines
Quoted 16 lines · On Wed, 16 Sep 2020 23:11:32 +0200 "Yann E. MORIN" <[email protected]>…
package/qt5/qt5webengine/qt5webengine.mk +2 -2
index 9101f35937..5df6942977 100644
@@ -29,16 +29,16 @@ endif
 
 QT5WEBENGINE_DEPENDENCIES += host-libpng host-libnss libnss
 
-QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_system_ffmpeg
+QT5WEBENGINE_CONF_OPTS = -webengine-ffmpeg
 
 ifeq ($(BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS),y)
-QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_proprietary_codecs
+QT5WEBENGINE_CONF_OPTS += -webengine-proprietary-codecs
 endif
 
Quoted 10 lines

package/qt5/qt5webengine/qt5webengine.mk endif · line 42

Quoted 6 lines
package/qt5/qt5webengine/qt5webengine.mk +1 -1
 ifeq ($(BR2_PACKAGE_QT5WEBENGINE_ALSA),y)
 QT5WEBENGINE_DEPENDENCIES += alsa-lib
 else
-QT5WEBENGINE_CONF_OPTS += QT_CONFIG-=alsa
+QT5WEBENGINE_CONF_OPTS += -no-webengine-alsa
 endif

In the original patch, there was a "--" that was added to separate these webengine options from the main options. You have not kept that. Are you sure this is OK ?

I am not sure, hence I said in the cover-letter "Note: this is not even build-tested; it's just a refresh-n-respin."

I'll do a test-build tonight (I did not have spare CPU cycles yesterday, but tonight I should have some.)

However, none of the qmake-package we have use that '--'.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH v4 1/3 package/qt5/qt5webengine: fix ffmpeg/codec/alsa option handling for latest

Hello Yann,

Quoted 32 lines · Yann E. MORIN

Thomas, All,

On 2020-09-17 14:55 +0200, Thomas Petazzoni spake thusly:

Quoted 18 lines
Quoted 16 lines · On Wed, 16 Sep 2020 23:11:32 +0200 "Yann E. MORIN" <[email protected]>…
package/qt5/qt5webengine/qt5webengine.mk +2 -2
index 9101f35937..5df6942977 100644
@@ -29,16 +29,16 @@ endif
 
 QT5WEBENGINE_DEPENDENCIES += host-libpng host-libnss libnss
 
-QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_system_ffmpeg
+QT5WEBENGINE_CONF_OPTS = -webengine-ffmpeg
 
 ifeq ($(BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS),y)
-QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_proprietary_codecs
+QT5WEBENGINE_CONF_OPTS += -webengine-proprietary-codecs
 endif
 
Quoted 10 lines

package/qt5/qt5webengine/qt5webengine.mk endif · line 42

Quoted 6 lines
package/qt5/qt5webengine/qt5webengine.mk +1 -1
 ifeq ($(BR2_PACKAGE_QT5WEBENGINE_ALSA),y)
 QT5WEBENGINE_DEPENDENCIES += alsa-lib
 else
-QT5WEBENGINE_CONF_OPTS += QT_CONFIG-=alsa
+QT5WEBENGINE_CONF_OPTS += -no-webengine-alsa
 endif

In the original patch, there was a "--" that was added to separate these webengine options from the main options. You have not kept that. Are you sure this is OK ?

Quoted 7 lines

I am not sure, hence I said in the cover-letter "Note: this is not even build-tested; it's just a refresh-n-respin."

I'll do a test-build tonight (I did not have spare CPU cycles yesterday, but tonight I should have some.)

However, none of the qmake-package we have use that '--'.

I believe Thomas is right, all other qmake-packages set an option <name>=|-=|+=<value> as the old behavior before the patch and not the 'real' option one after the patch (see above 'QT_CONFIG-=alsa' vs. '-no-webengine-alsa' or in case for the first one '-- -webengine-ffmpeg'...

Regards,
Peter

Quoted 4 lines

Regards,
Yann E. MORIN.

#5 lore raw

PATCH v4 1/3 package/qt5/qt5webengine: fix ffmpeg/codec/alsa option handling for latest

Hi All,

I can't speak for newer qt5 versions, but for 5.14.2 the -- is required. I don't understand the qt build system well enough to explain why.

--Nate

Quoted 63 lines · Peter Seiderer

Hello Yann,

Quoted 32 lines · Yann E. MORIN

Thomas, All,

On 2020-09-17 14:55 +0200, Thomas Petazzoni spake thusly:

Quoted 18 lines
Quoted 16 lines · On Wed, 16 Sep 2020 23:11:32 +0200 "Yann E. MORIN" <[email protected]>…
package/qt5/qt5webengine/qt5webengine.mk +2 -2
index 9101f35937..5df6942977 100644
@@ -29,16 +29,16 @@ endif
 
 QT5WEBENGINE_DEPENDENCIES += host-libpng host-libnss libnss
 
-QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_system_ffmpeg
+QT5WEBENGINE_CONF_OPTS = -webengine-ffmpeg
 
 ifeq ($(BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS),y)
-QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_proprietary_codecs
+QT5WEBENGINE_CONF_OPTS += -webengine-proprietary-codecs
 endif
 
Quoted 10 lines

package/qt5/qt5webengine/qt5webengine.mk endif · line 42

Quoted 6 lines
package/qt5/qt5webengine/qt5webengine.mk +1 -1
 ifeq ($(BR2_PACKAGE_QT5WEBENGINE_ALSA),y)
 QT5WEBENGINE_DEPENDENCIES += alsa-lib
 else
-QT5WEBENGINE_CONF_OPTS += QT_CONFIG-=alsa
+QT5WEBENGINE_CONF_OPTS += -no-webengine-alsa
 endif

In the original patch, there was a "--" that was added to separate these webengine options from the main options. You have not kept that. Are you sure this is OK ?

Quoted 7 lines

I am not sure, hence I said in the cover-letter "Note: this is not even build-tested; it's just a refresh-n-respin."

I'll do a test-build tonight (I did not have spare CPU cycles yesterday, but tonight I should have some.)

However, none of the qmake-package we have use that '--'.

I believe Thomas is right, all other qmake-packages set an option <name>=|-=|+=<value> as the old behavior before the patch and not the 'real' option one after the patch (see above 'QT_CONFIG-=alsa' vs. '-no-webengine-alsa' or in case for the first one '-- -webengine-ffmpeg'...

Regards,
Peter

Quoted 4 lines

Regards,
Yann E. MORIN.

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#6 lore raw

PATCH v4 1/3 package/qt5/qt5webengine: fix ffmpeg/codec/alsa option handling for latest

Nathan, Peter, All,

On 2020-09-17 15:23 -0400, Nathan Ford spake thusly:

Quoted 3 lines

I can't speak for newer qt5 versions, but for 5.14.2 the -- is required. I don't understand the qt build system well enough to explain why.

As said on the cover letter, I did not even build-tested it, and just refreshed the series, and I semi-voluntarily removed the --. I now did a build, and they are indeed needed.

Thanks for the sharp eyes!

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#7 lore raw

PATCH v4 2/3 package/qt5/qt5webengine: ffmpeg supports needs webp mux

In reply to Yann E. MORIN

From: Nathan Ford <[email protected]>

qt5webengine also now requires webp mux support or the auto detection of ffmpeg will fail.

[yann.morin.1998 at free.fr:
- refresh on master
- split into ists own patch
]

---
 package/qt5/qt5webengine/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/qt5/qt5webengine/Config.in +1 -0
index 9879345e1e..c830420479 100644
@@ -44,6 +44,7 @@ config BR2_PACKAGE_QT5WEBENGINE
 	select BR2_PACKAGE_OPUS
 	select BR2_PACKAGE_WEBP
 	select BR2_PACKAGE_WEBP_DEMUX
+	select BR2_PACKAGE_WEBP_MUX
 	select BR2_PACKAGE_QT5BASE_DBUS
 	select BR2_PACKAGE_QT5BASE_EGLFS
 	select BR2_PACKAGE_QT5BASE_FONTCONFIG
Signature · 1 line
2.20.1
#8 lore raw

PATCH v4 3/3 package/qt5/qt5webengine: fix build dependencies for autodetected packages

In reply to Yann E. MORIN

From: Nathan Ford <[email protected]>

---
 package/qt5/qt5webengine/qt5webengine.mk | 28 ++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
package/qt5/qt5webengine/qt5webengine.mk +28 -0
index 5df6942977..520d32835b 100644
@@ -41,6 +41,34 @@ else
 QT5WEBENGINE_CONF_OPTS += -no-webengine-alsa
 endif
 
+ifeq ($(BR2_PACKAGE_JSONCPP),y)
+QT5WEBENGINE_DEPENDENCIES += jsoncpp
+endif
+
+ifeq ($(BR2_PACKAGE_LCMS2),y)
+QT5WEBENGINE_DEPENDENCIES += lcms2
+endif
+
+ifeq ($(BR2_PACKAGE_LIBEVENT),y)
+QT5WEBENGINE_DEPENDENCIES += libevent
+endif
+
+ifeq ($(BR2_PACKAGE_LIBXML2),y)
+QT5WEBENGINE_DEPENDENCIES += libxml2
+endif
+
+ifeq ($(BR2_PACKAGE_LIBXSLT),y)
+QT5WEBENGINE_DEPENDENCIES += libxslt
+endif
+
+ifeq ($(BR2_PACKAGE_PROTOBUF),y)
+QT5WEBENGINE_DEPENDENCIES += protobuf
+endif
+
+ifeq ($(BR2_PACKAGE_SNAPPY),y)
+QT5WEBENGINE_DEPENDENCIES += snappy
+endif
+
 # QtWebengine's build system uses python, but only supports python2. We work
 # around this by forcing python2 early in the PATH, via a python->python2
 # symlink.
Signature · 1 line
2.20.1
#9 lore raw

PATCH v4 3/3 package/qt5/qt5webengine: fix build dependencies for autodetected packages

Quoted 17 lines · On Wed, 16 Sep 2020 23:11:34 +0200 "Yann E. MORIN" <[email protected]>…
package/qt5/qt5webengine/qt5webengine.mk +17 -0
+ifeq ($(BR2_PACKAGE_JSONCPP),y)
+QT5WEBENGINE_DEPENDENCIES += jsoncpp
+endif
+
+ifeq ($(BR2_PACKAGE_LCMS2),y)
+QT5WEBENGINE_DEPENDENCIES += lcms2
+endif
+
+ifeq ($(BR2_PACKAGE_LIBEVENT),y)
+QT5WEBENGINE_DEPENDENCIES += libevent
+endif
+
+ifeq ($(BR2_PACKAGE_LIBXML2),y)
+QT5WEBENGINE_DEPENDENCIES += libxml2
+endif
+
+ifeq ($(BR2_PACKAGE_LIBXSLT),y)

package/qt5/qt5webengine/qt5webengine.mk else · line 70

Quoted 10 lines
package/qt5/qt5webengine/qt5webengine.mk +10 -0
+QT5WEBENGINE_DEPENDENCIES += libxslt
+endif
+
+ifeq ($(BR2_PACKAGE_PROTOBUF),y)
+QT5WEBENGINE_DEPENDENCIES += protobuf
+endif
+
+ifeq ($(BR2_PACKAGE_SNAPPY),y)
+QT5WEBENGINE_DEPENDENCIES += snappy
+endif

I am not 100% sure but I believe those dependencies do have options, much like the -webengine-ffmpeg option that PATCH 1/3 is using. If you look at ./src/core/configure.json in the qt5webengine sources, you can see:

    "commandline": {
        "options": {
            "webengine-alsa": "boolean",
            "webengine-embedded-build": "boolean",
            "webengine-full-debug-info": "boolean",
            "webengine-icu": { "type": "enum", "name": "webengine-system-icu", "values": { "system": "yes", "qt": "no" } },
            "webengine-ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } },
            "webengine-opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } },
            "webengine-webp": { "type": "enum", "name": "webengine-system-libwebp", "values": { "system": "yes", "qt": "no" } },
            "webengine-pepper-plugins": "boolean",
            "webengine-printing-and-pdf": "boolean",
            "webengine-proprietary-codecs": "boolean",
            "webengine-pulseaudio": "boolean",
            "webengine-spellchecker": "boolean",
            "webengine-native-spellchecker": "boolean",
            "webengine-extensions": "boolean",
            "webengine-webrtc": "boolean",
            "webengine-geolocation": "boolean",
            "webengine-webchannel": "boolean",
            "webengine-kerberos": "boolean",
            "alsa": { "type": "boolean", "name": "webengine-alsa" },
            "pulseaudio": { "type": "boolean", "name": "webengine-pulseaudio" },
            "ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } },
            "opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } },
            "webp": { "type": "enum", "name": "webengine-system-libwebp", "values": { "system": "yes", "qt": "no" } },
            "pepper-plugins": { "type": "boolean", "name": "webengine-pepper-plugins" },
            "printing-and-pdf": { "type": "boolean", "name": "webengine-printing-and-pdf" },
            "proprietary-codecs": { "type": "boolean", "name": "webengine-proprietary-codecs" },
            "spellchecker": { "type": "boolean", "name": "webengine-spellchecker" },
            "extensions": { "type": "boolean", "name": "webengine-extensions" },
            "webrtc": { "type": "boolean", "name": "webengine-webrtc" }
        }
    },

So it seems like if we have a -webengine-ffmpeg option, then we should also have many other options to enable (and perhaps disable ?) other optional features.

However, I'm not sure to understand the difference between the "webengine-<something>" option and the corresponding "<something>" option.

Also, it seems like some options such as webengine-ffmpeg or webengine-icu can take multiple values: they are enums and not booleans. should we use -webengine-ffmpeg=system for example ? Ditto for the other dependencies;

For the record, the qt5webengine source code bundles chromium in ./src/3rdparty/, which itself bundles a bunch of things including ffmpeg in ./src/3rdparty/chromium/third_party/ffmpeg/ (do you like when a 3rdparty folder includes another third_party folder ?).

Obviously, in the context of Buildroot, we'd prefer to use as few bundled libraries as possible, and use as much as possible system libraries.

How is the configure.json above being parsed and used ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#10 lore raw

PATCH v4 3/3 package/qt5/qt5webengine: fix build dependencies for autodetected packages

Hi Thomas,

In src/buildtools/configure.json some of the library dependencies have had their auto detection disabled ( look for the key "autoDetect" in the features section ), at least as of 5.14.2 ( I have not migrated to newer for the projects I work on yet ).

I assumed that any lib that qt5webengine built itself was a hard dependency, so if it is present in the buildroot build, use it, otherwise let qt5webengine build its own. The alternative is to make all those libs build dependencies of qt5webengine.

--Nate

Quoted 104 lines · Thomas Petazzoni
Quoted 17 lines · On Wed, 16 Sep 2020 23:11:34 +0200 "Yann E. MORIN" <[email protected]>…
package/qt5/qt5webengine/qt5webengine.mk +17 -0
+ifeq ($(BR2_PACKAGE_JSONCPP),y)
+QT5WEBENGINE_DEPENDENCIES += jsoncpp
+endif
+
+ifeq ($(BR2_PACKAGE_LCMS2),y)
+QT5WEBENGINE_DEPENDENCIES += lcms2
+endif
+
+ifeq ($(BR2_PACKAGE_LIBEVENT),y)
+QT5WEBENGINE_DEPENDENCIES += libevent
+endif
+
+ifeq ($(BR2_PACKAGE_LIBXML2),y)
+QT5WEBENGINE_DEPENDENCIES += libxml2
+endif
+
+ifeq ($(BR2_PACKAGE_LIBXSLT),y)

package/qt5/qt5webengine/qt5webengine.mk else · line 70

Quoted 10 lines
package/qt5/qt5webengine/qt5webengine.mk +10 -0
+QT5WEBENGINE_DEPENDENCIES += libxslt
+endif
+
+ifeq ($(BR2_PACKAGE_PROTOBUF),y)
+QT5WEBENGINE_DEPENDENCIES += protobuf
+endif
+
+ifeq ($(BR2_PACKAGE_SNAPPY),y)
+QT5WEBENGINE_DEPENDENCIES += snappy
+endif

I am not 100% sure but I believe those dependencies do have options, much like the -webengine-ffmpeg option that PATCH 1/3 is using. If you look at ./src/core/configure.json in the qt5webengine sources, you can see:

    "commandline": {
        "options": {
            "webengine-alsa": "boolean",
            "webengine-embedded-build": "boolean",
            "webengine-full-debug-info": "boolean",
            "webengine-icu": { "type": "enum", "name": "webengine-system-icu", "values": { "system": "yes", "qt": "no" } },
            "webengine-ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } },
            "webengine-opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } },
            "webengine-webp": { "type": "enum", "name": "webengine-system-libwebp", "values": { "system": "yes", "qt": "no" } },
            "webengine-pepper-plugins": "boolean",
            "webengine-printing-and-pdf": "boolean",
            "webengine-proprietary-codecs": "boolean",
            "webengine-pulseaudio": "boolean",
            "webengine-spellchecker": "boolean",
            "webengine-native-spellchecker": "boolean",
            "webengine-extensions": "boolean",
            "webengine-webrtc": "boolean",
            "webengine-geolocation": "boolean",
            "webengine-webchannel": "boolean",
            "webengine-kerberos": "boolean",
            "alsa": { "type": "boolean", "name": "webengine-alsa" },
            "pulseaudio": { "type": "boolean", "name": "webengine-pulseaudio" },
            "ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } },
            "opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } },
            "webp": { "type": "enum", "name": "webengine-system-libwebp", "values": { "system": "yes", "qt": "no" } },
            "pepper-plugins": { "type": "boolean", "name": "webengine-pepper-plugins" },
            "printing-and-pdf": { "type": "boolean", "name": "webengine-printing-and-pdf" },
            "proprietary-codecs": { "type": "boolean", "name": "webengine-proprietary-codecs" },
            "spellchecker": { "type": "boolean", "name": "webengine-spellchecker" },
            "extensions": { "type": "boolean", "name": "webengine-extensions" },
            "webrtc": { "type": "boolean", "name": "webengine-webrtc" }
        }
    },

So it seems like if we have a -webengine-ffmpeg option, then we should also have many other options to enable (and perhaps disable ?) other optional features.

However, I'm not sure to understand the difference between the "webengine-<something>" option and the corresponding "<something>" option.

Also, it seems like some options such as webengine-ffmpeg or webengine-icu can take multiple values: they are enums and not booleans. should we use -webengine-ffmpeg=system for example ? Ditto for the other dependencies;

For the record, the qt5webengine source code bundles chromium in ./src/3rdparty/, which itself bundles a bunch of things including ffmpeg in ./src/3rdparty/chromium/third_party/ffmpeg/ (do you like when a 3rdparty folder includes another third_party folder ?).

Obviously, in the context of Buildroot, we'd prefer to use as few bundled libraries as possible, and use as much as possible system libraries.

How is the configure.json above being parsed and used ?

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#11 lore raw

PATCH v4 3/3 package/qt5/qt5webengine: fix build dependencies for autodetected packages

Quoted 4 lines · On Thu, 17 Sep 2020 15:22:55 -0400 Nathan Ford <[email protected]> wrote:

In src/buildtools/configure.json some of the library dependencies have had their auto detection disabled ( look for the key "autoDetect" in the features section ), at least as of 5.14.2 ( I have not migrated to newer for the projects I work on yet ).

Ah yes, there was also src/buildtools/configure.json, which I don't know how it interacts with ./src/core/configure.json...

So, the ones that have "autoDetect": "false", it means that the build system doesn't try to detect them, and it will only enable them if explicitly enabled?

Quoted 4 lines

I assumed that any lib that qt5webengine built itself was a hard dependency, so if it is present in the buildroot build, use it, otherwise let qt5webengine build its own. The alternative is to make all those libs build dependencies of qt5webengine.

As much as possible we want to:

(1) Use system libraries installed of bundled ones

(2) Be explicit when handling optional dependencies by telling the build system "please enable support for FOO", "please disable support for FOO".

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#13 lore raw

PATCH v4 3/3 package/qt5/qt5webengine: fix build dependencies for autodetected packages

Re-add CC: Yann, buildroot

Sorry,
Peter

Quoted 127 lines · Peter Seiderer

Hello Thomas,

Quoted 27 lines · Thomas Petazzoni
Quoted 24 lines · On Wed, 16 Sep 2020 23:11:34 +0200 "Yann E. MORIN" <[email protected]>…
package/qt5/qt5webengine/qt5webengine.mk +24 -0
+ifeq ($(BR2_PACKAGE_JSONCPP),y)
+QT5WEBENGINE_DEPENDENCIES += jsoncpp
+endif
+
+ifeq ($(BR2_PACKAGE_LCMS2),y)
+QT5WEBENGINE_DEPENDENCIES += lcms2
+endif
+
+ifeq ($(BR2_PACKAGE_LIBEVENT),y)
+QT5WEBENGINE_DEPENDENCIES += libevent
+endif
+
+ifeq ($(BR2_PACKAGE_LIBXML2),y)
+QT5WEBENGINE_DEPENDENCIES += libxml2
+endif
+
+ifeq ($(BR2_PACKAGE_LIBXSLT),y)
+QT5WEBENGINE_DEPENDENCIES += libxslt
+endif
+
+ifeq ($(BR2_PACKAGE_PROTOBUF),y)
+QT5WEBENGINE_DEPENDENCIES += protobuf
+endif
+
Quoted 8 lines

package/qt5/qt5webengine/qt5webengine.mk else · line 70

Quoted 3 lines
package/qt5/qt5webengine/qt5webengine.mk +3 -0
+ifeq ($(BR2_PACKAGE_SNAPPY),y)
+QT5WEBENGINE_DEPENDENCIES += snappy
+endif

I am not 100% sure but I believe those dependencies do have options, much like the -webengine-ffmpeg option that PATCH 1/3 is using. If you look at ./src/core/configure.json in the qt5webengine sources, you can see:

Do not see options for jsoncpp, lcms2, libevent, libxml2, libxslt, protobuf or snappy...

Quoted 35 lines
    "commandline": {
        "options": {
            "webengine-alsa": "boolean",
            "webengine-embedded-build": "boolean",
            "webengine-full-debug-info": "boolean",
            "webengine-icu": { "type": "enum", "name": "webengine-system-icu", "values": { "system": "yes", "qt": "no" } },
            "webengine-ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } },
            "webengine-opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } },
            "webengine-webp": { "type": "enum", "name": "webengine-system-libwebp", "values": { "system": "yes", "qt": "no" } },
            "webengine-pepper-plugins": "boolean",
            "webengine-printing-and-pdf": "boolean",
            "webengine-proprietary-codecs": "boolean",
            "webengine-pulseaudio": "boolean",
            "webengine-spellchecker": "boolean",
            "webengine-native-spellchecker": "boolean",
            "webengine-extensions": "boolean",
            "webengine-webrtc": "boolean",
            "webengine-geolocation": "boolean",
            "webengine-webchannel": "boolean",
            "webengine-kerberos": "boolean",
            "alsa": { "type": "boolean", "name": "webengine-alsa" },
            "pulseaudio": { "type": "boolean", "name": "webengine-pulseaudio" },
            "ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } },
            "opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } },
            "webp": { "type": "enum", "name": "webengine-system-libwebp", "values": { "system": "yes", "qt": "no" } },
            "pepper-plugins": { "type": "boolean", "name": "webengine-pepper-plugins" },
            "printing-and-pdf": { "type": "boolean", "name": "webengine-printing-and-pdf" },
            "proprietary-codecs": { "type": "boolean", "name": "webengine-proprietary-codecs" },
            "spellchecker": { "type": "boolean", "name": "webengine-spellchecker" },
            "extensions": { "type": "boolean", "name": "webengine-extensions" },
            "webrtc": { "type": "boolean", "name": "webengine-webrtc" }
        }
    },
Quoted 7 lines

So it seems like if we have a -webengine-ffmpeg option, then we should also have many other options to enable (and perhaps disable ?) other optional features.

However, I'm not sure to understand the difference between the "webengine-<something>" option and the corresponding "<something>" option.

I believe the second one is an (short) alias for the first/long one...

Quoted 5 lines

Also, it seems like some options such as webengine-ffmpeg or webengine-icu can take multiple values: they are enums and not booleans. should we use -webengine-ffmpeg=system for example ? Ditto for the other dependencies;

Or '-webengine-ffmpeg' means option enabled/yes --> use system one as the summary output (from the original submit, [1]) suggests:

    According to build/qt5webengine-5.12.7/config.summary:

      Optional system libraries used:
    [...]
       ffmpeg ............................... yes
    [...]
Quoted 9 lines

For the record, the qt5webengine source code bundles chromium in ./src/3rdparty/, which itself bundles a bunch of things including ffmpeg in ./src/3rdparty/chromium/third_party/ffmpeg/ (do you like when a 3rdparty folder includes another third_party folder ?).

Obviously, in the context of Buildroot, we'd prefer to use as few bundled libraries as possible, and use as much as possible system libraries.

Still a lot of space for improvements....

Regards,
Peter

[1] http://lists.busybox.net/pipermail/buildroot/2020-February/275313.html

Quoted 4 lines

How is the configure.json above being parsed and used ?

Thomas

#14 lore raw

v4 cover package/qt5/qt5webengine: fix options and dependencies (branch yem/qt5webengine-options)

In reply to Yann E. MORIN
Quoted 10 lines · Yann E. MORIN

Hello All!

This series is a refresh and respin of the commits by Nathan, which got reviewed by Peter.

I (Yann) merely did the following changes:

1. refresh on top of master, now that we no longer have a version choice for qt5,

Quoted 7 lines

2. split the first patch in two: the first to switch to the new options instead of defines, the second to add the missing dependency

As such, I did not carry Peter's review on the first patch, since I split it.

Note: this is not even build-tested; it's just a refresh-n-respin.

Since there was quite a bit of feedback on patches 1 and 3, I've marked this
series as Changes Requested.

Regards,
Arnout

Quoted 30 lines

Regards,
Yann E. MORIN.

The following changes since commit e5f92758ff52ff713c9b45a52f4fdb1bfabdfc2f

package/qt5/qt5webengine: fix build with Bison 3.7 (2020-09-16 22:13:20 +0200)

are available in the git repository at:

https://git.busybox.net/~ymorin/git/buildroot

for you to fetch changes up to 6efc39e9d97769fae93be2bcb91f56b050dda219

package/qt5/qt5webengine: fix build dependencies for autodetected packages (2020-09-16 23:01:16 +0200)

----------------------------------------------------------------
Nathan Ford (3):
package/qt5/qt5webengine: fix ffmpeg/codec/alsa option handling for latest package/qt5/qt5webengine: ffmpeg supports needs webp mux package/qt5/qt5webengine: fix build dependencies for autodetected packages

 package/qt5/qt5webengine/Config.in       |  1 +
 package/qt5/qt5webengine/qt5webengine.mk | 34 +++++++++++++++++++++++++++++---
 2 files changed, 32 insertions(+), 3 deletions(-)