Skip to contentSkip to conversation

qt5base: support OVERRIDE_SRCDIR

PATCH New Peter Korsgaard 3 participants 7 messages Nov 24, 2015 – Nov 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qt5base: support OVERRIDE_SRCDIR

With OVERRIDE_SRCDIR we don't apply any of the qt5base patches, but the custom specs files are needed to be able to build - So install these in the configure step instead of having them as a patch.

---
 package/qt5/qt5base/0002-mkspecs-files.patch | 41 ----------------------------
 package/qt5/qt5base/qmake.conf               | 24 ++++++++++++++++
 package/qt5/qt5base/qplatformdefs.h          |  1 +
 package/qt5/qt5base/qt5base.mk               |  4 +++
 4 files changed, 29 insertions(+), 41 deletions(-)
 delete mode 100644 package/qt5/qt5base/0002-mkspecs-files.patch
 create mode 100644 package/qt5/qt5base/qmake.conf
 create mode 100644 package/qt5/qt5base/qplatformdefs.h
package/qt5/qt5base/0002-mkspecs-files.patch deleted +0 -41
deleted file mode 100644
index adeabdf..0000000
@@ -1,41 +0,0 @@
-Add a Buildroot 'device' to ease cross-compilation
-
-Qt5 has a mechanism to support "device" profiles, so that people can
-specify the compiler, compiler flags and so on for a specific device.
-
-We leverage this mechanism in the Buildroot packaging of qt5 to
-simplify cross-compilation: we have our own "device" definition, which
-allows us to easily pass the cross-compiler paths and flags from our
-qt5.mk.
-
-Signed-off-by: Thomas Petazzoni <[email protected]>
-[Arnout: remove ccache support]
-Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
-
-Index: b/mkspecs/devices/linux-buildroot-g++/qmake.conf
-===================================================================
---- /dev/null
-+++ b/mkspecs/devices/linux-buildroot-g++/qmake.conf
-@@ -0,0 +1,16 @@
-+include(../common/linux_device_pre.conf)
-+
-+# modifications to g++-unix.conf
-+QMAKE_CC                = $${CROSS_COMPILE}gcc
-+QMAKE_CXX               = $${CROSS_COMPILE}g++
-+
-+#modifications to gcc-base.conf
-+QMAKE_CFLAGS           += $${BR_COMPILER_CFLAGS}
-+QMAKE_CXXFLAGS         += $${BR_COMPILER_CXXFLAGS}
-+QMAKE_CXXFLAGS_RELEASE += -O3
-+CONFIG                 += nostrip
-+
-+QMAKE_LIBS             += -lrt -lpthread -ldl
-+
-+include(../common/linux_device_post.conf)
-+load(qt_config)
-Index: b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
-===================================================================
---- /dev/null
-+++ b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
-@@ -0,0 +1 @@
-+#include "../../linux-g++/qplatformdefs.h"
package/qt5/qt5base/qmake.conf new file +24 -0
new file mode 100644
index 0000000..2152d3c
@@ -0,0 +1,24 @@
+# Qt5 has a mechanism to support "device" profiles, so that people can
+# specify the compiler, compiler flags and so on for a specific device.
+
+# We leverage this mechanism in the Buildroot packaging of qt5 to
+# simplify cross-compilation: we have our own "device" definition, which
+# allows us to easily pass the cross-compiler paths and flags from our
+# qt5.mk.
+
+include(../common/linux_device_pre.conf)
+
+# modifications to g++-unix.conf
+QMAKE_CC                = $${CROSS_COMPILE}gcc
+QMAKE_CXX               = $${CROSS_COMPILE}g++
+
+# modifications to gcc-base.conf
+QMAKE_CFLAGS           += $${BR_COMPILER_CFLAGS}
+QMAKE_CXXFLAGS         += $${BR_COMPILER_CXXFLAGS}
+QMAKE_CXXFLAGS_RELEASE += -O3
+CONFIG                 += nostrip
+
+QMAKE_LIBS             += -lrt -lpthread -ldl
+
+include(../common/linux_device_post.conf)
+load(qt_config)
package/qt5/qt5base/qplatformdefs.h new file +1 -0
new file mode 100644
index 0000000..99e9a27
@@ -0,0 +1 @@
+#include "../../linux-g++/qplatformdefs.h"
package/qt5/qt5base/qt5base.mk +4 -0
index 827a85e..6eeb619 100644
@@ -179,6 +179,10 @@ endef
 endif
 
 define QT5BASE_CONFIGURE_CMDS
