summaryrefslogtreecommitdiffstats
path: root/openembedded/classes/sip.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2005-08-31 10:45:47 +0000
committerRichard Purdie <richard@openedhand.com>2005-08-31 10:45:47 +0000
commit4b46c1f6e891b1ddd5968536440b888661fade3e (patch)
treee0ba2c1f56f61b868bf746da5c4feabb25b800b2 /openembedded/classes/sip.bbclass
downloadpoky-4b46c1f6e891b1ddd5968536440b888661fade3e.tar.gz
Initial population
git-svn-id: https://svn.o-hand.com/repos/poky@1 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/classes/sip.bbclass')
-rw-r--r--openembedded/classes/sip.bbclass53
1 files changed, 53 insertions, 0 deletions
diff --git a/openembedded/classes/sip.bbclass b/openembedded/classes/sip.bbclass
new file mode 100644
index 0000000000..7e049bc65a
--- /dev/null
+++ b/openembedded/classes/sip.bbclass
@@ -0,0 +1,53 @@
1DEPENDS_prepend = "sip-native python-sip "
2
3#EXTRA_SIPTAGS = "-tWS_QWS -tQtPE_1_6_0 -tQt_2_3_1"
4
5sip_do_generate() {
6 if [ -z "${SIP_MODULES}" ]; then
7 MODULES="`ls sip/*mod.sip`"
8 else
9 MODULES="${SIP_MODULES}"
10 fi
11
12 if [ -z "$MODULES" ]; then
13 die "SIP_MODULES not set and no modules found in $PWD"
14 else
15 oenote "using modules '${SIP_MODULES}' and tags '${EXTRA_SIPTAGS}'"
16 fi
17
18 if [ -z "${EXTRA_SIPTAGS}" ]; then
19 die "EXTRA_SIPTAGS needs to be set!"
20 else
21 SIPTAGS="${EXTRA_SIPTAGS}"
22 fi
23
24 if [ ! -z "${SIP_FEATURES}" ]; then
25 FEATURES="-z ${SIP_FEATURES}"
26 oenote "sip feature file: ${SIP_FEATURES}"
27 fi
28
29 for module in $MODULES
30 do
31 install -d ${module}/
32 oenote "calling 'sip -I sip -I ${STAGING_SIPDIR} ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.pro.in sip/${module}/${module}mod.sip'"
33 sip -I ${STAGING_SIPDIR} -I sip ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.sbf sip/${module}/${module}mod.sip \
34 || die "Error calling sip on ${module}"
35 cat ${module}/${module}.sbf | sed s,target,TARGET, \
36 | sed s,sources,SOURCES, \
37 | sed s,headers,HEADERS, \
38 | sed s,"moc_HEADERS =","HEADERS +=", \
39 >${module}/${module}.pro
40 echo "TEMPLATE=lib" >>${module}/${module}.pro
41 [ "${module}" = "qt" ] && echo "" >>${module}/${module}.pro
42 [ "${module}" = "qtcanvas" ] && echo "" >>${module}/${module}.pro
43 [ "${module}" = "qttable" ] && echo "" >>${module}/${module}.pro
44 [ "${module}" = "qwt" ] && echo "" >>${module}/${module}.pro
45 [ "${module}" = "qtpe" ] && echo "" >>${module}/${module}.pro
46 [ "${module}" = "qtpe" ] && echo "LIBS+=-lqpe" >>${module}/${module}.pro
47 true
48 done
49}
50
51EXPORT_FUNCTIONS do_generate
52
53addtask generate after do_unpack do_patch before do_configure