[v6,14/28] package/qt5webengine: Convert to qmake infra
diff mbox series

Message ID 20200217212350.29750-15-anaumann@ultratronik.de
State Accepted
Headers show
Series
  • Qt5 qmake infra and per-package compatibility
Related show

Commit Message

Andreas Naumann Feb. 17, 2020, 9:23 p.m. UTC
Mostly straightforward conversion but keeping custom config/build env
to apply the python2 workaround.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5/qt5webengine/qt5webengine.mk | 47 +++---------------------
 1 file changed, 6 insertions(+), 41 deletions(-)

Comments

Thomas Petazzoni March 11, 2020, 10:01 p.m. UTC | #1
Hello,

On Mon, 17 Feb 2020 22:23:36 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> Mostly straightforward conversion but keeping custom config/build env
> to apply the python2 workaround.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>

I've applied, but I have a comment, see below.

> +QT5WEBENGINE_CONF_ENV = $(QT5WEBENGINE_ENV)
> +QT5WEBENGINE_MAKE_ENV = $(QT5WEBENGINE_ENV)

I'm not really thrilled by this, and we had to do the same in
qt5webkit. This is modeled after the autotools-package infrastructure,
where normally environment variables passed to the ./configure script
don't need to be passed again at build time.

But if with qmake they are needed at both configure time and build
time, then perhaps we should change to have a single <pkg>_ENV
variable, passed at both configure and build time.

Let's see how many packages need this, and we'll adjust later if needed.

Best regards,

Thomas
Andreas Naumann March 16, 2020, 9:15 p.m. UTC | #2
Hi,

On 11.03.20 23:01, Thomas Petazzoni wrote:
> Hello,
> 
> On Mon, 17 Feb 2020 22:23:36 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
>> Mostly straightforward conversion but keeping custom config/build env
>> to apply the python2 workaround.
>>
>> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> 
> I've applied, but I have a comment, see below.
> 
>> +QT5WEBENGINE_CONF_ENV = $(QT5WEBENGINE_ENV)
>> +QT5WEBENGINE_MAKE_ENV = $(QT5WEBENGINE_ENV)
> 
> I'm not really thrilled by this, and we had to do the same in
> qt5webkit. This is modeled after the autotools-package infrastructure,
> where normally environment variables passed to the ./configure script
> don't need to be passed again at build time.
> 
> But if with qmake they are needed at both configure time and build
> time, then perhaps we should change to have a single <pkg>_ENV
> variable, passed at both configure and build time.

Actually I dont know which of the env settings are needed at configure 
time and which at build time or both. I've just kept the logic as it was.

regards,
Andreas

> 
> Let's see how many packages need this, and we'll adjust later if needed.
> 
> Best regards,
> 
> Thomas
>

Patch
diff mbox series

diff --git a/package/qt5/qt5webengine/qt5webengine.mk b/package/qt5/qt5webengine/qt5webengine.mk
index 1d5ee8d819..798b777df0 100644
--- a/package/qt5/qt5webengine/qt5webengine.mk
+++ b/package/qt5/qt5webengine/qt5webengine.mk
@@ -30,16 +30,16 @@  ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
 QT5WEBENGINE_DEPENDENCIES += host-libpng host-libnss libnss
 endif
 
-QT5WEBENGINE_QMAKEFLAGS += WEBENGINE_CONFIG+=use_system_ffmpeg
+QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_system_ffmpeg
 
 ifeq ($(BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS),y)
-QT5WEBENGINE_QMAKEFLAGS += WEBENGINE_CONFIG+=use_proprietary_codecs
+QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_proprietary_codecs
 endif
 
 ifeq ($(BR2_PACKAGE_QT5WEBENGINE_ALSA),y)
 QT5WEBENGINE_DEPENDENCIES += alsa-lib
 else
-QT5WEBENGINE_QMAKEFLAGS += QT_CONFIG-=alsa
+QT5WEBENGINE_CONF_OPTS += QT_CONFIG-=alsa
 endif
 
 # QtWebengine's build system uses python, but only supports python2. We work
@@ -63,42 +63,7 @@  QT5WEBENGINE_PRE_CONFIGURE_HOOKS += QT5WEBENGINE_CREATE_HOST_PKG_CONFIG
 QT5WEBENGINE_ENV += GN_PKG_CONFIG_HOST=$(@D)/host-bin/host-pkg-config
 endif
 
-define QT5WEBENGINE_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5WEBENGINE_ENV) $(HOST_DIR)/bin/qmake $(QT5WEBENGINE_QMAKEFLAGS))
-endef
-
-define QT5WEBENGINE_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(QT5WEBENGINE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5WEBENGINE_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(QT5WEBENGINE_ENV) $(MAKE) -C $(@D) install
-endef
-
-define QT5WEBENGINE_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtWebEngine $(TARGET_DIR)/usr/qml/
-endef
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5WEBENGINE_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/webengine* $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifneq ($(BR2_STATIC_LIBS),y)
-define QT5WEBENGINE_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebEngine*.so.* $(TARGET_DIR)/usr/lib
-	cp -dpf $(STAGING_DIR)/usr/libexec/QtWebEngineProcess $(TARGET_DIR)/usr/libexec/
-	cp -dpfr $(STAGING_DIR)/usr/resources/ $(TARGET_DIR)/usr/
-	mkdir -p $(TARGET_DIR)/usr/translations/qtwebengine_locales/
-	cp -dpfr $(STAGING_DIR)/usr/translations/qtwebengine_locales $(TARGET_DIR)/usr/translations/qtwebengine_locales/
-endef
-endif
-
-define QT5WEBENGINE_INSTALL_TARGET_CMDS
-	$(QT5WEBENGINE_INSTALL_TARGET_LIBS)
-	$(QT5WEBENGINE_INSTALL_TARGET_QMLS)
-	$(QT5WEBENGINE_INSTALL_TARGET_EXAMPLES)
-endef
+QT5WEBENGINE_CONF_ENV = $(QT5WEBENGINE_ENV)
+QT5WEBENGINE_MAKE_ENV = $(QT5WEBENGINE_ENV)
 
-$(eval $(generic-package))
+$(eval $(qmake-package))