qt5base: support OVERRIDE_SRCDIR
authorPeter Korsgaard <peter@korsgaard.com>
Tue, 24 Nov 2015 21:21:49 +0000 (22:21 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Thu, 26 Nov 2015 21:16:25 +0000 (22:16 +0100)
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.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
package/qt5/qt5base/0002-mkspecs-files.patch [deleted file]
package/qt5/qt5base/qmake.conf [new file with mode: 0644]
package/qt5/qt5base/qplatformdefs.h [new file with mode: 0644]
package/qt5/qt5base/qt5base.mk

diff --git a/package/qt5/qt5base/0002-mkspecs-files.patch b/package/qt5/qt5base/0002-mkspecs-files.patch
deleted file mode 100644 (file)
index adeabdf..0000000
+++ /dev/null
@@ -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 <thomas.petazzoni@free-electrons.com>
-[Arnout: remove ccache support]
-Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
-
-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"
diff --git a/package/qt5/qt5base/qmake.conf b/package/qt5/qt5base/qmake.conf
new file mode 100644 (file)
index 0000000..2152d3c
--- /dev/null
@@ -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)
diff --git a/package/qt5/qt5base/qplatformdefs.h b/package/qt5/qt5base/qplatformdefs.h
new file mode 100644 (file)
index 0000000..99e9a27
--- /dev/null
@@ -0,0 +1 @@
+#include "../../linux-g++/qplatformdefs.h"
index 827a85e982a338cddcb5fbd43fffc5314cdfaf2e..6eeb61973a8288986fea23ac94df4698baa94e7c 100644 (file)
@@ -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) \