aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2007-12-24 12:41:20 +0000
committerHolger Freyther <zecke@selfish.org>2007-12-24 12:41:20 +0000
commit65a0e7358915f95d64d2df033843e83b82ffd83f (patch)
tree4b9666cd21fe5cff7d40cf74263e4c798f3ba3a0
parent31e33a19636ee3c236526f232696fee13ecc76ef (diff)
downloadopenembedded-65a0e7358915f95d64d2df033843e83b82ffd83f.tar.gz
packages/qt4/qt4-x11-free,qtopia-core: Unify configure and compile of Qt4
Adjust packaging to look into the directories we configured.
-rw-r--r--packages/qt4/qt4-x11-free.inc1
-rw-r--r--packages/qt4/qt4-x11-free_4.3.3.bb41
-rw-r--r--packages/qt4/qt4_arch.inc10
-rw-r--r--packages/qt4/qt_configuration.inc67
-rw-r--r--packages/qt4/qt_depends.inc2
-rw-r--r--packages/qt4/qt_packaging.inc17
-rw-r--r--packages/qt4/qtopia-core.inc1
-rw-r--r--packages/qt4/qtopia-core_4.3.3.bb96
8 files changed, 90 insertions, 145 deletions
diff --git a/packages/qt4/qt4-x11-free.inc b/packages/qt4/qt4-x11-free.inc
index 1ea8930701..74773cd1d3 100644
--- a/packages/qt4/qt4-x11-free.inc
+++ b/packages/qt4/qt4-x11-free.inc
@@ -18,6 +18,7 @@ S = "${WORKDIR}/qt-x11-opensource-src-${PV}"
QT_BASE_NAME = "qt4"
QT_BASE_LIB = "libqt"
QT_LIBRARY_NAME = "libQt"
+QT_DIR_NAME = "qt4"
require qt_packaging.inc
require qt_depends.inc
diff --git a/packages/qt4/qt4-x11-free_4.3.3.bb b/packages/qt4/qt4-x11-free_4.3.3.bb
index b8876541b6..8b557a086c 100644
--- a/packages/qt4/qt4-x11-free_4.3.3.bb
+++ b/packages/qt4/qt4-x11-free_4.3.3.bb
@@ -1,50 +1,11 @@
-PARALLEL_MAKE = ""
-export QTDIR = "${S}"
STAGING_QT_DIR = "${STAGING_DIR}/${TARGET_SYS}/qt4"
-EXTRA_OEMAKE = "-e"
-require qt4_arch.inc
-QT_ARCH := "${@qt_arch(d)}"
# FIXME:
# * add missing options
-QT_CONFIG_FLAGS = "-release -shared -qt-zlib -system-libjpeg -no-nas-sound -no-sm -no-libmng -qt-libpng -no-gif -no-xinerama \
- -no-tablet -no-xkb -no-nis -no-cups -no-opengl \
- -no-sse -no-sse2 -no-mmx -no-3dnow \
- -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 \
- -qdbus \
- -verbose -stl -no-accessibility \
- -pch -no-glib"
+QT_CONFIG_FLAGS += "-no-xinerama -no-tablet -no-xkb -no-opengl"
-EXTRA_ENV = 'QMAKE="${STAGING_BINDIR_NATIVE}/qmake2 -after DEFINES+=QT_NO_XIM INCPATH+=${STAGING_INCDIR} \
- INCPATH+=${STAGING_INCDIR}/freetype2 LIBS+=-L${STAGING_LIBDIR}" \
- QMAKESPEC="${QMAKESPEC}" LINK="${CXX} -Wl,-rpath-link,${STAGING_LIBDIR}" \
- AR="${TARGET_PREFIX}ar cqs" \
- MOC="${STAGING_BINDIR_NATIVE}/moc4" UIC="${STAGING_BINDIR_NATIVE}/uic4" MAKE="make -e"'
-
-do_configure() {
- echo "DEFINES -= QT_NO_CAST_TO_ASCII" >>src/qbase.pri
- echo "DEFINES += QT_NO_XIM" >>src/qbase.pri
- unset QMAKESPEC
- ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake
- ln -s linux-g++ mkspecs/${TARGET_OS}-oe-g++
- #export QMAKESPEC="linux-oe-g++"
- #rm -rf ./mkspecs
- #ln -sf ${QMAKE_MKSPEC_PATH} ./mkspecs
- echo yes | ./configure -prefix / -platform ${TARGET_OS}-oe-g++ -crossarch ${QT_ARCH} ${QT_CONFIG_FLAGS} -fast \
- -L${STAGING_LIBDIR} -I${STAGING_INCDIR} -I${STAGING_INCDIR}/freetype2 -I${STAGING_INCDIR}/mysql
-}
-
-# FIXME: Might want to compile the cross tools for the -dev packages as well...
-do_compile() {
- unset CFLAGS CXXFLAGS
- install -m 0755 ${STAGING_BINDIR_NATIVE}/rcc4 ${S}/bin/rcc
- install -m 0755 ${STAGING_BINDIR_NATIVE}/moc4 ${S}/bin/moc
- install -m 0755 ${STAGING_BINDIR_NATIVE}/uic4 ${S}/bin/uic
-
- oe_runmake ${EXTRA_ENV}
-}
PARTS = "3Support AssistantClient Core DBus Designer DesignerComponents Gui Network Script Sql Svg Test Xml"
diff --git a/packages/qt4/qt4_arch.inc b/packages/qt4/qt4_arch.inc
index 63babd9a0a..60ede1db2b 100644
--- a/packages/qt4/qt4_arch.inc
+++ b/packages/qt4/qt4_arch.inc
@@ -1,3 +1,5 @@
+inherit siteinfo
+
def qt_arch(d):
import bb, re
arch = bb.data.getVar('TARGET_ARCH', d, 1)
@@ -11,3 +13,11 @@ def qt_arch(d):
arch = "mips"
return arch
+def qt_endian(d):
+ import bb
+ if bb.data.getVar('SITEINFO_ENDIANESS', d, True) == "le":
+ return "-little-endian"
+ elif bb.data.getVar('SITEINFO_ENDIANESS', d, True) == "be":
+ return "-big-endian"
+ else:
+ assert False
diff --git a/packages/qt4/qt_configuration.inc b/packages/qt4/qt_configuration.inc
new file mode 100644
index 0000000000..afa716d517
--- /dev/null
+++ b/packages/qt4/qt_configuration.inc
@@ -0,0 +1,67 @@
+require qt4_arch.inc
+QT_ARCH := "${@qt_arch(d)}"
+QT_ENDIAN = "${@qt_endian(d)}"
+
+QT_CONFIG_FLAGS = "-release -no-cups -no-accessibility -reduce-relocations \
+ -shared -no-nas-sound -no-sm -no-nis \
+ -qt-gif -system-libjpeg -system-libpng -system-zlib \
+ -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 \
+ -pch -qdbus -stl -glib"
+
+PARALLEL_MAKE = ""
+EXTRA_OEMAKE = "-e"
+
+EXTRA_ENV = 'QMAKE="${STAGING_BINDIR_NATIVE}/qmake2 -after \
+ INCPATH+=${STAGING_INCDIR}/freetype2 LIBS+=-L${STAGING_LIBDIR}" \
+ QMAKESPEC="${QMAKESPEC}" LINK="${CXX} -Wl,-rpath-link,${STAGING_LIBDIR}" \
+ AR="${TARGET_PREFIX}ar cqs" \
+ MOC="${STAGING_BINDIR_NATIVE}/moc4" UIC="${STAGING_BINDIR_NATIVE}/uic4" MAKE="make -e"'
+
+do_configure() {
+ unset QMAKESPEC
+ ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake
+ ln -s linux-g++ mkspecs/${TARGET_OS}-oe-g++
+
+ echo yes | ./configure -v \
+ -prefix ${prefix} \
+ -bindir ${bindir} \
+ -libdir ${libdir} \
+ -datadir ${datadir} \
+ -sysconfdir ${sysconfdir} \
+ -docdir ${docdir}/${QT_DIR_NAME} \
+ -headerdir ${includedir} \
+ -plugindir ${libdir}/${QT_DIR_NAME}/plugins \
+ -translationdir ${datadir}/${QT_DIR_NAME}/translations \
+ -examplesdir ${bindir}/${QT_DIR_NAME}/examples \
+ -demosdir ${bindir}/${QT_DIR_NAME}/demos \
+ -platform ${TARGET_OS}-oe-g++ \
+ -xplatform ${TARGET_OS}-oe-g++ \
+ -embedded ${QT_ARCH} ${QT_ENDIAN} -fast \
+ -crossarch ${QT_ARCH}
+ ${QT_CONFIG_FLAGS} -fast \
+ -L${STAGING_LIBDIR} -I${STAGING_INCDIR}
+ -I${STAGING_INCDIR}/freetype2
+}
+
+do_compile() {
+ unset CFLAGS CXXFLAGS
+ install -m 0755 ${STAGING_BINDIR_NATIVE}/rcc4 ${S}/bin/rcc
+ install -m 0755 ${STAGING_BINDIR_NATIVE}/moc4 ${S}/bin/moc
+ install -m 0755 ${STAGING_BINDIR_NATIVE}/uic4 ${S}/bin/uic
+
+ oe_runmake ${EXTRA_ENV}
+}
+
+#
+# Fixup some pkgconfig files
+# moc_location=/home/zecke/gmit/dela_build/git/openembedded-gmit.zecke/build/oetmp/work/arm-oabi-angstrom-linux/qtopia-core-4.3.0-r2/qtopia-core-opensource-src-4.3.0/bin/moc
+# uic_location=/home/zecke/gmit/dela_build/git/openembedded-gmit.zecke/build/oetmp/work/arm-oabi-angstrom-linux/qtopia-core-4.3.0-r2/qtopia-core-opensource-src-4.3.0/bin/uic
+#
+# Libs: -L${libdir} -lQtNetwork -L/home/zecke/gmit/dela_build/git/openembedded-gmit.zecke/build/oetmp/staging/arm-angstrom-linux/lib -L/home/zecke/gmit/dela_build/git/openembedded-gmit.zecke/build/oetmp/work/arm-oabi-angstrom-linux/qtopia-core-4.3.0-r2/qtopia-core-opensource-src-4.3.0/lib $(LIBS_EXTRA) -lQtCore -L/home/zecke/gmit/dela_build/git/openembedded-gmit.zecke/build/oetmp/staging/arm-angstrom-linux/lib -L/home/zecke/gmit/dela_build/git/openembedded-gmit.zecke/build/oetmp/work/arm-oabi-angstrom-linux/qtopia-core-4.3.0-r2/qtopia-core-opensource-src-4.3.0/lib -lm -lrt -lpthread -ldl
+#
+do_compile_append() {
+ cd ${S}/lib/pkgconfig
+ sed -i s#"-L${S}/lib"##g *.pc
+ sed -i s#"moc_location=${S}/bin/moc"#moc_location=${STAGING_BINDIR}/moc4# *.pc
+ sed -i s#"uic_location=${S}/bin/uic"#uic_location=${STAGING_BINDIR}/uic4# *.pc
+}
diff --git a/packages/qt4/qt_depends.inc b/packages/qt4/qt_depends.inc
index daafa21512..289b625d0e 100644
--- a/packages/qt4/qt_depends.inc
+++ b/packages/qt4/qt_depends.inc
@@ -1,3 +1,3 @@
inherit pkgconfig qmake_base
-DEPENDS += " uicmoc4-native qmake2-native freetype jpeg dbus openssl"
+DEPENDS += " uicmoc4-native qmake2-native freetype jpeg libpng zlib dbus openssl glib-2.0"
diff --git a/packages/qt4/qt_packaging.inc b/packages/qt4/qt_packaging.inc
index 01942866c7..86ab0e784c 100644
--- a/packages/qt4/qt_packaging.inc
+++ b/packages/qt4/qt_packaging.inc
@@ -81,16 +81,13 @@ FILES_${QT_BASE_LIB}dbus4 = "${libdir}/${QT_LIBRARY_NAME}DBus.
FILES_${QT_BASE_LIB}dbus4-dev = "${libdir}/${QT_LIBRARY_NAME}DBus.so"
FILES_${QT_BASE_LIB}dbus4-dbg = "${libdir}/.debug/${QT_LIBRARY_NAME}DBus*"
-FILES_${QT_BASE_NAME}-plugins-accessible = "${libdir}/plugins/accessible/*.so"
-FILES_${QT_BASE_NAME}-plugins-codecs = "${libdir}/plugins/codecs/*.so"
-FILES_${QT_BASE_NAME}-plugins-designer = "${libdir}/plugins/designer/*.so"
-FILES_${QT_BASE_NAME}-plugins-imageformats = "${libdir}/plugins/imageformats/*.so"
-FILES_${QT_BASE_NAME}-plugins-sqldrivers = "${libdir}/plugins/sqldrivers/*.so"
-FILES_${QT_BASE_NAME}-plugins-inputmethods = "${libdir}/plugins/inputmethods/*.so"
-FILES_${QT_BASE_NAME}-plugins-iconengines = "${libdir}/plugins/iconengines/*.so"
-
-FILES_${QT_BASE_NAME}-plugins += "${datadir}/qtopia/plugins/*/*.so"
-FILES_${QT_BASE_NAME}-plugins-dbg += "${datadir}/qtopia/plugins/*/.debug/*.so"
+FILES_${QT_BASE_NAME}-plugins-accessible = "${libdir}/${QT_DIR_NAME}/plugins/accessible/*.so"
+FILES_${QT_BASE_NAME}-plugins-codecs = "${libdir}/${QT_DIR_NAME}/plugins/codecs/*.so"
+FILES_${QT_BASE_NAME}-plugins-designer = "${libdir}/${QT_DIR_NAME}/plugins/designer/*.so"
+FILES_${QT_BASE_NAME}-plugins-imageformats = "${libdir}/${QT_DIR_NAME}/plugins/imageformats/*.so"
+FILES_${QT_BASE_NAME}-plugins-sqldrivers = "${libdir}/${QT_DIR_NAME}/plugins/sqldrivers/*.so"
+FILES_${QT_BASE_NAME}-plugins-inputmethods = "${libdir}/${QT_DIR_NAME}/plugins/inputmethods/*.so"
+FILES_${QT_BASE_NAME}-plugins-iconengines = "${libdir}/${QT_DIR_NAME}/plugins/iconengines/*.so"
FILES_${QT_BASE_NAME}-assistant = "${bindir}/*assistant*"
FILES_${QT_BASE_NAME}-designer = "${bindir}/*designer*"
diff --git a/packages/qt4/qtopia-core.inc b/packages/qt4/qtopia-core.inc
index dad062c9e0..28ab2fb614 100644
--- a/packages/qt4/qtopia-core.inc
+++ b/packages/qt4/qtopia-core.inc
@@ -13,6 +13,7 @@ S = "${WORKDIR}/qtopia-core-opensource-src-${PV}"
QT_BASE_NAME = "qtopiacore"
QT_BASE_LIB = "libqtopiacore"
QT_LIBRARY_NAME = "libQt"
+QT_DIR_NAME = "qtopia"
require qt_packaging.inc
require qt_depends.inc
diff --git a/packages/qt4/qtopia-core_4.3.3.bb b/packages/qt4/qtopia-core_4.3.3.bb
index d1a811cc2d..e7187b9309 100644
--- a/packages/qt4/qtopia-core_4.3.3.bb
+++ b/packages/qt4/qtopia-core_4.3.3.bb
@@ -1,99 +1,7 @@
-# Qmake gets confused by environment variables, as it builds both HOST
-# and TARGET objects. The correct compiler settings come from the mkspec
-# and are set with the OE_QMAKE_ variables
-PARALLEL_MAKE = ""
-EXTRA_OEMAKE = " MAKEFLAGS= "
-
-# This stuff could also be done by inheriting qmake, but I didn't want to
-# bother with the qmake separation from the Qtopia configure. This separation
-# is probably nothing more than a patch on the configure and setting some
-# environment variables to use our own qmake/moc/uic, but that's something
-# to figure out later.
-export OE_QMAKE_CC="${CC}"
-export OE_QMAKE_CFLAGS="${CFLAGS}"
-export OE_QMAKE_CXX="${CXX}"
-export OE_QMAKE_CXXFLAGS="-fno-exceptions ${CXXFLAGS}"
-export OE_QMAKE_LDFLAGS="${LDFLAGS}"
-export OE_QMAKE_LINK="${CXX}"
-export OE_QMAKE_AR="${AR}"
-export OE_QMAKE_RANLIB="${RANLIB}"
-export OE_QMAKE_STRIP="echo"
-export OE_QMAKE_RPATH="-Wl,-rpath-link,"
-export OE_QMAKE_INCDIR_QT="${QTDIR}/include"
-export OE_QMAKE_LIBDIR_QT="${QTDIR}/lib"
-export OE_QMAKE_INCDIR_QTOPIA="${QTOPIADIR}/include"
-export OE_QMAKE_LIBDIR_QTOPIA="${QTOPIADIR}/lib"
-
-require qt4_arch.inc
-QT_ARCH := "${@qte_arch(d)}"
-
-# FIXME use info.bbclass once it has been commited
-QT_ENDIAN = "-little-endian"
-
-# We don't build the examples and demos atm. They're quite big and not used
-# frequently, only for testing maybe. Feel free to change and to package
-# them separately.
-QT_CONFIG_FLAGS = "-release \
- -no-cups -no-accessibility \
- -nomake demos -nomake examples -nomake tools -reduce-relocations \
+QT_CONFIG_FLAGS += " \
+ -nomake demos -nomake examples -nomake tools \
-qt-mouse-tslib -qt-gfx-transformed -embedded ${QT_ARCH}"
-do_configure() {
- # Hack to honor our compiler flags
- sed -i s/-O2//g ${S}/mkspecs/*/qmake.conf
- sed -i s/-O2//g ${S}/mkspecs/*/*/qmake.conf
-
-
- # Install the OE build templates (something which might be done
- # by inheriting qmake)
- for template in linux-oe-g++ linux-uclibc-oe-g++ linux-gnueabi-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
-
- # The Qmake Makefile generation doesn't like these environment
- # variables, as they mess up the HOST tools builds
- unset CC
- unset CXX
- unset CFLAGS
- unset CXXFLAGS
- unset LDFLAGS
-
- # For rationale behind the installation locations, see remark above
- echo yes | ./configure -v \
- -prefix ${prefix} \
- -bindir ${bindir} \
- -libdir ${libdir} \
- -docdir ${docdir}/qtopia \
- -headerdir ${includedir} \
- -plugindir ${datadir}/qtopia/plugins \
- -datadir ${datadir} \
- -translationdir ${datadir}/qtopia/translations \
- -sysconfdir ${sysconfdir} \
- -examplesdir ${bindir}/qtopia/examples \
- -demosdir ${bindir}/qtopia/demos \
- -embedded ${QT_ARCH} ${QT_ENDIAN} -fast \
- -xplatform linux-oe-g++ \
- ${QT_CONFIG_FLAGS} \
- -L${STAGING_LIBDIR} -I${STAGING_INCDIR}
-}
-
-#
-# Fixup some pkgconfig files
-# moc_location=/home/zecke/gmit/dela_build/git/openembedded-gmit.zecke/build/oetmp/work/arm-oabi-angstrom-linux/qtopia-core-4.3.0-r2/qtopia-core-opensource-src-4.3.0/bin/moc
-# uic_location=/home/zecke/gmit/dela_build/git/openembedded-gmit.zecke/build/oetmp/work/arm-oabi-angstrom-linux/qtopia-core-4.3.0-r2/qtopia-core-opensource-src-4.3.0/bin/uic
-#
-# Libs: -L${libdir} -lQtNetwork -L/home/zecke/gmit/dela_build/git/openembedded-gmit.zecke/build/oetmp/staging/arm-angstrom-linux/lib -L/home/zecke/gmit/dela_build/git/openembedded-gmit.zecke/build/oetmp/work/arm-oabi-angstrom-linux/qtopia-core-4.3.0-r2/qtopia-core-opensource-src-4.3.0/lib $(LIBS_EXTRA) -lQtCore -L/home/zecke/gmit/dela_build/git/openembedded-gmit.zecke/build/oetmp/staging/arm-angstrom-linux/lib -L/home/zecke/gmit/dela_build/git/openembedded-gmit.zecke/build/oetmp/work/arm-oabi-angstrom-linux/qtopia-core-4.3.0-r2/qtopia-core-opensource-src-4.3.0/lib -lm -lrt -lpthread -ldl
-#
-do_compile_append() {
- cd ${S}/lib/pkgconfig
- sed -i s#"-L${S}/lib"##g *.pc
- sed -i s#"moc_location=${S}/bin/moc"#moc_location=${STAGING_BINDIR}/moc4# *.pc
- sed -i s#"uic_location=${S}/bin/uic"#uic_location=${STAGING_BINDIR}/uic4# *.pc
-}
-
do_stage_append() {
echo "Fixing up Qt"
cd ${STAGING_LIBDIR}/pkgconfig