mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 12:50:22 +02:00

Poky commit 69b6eaca3d9b635e8a61a0fdbd814b558e91901d [autotools: Enable separate builddir by default] enforced separate build directories, which is supported by automake. Make some minor updates to the recipes and upstream source to allow builds to work with separated src and build directories. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
56 lines
1.9 KiB
PHP
56 lines
1.9 KiB
PHP
inherit pythonnative python-dir
|
|
|
|
export STAGING_INCDIR
|
|
export STAGING_LIBDIR
|
|
export BUILD_SYS
|
|
export HOST_SYS
|
|
|
|
RDEPENDS_${PN}-python += "python"
|
|
PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python"
|
|
|
|
PACKAGES += "${PN}-python-staticdev ${PN}-python-dev ${PN}-python-dbg ${PN}-python"
|
|
|
|
FILES_${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
|
|
FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
|
|
FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
|
|
FILES_${PN}-python = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*"
|
|
|
|
SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python"
|
|
SRC_URI += "file://libvirt_api_xml_path.patch;patchdir=../libvirt-python-${PV}"
|
|
|
|
SRC_URI[libvirt_python.md5sum] = "cd3b75c0eb64e933f0b648fbdca6e868"
|
|
SRC_URI[libvirt_python.sha256sum] = "94d79d662b6010f6c688b8856b2d95077736d48ffa35feed5a339d7fafbf8c39"
|
|
|
|
export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml"
|
|
export LIBVIRT_CFLAGS = "-I${S}/include"
|
|
export LIBVIRT_LIBS = "-L${B}/src/.libs -lvirt -ldl"
|
|
export LDFLAGS="-L${B}/src/.libs"
|
|
|
|
LIBVIRT_INSTALL_ARGS = "--root=${D} \
|
|
--prefix=${prefix} \
|
|
--install-lib=${PYTHON_SITEPACKAGES_DIR} \
|
|
--install-data=${datadir}"
|
|
|
|
python __anonymous () {
|
|
pkgconfig = d.getVar('PACKAGECONFIG', True)
|
|
if ('python') in pkgconfig.split():
|
|
d.setVar('LIBVIRT_PYTHON_ENABLE', '1')
|
|
else:
|
|
d.setVar('LIBVIRT_PYTHON_ENABLE', '0')
|
|
}
|
|
|
|
do_compile_append() {
|
|
if [ "${LIBVIRT_PYTHON_ENABLE}" = "1" ]; then
|
|
cd ${WORKDIR}/libvirt-python-${PV} && \
|
|
${STAGING_BINDIR_NATIVE}/python-native/python setup.py build
|
|
fi
|
|
}
|
|
|
|
do_install_append() {
|
|
if [ "${LIBVIRT_PYTHON_ENABLE}" = "1" ]; then
|
|
cd ${WORKDIR}/${PN}-python-${PV} && \
|
|
${STAGING_BINDIR_NATIVE}/python-native/python setup.py install \
|
|
--install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${LIBVIRT_INSTALL_ARGS}
|
|
fi
|
|
}
|