summaryrefslogtreecommitdiff
path: root/qte/qte_2.3.7.oe
blob: 96f5f6a4b8bf957a7b7f2787d3bb750cfe3296ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
DESCRIPTION = "Qt/Embedded version ${PV}"
SECTION = "libs"
PRIORITY = "optional"
LICENSE = "GPL/QPL"
DEPENDS = "zlib libpng jpeg tslib uicmoc-native"
PROVIDES = "virtual/qte virtual/libqte2"
PR = "3"

SRC_URI = "ftp://ftp.trolltech.com/pub/qt/source/qt-embedded-${PV}.tar.gz \
	   file://qpe.patch;patch=1 \
	   file://tslib.patch;patch=1 \
	   file://devfs.patch;patch=1 \
	   file://no-moc.patch;patch=1 \
	   file://gcc3_4.patch;patch=1 \
	   file://update-qtfontdir \
	   file://sharp_char.h "

#
# FIXME: Apply the SIMpad hardware patch for SIMpad.
#
#SRC_URI_append_simpad = "file://simpad.patch;patch=1 "
#
# FIXME: Apply the C7xx hardware patch for shepherd/husky/boxer
#
#SRC_URI_append_<machine> = "file://c700-hardware.patch;patch=1 "

S = "${WORKDIR}/qt-${PV}"

export QTDIR = "${S}"

def qte_arch(d):
	import oe, re
	arch = oe.data.getVar('TARGET_ARCH', d, 1)
	if re.match("^i.86$", arch):
		arch = "x86"
	elif arch == "x86_64":
		arch = "x86"
	elif arch == "mipsel":
		arch = "mips"
	return arch

QTE_ARCH := "${@qte_arch(d)}"

EXTRA_OECONF_CONFIG = "-qconfig qpe"
EXTRA_OECONF = "-system-jpeg -system-libpng -system-zlib -no-qvfb -no-xft -no-vnc -gif \
		-xplatform ${TARGET_OS}-${QTE_ARCH}-g++ ${EXTRA_OECONF_CONFIG}"
EXTRA_OEMAKE = "-e"

#
# FIXME: Add more here
#
EXTRA_DEFINES 		= "-DQWS_TSLIB -DQT_QWS_CUSTOM -DWARNING_UNKNOWN_DEVICE"
EXTRA_DEFINES_collie 	= "-DQWS_TSLIB -DQT_QWS_CUSTOM -DQT_QWS_SL5XXX"
EXTRA_DEFINES_h3600 	= "-DQWS_TSLIB -DQT_QWS_CUSTOM -DQT_QWS_IPAQ"
EXTRA_DEFINES_simpad	= "-DQWS_TSLIB -DQT_QWS_CUSTOM -DQT_QWS_IPAQ -DQT_QWS_SIMPAD -DQT_QWS_DEVFS"
EXTRA_DEFINES_shepherd  = "-DQWS_TSLIB -DQT_QWS_CUSTOM -DQT_QWS_SLC700"
EXTRA_DEFINES_husky	= "-DQWS_TSLIB -DQT_QWS_CUSTOM -DQT_QWS_SLC700"
EXTRA_DEFINES_boxer     = "-DQWS_TSLIB -DQT_QWS_CUSTOM -DQT_QWS_SLC700"

export SYSCONF_CC = "${CC}"
export SYSCONF_CXX = "${CXX}"
export SYSCONF_LINK = "${CCLD}"
export SYSCONF_SHLIB = "${CCLD}"
export SYSCONF_CFLAGS = "${CFLAGS}"
export SYSCONF_CXXFLAGS = "${CXXFLAGS} -pipe -DQWS -fno-exceptions -fno-rtti -DNO_DEBUG ${EXTRA_DEFINES}"
export SYSCONF_LFLAGS = "${LDFLAGS} -lts"
export SYSCONF_MOC = "${STAGING_BINDIR}/moc"
export SYSCONF_UIC = "${STAGING_BINDIR}/uic"

do_configure() {
	for f in ${S}/configs/linux-*-g++-shared; do
		sed -e 's,-linux-,-linux-uclibc-,g' < $f \
			> `echo $f | sed -e 's,linux-,linux-uclibc-,'`
	done
	echo yes | ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
}

do_compile() {
	unset CC LD CCLD CXX RANLIB AR STRIP CFLAGS LDFLAGS CXXFLAGS CPPFLAGS
	install -d include/asm/
	install -m 0644 ${WORKDIR}/sharp_char.h include/asm/
	oe_runmake
}

do_stage() {
	oe_libinstall -so -C lib libqte ${STAGING_LIBDIR}
	rm -f include/qxt.h
	cp -pfLR include/* ${STAGING_INCDIR}/
}

do_install() {
	install -d ${D}/${sbindir}/
	install -m 0755 ${WORKDIR}/update-qtfontdir ${D}/${sbindir}/
	install -d ${D}${palmtopdir}/lib/fonts/
	oe_libinstall -so -C lib libqte ${D}/${palmtopdir}/lib
	cp -a lib/fonts/* ${D}${palmtopdir}/lib/fonts/
}

pkg_postinst () {
#!/bin/sh
if [ -n "$D" ]; then exit 1; fi
set -e
. /etc/profile
${sbindir}/update-qtfontdir
}

#
# FIXME: Don't use the above but make the following work:
#

#pkg_postinst_qte-font-fixed() {
#if [ -n $D ]; then exit 1; fi
#/usr/sbin/update-qtfontdir
#}

#pkg_postinst_qte-font-helvetica() {
#if [ -n $D ]; then exit 1; fi
#/usr/sbin/update-qtfontdir
#}

#pkg_postinst_qte-fonts-smoothtimes() {
#if [ -n $D ]; then exit 1; fi
#/usr/sbin/update-qtfontdir
#}

PACKAGES = "libqte2 qte-font-fixed qte-font-helvetica qte-font-smoothtimes qte-font-smallsmooth"

FILES_${PN} = ""
FILES_libqte2 = "${palmtopdir}/lib/libqte.so* /usr/sbin/update-qtfontdir"
FILES_qte-font-fixed = "${palmtopdir}/lib/fonts/fixed*"
FILES_qte-font-helvetica = "${palmtopdir}/lib/fonts/helvetica*"
FILES_qte-font-smoothtimes = "${palmtopdir}/lib/fonts/smoothtimes*"
FILES_qte-font-smallsmooth = "${palmtopdir}/lib/fonts/smallsmooth*"