<commit_before># This is qtopia-phone recipe heavilly based off the one in the qtopia-phone
# distribution.
#
# Please DO NOT merge this file into OE, it is not suitable for that yet as
# it compiles both native and target binaries. This requires stuff to be
# installed on the host which is against the aim of OE.

DESCRIPTION = "Qtopia OpenSource"
SECTION = "qtopia-phone"
LICENSE = "GPL"
PRIORITY = "optional"
HOMEPAGE = "http://www.trolltech.com"
DEPENDS = "glib-2.0 dbus freetype alsa-lib bluez-libs virtual/libx11 fontconfig xft libxext libxrender libxrandr libxcursor libxtst"
PROVIDES = "qtopia-phone"
PR = "r4"
SRCREV = "${AUTOREV}"
SRC_URI = "git://git.openmoko.org/git/qtopia.git;protocol=git \
           file://device-conf \
           file://qplatformdefs.h \
           file://Xsession.d/99qtopia \
           file://qtopia.sh"

S = "${WORKDIR}/git"

inherit pkgconfig

TARGET-DEVICE="${@base_contains('MACHINE', 'nokia770', ' nokia770', '',d)}"
TARGET-DEVICE="${@base_contains('MACHINE', 'nokia800', ' nokia770', '',d)}"
TARGET-DEVICE="${@base_contains('MACHINE', 'spitz', ' c3200', '',d)}"
TARGET-DEVICE="${@base_contains('MACHINE', 'tosa', ' c3200', '',d)}"
TARGET-DEVICE="${@base_contains('MACHINE', 'fic-gta01', 'ficgta01', '',d)}"
TARGET-DEVICE="${@base_contains('MACHINE', 'fic-gta02', 'ficgta01', '',d)}"

export QTOPIA_DEPOT_PATH = "${S}"

require qtopia-phone_arch.inc

QT_ARCH = "${@qtopia_arch(d)}"
QT_ENDIAN = "${@qtopia_endian(d)}"
PLATFORM = "${BUILD_OS}-g++"
XPLATFORM = "linux-oe-g++"
BUILDDIR = "${WORKDIR}/build"

OE_QT_DBUSPATH = "${STAGING_DIR_HOST}"
OE_QT_ARCH = "${QT_ARCH}"
OE_QT_XPLATFORM = "${XPLATFORM}"
OE_QT_RPREFIX = "/opt/Qtopia"
OE_QT_ENDIAN = "${QT_ENDIAN}"
OE_QT_EXTRACONFIG = "-I${STAGING_INCDIR}/dbus-1.0"

do_configure() {

unset CC
unset CXX
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS

mkdir -p ${S}/devices/${TARGET-DEVICE}/mkspecs/qws/${XPLATFORM}
install -m 644 ${S}/qtopiacore/qt/mkspecs/qws/linux-arm-g++/qmake.conf \
    ${S}/devices/${TARGET-DEVICE}/mkspecs/qws/${XPLATFORM}
install -m 644 ${WORKDIR}/qplatformdefs.h \
    ${S}/devices/${TARGET-DEVICE}/mkspecs/qws/${XPLATFORM}
sed -i -e "s@arm-linux-@${TARGET_SYS}-@" ${S}/devices/${TARGET-DEVICE}/mkspecs/qws/${XPLATFORM}/qmake.conf
sed -i -e "s|QMAKE_RPATH.*|QMAKE_RPATH =|" ${S}/devices/${TARGET-DEVICE}/mkspecs/qws/${XPLATFORM}/qmake.conf

# sed the dynamic config into the file
sed -i -e "s|OE_QT_DBUSPATH|${OE_QT_DBUSPATH}|" ${WORKDIR}/device-conf
sed -i -e "s|OE_QT_ARCH|${OE_QT_ARCH}|" ${WORKDIR}/device-conf
sed -i -e "s|OE_QT_XPLATFORM|${OE_QT_XPLATFORM}|" ${WORKDIR}/device-conf
sed -i -e "s|OE_QT_RPREFIX|${OE_QT_RPREFIX}|" ${WORKDIR}/device-conf
sed -i -e "s|OE_QT_ENDIAN|${OE_QT_ENDIAN}|" ${WORKDIR}/device-conf
sed -i -e "s|OE_QT_EXTRACONFIG|${OE_QT_EXTRACONFIG}|" ${WORKDIR}/device-conf

rm -f ${S}/devices/${TARGET-DEVICE}/configure
cp ${WORKDIR}/device-conf ${S}/devices/${TARGET-DEVICE}/configure
rm -f ${S}/devices/${TARGET-DEVICE}/environment
echo "" > ${S}/devices/${TARGET-DEVICE}/environment

mkdir -p ${BUILDDIR}
cd ${BUILDDIR}
echo yes | ${S}/configure -device ${TARGET-DEVICE} -xplatform ${XPLATFORM}

}

