Patchwork qt4-native: introduce the native version of qt4

login
register
mail settings
Submitter Simon Busch
Date May 8, 2011, 4:55 p.m.
Message ID <1304873759-20379-1-git-send-email-morphis@gravedo.de>
Download mbox | patch
Permalink /patch/3411/
State Superseded
Headers show

Comments

Simon Busch - May 8, 2011, 4:55 p.m.
The new recipe is based on the qt4-tool-native one but it even installs the libraries of
qt4 and not only the tools like moc/rcc. It will not increase the build time as most
libraries are already build for the qt4-tool-native but not staged.

Signed-off-by: Simon Busch <morphis@gravedo.de>
---
 recipes/qt4/qt4-native.inc      |   68 +++++++++++++++++++++++++++++++++++++++
 recipes/qt4/qt4-native_4.7.2.bb |   19 +++++++++++
 2 files changed, 87 insertions(+), 0 deletions(-)
 create mode 100644 recipes/qt4/qt4-native.inc
 create mode 100644 recipes/qt4/qt4-native_4.7.2.bb
Otavio Salvador - May 8, 2011, 5:18 p.m.
On Sun, May 8, 2011 at 13:55, Simon Busch <morphis@gravedo.de> wrote:
> The new recipe is based on the qt4-tool-native one but it even installs the libraries of
> qt4 and not only the tools like moc/rcc. It will not increase the build time as most
> libraries are already build for the qt4-tool-native but not staged.

Please remove the tools recipe too.
Simon Busch - May 8, 2011, 5:48 p.m.
On 08.05.2011 19:18, Otavio Salvador wrote:
> Please remove the tools recipe too.

Yes, I will provide a patch for this too. But first I want to know if
you are fine with this patch?
Otavio Salvador - May 8, 2011, 5:54 p.m.
On Sun, May 8, 2011 at 14:48, Simon Busch <morphis@gravedo.de> wrote:
> On 08.05.2011 19:18, Otavio Salvador wrote:
>> Please remove the tools recipe too.
>
> Yes, I will provide a patch for this too. But first I want to know if
> you are fine with this patch?

For me it seems fine however I'd prefer if you drop the tools one at
same commit so it is easier to revert if required.

BTW, it would be nice if you could do the same for oe-core :-)
Simon Busch - May 8, 2011, 6:01 p.m.
On 08.05.2011 19:54, Otavio Salvador wrote:
> On Sun, May 8, 2011 at 14:48, Simon Busch <morphis@gravedo.de> wrote:
>> On 08.05.2011 19:18, Otavio Salvador wrote:
>>> Please remove the tools recipe too.
>>
>> Yes, I will provide a patch for this too. But first I want to know if
>> you are fine with this patch?
> 
> For me it seems fine however I'd prefer if you drop the tools one at
> same commit so it is easier to revert if required.

Ok, I will send a patch which does both, adding the new and removing the
old recipe. I will even provided all versions of qt4 supported by
qt4-tools-native.

> BTW, it would be nice if you could do the same for oe-core :-)

I can but I have to setup the environment first to test everything. So
this will need some time.

regards,
Simon
Otavio Salvador - May 8, 2011, 6:05 p.m.
On Sun, May 8, 2011 at 15:01, Simon Busch <morphis@gravedo.de> wrote:
...
>> BTW, it would be nice if you could do the same for oe-core :-)
>
> I can but I have to setup the environment first to test everything. So
> this will need some time.

That would be nice to avoid more missing stuff between both.

I am just porting your rpath and my qt fixes for cmake and avoiding
divertion when possible seems the better.

Patch

diff --git a/recipes/qt4/qt4-native.inc b/recipes/qt4/qt4-native.inc
new file mode 100644
index 0000000..ee702e9
--- /dev/null
+++ b/recipes/qt4/qt4-native.inc
@@ -0,0 +1,68 @@ 
+DESCRIPTION = "Native version Qt/[X11|Mac|Embedded]"
+DEPENDS = "zlib-native dbus-native"
+SECTION = "libs"
+HOMEPAGE = "http://www.trolltech.com"
+PRIORITY = "optional"
+LICENSE = "GPL"
+PROVIDES = "qt4-tools-native"
+
+INC_PR = "r0"
+
+inherit native
+
+SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \
+           file://qt-config.patch \
+           file://g++.conf \
+           file://linux.conf"
+S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
+
+EXTRA_OECONF = "-prefix ${prefix} \
+                -L ${STAGING_LIBDIR_NATIVE} \
+                -I ${STAGING_INCDIR_NATIVE} \
+                -qt-libjpeg -qt-gif -system-zlib \
+                -no-libjpeg -no-libpng -no-libmng -no-libtiff \
+                -no-accessibility \
+                -no-cups \
+                -no-nas-sound \
+                -no-nis -no-openssl \
+                -verbose -release \
+                -embedded -no-freetype -no-glib -no-iconv \
+                -exceptions -xmlpatterns \
+                -qt3support"
+
+# yank default -e, otherwise we get the following error:
+# moc_qbuffer.cpp: No such file or directory
+EXTRA_OEMAKE = " "
+
+do_configure() {
+   (echo o; echo yes) | ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
+}
+
+TOBUILD = "\
+  src/tools/moc \
+  src/corelib \
+  src/sql \
+  src/xml \
+  src/network \
+  src/tools/uic \
+  src/tools/rcc \
+  src/xmlpatterns \
+  src/dbus \
+  src/gui \
+  src/testlib \
+  src/qt3support \
+"
+
+do_compile() {
+    for i in ${TOBUILD}; do
+        cd ${S}/$i && oe_runmake CC="${CC}" CXX="${CXX}"
+    done
+}
+
+NATIVE_INSTALL_WORKS = "1"
+
+do_install() {
+    for i in ${TOBUILD}; do
+        cd ${S}/$i && oe_runmake install INSTALL_ROOT=${D}
+    done
+}
diff --git a/recipes/qt4/qt4-native_4.7.2.bb b/recipes/qt4/qt4-native_4.7.2.bb
new file mode 100644
index 0000000..7e98035
--- /dev/null
+++ b/recipes/qt4/qt4-native_4.7.2.bb
@@ -0,0 +1,19 @@ 
+require qt4-native.inc
+LICENSE = "LGPLv2.1 GPLv3"
+
+PR = "${INC_PR}.0"
+
+# Find the g++.conf/linux.conf in the right directory.
+FILESPATHPKG =. "qt-${PV}:"
+SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \
+           file://qt-config.patch \
+           file://g++.conf \
+           file://linux.conf"
+S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
+
+EXTRA_OECONF += " -no-fast -silent -no-rpath"
+
+TOBUILD := "src/tools/bootstrap ${TOBUILD}"
+
+SRC_URI[md5sum] = "66b992f5c21145df08c99d21847f4fdb"
+SRC_URI[sha256sum] = "d4783b524b90bcd270ccf6e7a30d5fb51696c47eb5de49ebc2d553cd3eb49336"