sharp-binary-only: remove unused libs/utils for Zaurus
[openembedded.git] / classes / sip3.bbclass
blobc2c47253773c2398852389ad27cfb82cfde3a355
1 # Build Class for Sip based Python Bindings
2 # (C) Michael 'Mickey' Lauer <mickey@Vanille.de>
5 DEPENDS =+ "sip-native python-sip"
7 # default stuff, do not uncomment
8 # EXTRA_SIPTAGS = "-tWS_QWS -tQtPE_1_6_0 -tQt_2_3_1"
10 sip3_do_generate() {
11         if [ -z "${SIP_MODULES}" ]; then 
12                 MODULES="`ls sip/*mod.sip`"
13         else
14                 MODULES="${SIP_MODULES}"
15         fi
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
23         if [ -z "${EXTRA_SIPTAGS}" ]; then
24                 die "EXTRA_SIPTAGS needs to be set!"
25         else
26                 SIPTAGS="${EXTRA_SIPTAGS}"
27         fi
29         if [ ! -z "${SIP_FEATURES}" ]; then
30                 FEATURES="-z ${SIP_FEATURES}"
31                 oenote "sip feature file: ${SIP_FEATURES}"
32         fi
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
56 do_generate[deptask] = "do_populate_sysroot"
58 EXPORT_FUNCTIONS do_generate
60 addtask generate after do_unpack do_patch before do_configure