do_compile() {<commit_msg>Qtopia/X11: Assist the Qt/Qtopia buildsystem in finding the freetype2/fontconfig headers<commit_after># This is qtopia-phone recipe heavilly based off the one in the qtopia-phone
# distribution.
#
# Please DO NOT merge this file into OE, it is not suitable for that yet as
# it compiles both native and target binaries. This requires stuff to be
# installed on the host which is against the aim of OE.

DESCRIPTION = "Qtopia OpenSource"
SECTION = "qtopia-phone"
LICENSE = "GPL"
PRIORITY = "optional"
HOMEPAGE = "http://www.trolltech.com"
DEPENDS = "glib-2.0 dbus freetype alsa-lib bluez-libs virtual/libx11 fontconfig xft libxext libxrender libxrandr libxcursor libxtst"
PROVIDES = "qtopia-phone"
PR = "r4"
SRCREV = "${AUTOREV}"
SRC_URI = "git://git.openmoko.org/git/qtopia.git;protocol=git \
           file://device-conf \
           file://qplatformdefs.h \
           file://Xsession.d/99qtopia \
           file://qtopia.sh"

S = "${WORKDIR}/git"

inherit pkgconfig

TARGET-DEVICE="${@base_contains('MACHINE', 'nokia770', ' nokia770', '',d)}"
TARGET-DEVICE="${@base_contains('MACHINE', 'nokia800', ' nokia770', '',d)}"
TARGET-DEVICE="${@base_contains('MACHINE', 'spitz', ' c3200', '',d)}"
TARGET-DEVICE="${@base_contains('MACHINE', 'tosa', ' c3200', '',d)}"
TARGET-DEVICE="${@base_contains('MACHINE', 'fic-gta01', 'ficgta01', '',d)}"
TARGET-DEVICE="${@base_contains('MACHINE', 'fic-gta02', 'ficgta01', '',d)}"

export QTOPIA_DEPOT_PATH = "${S}"

require qtopia-phone_arch.inc

QT_ARCH = "${@qtopia_arch(d)}"
QT_ENDIAN = "${@qtopia_endian(d)}"
PLATFORM = "${BUILD_OS}-g++"
XPLATFORM = "linux-oe-g++"
BUILDDIR = "${WORKDIR}/build"

OE_QT_DBUSPATH = "${STAGING_DIR_HOST}"
OE_QT_ARCH = "${QT_ARCH}"
OE_QT_XPLATFORM = "${XPLATFORM}"
OE_QT_RPREFIX = "/opt/Qtopia"
OE_QT_ENDIAN = "${QT_ENDIAN}"
OE_QT_EXTRACONFIG = "-I${STAGING_INCDIR}/dbus-1.0"

do_configure() {

unset CC
unset CXX
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS

mkdir -p ${S}/devices/${TARGET-DEVICE}/mkspecs/qws/${XPLATFORM}
install -m 644 ${S}/qtopiacore/qt/mkspecs/qws/linux-arm-g++/qmake.conf \
    ${S}/devices/${TARGET-DEVICE}/mkspecs/qws/${XPLATFORM}
install -m 644 ${WORKDIR}/qplatformdefs.h \
    ${S}/devices/${TARGET-DEVICE}/mkspecs/qws/${XPLATFORM}
sed -i -e "s@arm-linux-@${TARGET_SYS}-@" ${S}/devices/${TARGET-DEVICE}/mkspecs/qws/${XPLATFORM}/qmake.conf
sed -i -e "s|QMAKE_RPATH.*|QMAKE_RPATH =|" ${S}/devices/${TARGET-DEVICE}/mkspecs/qws/${XPLATFORM}/qmake.conf

# sed the dynamic config into the file
sed -i -e "s|OE_QT_DBUSPATH|${OE_QT_DBUSPATH}|" ${WORKDIR}/device-conf
sed -i -e "s|OE_QT_ARCH|${OE_QT_ARCH}|" ${WORKDIR}/device-conf
sed -i -e "s|OE_QT_XPLATFORM|${OE_QT_XPLATFORM}|" ${WORKDIR}/device-conf
sed -i -e "s|OE_QT_RPREFIX|${OE_QT_RPREFIX}|" ${WORKDIR}/device-conf
sed -i -e "s|OE_QT_ENDIAN|${OE_QT_ENDIAN}|" ${WORKDIR}/device-conf
sed -i -e "s|OE_QT_EXTRACONFIG|${OE_QT_EXTRACONFIG}|" ${WORKDIR}/device-conf

rm -f ${S}/devices/${TARGET-DEVICE}/configure
cp ${WORKDIR}/device-conf ${S}/devices/${TARGET-DEVICE}/configure
rm -f ${S}/devices/${TARGET-DEVICE}/environment
echo "" > ${S}/devices/${TARGET-DEVICE}/environment

mkdir -p ${BUILDDIR}
cd ${BUILDDIR}
echo yes | ${S}/configure -device ${TARGET-DEVICE} -xplatform ${XPLATFORM} -I${STAGING_INCDIR}/freetype2 -I${STAGING_INCDIR}/fontconfig

}

do_compile() {
{'fraction_non_alphanumeric': 0.19221260815822003, 'fraction_numerical': 0.013906056860321385, 'mean_word_length': 5.100848256361923, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1880208', 'n_tokens_mistral': 2743, 'n_tokens_neox': 2631, 'n_words': 491}