aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-06-12 12:13:40 +1200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2016-06-12 12:15:19 +1200
commit334999487abd3ccf9eadde88c2b9486455325a90 (patch)
tree7c9d6c112df6696d203ea81830f839428328eaca
parentc8fbef02f9eb9aeb394fe46996d216b8850c2374 (diff)
downloadmeta-opie-334999487abd3ccf9eadde88c2b9486455325a90.zip
meta-opie-334999487abd3ccf9eadde88c2b9486455325a90.tar.gz
meta-opie-334999487abd3ccf9eadde88c2b9486455325a90.tar.bz2
classes/qmake_base_legacy: replace qmake_base
Copy in qmake_base from meta-qt4 (where it was moved from openembedded-core recently) and rename it to qmake_base_legacy. (We don't want to depend on meta-qt4 just for this, but we also should avoid a name clash.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--classes/qmake.bbclass2
-rw-r--r--classes/qmake_base_legacy.bbclass119
-rw-r--r--classes/qt3e.bbclass2
-rw-r--r--recipes-qt/qmake/qmake_1.07a.bb2
-rw-r--r--recipes-qt/uicmoc/uicmoc_2.3.10.bb2
-rw-r--r--recipes-qtopia/nonworking/zethereal/zethereal_1.0.0.bb2
-rw-r--r--recipes-qtopia/snes9x/snes9x-sdl-qpe_1.39.bb2
7 files changed, 125 insertions, 6 deletions
diff --git a/classes/qmake.bbclass b/classes/qmake.bbclass
index 2fd0364..ee3489b 100644
--- a/classes/qmake.bbclass
+++ b/classes/qmake.bbclass
@@ -1,4 +1,4 @@
-inherit qmake_base
+inherit qmake_base_legacy
DEPENDS_prepend = "qmake-native "
diff --git a/classes/qmake_base_legacy.bbclass b/classes/qmake_base_legacy.bbclass
new file mode 100644
index 0000000..dc98713
--- /dev/null
+++ b/classes/qmake_base_legacy.bbclass
@@ -0,0 +1,119 @@
+QMAKE_MKSPEC_PATH ?= "${STAGING_DATADIR_NATIVE}/qmake"
+
+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 = ""
+
+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,"
+
+# 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
+}
+
+do_generate_qt_config_file() {
+ export QT_CONF_PATH=${WORKDIR}/qt.conf
+ cat > ${WORKDIR}/qt.conf <<EOF
+[Paths]
+Prefix =
+Binaries = ${STAGING_BINDIR_NATIVE}
+Headers = ${STAGING_INCDIR}/${QT_DIR_NAME}
+Plugins = ${STAGING_LIBDIR}/${QT_DIR_NAME}/plugins/
+Mkspecs = ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/
+EOF
+}
+
+addtask generate_qt_config_file after do_patch before do_configure
+
+qmake_base_do_configure() {
+ case ${QMAKESPEC} in
+ *linux-oe-g++|*linux-uclibc-oe-g++|*linux-gnueabi-oe-g++|*linux-uclibceabi-oe-g++|*linux-gnuspe-oe-g++|*linux-uclibcspe-oe-g++|*linux-gnun32-oe-g++)
+ ;;
+ *-oe-g++)
+ die Unsupported target ${TARGET_OS} for oe-g++ qmake spec
+ ;;
+ *)
+ bbnote 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
+
+ bbnote "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}"
+ bbnote "qmake postvar substitution: ${EXTRA_QMAKEVARS_POST}"
+ fi
+
+ if [ ! -z "${EXTRA_QMAKEVARS_PRE}" ]; then
+ QMAKE_VARSUBST_PRE="${EXTRA_QMAKEVARS_PRE}"
+ bbnote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
+ fi
+
+ # Hack .pro files to use OE utilities
+ LCONVERT_NAME=$(basename ${OE_QMAKE_LCONVERT})
+ LRELEASE_NAME=$(basename ${OE_QMAKE_LRELEASE})
+ LUPDATE_NAME=$(basename ${OE_QMAKE_LUPDATE})
+ XMLPATTERNS_NAME=$(basename ${OE_QMAKE_XMLPATTERNS})
+ find -name '*.pro' \
+ -exec sed -i -e "s|\(=\s*.*\)/$LCONVERT_NAME|\1/lconvert|g" \
+ -e "s|\(=\s*.*\)/$LRELEASE_NAME|\1/lrelease|g" \
+ -e "s|\(=\s*.*\)/$LUPDATE_NAME|\1/lupdate|g" \
+ -e "s|\(=\s*.*\)/$XMLPATTERNS_NAME|\1/xmlpatterns|g" \
+ -e "s|\(=\s*.*\)/lconvert|\1/$LCONVERT_NAME|g" \
+ -e "s|\(=\s*.*\)/lrelease|\1/$LRELEASE_NAME|g" \
+ -e "s|\(=\s*.*\)/lupdate|\1/$LUPDATE_NAME|g" \
+ -e "s|\(=\s*.*\)/xmlpatterns|\1/$XMLPATTERNS_NAME|g" \
+ '{}' ';'
+
+#bbnote "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/classes/qt3e.bbclass b/classes/qt3e.bbclass
index d3d4a14..bc36cb4 100644
--- a/classes/qt3e.bbclass
+++ b/classes/qt3e.bbclass
@@ -1,5 +1,5 @@
#
-# override variables set by qmake_base to compile Qt/X11 apps
+# override variables set by qmake_base_legacy to compile Qt/X11 apps
#
export QTDIR="${STAGING_DIR_HOST}/qte3"
export QTEDIR="${STAGING_DIR_HOST}/qte3"
diff --git a/recipes-qt/qmake/qmake_1.07a.bb b/recipes-qt/qmake/qmake_1.07a.bb
index 1ee0a0f..40c7c31 100644
--- a/recipes-qt/qmake/qmake_1.07a.bb
+++ b/recipes-qt/qmake/qmake_1.07a.bb
@@ -13,7 +13,7 @@ S = "${WORKDIR}/${QTEVER}"
LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=629178675a7d49c9fa19dfe9f43ea256 \
file://README;beginline=1;endline=7;md5=a85582a7befb26735438461afd8559af"
-inherit qmake_base
+inherit qmake_base_legacy
BBCLASSEXTEND = "native nativesdk"
export QTDIR = "${S}"
diff --git a/recipes-qt/uicmoc/uicmoc_2.3.10.bb b/recipes-qt/uicmoc/uicmoc_2.3.10.bb
index 2afd57a..bb82aed 100644
--- a/recipes-qt/uicmoc/uicmoc_2.3.10.bb
+++ b/recipes-qt/uicmoc/uicmoc_2.3.10.bb
@@ -17,7 +17,7 @@ S = "${WORKDIR}/qt-${PV}"
LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=aea7d119b7f7d798464fa2b1aae005f8 \
file://README;beginline=1;endline=7;md5=d3e237af71522cc2a3c89dbaf48b345d"
-inherit qmake_base
+inherit qmake_base_legacy
BBCLASSEXTEND = "native nativesdk"
UICMOCNATIVE = "uicmoc-native"
UICMOCNATIVE_virtclass-native = ""
diff --git a/recipes-qtopia/nonworking/zethereal/zethereal_1.0.0.bb b/recipes-qtopia/nonworking/zethereal/zethereal_1.0.0.bb
index c17e130..f24ca3b 100644
--- a/recipes-qtopia/nonworking/zethereal/zethereal_1.0.0.bb
+++ b/recipes-qtopia/nonworking/zethereal/zethereal_1.0.0.bb
@@ -8,7 +8,7 @@ APPTYPE = "binary"
APPDESKTOP = "${WORKDIR}"
PR = "r0"
-inherit autotools qmake_base
+inherit autotools qmake_base_legacy
EXTRA_OECONF = "--disable-ethereal \
--enable-tethereal \
diff --git a/recipes-qtopia/snes9x/snes9x-sdl-qpe_1.39.bb b/recipes-qtopia/snes9x/snes9x-sdl-qpe_1.39.bb
index 51de404..a165fa6 100644
--- a/recipes-qtopia/snes9x/snes9x-sdl-qpe_1.39.bb
+++ b/recipes-qtopia/snes9x/snes9x-sdl-qpe_1.39.bb
@@ -10,7 +10,7 @@ S = "${WORKDIR}/snes9x-sdl-${PV}"
FILESEXTRAPATHS_prepend := "${THISDIR}/snes9x-sdl:"
-inherit qmake_base palmtop-defs
+inherit qmake_base_legacy palmtop-defs
QT_LIBRARY = '${@base_conditional("PALMTOP_USE_MULTITHREADED_QT", "yes", "qte-mt", "qte",d)}'