Skip to contentSkip to conversation

qt5 add qmake.conf.in for eglfs

PATCH New Giulio Benetti 3 participants 11 messages Nov 8, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 qt5 add qmake.conf.in for eglfs

EGLFS_DEVICE_INTEGRATION = eglfs_* doesn't work correctly with previous patch EGLFS_DEVICE_INTEGRATION = eglfs_viv/eglfs_* must be written before include(../common/linux_device_post.conf)

Starting from qmake.conf.in,
generate qmake.conf substituting @EGLFS_DEVICE@ with eglfs_viv or eglfs_mali according to Package selection

Changes v1 -> v2:

* Moved qmake.conf to qmake.conf.in
* Added @EGLFS_DEVICE@ placeholder into qmake.conf.in
* Modified QT5BASE_CONFIGURE_QMAKE_CONFIG to use sed

---
 package/qt5/qt5base/{qmake.conf => qmake.conf.in} |  2 ++
 package/qt5/qt5base/qt5base.mk                    | 12 +++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)
 rename package/qt5/qt5base/{qmake.conf => qmake.conf.in} (95%)
package/qt5/qt5base/qmake.conf.in renamed from package/qt5/qt5base/qmake.conf +2 -0
similarity index 95%
rename from package/qt5/qt5base/qmake.conf
rename to package/qt5/qt5base/qmake.conf.in
index 8b6debe..fb698b9 100644
@@ -24,5 +24,7 @@ QMAKE_CFLAGS_ISYSTEM   =
 # Architecturespecific configuration
 include(arch.conf)
 
+EGLFS_DEVICE_INTEGRATION = @EGLFS_DEVICE@
+
 include(../common/linux_device_post.conf)
 load(qt_config)
package/qt5/qt5base/qt5base.mk +9 -3
index b3f9c79..d58a58a 100644
@@ -243,8 +243,13 @@ QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_DBUS) += Qt5DBus
 ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST)$(BR2_PACKAGE_IMX_GPU_VIV),yy)
 # use vivante backend
 define QT5BASE_CONFIGURE_QMAKE_CONFIG
-	echo "EGLFS_DEVICE_INTEGRATION = eglfs_viv" >> \
-		$(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf
+	sed 's/@EGLFS_DEVICE@/eglfs_viv/g' $(QT5BASE_PKGDIR)/qmake.conf.in > \
+		$(QT5BASE_PKGDIR)/qmake.conf
+endef
+else
+define QT5BASE_CONFIGURE_QMAKE_CONFIG
+	sed '/@EGLFS_DEVICE@/,+1d' $(QT5BASE_PKGDIR)/qmake.conf.in > \
+		$(QT5BASE_PKGDIR)/qmake.conf
 endef
 endif
 
@@ -263,9 +268,10 @@ endef
 endif
 
 define QT5BASE_CONFIGURE_CMDS
+	$(QT5BASE_CONFIGURE_QMAKE_CONFIG)
 	$(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qmake.conf \
 		$(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf
-	$(QT5BASE_CONFIGURE_QMAKE_CONFIG)
+	$(RM) $(QT5BASE_PKGDIR)/qmake.conf
 	$(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qplatformdefs.h \
 		$(@D)/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
 	$(QT5BASE_CONFIGURE_CONFIG_FILE)
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 2/2 add qmake.conf eglfs_mali option

Package qt5base didn't treat eglfs_mali.
Add support for eglfs_mali according to package selection

Changes v1->v2:
* Add eglfs_mali support

---
 package/qt5/qt5base/qt5base.mk | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
package/qt5/qt5base/qt5base.mk +11 -2
index d58a58a..23f5138 100644
@@ -240,18 +240,27 @@ QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_PRINTSUPPORT) += Qt5PrintSupport
 
 QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_DBUS) += Qt5DBus
 
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST)$(BR2_PACKAGE_IMX_GPU_VIV),yy)
-# use vivante backend
+ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
+ifeq ($(BR2_PACKAGE_IMX_GPU_VIV),y)
+# use eglfs vivante backend
 define QT5BASE_CONFIGURE_QMAKE_CONFIG
 	sed 's/@EGLFS_DEVICE@/eglfs_viv/g' $(QT5BASE_PKGDIR)/qmake.conf.in > \
 		$(QT5BASE_PKGDIR)/qmake.conf
 endef
