]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/qte/qte_4.0.0-snapshot.bb
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / qte / qte_4.0.0-snapshot.bb
1 DESCRIPTION = "Qt/Embedded version ${PV}"
2 SECTION = "libs"
3 PRIORITY = "optional"
4 LICENSE = "GPL QPL"
5 DEPENDS = "zlib libpng jpeg tslib qmake-native-1.08a uicmoc4-native"
6 PROVIDES = "virtual/qte4 virtual/libqte4"
7 MAINTAINER = "Michael 'Mickey' Lauer <mickey@Vanille.de>"
8 PR = "ml1"
9
10 BROKEN = "1"
11
12 PV = "4.0.0-b2-snapshot-20050128"
13
14 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/qte-4.0.0-snapshot"
15
16 SRC_URI = "ftp://ftp.trolltech.com/pub/qt/snapshots/qt-embedded-opensource-${PV}.tar.bz2 \
17            file://gcc34.patch;patch=1 \
18            file://add-qatomic.patch;patch=1 \
19            file://fix-mkspecs.patch;patch=1 \
20            file://fix-qwsmanager.patch;patch=1 \
21            file://fix-sl5000driver.patch;patch=1 \
22            file://no-moc-no-uic-no-rcc.patch;patch=1 \
23            file://sharp_char.h \
24            file://switches.h \
25            file://update-qtfontdir"
26 S = "${WORKDIR}/qt-embedded-opensource-${PV}"
27
28 DEFAULT_PREFERENCE = "-1"
29
30 export QTDIR = "${S}"
31
32 def qte_arch(d):
33         import bb, re
34         arch = bb.data.getVar('TARGET_ARCH', d, 1)
35         if re.match("^i.86$", arch):
36                 arch = "x86"
37         elif arch == "x86_64":
38                 arch = "x86"
39         elif arch == "mipsel":
40                 arch = "mips"
41         return arch
42
43 QTE_ARCH := "${@qte_arch(d)}"
44
45 #
46 # How to build the embedded drivers. Use plugin-<type> or qt-<type>. As for Beta1, that doesn't work :D
47 #
48 GFX = "qt-gfx"
49 KBD = "qt-kbd"
50 MSE = "qt-mouse"
51
52 #
53 # Which configuration to build. As for Beta1, this doesn't work :)
54 #
55 QCONFIG = ""
56 # QCONFIG = "-qconfig full"
57 QDEPTHS = "-depths 8,16,24,32"
58
59 #
60 # Borken: yopy, busmouse, linuxtp
61 #
62
63 EXTRA_OECONF = "-embedded ${QTE_ARCH} \
64                 -system-libjpeg -system-libpng -system-zlib \
65                 -no-qvfb -no-nis -no-cups -no-stl -no-pch   \
66                 -no-accessibility -no-compat -fast          \
67                 ${QCONFIG} ${QDEPTHS}                       \
68                 -qt-gfx-transformed                         \
69                 -qt-gfx-vnc                                 \
70                 -${KBD}-sl5000                          \
71                 -${KBD}-tty                             \
72                 -${KBD}-usb                             \
73                 -${MSE}-pc                            \
74                 "
75
76 EXTRA_OEMAKE = "-e"
77 PARALLEL_MAKE = ""
78
79 export EXTRA_CFLAGS = "-I${STAGING_INCDIR}"
80 export EXTRA_CXXFLAGS = "-I${STAGING_INCDIR}"
81 export EXTRA_LFLAGS = "-L${STAGING_LIBDIR} -Wl,-rpath-link,${STAGING_LIBDIR}"
82
83 do_configure() {
84         echo "DEFINES -= QT_NO_CAST_TO_ASCII" >>src/qbase.pri
85         unset QMAKESPEC
86         echo yes | ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
87 }
88
89 do_compile() {
90         unset CC LD CCLD CXX RANLIB AR STRIP CFLAGS LDFLAGS CXXFLAGS CPPFLAGS LINK
91         install -m 0755 ${STAGING_BINDIR}/rcc4 ${S}/bin/rcc
92         install -m 0755 ${STAGING_BINDIR}/moc4 ${S}/bin/moc
93         install -m 0755 ${STAGING_BINDIR}/uic4 ${S}/bin/uic
94
95         install -d include/asm/ 
96         install -m 0644 ${WORKDIR}/sharp_char.h include/asm/
97         install -d include/linux/
98         install -m 0644 ${WORKDIR}/switches.h   include/linux/
99
100         oe_runmake
101 }
102
103 do_stage() {
104         install -d ${STAGING_DIR}/${HOST_SYS}/qt4/lib
105
106         for lib in Core Gui Network Sql Xml
107         do
108                 cp -pPR lib/libQt${lib}* ${STAGING_DIR}/${HOST_SYS}/qt4/lib/
109         done
110
111         install -d ${STAGING_DIR}/${HOST_SYS}/qt4/include/
112         cp -pPR include/* ${STAGING_DIR}/${HOST_SYS}/qt4/include
113 }
114
115 do_install() {
116         install -d ${D}${palmtopdir}/bin
117         install -d ${D}${sbindir}/
118         install -m 0755 ${WORKDIR}/update-qtfontdir ${D}${sbindir}/
119         install -d ${D}${palmtopdir}/lib/fonts/
120         cp -pPR lib/fonts/* ${D}${palmtopdir}/lib/fonts/
121
122         for lib in Core Gui Network Sql Xml
123         do
124                 oe_soinstall lib/libQt${lib}.so.4.0.0 ${D}${palmtopdir}/lib
125         done
126
127         for i in `find . -perm 0755 -type f`
128         do
129                 install -m 0755 $i ${D}${palmtopdir}/bin/`basename $i`
130         done
131 }
132
133 pkg_postinst() {
134 #!/bin/sh
135 if [ -n "$D" ]; then exit 1; fi
136 set -e
137 . /etc/profile
138 ${sbindir}/update-qtfontdir
139 }
140
141 pkg_postinst_qte-font-unicode() {
142 #!/bin/sh
143 if [ -n "$D" ]; then exit 1; fi
144 set -e
145 . /etc/profile
146 ${sbindir}/update-qtfontdir
147 }
148
149 pkg_postinst_qte-font-lcd () {
150 #!/bin/sh
151 if [ -n "$D" ]; then exit 1; fi
152 set -e
153 . /etc/profile
154 ${sbindir}/update-qtfontdir
155 }
156
157 pkg_postinst_qte-font-japanese() {
158 #!/bin/sh
159 if [ -n "$D" ]; then exit 1; fi
160 set -e
161 . /etc/profile
162 ${sbindir}/update-qtfontdir
163 }
164
165 pkg_postinst_qte-font-micro() {
166 #!/bin/sh
167 if [ -n "$D" ]; then exit 1; fi
168 set -e
169 . /etc/profile
170 ${sbindir}/update-qtfontdir
171 }
172
173 pkg_postinst_qte-font-courier() {
174 #!/bin/sh
175 if [ -n "$D" ]; then exit 1; fi
176 set -e
177 . /etc/profile
178 ${sbindir}/update-qtfontdir
179 }
180
181 LIB_PACKAGES = "\
182                 libqte4-debug                   \
183                 libqte4-core                    \
184                 libqte4-gui                     \
185                 libqte4-network                 \
186                 libqte4-sql                     \
187                 libqte4-xml                     \
188                 "
189                 
190
191 FONT_PACKAGES = "\
192                 qte-font-fixed                  \
193                 qte-font-helvetica-small        \
194                 qte-font-helvetica-large        \
195                 qte-font-smoothtimes            \
196                 qte-font-smallsmooth            \
197                 qte-font-unicode                \
198                 qte-font-lcd                    \
199                 qte-font-japanese               \
200                 qte-font-micro                  \
201                 qte-font-courier                \
202                 "
203
204 PACKAGES = "${LIB_PACKAGES} ${FONT_PACKAGES} examples"
205
206 PACKAGE_ARCH = "${MACHINE_ARCH}"
207
208 FILES_${PN} = ""
209 FILES_libqte4-debug     = "${palmtopdir}/lib/libQt*_debug.*"
210 FILES_libqte4-core      = "${palmtopdir}/lib/libQtCore.* ${sbindir}/update-qtfontdir"
211 FILES_libqte4-gui       = "${palmtopdir}/lib/libQtGui.*"
212 FILES_libqte4-network   = "${palmtopdir}/lib/libQtNetwork.*"
213 FILES_libqte4-sql       = "${palmtopdir}/lib/libQtSql.*"
214 FILES_libqte4-xml       = "${palmtopdir}/lib/libQtXml.*"
215 FILES_examples          = "${palmtopdir}/bin"
216
217 FILES_qte-font-fixed = "${palmtopdir}/lib/fonts/fixed*"
218 PACKAGE_ARCH_qte-font-fixed = "all"
219
220 FILES_qte-font-helvetica-small = "${palmtopdir}/lib/fonts/helvetica_80*.qpf \
221         ${palmtopdir}/lib/fonts/helvetica_100*.qpf ${palmtopdir}/lib/fonts/helvetica_120*.qpf"
222 PACKAGE_ARCH_qte-font-helvetica-small = "all"
223
224 FILES_qte-font-helvetica-large = "${palmtopdir}/lib/fonts/helvetica_140*.qpf \
225         ${palmtopdir}/lib/fonts/helvetica_180*.qpf ${palmtopdir}/lib/fonts/helvetica_240*.qpf"
226 PACKAGE_ARCH_qte-font-helvetica-large = "all"
227
228 FILES_qte-font-smoothtimes = "${palmtopdir}/lib/fonts/smoothtimes*"
229 PACKAGE_ARCH_qte-font-smoothtimes = "all"
230
231 FILES_qte-font-smallsmooth = "${palmtopdir}/lib/fonts/smallsmooth*"
232 PACKAGE_ARCH_qte-font-smallsmooth = "all"
233
234 FILES_qte-font-unicode = "${palmtopdir}/lib/fonts/unifont*.qpf"
235 PACKAGE_ARCH_qte-font-unicode = "all"
236
237 FILES_qte-font-lcd = "${palmtopdir}/lib/fonts/lcd*"
238 PACKAGE_ARCH_qte-font-lcd = "all"
239
240 FILES_qte-font-japanese = "${palmtopdir}/lib/fonts/japanese*"
241 PACKAGE_ARCH_qte-font-japanese = "all"
242
243 FILES_qte-font-micro = "${palmtopdir}/lib/fonts/micro*.qpf"
244 PACKAGE_ARCH_qte-font-micro = "all"
245
246 FILES_qte-font-courier = "${palmtopdir}/lib/fonts/cour*"
247 PACKAGE_ARCH_qte-font-courier = "all"