aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-01-03 11:07:49 +0100
committerKoen Kooi <koen@dominion.thruhere.net>2011-01-03 12:02:35 +0100
commit63057a32d7b877c39b85eb3e9168c6fd7e4ce579 (patch)
tree5e3c5c688c4f98a325f0abdc64f4f57e611f5d8e
parent5d5148b88be7fdee6f68df2c8e27f5bdd76c6141 (diff)
downloadmeta-openembedded-63057a32d7b877c39b85eb3e9168c6fd7e4ce579.tar.gz
qmake2: import from OE
We want to have a seperate qmake for the time being, but eventually all tweaks should move into qt4-tools Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-rw-r--r--classes/qmake_base.bbclass91
-rw-r--r--recipes-qt/qt4/qmake2-sdk/linux-oe-qmake.conf1
-rw-r--r--recipes-qt/qt4/qmake2.inc69
-rw-r--r--recipes-qt/qt4/qmake2/linux-oe-qmake.conf1
-rw-r--r--recipes-qt/qt4/qmake2_2.10a.bb60
5 files changed, 222 insertions, 0 deletions
diff --git a/classes/qmake_base.bbclass b/classes/qmake_base.bbclass
new file mode 100644
index 0000000000..577c0fab3b
--- /dev/null
+++ b/classes/qmake_base.bbclass
@@ -0,0 +1,91 @@
+
+OE_QMAKE_PLATFORM = "${TARGET_OS}-oe-g++"
+QMAKESPEC = "${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}"
+
+# We override this completely to eliminate the -e normally passed in
+EXTRA_OEMAKE = ' MAKEFLAGS= '
+
+export OE_QMAKE_CC="${CC}"
+export OE_QMAKE_CFLAGS="${CFLAGS}"
+export OE_QMAKE_CXX="${CXX}"
+export OE_QMAKE_LDFLAGS="${LDFLAGS}"
+export OE_QMAKE_AR="${AR}"
+export OE_QMAKE_STRIP="echo"
+export OE_QMAKE_RPATH="-Wl,-rpath-link,"
+
+# do not export STRIP to the environment
+STRIP[unexport] = "1"
+
+# default to qte2 via bb.conf, inherit qt3x11 to configure for qt3x11
+
+oe_qmake_mkspecs () {
+ mkdir -p mkspecs/${OE_QMAKE_PLATFORM}
+ for f in ${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}/*; do
+ if [ -L $f ]; then
+ lnk=`readlink $f`
+ if [ -f mkspecs/${OE_QMAKE_PLATFORM}/$lnk ]; then
+ ln -s $lnk mkspecs/${OE_QMAKE_PLATFORM}/`basename $f`
+ else
+ cp $f mkspecs/${OE_QMAKE_PLATFORM}/
+ fi
+ else
+ cp $f mkspecs/${OE_QMAKE_PLATFORM}/
+ fi
+ done
+}
+
+qmake_base_do_configure() {
+ case ${QMAKESPEC} in
+ *linux-oe-g++|*linux-uclibc-oe-g++|*linux-gnueabi-oe-g++|*linux-uclibceabi-oe-g++)
+ ;;
+ *-oe-g++)
+ die Unsupported target ${TARGET_OS} for oe-g++ qmake spec
+ ;;
+ *)
+ oenote Searching for qmake spec file
+ paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-${TARGET_ARCH}-g++"
+ paths="${QMAKE_MKSPEC_PATH}/${TARGET_OS}-g++ $paths"
+
+ if (echo "${TARGET_ARCH}"|grep -q 'i.86'); then
+ paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-x86-g++ $paths"
+ fi
+ for i in $paths; do
+ if test -e $i; then
+ export QMAKESPEC=$i
+ break
+ fi
+ done
+ ;;
+ esac
+
+ oenote "using qmake spec in ${QMAKESPEC}, using profiles '${QMAKE_PROFILES}'"
+
+ if [ -z "${QMAKE_PROFILES}" ]; then
+ PROFILES="`ls *.pro`"
+ else
+ PROFILES="${QMAKE_PROFILES}"
+ fi
+
+ if [ -z "$PROFILES" ]; then
+ die "QMAKE_PROFILES not set and no profiles found in $PWD"
+ fi
+
+ if [ ! -z "${EXTRA_QMAKEVARS_POST}" ]; then
+ AFTER="-after"
+ QMAKE_VARSUBST_POST="${EXTRA_QMAKEVARS_POST}"
+ oenote "qmake postvar substitution: ${EXTRA_QMAKEVARS_POST}"
+ fi
+
+ if [ ! -z "${EXTRA_QMAKEVARS_PRE}" ]; then
+ QMAKE_VARSUBST_PRE="${EXTRA_QMAKEVARS_PRE}"
+ oenote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
+ fi
+
+#oenote "Calling '${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'"
+ unset QMAKESPEC || true
+ ${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling ${OE_QMAKE_QMAKE} on $PROFILES"
+}
+
+EXPORT_FUNCTIONS do_configure
+
+addtask configure after do_unpack do_patch before do_compile
diff --git a/recipes-qt/qt4/qmake2-sdk/linux-oe-qmake.conf b/recipes-qt/qt4/qmake2-sdk/linux-oe-qmake.conf
new file mode 100644
index 0000000000..f58481a693
--- /dev/null
+++ b/recipes-qt/qt4/qmake2-sdk/linux-oe-qmake.conf
@@ -0,0 +1 @@
+include(../linux-g++/qmake.conf)
diff --git a/recipes-qt/qt4/qmake2.inc b/recipes-qt/qt4/qmake2.inc
new file mode 100644
index 0000000000..f2631b5f7e
--- /dev/null
+++ b/recipes-qt/qt4/qmake2.inc
@@ -0,0 +1,69 @@
+DESCRIPTION = "TrollTech Makefile Generator"
+PRIORITY = "optional"
+HOMEPAGE = "http://www.trolltech.com"
+SECTION = "devel"
+LICENSE = "GPL"
+PR = "r12"
+
+# We call 'moc' during the build
+DEPENDS = "qt4-tools-native"
+
+QTVER = "qt-embedded-linux-opensource-src-${QTVERSION}"
+
+SRC_URI = "ftp://ftp.trolltech.com/qt/source/${QTVER}.tar.bz2 \
+ file://0001-fix-mkspecs.patch \
+ file://qt-config.patch \
+ file://use-lflags-last.patch \
+ file://linux-oe-qmake.conf"
+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
+ for template in linux-oe-g++ linux-uclibc-oe-g++ linux-gnueabi-oe-g++ linux-uclibceabi-oe-g++
+ do
+ install -d ${S}/mkspecs/$template
+ install -m 0644 ${WORKDIR}/linux-oe-qmake.conf ${S}/mkspecs/$template/qmake.conf
+ ln -sf ../linux-g++/qplatformdefs.h ${S}/mkspecs/$template/qplatformdefs.h
+ done
+
+ QMAKESPEC=
+ PLATFORM=${HOST_OS}-oe-g++
+ export PLATFORM
+ export OE_QMAKE_CC="${CC}"
+ export OE_QMAKE_CFLAGS="${CFLAGS}"
+ export OE_QMAKE_CXX="${CXX}"
+ export OE_QMAKE_CXXFLAGS="-fno-exceptions -fno-rtti ${CXXFLAGS}"
+ export OE_QMAKE_LDFLAGS="${LDFLAGS}"
+ export OE_QMAKE_LINK="${CCLD}"
+ export OE_QMAKE_AR="${AR}"
+ export OE_QMAKE_STRIP="${STRIP}"
+ export OE_QMAKE_UIC="${STAGING_BINDIR_NATIVE}/uic4"
+ export OE_QMAKE_MOC="${STAGING_BINDIR_NATIVE}/moc4"
+ export QMAKE_MOC="${STAGING_BINDIR_NATIVE}/moc4"
+ export OE_QMAKE_RCC="${STAGING_BINDIR_NATIVE}/rcc4"
+ export QMAKE_RCC="${STAGING_BINDIR_NATIVE}/rcc4"
+ export OE_QMAKE_QMAKE="${STAGING_BINDIR_NATIVE}/qmake"
+ export OE_QMAKE_RPATH="-Wl,-rpath-link,"
+ echo yes | ./configure -prefix ${STAGING_DIR_NATIVE}/qt4 ${EXTRA_OECONF} || die "Configuring qt failed"
+}
+
+do_compile() {
+ :
+}
+
+FILES_${PN} += "${datadir}/qt4/"
diff --git a/recipes-qt/qt4/qmake2/linux-oe-qmake.conf b/recipes-qt/qt4/qmake2/linux-oe-qmake.conf
new file mode 100644
index 0000000000..f58481a693
--- /dev/null
+++ b/recipes-qt/qt4/qmake2/linux-oe-qmake.conf
@@ -0,0 +1 @@
+include(../linux-g++/qmake.conf)
diff --git a/recipes-qt/qt4/qmake2_2.10a.bb b/recipes-qt/qt4/qmake2_2.10a.bb
new file mode 100644
index 0000000000..77d909f8eb
--- /dev/null
+++ b/recipes-qt/qt4/qmake2_2.10a.bb
@@ -0,0 +1,60 @@
+QTVERSION="4.4.3"
+FILESDIR += "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/qmake2"
+
+BBCLASSEXTEND = "native sdk"
+
+require ${PN}.inc
+
+SRC_URI += "file://qmake-hack.diff"
+
+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
+ install -d ${D}/${datadir}/qtopia
+
+ script="${D}/${datadir}/qtopia/environment-setup"
+ touch $script
+ echo 'export QT_DIR_NAME=qtopia' >> $script
+ echo 'export QT_LIBINFIX=E' >> $script
+ echo 'export OE_QMAKE_AR=ar' >> $script
+ echo 'export OE_QMAKE_CC=gcc' >> $script
+ echo 'export OE_QMAKE_CXX=g++' >> $script
+ echo 'export OE_QMAKE_LINK=g++' >> $script
+ echo 'export OE_QMAKE_LIBDIR_QT=${libdir}' >> $script
+ echo 'export OE_QMAKE_INCDIR_QT=${includedir}/qtopia' >> $script
+ echo 'export OE_QMAKE_MOC=${bindir}/moc' >> $script
+ echo 'export OE_QMAKE_UIC=${bindir}/uic' >> $script
+ echo 'export OE_QMAKE_UIC3=${bindir}/uic3' >> $script
+ echo 'export OE_QMAKE_RCC=${bindir}/rcc' >> $script
+ echo 'export OE_QMAKE_QDBUSCPP2XML=${bindir}/qdbuscpp2xml' >> $script
+ echo 'export OE_QMAKE_QDBUSXML2CPP=${bindir}/qdbusxml2cpp' >> $script
+ echo 'export OE_QMAKE_QT_CONFIG=${datadir}/qtopia/mkspecs/qconfig.pri' >> $script
+ echo 'export QMAKESPEC=${datadir}/qtopia/mkspecs/linux-g++' >> $script
+
+ script="${D}/${datadir}/qt4/environment-setup"
+ touch $script
+ echo 'export OE_QMAKE_AR=ar' >> $script
+ echo 'export OE_QMAKE_CC=gcc' >> $script
+ echo 'export OE_QMAKE_CXX=g++' >> $script
+ echo 'export OE_QMAKE_LINK=g++' >> $script
+ echo 'export OE_QMAKE_LIBDIR_QT=${libdir}' >> $script
+ echo 'export OE_QMAKE_INCDIR_QT=${includedir}/qt4' >> $script
+ echo 'export OE_QMAKE_MOC=${bindir}/moc' >> $script
+ echo 'export OE_QMAKE_UIC=${bindir}/uic' >> $script
+ echo 'export OE_QMAKE_UIC3=${bindir}/uic3' >> $script
+ echo 'export OE_QMAKE_RCC=${bindir}/rcc' >> $script
+ echo 'export OE_QMAKE_QDBUSCPP2XML=${bindir}/qdbuscpp2xml' >> $script
+ echo 'export OE_QMAKE_QDBUSXML2CPP=${bindir}/qdbusxml2cpp' >> $script
+ echo 'export OE_QMAKE_QT_CONFIG=${datadir}/qt4/mkspecs/qconfig.pri' >> $script
+ echo 'export QMAKESPEC=${datadir}/qt4/mkspecs/linux-g++' >> $script
+
+ chmod 0755 ${D}${datadir}/qt*/environment-setup
+}
+
+FILES_${PN} += "${datadir}/qt*/environment-setup"
+
+
+SRC_URI[md5sum] = "9a639aec44a1e4c70040117183d247a3"
+SRC_URI[sha256sum] = "05d06b93f95092f1318634fca24f0c2d0a1252c9f1dc2fbb427b07e8ecbb4f39"