+else ifeq ($(filter y,$(BR2_PACKAGE_SUNXI_MALI) $(BR2_PACKAGE_SUNXI_MALI_MAINLINE)),y)
+# use eglfs mali backend
+define QT5BASE_CONFIGURE_QMAKE_CONFIG
+	sed 's/@EGLFS_DEVICE@/eglfs_mali/g' $(QT5BASE_PKGDIR)/qmake.conf.in > \
+		$(QT5BASE_PKGDIR)/qmake.conf
+endef
 else
+# don't use any eglfs backend
 define QT5BASE_CONFIGURE_QMAKE_CONFIG
 	sed '/@EGLFS_DEVICE@/,+1d' $(QT5BASE_PKGDIR)/qmake.conf.in > \
 		$(QT5BASE_PKGDIR)/qmake.conf
 endef
 endif
+endif
 
 ifneq ($(QT5BASE_CONFIG_FILE),)
 define QT5BASE_CONFIGURE_CONFIG_FILE
Signature · 1 line
2.7.4
#2 lore raw

PATCH v2 2/2 add qmake.conf eglfs_mali option

Quoted 19 lines · Giulio Benetti

Package qt5base didn't treat eglfs_mali.
Add support for eglfs_mali according to package selection

Changes v1->v2:
* Add eglfs_mali support

---
 package/qt5/qt5base/qt5base.mk | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
package/qt5/qt5base/qt5base.mk +0 -0
index d58a58a..23f5138 100644
@@ -240,18 +240,27 @@ QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_PRINTSUPPORT) += Qt5PrintSupport
 
 QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_DBUS) += Qt5DBus
 

package/qt5/qt5base/qt5base.mk QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_PRINTSUPPORT) += Qt5PrintSupport · line 250

Quoted 10 lines
package/qt5/qt5base/qt5base.mk +4 -2
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST)$(BR2_PACKAGE_IMX_GPU_VIV),yy)
-# use vivante backend
+ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
+ifeq ($(BR2_PACKAGE_IMX_GPU_VIV),y)
+# use eglfs vivante backend
 define QT5BASE_CONFIGURE_QMAKE_CONFIG
 	sed 's/@EGLFS_DEVICE@/eglfs_viv/g' $(QT5BASE_PKGDIR)/qmake.conf.in > \
 		$(QT5BASE_PKGDIR)/qmake.conf
 endef
+else ifeq ($(filter y,$(BR2_PACKAGE_SUNXI_MALI) $(BR2_PACKAGE_SUNXI_MALI_MAINLINE)),y)

Since the sunxi-mali-mainline package has not been accepted yet, this is not
correct (yet). To solve that, the easiest way is to include all three in a single series.

package/qt5/qt5base/qt5base.mk QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_PRINTSUPPORT) += Qt5PrintSupport · line 255

Quoted 5 lines
package/qt5/qt5base/qt5base.mk +5 -0
+# use eglfs mali backend
+define QT5BASE_CONFIGURE_QMAKE_CONFIG
+	sed 's/@EGLFS_DEVICE@/eglfs_mali/g' $(QT5BASE_PKGDIR)/qmake.conf.in > \
+		$(QT5BASE_PKGDIR)/qmake.conf
+endef

This is getting complicated, especially since there will probably be more
backends that need this... How about:

ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
ifeq ($(BR2_PACKAGE_IMX_GPU_VIV),y)
QT5BASE_EGLFS_DEVICE = eglfs_viv
else ifeq ($(BR2_PACKAGE_SUNXI_MALI),y)
QT5BASE_EGLFS_DEVICE = eglfs_mali
endif
endif