+	$(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qmake.conf \
+		$(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf
+	$(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qplatformdefs.h \
+		$(@D)/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
 	$(QT5BASE_CONFIGURE_CONFIG_FILE)
 	(cd $(@D); \
 		$(TARGET_MAKE_ENV) \
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 qt5base: support OVERRIDE_SRCDIR

Peter, All,

On 2015-11-24 22:21 +0100, Peter Korsgaard spake thusly:

Quoted 3 lines

With OVERRIDE_SRCDIR we don't apply any of the qt5base patches, but the custom specs files are needed to be able to build - So install these in the configure step instead of having them as a patch.

IMHO, it make more sense to install them at post-patch (or post-extract) rather than at the beginning of the configure step.

Regards,
Yann E. MORIN.

Quoted 117 lines
---
 package/qt5/qt5base/0002-mkspecs-files.patch | 41 ----------------------------
 package/qt5/qt5base/qmake.conf               | 24 ++++++++++++++++
 package/qt5/qt5base/qplatformdefs.h          |  1 +
 package/qt5/qt5base/qt5base.mk               |  4 +++
 4 files changed, 29 insertions(+), 41 deletions(-)
 delete mode 100644 package/qt5/qt5base/0002-mkspecs-files.patch
 create mode 100644 package/qt5/qt5base/qmake.conf
 create mode 100644 package/qt5/qt5base/qplatformdefs.h
package/qt5/qt5base/0002-mkspecs-files.patch deleted +0 -41
deleted file mode 100644
index adeabdf..0000000
@@ -1,41 +0,0 @@
-Add a Buildroot 'device' to ease cross-compilation
-
-Qt5 has a mechanism to support "device" profiles, so that people can
-specify the compiler, compiler flags and so on for a specific device.
-
-We leverage this mechanism in the Buildroot packaging of qt5 to
-simplify cross-compilation: we have our own "device" definition, which
-allows us to easily pass the cross-compiler paths and flags from our
-qt5.mk.
-
-Signed-off-by: Thomas Petazzoni <[email protected]>
-[Arnout: remove ccache support]
-Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
-
-Index: b/mkspecs/devices/linux-buildroot-g++/qmake.conf
-===================================================================
---- /dev/null
-+++ b/mkspecs/devices/linux-buildroot-g++/qmake.conf
-@@ -0,0 +1,16 @@
-+include(../common/linux_device_pre.conf)
-+
-+# modifications to g++-unix.conf
-+QMAKE_CC                = $${CROSS_COMPILE}gcc
-+QMAKE_CXX               = $${CROSS_COMPILE}g++
-+
-+#modifications to gcc-base.conf
-+QMAKE_CFLAGS           += $${BR_COMPILER_CFLAGS}
-+QMAKE_CXXFLAGS         += $${BR_COMPILER_CXXFLAGS}
-+QMAKE_CXXFLAGS_RELEASE += -O3
-+CONFIG                 += nostrip
-+
-+QMAKE_LIBS             += -lrt -lpthread -ldl
-+
-+include(../common/linux_device_post.conf)
-+load(qt_config)
-Index: b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
-===================================================================
---- /dev/null
-+++ b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
-@@ -0,0 +1 @@
-+#include "../../linux-g++/qplatformdefs.h"
package/qt5/qt5base/qmake.conf new file +24 -0
new file mode 100644
index 0000000..2152d3c
@@ -0,0 +1,24 @@
+# Qt5 has a mechanism to support "device" profiles, so that people can
+# specify the compiler, compiler flags and so on for a specific device.
+
+# We leverage this mechanism in the Buildroot packaging of qt5 to
+# simplify cross-compilation: we have our own "device" definition, which
+# allows us to easily pass the cross-compiler paths and flags from our
+# qt5.mk.
+
+include(../common/linux_device_pre.conf)
+
+# modifications to g++-unix.conf
+QMAKE_CC                = $${CROSS_COMPILE}gcc
+QMAKE_CXX               = $${CROSS_COMPILE}g++
+
+# modifications to gcc-base.conf
+QMAKE_CFLAGS           += $${BR_COMPILER_CFLAGS}
+QMAKE_CXXFLAGS         += $${BR_COMPILER_CXXFLAGS}
+QMAKE_CXXFLAGS_RELEASE += -O3
+CONFIG                 += nostrip
+
+QMAKE_LIBS             += -lrt -lpthread -ldl
+
+include(../common/linux_device_post.conf)
+load(qt_config)
package/qt5/qt5base/qplatformdefs.h new file +1 -0
new file mode 100644
index 0000000..99e9a27
@@ -0,0 +1 @@
+#include "../../linux-g++/qplatformdefs.h"
package/qt5/qt5base/qt5base.mk +4 -0
index 827a85e..6eeb619 100644
@@ -179,6 +179,10 @@ endef
 endif
 
 define QT5BASE_CONFIGURE_CMDS
+	$(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qmake.conf \
+		$(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf
+	$(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qplatformdefs.h \
+		$(@D)/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
 	$(QT5BASE_CONFIGURE_CONFIG_FILE)
 	(cd $(@D); \
 		$(TARGET_MAKE_ENV) \
Signature · 6 lines
2.1.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 qt5base: support OVERRIDE_SRCDIR

Quoted 9 lines · Yann E. MORIN

Peter, All,

On 2015-11-24 22:21 +0100, Peter Korsgaard spake thusly:

Quoted 3 lines

With OVERRIDE_SRCDIR we don't apply any of the qt5base patches, but the custom specs files are needed to be able to build - So install these in the configure step instead of having them as a patch.

IMHO, it make more sense to install them at post-patch (or post-extract) rather than at the beginning of the configure step.

But that wouldn't solve the issue, that it is not applied for OVERRIDE_SRCDIR.
With OVERRIDE_SRCDIR, no extract or patch step is done, instead the rsync step is done.

We could add it in a POST_PATCH _and_ a POST_RSYNC hook, however.

Regards,
Arnout

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 1/1 qt5base: support OVERRIDE_SRCDIR

Arnout, All,

On 2015-11-25 00:00 +0100, Arnout Vandecappelle spake thusly:

Quoted 6 lines · Yann E. MORIN
Quoted 5 lines

On 2015-11-24 22:21 +0100, Peter Korsgaard spake thusly:

Quoted 3 lines

With OVERRIDE_SRCDIR we don't apply any of the qt5base patches, but the custom specs files are needed to be able to build - So install these in the configure step instead of having them as a patch.

Quoted 6 lines
Quoted 2 lines

IMHO, it make more sense to install them at post-patch (or post-extract) rather than at the beginning of the configure step.

But that wouldn't solve the issue, that it is not applied for OVERRIDE_SRCDIR.
With OVERRIDE_SRCDIR, no extract or patch step is done, instead the rsync step is done.

Argh, indeed...

Quoted 1 line

We could add it in a POST_PATCH _and_ a POST_RSYNC hook, however.

Yes, that would be better, I think.

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 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH 1/1 qt5base: support OVERRIDE_SRCDIR

In reply to Arnout Vandecappelle
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle <[email protected]> writes:

Quoted 7 lines · Yann E. MORIN

Peter, All,

On 2015-11-24 22:21 +0100, Peter Korsgaard spake thusly:

Quoted 3 lines

With OVERRIDE_SRCDIR we don't apply any of the qt5base patches, but the custom specs files are needed to be able to build - So install these in the configure step instead of having them as a patch.

Quoted 8 lines
Quoted 2 lines

IMHO, it make more sense to install them at post-patch (or post-extract) rather than at the beginning of the configure step.

But that wouldn't solve the issue, that it is not applied for OVERRIDE_SRCDIR.
With OVERRIDE_SRCDIR, no extract or patch step is done, instead the rsync step is done.

We could add it in a POST_PATCH _and_ a POST_RSYNC hook, however.

But would it have any real advantage over just doing it in the configure step? It would be more code, and this is arguable about configuring qt5base, and we already do so for the QT5BASE_CONFIGURE_CONFIG_FILE stuff.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard 
#5 lore raw

PATCH 1/1 qt5base: support OVERRIDE_SRCDIR

In reply to Peter Korsgaard

Peter, All,

On 2015-11-24 22:21 +0100, Peter Korsgaard spake thusly:

Quoted 5 lines

With OVERRIDE_SRCDIR we don't apply any of the qt5base patches, but the custom specs files are needed to be able to build - So install these in the configure step instead of having them as a patch.

After your comments:

Regards,
Yann E. MORIN.

Quoted 116 lines
---
 package/qt5/qt5base/0002-mkspecs-files.patch | 41 ----------------------------
 package/qt5/qt5base/qmake.conf               | 24 ++++++++++++++++
 package/qt5/qt5base/qplatformdefs.h          |  1 +
 package/qt5/qt5base/qt5base.mk               |  4 +++
 4 files changed, 29 insertions(+), 41 deletions(-)
 delete mode 100644 package/qt5/qt5base/0002-mkspecs-files.patch
 create mode 100644 package/qt5/qt5base/qmake.conf
 create mode 100644 package/qt5/qt5base/qplatformdefs.h
package/qt5/qt5base/0002-mkspecs-files.patch deleted +0 -41
deleted file mode 100644
index adeabdf..0000000
@@ -1,41 +0,0 @@
-Add a Buildroot 'device' to ease cross-compilation
-
-Qt5 has a mechanism to support "device" profiles, so that people can
-specify the compiler, compiler flags and so on for a specific device.
-
-We leverage this mechanism in the Buildroot packaging of qt5 to
-simplify cross-compilation: we have our own "device" definition, which
-allows us to easily pass the cross-compiler paths and flags from our
-qt5.mk.
-
-Signed-off-by: Thomas Petazzoni <[email protected]>
-[Arnout: remove ccache support]
-Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
-
-Index: b/mkspecs/devices/linux-buildroot-g++/qmake.conf
-===================================================================
---- /dev/null
-+++ b/mkspecs/devices/linux-buildroot-g++/qmake.conf
-@@ -0,0 +1,16 @@
-+include(../common/linux_device_pre.conf)
-+
-+# modifications to g++-unix.conf
-+QMAKE_CC                = $${CROSS_COMPILE}gcc
-+QMAKE_CXX               = $${CROSS_COMPILE}g++
-+
-+#modifications to gcc-base.conf
-+QMAKE_CFLAGS           += $${BR_COMPILER_CFLAGS}
-+QMAKE_CXXFLAGS         += $${BR_COMPILER_CXXFLAGS}
-+QMAKE_CXXFLAGS_RELEASE += -O3
-+CONFIG                 += nostrip
-+
-+QMAKE_LIBS             += -lrt -lpthread -ldl
-+
-+include(../common/linux_device_post.conf)
-+load(qt_config)
-Index: b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
-===================================================================
---- /dev/null
-+++ b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
-@@ -0,0 +1 @@
-+#include "../../linux-g++/qplatformdefs.h"
package/qt5/qt5base/qmake.conf new file +24 -0
new file mode 100644
index 0000000..2152d3c
@@ -0,0 +1,24 @@
+# Qt5 has a mechanism to support "device" profiles, so that people can
+# specify the compiler, compiler flags and so on for a specific device.
+
+# We leverage this mechanism in the Buildroot packaging of qt5 to
+# simplify cross-compilation: we have our own "device" definition, which
+# allows us to easily pass the cross-compiler paths and flags from our
+# qt5.mk.
+
+include(../common/linux_device_pre.conf)
+
+# modifications to g++-unix.conf
+QMAKE_CC                = $${CROSS_COMPILE}gcc
+QMAKE_CXX               = $${CROSS_COMPILE}g++
+
+# modifications to gcc-base.conf
+QMAKE_CFLAGS           += $${BR_COMPILER_CFLAGS}
+QMAKE_CXXFLAGS         += $${BR_COMPILER_CXXFLAGS}
+QMAKE_CXXFLAGS_RELEASE += -O3
+CONFIG                 += nostrip
+
+QMAKE_LIBS             += -lrt -lpthread -ldl
+
+include(../common/linux_device_post.conf)
+load(qt_config)
package/qt5/qt5base/qplatformdefs.h new file +1 -0
new file mode 100644
index 0000000..99e9a27
@@ -0,0 +1 @@
+#include "../../linux-g++/qplatformdefs.h"
package/qt5/qt5base/qt5base.mk +4 -0
index 827a85e..6eeb619 100644
@@ -179,6 +179,10 @@ endef
 endif
 
 define QT5BASE_CONFIGURE_CMDS
+	$(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qmake.conf \
+		$(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf
+	$(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qplatformdefs.h \
+		$(@D)/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
 	$(QT5BASE_CONFIGURE_CONFIG_FILE)
 	(cd $(@D); \
 		$(TARGET_MAKE_ENV) \
Signature · 6 lines
2.1.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH 1/1 qt5base: support OVERRIDE_SRCDIR

In reply to Peter Korsgaard
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

With OVERRIDE_SRCDIR we don't apply any of the qt5base patches, but the custom specs files are needed to be able to build - So install these in the configure step instead of having them as a patch.

Committed, thanks.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard