qmake2: convert native and sdk to use BBCLASS_EXTEND and new-style staging
authorKoen Kooi <koen@openembedded.org>
Wed, 10 Feb 2010 10:32:28 +0000 (11:32 +0100)
committerKoen Kooi <koen@openembedded.org>
Sun, 14 Feb 2010 10:28:40 +0000 (11:28 +0100)
recipes/qmake/files/qmake-hack.diff [new file with mode: 0644]
recipes/qmake/qmake2-native_2.10a.bb [deleted file]
recipes/qmake/qmake2.inc [moved from recipes/qmake/qmake2-native.inc with 87% similarity]
recipes/qmake/qmake2/linux-oe-qmake.conf [moved from recipes/qmake/qmake2-native/linux-oe-qmake.conf with 100% similarity]
recipes/qmake/qmake2_2.10a.bb [moved from recipes/qmake/qmake2-sdk_2.10a.bb with 50% similarity]

diff --git a/recipes/qmake/files/qmake-hack.diff b/recipes/qmake/files/qmake-hack.diff
new file mode 100644 (file)
index 0000000..290f540
--- /dev/null
@@ -0,0 +1,15 @@
+--- /tmp/configure     2010-02-10 15:41:58.000000000 +0100
++++ qt-embedded-linux-opensource-src-4.4.3/configure   2010-02-10 15:42:01.000000000 +0100
+@@ -3946,6 +3946,12 @@
+     [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
+     [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
+     [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
++
++# OE
++if [ x$CROSSHACK = xtrue ] ; then
++      echo "Exiting now, since we have what we want: a qmake binary"
++      exit 0
++fi
+ fi # Build qmake
+ #-------------------------------------------------------------------------------
diff --git a/recipes/qmake/qmake2-native_2.10a.bb b/recipes/qmake/qmake2-native_2.10a.bb
deleted file mode 100644 (file)
index 4579838..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-QTVERSION="4.4.3"
-FILESDIR += "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/qmake2-native"
-
-inherit native
-
-require ${PN}.inc
-
-do_install() {
-    :
-}
-
-
similarity index 87%
rename from recipes/qmake/qmake2-native.inc
rename to recipes/qmake/qmake2.inc
index 9908200..6924d1f 100644 (file)
@@ -3,7 +3,7 @@ PRIORITY = "optional"
 HOMEPAGE = "http://www.trolltech.com"
 SECTION = "devel"
 LICENSE = "GPL"
-PR = "r7"
+PR = "r8"
 
 # We call 'moc' during the build 
 DEPENDS = "uicmoc4-native"
@@ -19,10 +19,18 @@ S = "${WORKDIR}/${QTVER}"
 
 inherit autotools  
 
+CROSSHACK = "true"
+CROSSHACK_virtclass-native = ""
+CROSSHACK_virtclass-nativesdk = ""
+
+export CROSSHACK
 export QTDIR = "${S}"
 EXTRA_OEMAKE = "-e"
 
+TARGET_CC_ARCH += "${LDFLAGS}"
+
 do_configure() {
+
     # Make sure we regenerate all Makefiles 
     find ${S} -name "Makefile" | xargs rm
     # Install the OE build templates
@@ -58,10 +66,4 @@ do_compile() {
     :
 }
 
-do_stage() {
-       install -d ${STAGING_BINDIR_NATIVE}     
-       install -m 0755 bin/qmake ${STAGING_BINDIR_NATIVE}/qmake2
-       install -m 0755 bin/qmake ${STAGING_BINDIR_NATIVE}/qmake-qt4
-       install -d ${STAGING_DATADIR_NATIVE}/qt4
-       cp -PfR mkspecs ${STAGING_DATADIR_NATIVE}/qt4/
-}
+FILES_${PN} += "${datadir}/qt4/"
similarity index 50%
rename from recipes/qmake/qmake2-sdk_2.10a.bb
rename to recipes/qmake/qmake2_2.10a.bb
index 6ed9ebd..abf4380 100644 (file)
@@ -1,10 +1,14 @@
 QTVERSION="4.4.3"
-require qmake2-native.inc
+FILESDIR += "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/qmake2"
 
-inherit sdk
+BBCLASSEXTEND = "native sdk"
 
-do_install () {
-       install -d ${D}/${bindir}
+require ${PN}.inc
+
+SRC_URI += "file://qmake-hack.diff;patch=1"
+
+do_install() {
+    install -d ${D}/${bindir}
     install -m 0755 bin/qmake ${D}/${bindir}/qmake2
     install -m 0755 bin/qmake ${D}/${bindir}/qmake-qt4
     install -d ${D}/${datadir}/qt4
@@ -12,6 +16,3 @@ do_install () {
 }
 
 
-
-
-