diff options
author | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
commit | b2f192faabe412adce79534e22efe9fb69ee40e2 (patch) | |
tree | 7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/classes/sip.bbclass | |
parent | 2cf0eadf9f730027833af802d7e6c90b44248f80 (diff) | |
download | poky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz |
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/sip.bbclass')
-rw-r--r-- | meta/classes/sip.bbclass | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/meta/classes/sip.bbclass b/meta/classes/sip.bbclass new file mode 100644 index 0000000000..adf179b130 --- /dev/null +++ b/meta/classes/sip.bbclass | |||
@@ -0,0 +1,58 @@ | |||
1 | # Build Class for Sip based Python Bindings | ||
2 | # (C) Michael 'Mickey' Lauer <mickey@Vanille.de> | ||
3 | # | ||
4 | |||
5 | DEPENDS =+ "sip-native python-sip" | ||
6 | |||
7 | # default stuff, do not uncomment | ||
8 | # EXTRA_SIPTAGS = "-tWS_QWS -tQtPE_1_6_0 -tQt_2_3_1" | ||
9 | |||
10 | sip_do_generate() { | ||
11 | if [ -z "${SIP_MODULES}" ]; then | ||
12 | MODULES="`ls sip/*mod.sip`" | ||
13 | else | ||
14 | MODULES="${SIP_MODULES}" | ||
15 | fi | ||
16 | |||
17 | if [ -z "$MODULES" ]; then | ||
18 | die "SIP_MODULES not set and no modules found in $PWD" | ||
19 | else | ||
20 | oenote "using modules '${SIP_MODULES}' and tags '${EXTRA_SIPTAGS}'" | ||
21 | fi | ||
22 | |||
23 | if [ -z "${EXTRA_SIPTAGS}" ]; then | ||
24 | die "EXTRA_SIPTAGS needs to be set!" | ||
25 | else | ||
26 | SIPTAGS="${EXTRA_SIPTAGS}" | ||
27 | fi | ||
28 | |||
29 | if [ ! -z "${SIP_FEATURES}" ]; then | ||
30 | FEATURES="-z ${SIP_FEATURES}" | ||
31 | oenote "sip feature file: ${SIP_FEATURES}" | ||
32 | fi | ||
33 | |||
34 | for module in $MODULES | ||
35 | do | ||
36 | install -d ${module}/ | ||
37 | oenote "calling 'sip -I sip -I ${STAGING_SIPDIR} ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.pro.in sip/${module}/${module}mod.sip'" | ||
38 | sip -I ${STAGING_SIPDIR} -I sip ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.sbf sip/${module}/${module}mod.sip \ | ||
39 | || die "Error calling sip on ${module}" | ||
40 | cat ${module}/${module}.sbf | sed s,target,TARGET, \ | ||
41 | | sed s,sources,SOURCES, \ | ||
42 | | sed s,headers,HEADERS, \ | ||
43 | | sed s,"moc_HEADERS =","HEADERS +=", \ | ||
44 | >${module}/${module}.pro | ||
45 | echo "TEMPLATE=lib" >>${module}/${module}.pro | ||
46 | [ "${module}" = "qt" ] && echo "" >>${module}/${module}.pro | ||
47 | [ "${module}" = "qtcanvas" ] && echo "" >>${module}/${module}.pro | ||
48 | [ "${module}" = "qttable" ] && echo "" >>${module}/${module}.pro | ||
49 | [ "${module}" = "qwt" ] && echo "" >>${module}/${module}.pro | ||
50 | [ "${module}" = "qtpe" ] && echo "" >>${module}/${module}.pro | ||
51 | [ "${module}" = "qtpe" ] && echo "LIBS+=-lqpe" >>${module}/${module}.pro | ||
52 | true | ||
53 | done | ||
54 | } | ||
55 | |||
56 | EXPORT_FUNCTIONS do_generate | ||
57 | |||
58 | addtask generate after do_unpack do_patch before do_configure | ||