qt4-libs-native: add initial recipe

Submitted by Simon Busch on May 7, 2011, 1:07 p.m.

Details

Message ID 1304773638-24877-1-git-send-email-morphis@gravedo.de
State Superseded
Headers show

Commit Message

Simon Busch May 7, 2011, 1:07 p.m.
The native version of the qt4 libraries is needed by some other native recipes to build.
It's mostly a copy of the qt4-tools-native recipes with some changed configuration optons
and is only available for version 4.7.2 now.

Signed-off-by: Simon Busch <morphis@gravedo.de>
---
 recipes/qt4/qt4-libs-native.inc      |   67 ++++++++++++++++++++++++++++++++++
 recipes/qt4/qt4-libs-native_4.7.2.bb |   19 ++++++++++
 2 files changed, 86 insertions(+), 0 deletions(-)
 create mode 100644 recipes/qt4/qt4-libs-native.inc
 create mode 100644 recipes/qt4/qt4-libs-native_4.7.2.bb

Patch hide | download patch | download mbox

diff --git a/recipes/qt4/qt4-libs-native.inc b/recipes/qt4/qt4-libs-native.inc
new file mode 100644
index 0000000..7d2116a
--- /dev/null
+++ b/recipes/qt4/qt4-libs-native.inc
@@ -0,0 +1,67 @@ 
+DESCRIPTION = "Native libraries for Qt/[X11|Mac|Embedded] version 4.x"
+DEPENDS = "zlib-native dbus-native"
+SECTION = "libs"
+HOMEPAGE = "http://www.trolltech.com"
+PRIORITY = "optional"
+LICENSE = "GPL"
+
+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-libs-native_4.7.2.bb b/recipes/qt4/qt4-libs-native_4.7.2.bb
new file mode 100644
index 0000000..23c5632
--- /dev/null
+++ b/recipes/qt4/qt4-libs-native_4.7.2.bb
@@ -0,0 +1,19 @@ 
+require qt4-libs-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"

Comments

Otavio Salvador May 7, 2011, 7:17 p.m.
On Sat, May 7, 2011 at 10:07, Simon Busch <morphis@gravedo.de> wrote:
> The native version of the qt4 libraries is needed by some other native recipes to build.
> It's mostly a copy of the qt4-tools-native recipes with some changed configuration optons
> and is only available for version 4.7.2 now.

I second this idea since I will be a user of it but seems better to me
to have a full qt4-native since this would reduce build duplication
time, no?
Simon Busch May 8, 2011, 12:28 p.m.
On 07.05.2011 21:17, Otavio Salvador wrote:
> On Sat, May 7, 2011 at 10:07, Simon Busch <morphis@gravedo.de> wrote:
>> The native version of the qt4 libraries is needed by some other native recipes to build.
>> It's mostly a copy of the qt4-tools-native recipes with some changed configuration optons
>> and is only available for version 4.7.2 now.
> 
> I second this idea since I will be a user of it but seems better to me
> to have a full qt4-native since this would reduce build duplication
> time, no?

You are right. As qt4-libs-native and qt4-tools-native are build mostly
the same stuff we could merge them and create a qt4-native recipe if
nobody else has any concerns. I will provide a patch for this.

regards,
Simon
Otavio Salvador May 8, 2011, 4:33 p.m.
On Sun, May 8, 2011 at 09:28, Simon Busch <morphis@gravedo.de> wrote:
> On 07.05.2011 21:17, Otavio Salvador wrote:
>> On Sat, May 7, 2011 at 10:07, Simon Busch <morphis@gravedo.de> wrote:
>>> The native version of the qt4 libraries is needed by some other native recipes to build.
>>> It's mostly a copy of the qt4-tools-native recipes with some changed configuration optons
>>> and is only available for version 4.7.2 now.
>>
>> I second this idea since I will be a user of it but seems better to me
>> to have a full qt4-native since this would reduce build duplication
>> time, no?
>
> You are right. As qt4-libs-native and qt4-tools-native are build mostly
> the same stuff we could merge them and create a qt4-native recipe if
> nobody else has any concerns. I will provide a patch for this.

IMO you might try to make it on qt4-x11-free recipe and add a provides
for the tools.
Simon Busch May 8, 2011, 4:51 p.m.
On 08.05.2011 18:33, Otavio Salvador wrote:
> On Sun, May 8, 2011 at 09:28, Simon Busch <morphis@gravedo.de> wrote:
>> On 07.05.2011 21:17, Otavio Salvador wrote:
>>> On Sat, May 7, 2011 at 10:07, Simon Busch <morphis@gravedo.de> wrote:
>>>> The native version of the qt4 libraries is needed by some other native recipes to build.
>>>> It's mostly a copy of the qt4-tools-native recipes with some changed configuration optons
>>>> and is only available for version 4.7.2 now.
>>>
>>> I second this idea since I will be a user of it but seems better to me
>>> to have a full qt4-native since this would reduce build duplication
>>> time, no?
>>
>> You are right. As qt4-libs-native and qt4-tools-native are build mostly
>> the same stuff we could merge them and create a qt4-native recipe if
>> nobody else has any concerns. I will provide a patch for this.
> 
> IMO you might try to make it on qt4-x11-free recipe and add a provides
> for the tools.

Hm, I need it for the embedded variant of qt4 so we should add it to
qt4.inc which is already quite complex and very target specific. I think
the best option is to create a qt4-native recipe which provides both
qt4-tools-native and qt4-libs-native. This would even be the best option
to be backward compatible (some stuff in OE is depending on
qt4-native-tools in different versions).

regards,
Simon
Otavio Salvador May 8, 2011, 4:59 p.m.
On Sun, May 8, 2011 at 13:51, Simon Busch <morphis@gravedo.de> wrote:
...
> Hm, I need it for the embedded variant of qt4 so we should add it to
> qt4.inc which is already quite complex and very target specific. I think
> the best option is to create a qt4-native recipe which provides both
> qt4-tools-native and qt4-libs-native. This would even be the best option
> to be backward compatible (some stuff in OE is depending on
> qt4-native-tools in different versions).

The native variant does need to be the embedded one for you? I think
you just needed it to run something that uses QtCore or something
similar during the build process (my case) and then build it for the
target.
Simon Busch May 8, 2011, 5:14 p.m.
On 08.05.2011 18:59, Otavio Salvador wrote:
> On Sun, May 8, 2011 at 13:51, Simon Busch <morphis@gravedo.de> wrote:
> ...
>> Hm, I need it for the embedded variant of qt4 so we should add it to
>> qt4.inc which is already quite complex and very target specific. I think
>> the best option is to create a qt4-native recipe which provides both
>> qt4-tools-native and qt4-libs-native. This would even be the best option
>> to be backward compatible (some stuff in OE is depending on
>> qt4-native-tools in different versions).
> 
> The native variant does need to be the embedded one for you? I think
> you just needed it to run something that uses QtCore or something
> similar during the build process (my case) and then build it for the
> target.

No, the native variant should be build from the qt4 anywhere package as
it's already the case for the qt4-tools-native. My qt4-native recipe
does this too. It builds only the needed tools and libraries and
installs them to the sysroot. Currently it builds:

- src/tools/moc
- src/corelib
- src/xml
- src/network
- src/tools/uic
- src/tools/rcc
- src/xmlpatterns
- src/testlib
- src/qt3support

If some other libs/tools are needed for any other native tool we should
add it to the list above.

And yes, you are right my recipes which need the qt4-native one only
needs the Qt4 core libs (as it should be the case for most native stuff
which uses qt4).

regards,
Simon