summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 @@
1
2OE_QMAKE_PLATFORM = "${TARGET_OS}-oe-g++"
3QMAKESPEC = "${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}"
4
5# We override this completely to eliminate the -e normally passed in
6EXTRA_OEMAKE = ' MAKEFLAGS= '
7
8export OE_QMAKE_CC="${CC}"
9export OE_QMAKE_CFLAGS="${CFLAGS}"
10export OE_QMAKE_CXX="${CXX}"
11export OE_QMAKE_LDFLAGS="${LDFLAGS}"
12export OE_QMAKE_AR="${AR}"
13export OE_QMAKE_STRIP="echo"
14export OE_QMAKE_RPATH="-Wl,-rpath-link,"
15
16# do not export STRIP to the environment
17STRIP[unexport] = "1"
18
19# default to qte2 via bb.conf, inherit qt3x11 to configure for qt3x11
20
21oe_qmake_mkspecs () {
22 mkdir -p mkspecs/${OE_QMAKE_PLATFORM}
23 for f in ${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}/*; do
24 if [ -L $f ]; then
25 lnk=`readlink $f`
26 if [ -f mkspecs/${OE_QMAKE_PLATFORM}/$lnk ]; then
27 ln -s $lnk mkspecs/${OE_QMAKE_PLATFORM}/`basename $f`
28 else
29 cp $f mkspecs/${OE_QMAKE_PLATFORM}/
30 fi
31 else
32 cp $f mkspecs/${OE_QMAKE_PLATFORM}/
33 fi
34 done
35}
36
37qmake_base_do_configure() {
38 case ${QMAKESPEC} in
39 *linux-oe-g++|*linux-uclibc-oe-g++|*linux-gnueabi-oe-g++|*linux-uclibceabi-oe-g++)
40 ;;
41 *-oe-g++)
42 die Unsupported target ${TARGET_OS} for oe-g++ qmake spec
43 ;;
44 *)
45 oenote Searching for qmake spec file
46 paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-${TARGET_ARCH}-g++"
47 paths="${QMAKE_MKSPEC_PATH}/${TARGET_OS}-g++ $paths"
48
49 if (echo "${TARGET_ARCH}"|grep -q 'i.86'); then
50 paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-x86-g++ $paths"
51 fi
52 for i in $paths; do
53 if test -e $i; then
54 export QMAKESPEC=$i
55 break
56 fi
57 done
58 ;;
59 esac
60
61 oenote "using qmake spec in ${QMAKESPEC}, using profiles '${QMAKE_PROFILES}'"
62
63 if [ -z "${QMAKE_PROFILES}" ]; then
64 PROFILES="`ls *.pro`"
65 else
66 PROFILES="${QMAKE_PROFILES}"
67 fi
68
69 if [ -z "$PROFILES" ]; then
70 die "QMAKE_PROFILES not set and no profiles found in $PWD"
71 fi
72
73 if [ ! -z "${EXTRA_QMAKEVARS_POST}" ]; then
74 AFTER="-after"
75 QMAKE_VARSUBST_POST="${EXTRA_QMAKEVARS_POST}"
76 oenote "qmake postvar substitution: ${EXTRA_QMAKEVARS_POST}"
77 fi
78
79 if [ ! -z "${EXTRA_QMAKEVARS_PRE}" ]; then
80 QMAKE_VARSUBST_PRE="${EXTRA_QMAKEVARS_PRE}"
81 oenote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
82 fi
83
84#oenote "Calling '${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'"
85 unset QMAKESPEC || true
86 ${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling ${OE_QMAKE_QMAKE} on $PROFILES"
87}
88
89EXPORT_FUNCTIONS do_configure
90
91addtask 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 @@
1DESCRIPTION = "TrollTech Makefile Generator"
2PRIORITY = "optional"
3HOMEPAGE = "http://www.trolltech.com"
4SECTION = "devel"
5LICENSE = "GPL"
6PR = "r12"
7
8# We call 'moc' during the build
9DEPENDS = "qt4-tools-native"
10
11QTVER = "qt-embedded-linux-opensource-src-${QTVERSION}"
12
13SRC_URI = "ftp://ftp.trolltech.com/qt/source/${QTVER}.tar.bz2 \
14 file://0001-fix-mkspecs.patch \
15 file://qt-config.patch \
16 file://use-lflags-last.patch \
17 file://linux-oe-qmake.conf"
18S = "${WORKDIR}/${QTVER}"
19
20inherit autotools
21
22CROSSHACK = "true"
23CROSSHACK_virtclass-native = ""
24CROSSHACK_virtclass-nativesdk = ""
25
26export CROSSHACK
27export QTDIR = "${S}"
28EXTRA_OEMAKE = "-e"
29
30TARGET_CC_ARCH += "${LDFLAGS}"
31
32do_configure() {
33
34 # Make sure we regenerate all Makefiles
35 find ${S} -name "Makefile" | xargs rm
36 # Install the OE build templates
37 for template in linux-oe-g++ linux-uclibc-oe-g++ linux-gnueabi-oe-g++ linux-uclibceabi-oe-g++
38 do
39 install -d ${S}/mkspecs/$template
40 install -m 0644 ${WORKDIR}/linux-oe-qmake.conf ${S}/mkspecs/$template/qmake.conf
41 ln -sf ../linux-g++/qplatformdefs.h ${S}/mkspecs/$template/qplatformdefs.h
42 done
43
44 QMAKESPEC=
45 PLATFORM=${HOST_OS}-oe-g++
46 export PLATFORM
47 export OE_QMAKE_CC="${CC}"
48 export OE_QMAKE_CFLAGS="${CFLAGS}"
49 export OE_QMAKE_CXX="${CXX}"
50 export OE_QMAKE_CXXFLAGS="-fno-exceptions -fno-rtti ${CXXFLAGS}"
51 export OE_QMAKE_LDFLAGS="${LDFLAGS}"
52 export OE_QMAKE_LINK="${CCLD}"
53 export OE_QMAKE_AR="${AR}"
54 export OE_QMAKE_STRIP="${STRIP}"
55 export OE_QMAKE_UIC="${STAGING_BINDIR_NATIVE}/uic4"
56 export OE_QMAKE_MOC="${STAGING_BINDIR_NATIVE}/moc4"
57 export QMAKE_MOC="${STAGING_BINDIR_NATIVE}/moc4"
58 export OE_QMAKE_RCC="${STAGING_BINDIR_NATIVE}/rcc4"
59 export QMAKE_RCC="${STAGING_BINDIR_NATIVE}/rcc4"
60 export OE_QMAKE_QMAKE="${STAGING_BINDIR_NATIVE}/qmake"
61 export OE_QMAKE_RPATH="-Wl,-rpath-link,"
62 echo yes | ./configure -prefix ${STAGING_DIR_NATIVE}/qt4 ${EXTRA_OECONF} || die "Configuring qt failed"
63}
64
65do_compile() {
66 :
67}
68
69FILES_${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 @@
1QTVERSION="4.4.3"
2FILESDIR += "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/qmake2"
3
4BBCLASSEXTEND = "native sdk"
5
6require ${PN}.inc
7
8SRC_URI += "file://qmake-hack.diff"
9
10do_install() {
11 install -d ${D}/${bindir}
12 install -m 0755 bin/qmake ${D}/${bindir}/qmake2
13 install -m 0755 bin/qmake ${D}/${bindir}/qmake-qt4
14 install -d ${D}/${datadir}/qt4
15 install -d ${D}/${datadir}/qtopia
16
17 script="${D}/${datadir}/qtopia/environment-setup"
18 touch $script
19 echo 'export QT_DIR_NAME=qtopia' >> $script
20 echo 'export QT_LIBINFIX=E' >> $script
21 echo 'export OE_QMAKE_AR=ar' >> $script
22 echo 'export OE_QMAKE_CC=gcc' >> $script
23 echo 'export OE_QMAKE_CXX=g++' >> $script
24 echo 'export OE_QMAKE_LINK=g++' >> $script
25 echo 'export OE_QMAKE_LIBDIR_QT=${libdir}' >> $script
26 echo 'export OE_QMAKE_INCDIR_QT=${includedir}/qtopia' >> $script
27 echo 'export OE_QMAKE_MOC=${bindir}/moc' >> $script
28 echo 'export OE_QMAKE_UIC=${bindir}/uic' >> $script
29 echo 'export OE_QMAKE_UIC3=${bindir}/uic3' >> $script
30 echo 'export OE_QMAKE_RCC=${bindir}/rcc' >> $script
31 echo 'export OE_QMAKE_QDBUSCPP2XML=${bindir}/qdbuscpp2xml' >> $script
32 echo 'export OE_QMAKE_QDBUSXML2CPP=${bindir}/qdbusxml2cpp' >> $script
33 echo 'export OE_QMAKE_QT_CONFIG=${datadir}/qtopia/mkspecs/qconfig.pri' >> $script
34 echo 'export QMAKESPEC=${datadir}/qtopia/mkspecs/linux-g++' >> $script
35
36 script="${D}/${datadir}/qt4/environment-setup"
37 touch $script
38 echo 'export OE_QMAKE_AR=ar' >> $script
39 echo 'export OE_QMAKE_CC=gcc' >> $script
40 echo 'export OE_QMAKE_CXX=g++' >> $script
41 echo 'export OE_QMAKE_LINK=g++' >> $script
42 echo 'export OE_QMAKE_LIBDIR_QT=${libdir}' >> $script
43 echo 'export OE_QMAKE_INCDIR_QT=${includedir}/qt4' >> $script
44 echo 'export OE_QMAKE_MOC=${bindir}/moc' >> $script
45 echo 'export OE_QMAKE_UIC=${bindir}/uic' >> $script
46 echo 'export OE_QMAKE_UIC3=${bindir}/uic3' >> $script
47 echo 'export OE_QMAKE_RCC=${bindir}/rcc' >> $script
48 echo 'export OE_QMAKE_QDBUSCPP2XML=${bindir}/qdbuscpp2xml' >> $script
49 echo 'export OE_QMAKE_QDBUSXML2CPP=${bindir}/qdbusxml2cpp' >> $script
50 echo 'export OE_QMAKE_QT_CONFIG=${datadir}/qt4/mkspecs/qconfig.pri' >> $script
51 echo 'export QMAKESPEC=${datadir}/qt4/mkspecs/linux-g++' >> $script
52
53 chmod 0755 ${D}${datadir}/qt*/environment-setup
54}
55
56FILES_${PN} += "${datadir}/qt*/environment-setup"
57
58
59SRC_URI[md5sum] = "9a639aec44a1e4c70040117183d247a3"
60SRC_URI[sha256sum] = "05d06b93f95092f1318634fca24f0c2d0a1252c9f1dc2fbb427b07e8ecbb4f39"