ifeq ($(QT5BASE_EGLFS_DEVICE),)

	sed '/@EGLFS_DEVICE@/,+1d' $(QT5BASE_PKGDIR)/qmake.conf.in > \
		$(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf
else
 	sed 's/@EGLFS_DEVICE@/$(QT5BASE_EGLFS_DEVICE)/g'
$(QT5BASE_PKGDIR)/qmake.conf.in > \
		$(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf

endif

Regards,
Arnout

Quoted 12 lines
package/qt5/qt5base/qt5base.mk +2 -0
 else
+# don't use any eglfs backend
 define QT5BASE_CONFIGURE_QMAKE_CONFIG
 	sed '/@EGLFS_DEVICE@/,+1d' $(QT5BASE_PKGDIR)/qmake.conf.in > \
 		$(QT5BASE_PKGDIR)/qmake.conf
 endef
 endif
+endif
 
 ifneq ($(QT5BASE_CONFIG_FILE),)
 define QT5BASE_CONFIGURE_CONFIG_FILE
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#3 lore raw

PATCH v2 2/2 add qmake.conf eglfs_mali option

Hi Arnout,

Il 08/11/2017 23:39, Arnout Vandecappelle ha scritto:

Quoted 22 lines · Giulio Benetti
Quoted 19 lines

Package qt5base didn't treat eglfs_mali.
Add support for eglfs_mali according to package selection

Changes v1->v2:
* Add eglfs_mali support

---
  package/qt5/qt5base/qt5base.mk | 13 +++++++++++--
  1 file changed, 11 insertions(+), 2 deletions(-)
package/qt5/qt5base/qt5base.mk +0 -0
index d58a58a..23f5138 100644
@@ -240,18 +240,27 @@ QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_PRINTSUPPORT) += Qt5PrintSupport
 
  QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_DBUS) += Qt5DBus
 
Quoted 14 lines

package/qt5/qt5base/qt5base.mk QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_PRINTSUPPORT) += Qt5PrintSupport · line 250

Quoted 10 lines
package/qt5/qt5base/qt5base.mk +4 -2
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST)$(BR2_PACKAGE_IMX_GPU_VIV),yy)
-# use vivante backend
+ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
+ifeq ($(BR2_PACKAGE_IMX_GPU_VIV),y)
+# use eglfs vivante backend
  define QT5BASE_CONFIGURE_QMAKE_CONFIG
  	sed 's/@EGLFS_DEVICE@/eglfs_viv/g' $(QT5BASE_PKGDIR)/qmake.conf.in > \
  		$(QT5BASE_PKGDIR)/qmake.conf
  endef
+else ifeq ($(filter y,$(BR2_PACKAGE_SUNXI_MALI) $(BR2_PACKAGE_SUNXI_MALI_MAINLINE)),y)

Since the sunxi-mali-mainline package has not been accepted yet, this is not
correct (yet). To solve that, the easiest way is to include all three in a single series.

You're right,
so I will add BR2_PACKAGE_SUNXI_MALI_MAINLINE later.

Quoted 18 lines

package/qt5/qt5base/qt5base.mk QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_PRINTSUPPORT) += Qt5PrintSupport · line 255

Quoted 6 lines
package/qt5/qt5base/qt5base.mk +5 -0
+# use eglfs mali backend
+define QT5BASE_CONFIGURE_QMAKE_CONFIG
+	sed 's/@EGLFS_DEVICE@/eglfs_mali/g' $(QT5BASE_PKGDIR)/qmake.conf.in > \
+		$(QT5BASE_PKGDIR)/qmake.conf
+endef

This is getting complicated, especially since there will probably be more
backends that need this... How about:

ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
ifeq ($(BR2_PACKAGE_IMX_GPU_VIV),y)
QT5BASE_EGLFS_DEVICE = eglfs_viv
else ifeq ($(BR2_PACKAGE_SUNXI_MALI),y)
QT5BASE_EGLFS_DEVICE = eglfs_mali
endif
endif

Quoted 9 lines

