mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 12:50:22 +02:00
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>
This commit is contained in:
parent
572043f25b
commit
93a8aadc0d
|
@ -1,13 +1,14 @@
|
|||
inherit python-dir
|
||||
|
||||
# Enable the Python tool support
|
||||
EXTRA_OECONF += "--with-python=yes"
|
||||
EXTRA_OECONF += "--with-python=yes --with-python-inc-dir=-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}"
|
||||
|
||||
SRC_URI += " file://oe_PYTHON_INCLUDES.patch"
|
||||
SRC_URI += " file://python_incdir.patch"
|
||||
|
||||
DEPENDS += "python python-native"
|
||||
RDEPENDS_${PN}-python += "python xen-python"
|
||||
RDEPENDS_${PN}-python += "python"
|
||||
PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python"
|
||||
|
||||
PACKAGES += "${PN}-python-dbg ${PN}-python"
|
||||
FILES_${PN}-python-dbg += "${libdir}/${PYTHON_DIR}/site-packages/.debug/"
|
||||
FILES_${PN}-python += "${libdir}/${PYTHON_DIR}/site-packages"
|
||||
FILES_${PN}-python-dbg += "${libdir}/${PYTHON_DIR}/dist-packages/.debug/"
|
||||
FILES_${PN}-python += "${libdir}/${PYTHON_DIR}/dist-packages"
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
--- libvirt-0.9.10/configure.ac.sav 2012-03-14 15:03:11.042785629 -0600
|
||||
+++ libvirt-0.9.10/configure.ac 2012-03-14 15:17:13.722309867 -0600
|
||||
@@ -2052,26 +2052,22 @@
|
||||
AM_PATH_PYTHON(,, [:])
|
||||
|
||||
if test "$PYTHON" != : ; then
|
||||
- PYTHON_CONFIG="$PYTHON-config"
|
||||
-
|
||||
- if test -x "$PYTHON_CONFIG"
|
||||
+ if test -r `$as_dirname $PYTHON`/../include/python$PYTHON_VERSION/Python.h
|
||||
+ then
|
||||
+ PYTHON_INCLUDES=-I`$as_dirname $PYTHON`/../include/python$PYTHON_VERSION
|
||||
+ elif test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h
|
||||
then
|
||||
- PYTHON_INCLUDES=`$PYTHON_CONFIG --includes`
|
||||
+ PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION
|
||||
else
|
||||
- if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h
|
||||
+ if test -r $prefix/include/python$PYTHON_VERSION/Python.h
|
||||
then
|
||||
- PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION
|
||||
+ PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION
|
||||
else
|
||||
- if test -r $prefix/include/python$PYTHON_VERSION/Python.h
|
||||
+ if test -r /usr/include/python$PYTHON_VERSION/Python.h
|
||||
then
|
||||
- PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION
|
||||
+ PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION
|
||||
else
|
||||
- if test -r /usr/include/python$PYTHON_VERSION/Python.h
|
||||
- then
|
||||
- PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION
|
||||
- else
|
||||
- AC_MSG_ERROR([You must install python-devel to build Python bindings])
|
||||
- fi
|
||||
+ AC_MSG_ERROR([You must install python-devel to build Python bindings])
|
||||
fi
|
||||
fi
|
||||
fi
|
68
recipes-extended/libvirt/libvirt/python_incdir.patch
Normal file
68
recipes-extended/libvirt/libvirt/python_incdir.patch
Normal file
|
@ -0,0 +1,68 @@
|
|||
Index: libvirt-0.10.2/configure.ac
|
||||
===================================================================
|
||||
--- libvirt-0.10.2.orig/configure.ac 2012-10-29 11:59:27.091615491 +0200
|
||||
+++ libvirt-0.10.2/configure.ac 2012-10-29 12:09:50.067603647 +0200
|
||||
@@ -2397,6 +2397,11 @@
|
||||
|
||||
PYTHON_VERSION=
|
||||
PYTHON_INCLUDES=
|
||||
+
|
||||
+AC_ARG_WITH(python-inc-dir,
|
||||
+ AS_HELP_STRING([--with-python-inc-dir=DIR], [directory with Python include files]),
|
||||
+ [PYTHON_INCLUDES="${withval}"], [])
|
||||
+
|
||||
if test "$with_python" != "no" ; then
|
||||
if test -x "$with_python/bin/python"
|
||||
then
|
||||
@@ -2422,29 +2427,30 @@
|
||||
AM_PATH_PYTHON(,, [:])
|
||||
|
||||
if test "$PYTHON" != : ; then
|
||||
- PYTHON_CONFIG="$PYTHON-config"
|
||||
-
|
||||
- if test -x "$PYTHON_CONFIG"
|
||||
- then
|
||||
- PYTHON_INCLUDES=`$PYTHON_CONFIG --includes`
|
||||
- else
|
||||
- if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h
|
||||
- then
|
||||
- PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION
|
||||
- else
|
||||
- if test -r $prefix/include/python$PYTHON_VERSION/Python.h
|
||||
- then
|
||||
- PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION
|
||||
- else
|
||||
- if test -r /usr/include/python$PYTHON_VERSION/Python.h
|
||||
- then
|
||||
- PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION
|
||||
- else
|
||||
- AC_MSG_ERROR([You must install python-devel to build Python bindings])
|
||||
- fi
|
||||
+ if ! test -n "$PYTHON_INCLUDES"; then
|
||||
+ PYTHON_CONFIG="$PYTHON-config"
|
||||
+ if test -x "$PYTHON_CONFIG"
|
||||
+ then
|
||||
+ PYTHON_INCLUDES=`$PYTHON_CONFIG --includes`
|
||||
+ else
|
||||
+ if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h
|
||||
+ then
|
||||
+ PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION
|
||||
+ else
|
||||
+ if test -r $prefix/include/python$PYTHON_VERSION/Python.h
|
||||
+ then
|
||||
+ PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION
|
||||
+ else
|
||||
+ if test -r /usr/include/python$PYTHON_VERSION/Python.h
|
||||
+ then
|
||||
+ PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION
|
||||
+ else
|
||||
+ AC_MSG_ERROR([You must install python-devel to build Python bindings])
|
||||
+ fi
|
||||
+ fi
|
||||
fi
|
||||
fi
|
||||
- fi
|
||||
+ fi
|
||||
else
|
||||
AC_MSG_ERROR([You must install python to build Python bindings])
|
||||
fi
|
|
@ -5,9 +5,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f"
|
|||
SECTION = "console/tools"
|
||||
PR = "r0"
|
||||
|
||||
DEPENDS="bridge-utils gnutls libxml2 lvm2 avahi polkit parted curl libpcap util-linux e2fsprogs xen pm-utils iptables ebtables dnsmasq"
|
||||
DEPENDS="bridge-utils gnutls libxml2 lvm2 avahi polkit parted curl libpcap util-linux e2fsprogs pm-utils iptables ebtables dnsmasq"
|
||||
|
||||
RDEPENDS_${PN}-libvirtd = "bridge-utils iptables pm-utils dnsmasq xen ebtables dmidecode "
|
||||
RDEPENDS_${PN}-libvirtd = "bridge-utils iptables pm-utils dnsmasq ebtables dmidecode "
|
||||
|
||||
#connman blocks the 53 port and libvirtd can't start its DNS service
|
||||
RCONFLICTS_${PN}_libvirtd = "connman"
|
||||
|
||||
SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz \
|
||||
file://libvirtd.sh \
|
||||
|
@ -19,7 +22,18 @@ SRC_URI[sha256sum] = "1fe69ae1268a097cc0cf83563883b51780d528c6493efe3e7d94c4160c
|
|||
inherit autotools gettext update-rc.d
|
||||
|
||||
# Trimmed down version for Xen daemon server
|
||||
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"
|
||||
EXTRA_OECONF = "--with-libvirtd --with-test=yes --with-remote=yes --with-macvtap=no --with-polkit=no"
|
||||
|
||||
PACKAGECONFIG ??= "xen"
|
||||
PACKAGECONFIG[qemu] = "--with-qemu --with-yajl,--without-qemu --without-yajl,qemu yajl"
|
||||
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"
|
||||
PACKAGECONFIG[uml] = "--with-uml, --without-uml"
|
||||
PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz"
|
||||
PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware"
|
||||
PACKAGECONFIG[phyp] = "--with-phyp,--without-phyp"
|
||||
PACKAGECONFIG[vbox] = "--with-vbox,--without-vbox"
|
||||
PACKAGECONFIG[esx] = "--with-esx,--without-esx"
|
||||
PACKAGECONFIG[hyperv] = "--with-hyperv,--without-hyperv"
|
||||
|
||||
CACHED_CONFIGUREVARS += "\
|
||||
ac_cv_path_XMLLINT=/usr/bin/xmllint \
|
||||
|
|
Loading…
Reference in New Issue
Block a user