diff options
author | Mihai Prica <mihai.prica@intel.com> | 2012-11-15 14:23:39 +0200 |
---|---|---|
committer | Raymond Danks <ray.danks@se-eng.com> | 2012-11-26 16:21:16 -0700 |
commit | 93a8aadc0d2285e1b95ced8f2d691433f97f58b5 (patch) | |
tree | 7e7c98f05703a6d9b546d4cf2dd59f8412c30e32 | |
parent | 572043f25bc2012acfbfe1e23edf6011a0ec84aa (diff) | |
download | meta-virtualization-93a8aadc0d2285e1b95ced8f2d691433f97f58b5.tar.gz |
libvirt: updated to work for other hypervisors
* the package can now be customized using PACKAGECONFIG
* fixed to use target include files for python
Signed-off-by: Mihai Prica <mihai.prica@intel.com>
Signed-off-by: Raymond Danks <ray.danks@se-eng.com>
-rw-r--r-- | recipes-extended/libvirt/libvirt-python.inc | 11 | ||||
-rw-r--r-- | recipes-extended/libvirt/libvirt/oe_PYTHON_INCLUDES.patch | 39 | ||||
-rw-r--r-- | recipes-extended/libvirt/libvirt/python_incdir.patch | 68 | ||||
-rw-r--r-- | recipes-extended/libvirt/libvirt_0.10.2.bb | 20 |
4 files changed, 91 insertions, 47 deletions
diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc index 0b01833c..49d15fb3 100644 --- a/recipes-extended/libvirt/libvirt-python.inc +++ b/recipes-extended/libvirt/libvirt-python.inc | |||
@@ -1,13 +1,14 @@ | |||
1 | inherit python-dir | 1 | inherit python-dir |
2 | 2 | ||
3 | # Enable the Python tool support | 3 | # Enable the Python tool support |
4 | EXTRA_OECONF += "--with-python=yes" | 4 | EXTRA_OECONF += "--with-python=yes --with-python-inc-dir=-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}" |
5 | 5 | ||
6 | SRC_URI += " file://oe_PYTHON_INCLUDES.patch" | 6 | SRC_URI += " file://python_incdir.patch" |
7 | 7 | ||
8 | DEPENDS += "python python-native" | 8 | DEPENDS += "python python-native" |
9 | RDEPENDS_${PN}-python += "python xen-python" | 9 | RDEPENDS_${PN}-python += "python" |
10 | PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python" | ||
10 | 11 | ||
11 | PACKAGES += "${PN}-python-dbg ${PN}-python" | 12 | PACKAGES += "${PN}-python-dbg ${PN}-python" |
12 | FILES_${PN}-python-dbg += "${libdir}/${PYTHON_DIR}/site-packages/.debug/" | 13 | FILES_${PN}-python-dbg += "${libdir}/${PYTHON_DIR}/dist-packages/.debug/" |
13 | FILES_${PN}-python += "${libdir}/${PYTHON_DIR}/site-packages" | 14 | FILES_${PN}-python += "${libdir}/${PYTHON_DIR}/dist-packages" |
diff --git a/recipes-extended/libvirt/libvirt/oe_PYTHON_INCLUDES.patch b/recipes-extended/libvirt/libvirt/oe_PYTHON_INCLUDES.patch deleted file mode 100644 index a4913ba3..00000000 --- a/recipes-extended/libvirt/libvirt/oe_PYTHON_INCLUDES.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | --- libvirt-0.9.10/configure.ac.sav 2012-03-14 15:03:11.042785629 -0600 | ||
2 | +++ libvirt-0.9.10/configure.ac 2012-03-14 15:17:13.722309867 -0600 | ||
3 | @@ -2052,26 +2052,22 @@ | ||
4 | AM_PATH_PYTHON(,, [:]) | ||
5 | |||
6 | if test "$PYTHON" != : ; then | ||
7 | - PYTHON_CONFIG="$PYTHON-config" | ||
8 | - | ||
9 | - if test -x "$PYTHON_CONFIG" | ||
10 | + if test -r `$as_dirname $PYTHON`/../include/python$PYTHON_VERSION/Python.h | ||
11 | + then | ||
12 | + PYTHON_INCLUDES=-I`$as_dirname $PYTHON`/../include/python$PYTHON_VERSION | ||
13 | + elif test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h | ||
14 | then | ||
15 | - PYTHON_INCLUDES=`$PYTHON_CONFIG --includes` | ||
16 | + PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION | ||
17 | else | ||
18 | - if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h | ||
19 | + if test -r $prefix/include/python$PYTHON_VERSION/Python.h | ||
20 | then | ||
21 | - PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION | ||
22 | + PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION | ||
23 | else | ||
24 | - if test -r $prefix/include/python$PYTHON_VERSION/Python.h | ||
25 | + if test -r /usr/include/python$PYTHON_VERSION/Python.h | ||
26 | then | ||
27 | - PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION | ||
28 | + PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION | ||
29 | else | ||
30 | - if test -r /usr/include/python$PYTHON_VERSION/Python.h | ||
31 | - then | ||
32 | - PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION | ||
33 | - else | ||
34 | - AC_MSG_ERROR([You must install python-devel to build Python bindings]) | ||
35 | - fi | ||
36 | + AC_MSG_ERROR([You must install python-devel to build Python bindings]) | ||
37 | fi | ||
38 | fi | ||
39 | fi | ||
diff --git a/recipes-extended/libvirt/libvirt/python_incdir.patch b/recipes-extended/libvirt/libvirt/python_incdir.patch new file mode 100644 index 00000000..6c77b09a --- /dev/null +++ b/recipes-extended/libvirt/libvirt/python_incdir.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | Index: libvirt-0.10.2/configure.ac | ||
2 | =================================================================== | ||
3 | --- libvirt-0.10.2.orig/configure.ac 2012-10-29 11:59:27.091615491 +0200 | ||
4 | +++ libvirt-0.10.2/configure.ac 2012-10-29 12:09:50.067603647 +0200 | ||
5 | @@ -2397,6 +2397,11 @@ | ||
6 | |||
7 | PYTHON_VERSION= | ||
8 | PYTHON_INCLUDES= | ||
9 | + | ||
10 | +AC_ARG_WITH(python-inc-dir, | ||
11 | + AS_HELP_STRING([--with-python-inc-dir=DIR], [directory with Python include files]), | ||
12 | + [PYTHON_INCLUDES="${withval}"], []) | ||
13 | + | ||
14 | if test "$with_python" != "no" ; then | ||
15 | if test -x "$with_python/bin/python" | ||
16 | then | ||
17 | @@ -2422,29 +2427,30 @@ | ||
18 | AM_PATH_PYTHON(,, [:]) | ||
19 | |||
20 | if test "$PYTHON" != : ; then | ||
21 | - PYTHON_CONFIG="$PYTHON-config" | ||
22 | - | ||
23 | - if test -x "$PYTHON_CONFIG" | ||
24 | - then | ||
25 | - PYTHON_INCLUDES=`$PYTHON_CONFIG --includes` | ||
26 | - else | ||
27 | - if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h | ||
28 | - then | ||
29 | - PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION | ||
30 | - else | ||
31 | - if test -r $prefix/include/python$PYTHON_VERSION/Python.h | ||
32 | - then | ||
33 | - PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION | ||
34 | - else | ||
35 | - if test -r /usr/include/python$PYTHON_VERSION/Python.h | ||
36 | - then | ||
37 | - PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION | ||
38 | - else | ||
39 | - AC_MSG_ERROR([You must install python-devel to build Python bindings]) | ||
40 | - fi | ||
41 | + if ! test -n "$PYTHON_INCLUDES"; then | ||
42 | + PYTHON_CONFIG="$PYTHON-config" | ||
43 | + if test -x "$PYTHON_CONFIG" | ||
44 | + then | ||
45 | + PYTHON_INCLUDES=`$PYTHON_CONFIG --includes` | ||
46 | + else | ||
47 | + if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h | ||
48 | + then | ||
49 | + PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION | ||
50 | + else | ||
51 | + if test -r $prefix/include/python$PYTHON_VERSION/Python.h | ||
52 | + then | ||
53 | + PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION | ||
54 | + else | ||
55 | + if test -r /usr/include/python$PYTHON_VERSION/Python.h | ||
56 | + then | ||
57 | + PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION | ||
58 | + else | ||
59 | + AC_MSG_ERROR([You must install python-devel to build Python bindings]) | ||
60 | + fi | ||
61 | + fi | ||
62 | fi | ||
63 | fi | ||
64 | - fi | ||
65 | + fi | ||
66 | else | ||
67 | AC_MSG_ERROR([You must install python to build Python bindings]) | ||
68 | fi | ||
diff --git a/recipes-extended/libvirt/libvirt_0.10.2.bb b/recipes-extended/libvirt/libvirt_0.10.2.bb index ca09b2c2..23cd885b 100644 --- a/recipes-extended/libvirt/libvirt_0.10.2.bb +++ b/recipes-extended/libvirt/libvirt_0.10.2.bb | |||
@@ -5,9 +5,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f" | |||
5 | SECTION = "console/tools" | 5 | SECTION = "console/tools" |
6 | PR = "r0" | 6 | PR = "r0" |
7 | 7 | ||
8 | DEPENDS="bridge-utils gnutls libxml2 lvm2 avahi polkit parted curl libpcap util-linux e2fsprogs xen pm-utils iptables ebtables dnsmasq" | 8 | DEPENDS="bridge-utils gnutls libxml2 lvm2 avahi polkit parted curl libpcap util-linux e2fsprogs pm-utils iptables ebtables dnsmasq" |
9 | 9 | ||
10 | RDEPENDS_${PN}-libvirtd = "bridge-utils iptables pm-utils dnsmasq xen ebtables dmidecode " | 10 | RDEPENDS_${PN}-libvirtd = "bridge-utils iptables pm-utils dnsmasq ebtables dmidecode " |
11 | |||
12 | #connman blocks the 53 port and libvirtd can't start its DNS service | ||
13 | RCONFLICTS_${PN}_libvirtd = "connman" | ||
11 | 14 | ||
12 | SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz \ | 15 | SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz \ |
13 | file://libvirtd.sh \ | 16 | file://libvirtd.sh \ |
@@ -19,7 +22,18 @@ SRC_URI[sha256sum] = "1fe69ae1268a097cc0cf83563883b51780d528c6493efe3e7d94c4160c | |||
19 | inherit autotools gettext update-rc.d | 22 | inherit autotools gettext update-rc.d |
20 | 23 | ||
21 | # Trimmed down version for Xen daemon server | 24 | # Trimmed down version for Xen daemon server |
22 | EXTRA_OECONF="--with-xenapi=no --with-libxl=${STAGING_DIR_TARGET}/lib --with-xen=yes --with-xen-inotify=yes --with-qemu=no --with-uml=no --with-openvz=no --with-vmware=no --with-phyp=no --with-libvirtd -with-vbox=no --with-esx=no --with-hyperv=no --with-test=yes --with-remote=yes --with-macvtap=no" | 25 | EXTRA_OECONF = "--with-libvirtd --with-test=yes --with-remote=yes --with-macvtap=no --with-polkit=no" |
26 | |||
27 | PACKAGECONFIG ??= "xen" | ||
28 | PACKAGECONFIG[qemu] = "--with-qemu --with-yajl,--without-qemu --without-yajl,qemu yajl" | ||
29 | PACKAGECONFIG[xen] = "--with-xen --with-xenapi --with-libxl=${STAGING_DIR_TARGET}/lib --with-xen-inotify,--without-xen --without-xenapi --without-libxl --without-xen-inotify,xen" | ||
30 | PACKAGECONFIG[uml] = "--with-uml, --without-uml" | ||
31 | PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz" | ||
32 | PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware" | ||
33 | PACKAGECONFIG[phyp] = "--with-phyp,--without-phyp" | ||
34 | PACKAGECONFIG[vbox] = "--with-vbox,--without-vbox" | ||
35 | PACKAGECONFIG[esx] = "--with-esx,--without-esx" | ||
36 | PACKAGECONFIG[hyperv] = "--with-hyperv,--without-hyperv" | ||
23 | 37 | ||
24 | CACHED_CONFIGUREVARS += "\ | 38 | CACHED_CONFIGUREVARS += "\ |
25 | ac_cv_path_XMLLINT=/usr/bin/xmllint \ | 39 | ac_cv_path_XMLLINT=/usr/bin/xmllint \ |