ifeq ($(QT5BASE_EGLFS_DEVICE),)

	sed '/@EGLFS_DEVICE@/,+1d' $(QT5BASE_PKGDIR)/qmake.conf.in > \
		$(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf
else
  	sed 's/@EGLFS_DEVICE@/$(QT5BASE_EGLFS_DEVICE)/g'
$(QT5BASE_PKGDIR)/qmake.conf.in > \
		$(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf

endif

Good idea, I will modify that way and submit [PATCH v3]

Quoted 13 lines

Regards,
Arnout

Quoted 9 lines
package/qt5/qt5base/qt5base.mk +2 -0
  else
+# don't use any eglfs backend
  define QT5BASE_CONFIGURE_QMAKE_CONFIG
  	sed '/@EGLFS_DEVICE@/,+1d' $(QT5BASE_PKGDIR)/qmake.conf.in > \
  		$(QT5BASE_PKGDIR)/qmake.conf
  endef
  endif
+endif
 
Quoted 4 lines

package/qt5/qt5base/qt5base.mk QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_PRINTSUPPORT) += Qt5PrintSupport · line 266

Quoted 3 lines
package/qt5/qt5base/qt5base.mk +0 -0
  ifneq ($(QT5BASE_CONFIG_FILE),)
  define QT5BASE_CONFIGURE_CONFIG_FILE

Best regards!

Signature · 11 lines
Giulio Benetti
R&D Manager &
Advanced Research

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642
#4 lore raw

PATCH v2 1/2 qt5 add qmake.conf.in for eglfs

In reply to Giulio Benetti

Giulio,

Quoted 7 lines · Giulio Benetti

EGLFS_DEVICE_INTEGRATION = eglfs_* doesn't work correctly with previous patch EGLFS_DEVICE_INTEGRATION = eglfs_viv/eglfs_* must be written before include(../common/linux_device_post.conf)

Starting from qmake.conf.in,
generate qmake.conf substituting @EGLFS_DEVICE@ with eglfs_viv or eglfs_mali according to Package selection

---

Tip: In the future, put 3 dashes right here so the revision notes, and any notes in general you want to include in the email, are not included in the final commit log. You can apply the generated email yourself to a clean tree and see that anything below the 3 dashes is dropped.

Quoted 8 lines

Changes v1 -> v2:

* Moved qmake.conf to qmake.conf.in
* Added @EGLFS_DEVICE@ placeholder into qmake.conf.in
* Modified QT5BASE_CONFIGURE_QMAKE_CONFIG to use sed

---

...

Josh

#5 lore raw

PATCH v2 1/2 qt5 add qmake.conf.in for eglfs

Hi,

Quoted 13 lines

Il giorno 08 nov 2017, alle ore 19:42, Joshua Henderson <[email protected]> ha scritto:

Giulio,

Quoted 8 lines · Giulio Benetti

EGLFS_DEVICE_INTEGRATION = eglfs_* doesn't work correctly with previous patch EGLFS_DEVICE_INTEGRATION = eglfs_viv/eglfs_* must be written before include(../common/linux_device_post.conf)

Starting from qmake.conf.in,
generate qmake.conf substituting @EGLFS_DEVICE@ with eglfs_viv or eglfs_mali according to Package selection

Quoted 6 lines

---

Tip: In the future, put 3 dashes right here so the revision notes, and any notes in general you want to include in the email, are not included in the final commit log. You can apply the generated email yourself to a clean tree and see that anything below the 3 dashes is dropped.

Ok, I didn?t know about that.
Thank you very much!

Quoted 13 lines
Quoted 9 lines

Changes v1 -> v2:

* Moved qmake.conf to qmake.conf.in
* Added @EGLFS_DEVICE@ placeholder into qmake.conf.in
* Modified QT5BASE_CONFIGURE_QMAKE_CONFIG to use sed

---

...

Josh

#6 lore raw

PATCH v2 1/2 qt5 add qmake.conf.in for eglfs

Need to re-submit patch?

Giulio

Quoted 40 lines

Il giorno 08 nov 2017, alle ore 19:52, Giulio Benetti <[email protected]> ha scritto:

Hi,

Quoted 13 lines

Il giorno 08 nov 2017, alle ore 19:42, Joshua Henderson <[email protected]> ha scritto:

Giulio,

Quoted 8 lines · Giulio Benetti

EGLFS_DEVICE_INTEGRATION = eglfs_* doesn't work correctly with previous patch EGLFS_DEVICE_INTEGRATION = eglfs_viv/eglfs_* must be written before include(../common/linux_device_post.conf)

Starting from qmake.conf.in,
generate qmake.conf substituting @EGLFS_DEVICE@ with eglfs_viv or eglfs_mali according to Package selection

Quoted 6 lines

---

Tip: In the future, put 3 dashes right here so the revision notes, and any notes in general you want to include in the email, are not included in the final commit log. You can apply the generated email yourself to a clean tree and see that anything below the 3 dashes is dropped.

Ok, I didn?t know about that.
Thank you very much!

Quoted 13 lines
Quoted 9 lines

Changes v1 -> v2:

* Moved qmake.conf to qmake.conf.in
* Added @EGLFS_DEVICE@ placeholder into qmake.conf.in
* Modified QT5BASE_CONFIGURE_QMAKE_CONFIG to use sed

---

...

Josh

#7 lore raw

PATCH v2 1/2 qt5 add qmake.conf.in for eglfs

In reply to Giulio Benetti

Giulio,

Quoted 17 lines · Giulio Benetti

Hi,

Quoted 15 lines

Il giorno 08 nov 2017, alle ore 19:42, Joshua Henderson <[email protected]> ha scritto:

Giulio,

Quoted 8 lines · Giulio Benetti

EGLFS_DEVICE_INTEGRATION = eglfs_* doesn't work correctly with previous patch EGLFS_DEVICE_INTEGRATION = eglfs_viv/eglfs_* must be written before include(../common/linux_device_post.conf)

Starting from qmake.conf.in,
generate qmake.conf substituting @EGLFS_DEVICE@ with eglfs_viv or eglfs_mali according to Package selection

---

Quoted 8 lines
Quoted 4 lines

Tip: In the future, put 3 dashes right here so the revision notes, and any notes in general you want to include in the email, are not included in the final commit log. You can apply the generated email yourself to a clean tree and see that anything below the 3 dashes is dropped.

Ok, I didn?t know about that.
Thank you very much!

You might want to look into git notes and git format-patch --notes to automate it and keep notes separate. Maybe wait a bit before submitting a new patch just for this right now, unless requested.

Josh

#8 lore raw

PATCH v2 1/2 qt5 add qmake.conf.in for eglfs

Hi,

Il 08/11/2017 21:03, Joshua Henderson ha scritto:

Quoted 29 lines

Giulio,

Quoted 17 lines · Giulio Benetti

Hi,

Quoted 15 lines

Il giorno 08 nov 2017, alle ore 19:42, Joshua Henderson <[email protected]> ha scritto:

Giulio,

Quoted 8 lines · Giulio Benetti

EGLFS_DEVICE_INTEGRATION = eglfs_* doesn't work correctly with previous patch EGLFS_DEVICE_INTEGRATION = eglfs_viv/eglfs_* must be written before include(../common/linux_device_post.conf)

Starting from qmake.conf.in,
generate qmake.conf substituting @EGLFS_DEVICE@ with eglfs_viv or eglfs_mali according to Package selection

---

Quoted 8 lines
Quoted 4 lines

Tip: In the future, put 3 dashes right here so the revision notes, and any notes in general you want to include in the email, are not included in the final commit log. You can apply the generated email yourself to a clean tree and see that anything below the 3 dashes is dropped.

Ok, I didn?t know about that.
Thank you very much!

Quoted 6 lines

You might want to look into git notes and git format-patch --notes to automate it and keep notes separate. Maybe wait a bit before submitting a new patch just for this right now, unless requested.

Josh

Thank you very much for hint.
I will follow it for sure
and let's wait for Maintainers about patchset.

Signature · 11 lines
Giulio Benetti
R&D Manager &
Advanced Research

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642
#9 lore raw

PATCH v2 1/2 qt5 add qmake.conf.in for eglfs

In reply to Giulio Benetti

Hi Giulio,

Quoted 6 lines · Giulio Benetti

EGLFS_DEVICE_INTEGRATION = eglfs_* doesn't work correctly with previous patch EGLFS_DEVICE_INTEGRATION = eglfs_viv/eglfs_* must be written before include(../common/linux_device_post.conf)

Starting from qmake.conf.in,
generate qmake.conf substituting @EGLFS_DEVICE@ with eglfs_viv or eglfs_mali according to Package selection

The commit message is still not entirely clear. Howe about this:

qt5: correct eglfs support in qmake.conf.in

Setting EGLFS_DEVICE_INTEGRATION at the end of qmake.conf like is done by commit 0c219ddb8a doesn't work correctly: it has to be set before the include(../common/linux_device_post.conf)

Instead of appending to the file, change it into a qmake.conf.in template file that contains an EGLFS_DEVICE_INTEGRATION assignment and update it with sed.

Quoted 34 lines

Changes v1 -> v2:

* Moved qmake.conf to qmake.conf.in
* Added @EGLFS_DEVICE@ placeholder into qmake.conf.in
* Modified QT5BASE_CONFIGURE_QMAKE_CONFIG to use sed

---
 package/qt5/qt5base/{qmake.conf => qmake.conf.in} |  2 ++
 package/qt5/qt5base/qt5base.mk                    | 12 +++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)
 rename package/qt5/qt5base/{qmake.conf => qmake.conf.in} (95%)
