diff options
Diffstat (limited to 'meta-oe/classes/qmake_base.bbclass')
-rw-r--r-- | meta-oe/classes/qmake_base.bbclass | 105 |
1 files changed, 0 insertions, 105 deletions
diff --git a/meta-oe/classes/qmake_base.bbclass b/meta-oe/classes/qmake_base.bbclass deleted file mode 100644 index aa8c05b9d..000000000 --- a/meta-oe/classes/qmake_base.bbclass +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | |||
2 | OE_QMAKE_PLATFORM = "${TARGET_OS}-oe-g++" | ||
3 | QMAKESPEC := "${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}" | ||
4 | |||
5 | # We override this completely to eliminate the -e normally passed in | ||
6 | EXTRA_OEMAKE = ' MAKEFLAGS= ' | ||
7 | |||
8 | export OE_QMAKE_CC="${CC}" | ||
9 | export OE_QMAKE_CFLAGS="${CFLAGS}" | ||
10 | export OE_QMAKE_CXX="${CXX}" | ||
11 | export OE_QMAKE_LDFLAGS="${LDFLAGS}" | ||
12 | export OE_QMAKE_AR="${AR}" | ||
13 | export OE_QMAKE_STRIP="echo" | ||
14 | export OE_QMAKE_RPATH="-Wl,-rpath-link," | ||
15 | |||
16 | # do not export STRIP to the environment | ||
17 | STRIP[unexport] = "1" | ||
18 | |||
19 | # default to qte2 via bb.conf, inherit qt3x11 to configure for qt3x11 | ||
20 | |||
21 | oe_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 | |||
37 | do_generate_qt_config_file() { | ||
38 | export QT_CONF_PATH=${WORKDIR}/qt.conf | ||
39 | cat > ${WORKDIR}/qt.conf <<EOF | ||
40 | [Paths] | ||
41 | Prefix = | ||
42 | Binaries = ${STAGING_BINDIR_NATIVE} | ||
43 | Headers = ${STAGING_INCDIR}/qt4 | ||
44 | Plugins = ${STAGING_LIBDIR}/qt4/plugins/ | ||
45 | Mkspecs = ${STAGING_DATADIR}/qt4/mkspecs/ | ||
46 | EOF | ||
47 | } | ||
48 | |||
49 | addtask generate_qt_config_file after do_patch before do_configure | ||
50 | |||
51 | qmake_base_do_configure() { | ||
52 | case ${QMAKESPEC} in | ||
53 | *linux-oe-g++|*linux-uclibc-oe-g++|*linux-gnueabi-oe-g++|*linux-uclibceabi-oe-g++) | ||
54 | ;; | ||
55 | *-oe-g++) | ||
56 | die Unsupported target ${TARGET_OS} for oe-g++ qmake spec | ||
57 | ;; | ||
58 | *) | ||
59 | bbnote Searching for qmake spec file | ||
60 | paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-${TARGET_ARCH}-g++" | ||
61 | paths="${QMAKE_MKSPEC_PATH}/${TARGET_OS}-g++ $paths" | ||
62 | |||
63 | if (echo "${TARGET_ARCH}"|grep -q 'i.86'); then | ||
64 | paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-x86-g++ $paths" | ||
65 | fi | ||
66 | for i in $paths; do | ||
67 | if test -e $i; then | ||
68 | export QMAKESPEC=$i | ||
69 | break | ||
70 | fi | ||
71 | done | ||
72 | ;; | ||
73 | esac | ||
74 | |||
75 | bbnote "using qmake spec in ${QMAKESPEC}, using profiles '${QMAKE_PROFILES}'" | ||
76 | |||
77 | if [ -z "${QMAKE_PROFILES}" ]; then | ||
78 | PROFILES="`ls *.pro`" | ||
79 | else | ||
80 | PROFILES="${QMAKE_PROFILES}" | ||
81 | fi | ||
82 | |||
83 | if [ -z "$PROFILES" ]; then | ||
84 | die "QMAKE_PROFILES not set and no profiles found in $PWD" | ||
85 | fi | ||
86 | |||
87 | if [ ! -z "${EXTRA_QMAKEVARS_POST}" ]; then | ||
88 | AFTER="-after" | ||
89 | QMAKE_VARSUBST_POST="${EXTRA_QMAKEVARS_POST}" | ||
90 | bbnote "qmake postvar substitution: ${EXTRA_QMAKEVARS_POST}" | ||
91 | fi | ||
92 | |||
93 | if [ ! -z "${EXTRA_QMAKEVARS_PRE}" ]; then | ||
94 | QMAKE_VARSUBST_PRE="${EXTRA_QMAKEVARS_PRE}" | ||
95 | bbnote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}" | ||
96 | fi | ||
97 | |||
98 | #bbnote "Calling '${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'" | ||
99 | unset QMAKESPEC || true | ||
100 | ${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling ${OE_QMAKE_QMAKE} on $PROFILES" | ||
101 | } | ||
102 | |||
103 | EXPORT_FUNCTIONS do_configure | ||
104 | |||
105 | addtask configure after do_unpack do_patch before do_compile | ||