Replace all occurrences of make -j16 by oe_runmake
[scm/bb/meta-tizen.git] / meta-tizen-common-base / recipes-core / libxml2 / python-libxml2.inc
1 DESCRIPTION = "Python Bindings for libxml2"
2 HOMEPAGE = "http://xmlsoft.org"
3 SECTION = "Platform Development/Python"
4 LICENSE = "MIT"
5 PV = "2.8.0"
6
7 SRC_URI = ""
8
9 S = "${WORKDIR}/git"
10
11 inherit manifest autotools-brokensep
12
13 BBCLASSEXTEND = ""
14 PROVIDES = ""
15
16 #PROVIDES by python-libxml2
17 # the PROVIDES rules is ignore "libxml2-python = 2.8.0"
18 PROVIDES += "libxml2-python"
19 RPROVIDES_python-libxml2 += "libxml2-python"
20
21
22 RDEPENDS = ""
23 #RDEPENDS of python-libxml2 (${PN})
24 RDEPENDS_${PN} += "libxml2"
25
26
27 DEPENDS = ""
28 #DEPENDS of python-libxml2
29 inherit pythonnative
30 DEPENDS += "libxml2"
31 DEPENDS += "python-xml"
32
33 do_prep() {
34  cd ${S}
35  chmod -Rf a+rX,u+w,g-w,o-w ${S}
36  #setup -q -n libxml2-2.8.0
37  
38  
39 }
40 do_patch_append() {
41     bb.build.exec_func('do_prep', d)
42 }
43
44 do_configure() {
45 }
46
47 do_compile() {
48  cd ${S}
49   LANG=C
50   export LANG
51   unset DISPLAY
52   LD_AS_NEEDED=1; export LD_AS_NEEDED ;
53   
54   export CFLAGS="$CFLAGS -fno-strict-aliasing"
55   
56   autotools_do_configure
57   
58   # use libxml2 as built by libxml2 source package
59   mkdir .libs
60   cp -v ${prefix}/lib/libxml2.la .
61   oe_runmake -C python
62   
63   
64   
65 }
66 EXTRA_OECONF += " --with-fexceptions --with-history --enable-ipv6 --with-sax1 --with-regexps --with-threads --with-reader --with-http"
67
68 do_install() {
69  export RPM_BUILD_ROOT=${D}
70  cd ${S}
71  LANG=C
72  export LANG
73  unset DISPLAY
74  rm -rf ${D}
75  mkdir -p ${D}
76  
77  make -C python install \
78      DESTDIR=${D} \
79      pythondir=/usr/lib/python2.7/site-packages \
80      PYTHON_SITE_PACKAGES=/usr/lib/python2.7/site-packages
81  chmod a-x python/tests/*.py
82  # Unwanted doc stuff
83  rm -fr ${D}${prefix}/share/doc
84  rm -f python/tests/Makefile*
85  # #223696
86  rm -f ${D}/usr/lib/python2.7/site-packages/*.{la,a}
87  
88  
89 }
90
91 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
92 PACKAGES += " python-libxml2 "
93
94 python-libxml2_files = ""
95 python-libxml2_files += "python/libxml2class.txt"
96 python-libxml2_files += "python/tests"
97 python-libxml2_files += "/usr/lib/python2.7/site-packages/*"
98
99 FILES_${PN} = "${python-libxml2_files}"
100
101 PKG_python-libxml2= "python-libxml2"
102
103 require python-libxml2-extraconf.inc
104