package/qt5/qt5base/qmake.conf.in renamed from package/qt5/qt5base/qmake.conf +2 -0
similarity index 95%
rename from package/qt5/qt5base/qmake.conf
rename to package/qt5/qt5base/qmake.conf.in
index 8b6debe..fb698b9 100644
@@ -24,5 +24,7 @@ QMAKE_CFLAGS_ISYSTEM   =
 # Architecturespecific configuration
 include(arch.conf)
 
+EGLFS_DEVICE_INTEGRATION = @EGLFS_DEVICE@
+
 include(../common/linux_device_post.conf)
 load(qt_config)
package/qt5/qt5base/qt5base.mk +0 -0
index b3f9c79..d58a58a 100644

package/qt5/qt5base/qt5base.mk QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_DBUS) += Qt5DBus · line 247

Quoted 7 lines
package/qt5/qt5base/qt5base.mk +2 -2
@@ -243,8 +243,13 @@ QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_DBUS) += Qt5DBus
 ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST)$(BR2_PACKAGE_IMX_GPU_VIV),yy)
 # use vivante backend
 define QT5BASE_CONFIGURE_QMAKE_CONFIG
-	echo "EGLFS_DEVICE_INTEGRATION = eglfs_viv" >> \
-		$(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf
+	sed 's/@EGLFS_DEVICE@/eglfs_viv/g' $(QT5BASE_PKGDIR)/qmake.conf.in > \
+		$(QT5BASE_PKGDIR)/qmake.conf

What I meant is to write directly to the target file, so

		$(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf
Quoted 9 lines
package/qt5/qt5base/qt5base.mk +5 -0
+endef
+else
+define QT5BASE_CONFIGURE_QMAKE_CONFIG
+	sed '/@EGLFS_DEVICE@/,+1d' $(QT5BASE_PKGDIR)/qmake.conf.in > \
+		$(QT5BASE_PKGDIR)/qmake.conf
 endef
 endif
 

package/qt5/qt5base/qt5base.mk endef · line 273

Quoted 6 lines
package/qt5/qt5base/qt5base.mk +1 -0
@@ -263,9 +268,10 @@ endef
 endif
 
 define QT5BASE_CONFIGURE_CMDS
+	$(QT5BASE_CONFIGURE_QMAKE_CONFIG)
 	$(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qmake.conf \
 		$(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf

So remove this

package/qt5/qt5base/qt5base.mk endef · line 274

Quoted 2 lines
package/qt5/qt5base/qt5base.mk +1 -1
-	$(QT5BASE_CONFIGURE_QMAKE_CONFIG)
+	$(RM) $(QT5BASE_PKGDIR)/qmake.conf

And this.

Regards,
Arnout

Quoted 4 lines
package/qt5/qt5base/qt5base.mk +0 -0
 	$(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qplatformdefs.h \
 		$(@D)/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
 	$(QT5BASE_CONFIGURE_CONFIG_FILE)
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#10 lore raw

PATCH v2 1/2 qt5 add qmake.conf.in for eglfs

Hi Arnout,

Il 08/11/2017 23:30, Arnout Vandecappelle ha scritto:

Quoted 12 lines

Hi Giulio,

Quoted 6 lines · Giulio Benetti

EGLFS_DEVICE_INTEGRATION = eglfs_* doesn't work correctly with previous patch EGLFS_DEVICE_INTEGRATION = eglfs_viv/eglfs_* must be written before include(../common/linux_device_post.conf)

Starting from qmake.conf.in,
generate qmake.conf substituting @EGLFS_DEVICE@ with eglfs_viv or eglfs_mali according to Package selection

The commit message is still not entirely clear. Howe about this:

Quoted 8 lines

qt5: correct eglfs support in qmake.conf.in

Setting EGLFS_DEVICE_INTEGRATION at the end of qmake.conf like is done by commit 0c219ddb8a doesn't work correctly: it has to be set before the include(../common/linux_device_post.conf)

Instead of appending to the file, change it into a qmake.conf.in template file that contains an EGLFS_DEVICE_INTEGRATION assignment and update it with sed.

Thank you for the example, it is precious to me.

Quoted 44 lines
Quoted 35 lines

Changes v1 -> v2:

* Moved qmake.conf to qmake.conf.in
* Added @EGLFS_DEVICE@ placeholder into qmake.conf.in
* Modified QT5BASE_CONFIGURE_QMAKE_CONFIG to use sed

---
  package/qt5/qt5base/{qmake.conf => qmake.conf.in} |  2 ++
  package/qt5/qt5base/qt5base.mk                    | 12 +++++++++---
  2 files changed, 11 insertions(+), 3 deletions(-)

rename package/qt5/qt5base/{qmake.conf => qmake.conf.in} (95%)

package/qt5/qt5base/qmake.conf.in renamed from package/qt5/qt5base/qmake.conf +2 -0
similarity index 95%
rename from package/qt5/qt5base/qmake.conf
rename to package/qt5/qt5base/qmake.conf.in
index 8b6debe..fb698b9 100644
@@ -24,5 +24,7 @@ QMAKE_CFLAGS_ISYSTEM   =
  # Architecturespecific configuration
  include(arch.conf)
 
+EGLFS_DEVICE_INTEGRATION = @EGLFS_DEVICE@
+
  include(../common/linux_device_post.conf)
  load(qt_config)
package/qt5/qt5base/qt5base.mk +0 -0
index b3f9c79..d58a58a 100644

package/qt5/qt5base/qt5base.mk QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_DBUS) += Qt5DBus · line 247

Quoted 7 lines
package/qt5/qt5base/qt5base.mk +2 -2
@@ -243,8 +243,13 @@ QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_DBUS) += Qt5DBus
  ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST)$(BR2_PACKAGE_IMX_GPU_VIV),yy)
  # use vivante backend
  define QT5BASE_CONFIGURE_QMAKE_CONFIG
-	echo "EGLFS_DEVICE_INTEGRATION = eglfs_viv" >> \
-		$(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf
+	sed 's/@EGLFS_DEVICE@/eglfs_viv/g' $(QT5BASE_PKGDIR)/qmake.conf.in > \
+		$(QT5BASE_PKGDIR)/qmake.conf

What I meant is to write directly to the target file, so

Quoted 1 line
		$(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf

I wanted to do the same, but directory "linux-buildroot-g++" doesn't exists, so sed failed.
But it makes more sense to "mkdir -p $(@D)/mkspecs/devices/linux-buildroot-g++/" at the beginning and make it behaving like you've written down, so....

Quoted 9 lines
Quoted 9 lines
package/qt5/qt5base/qt5base.mk +5 -0
+endef
+else
+define QT5BASE_CONFIGURE_QMAKE_CONFIG
+	sed '/@EGLFS_DEVICE@/,+1d' $(QT5BASE_PKGDIR)/qmake.conf.in > \
+		$(QT5BASE_PKGDIR)/qmake.conf
  endef
  endif
 
Quoted 7 lines

package/qt5/qt5base/qt5base.mk endef · line 273

Quoted 7 lines
package/qt5/qt5base/qt5base.mk +1 -0
@@ -263,9 +268,10 @@ endef
  endif
 
  define QT5BASE_CONFIGURE_CMDS
+	$(QT5BASE_CONFIGURE_QMAKE_CONFIG)
  	$(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qmake.conf \
  		$(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf

I remove this

Quoted 5 lines

So remove this

package/qt5/qt5base/qt5base.mk endef · line 274

Quoted 2 lines
package/qt5/qt5base/qt5base.mk +1 -1
-	$(QT5BASE_CONFIGURE_QMAKE_CONFIG)
+	$(RM) $(QT5BASE_PKGDIR)/qmake.conf

and this

Quoted 12 lines

And this.

Regards,
Arnout

Quoted 4 lines
package/qt5/qt5base/qt5base.mk +0 -0
  	$(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qplatformdefs.h \
  		$(@D)/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
  	$(QT5BASE_CONFIGURE_CONFIG_FILE)
Signature · 11 lines
Giulio Benetti
R&D Manager &
Advanced Research

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642