From 0faff8720150863ff38132f87ef65721fcb86dc1 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 24 Mar 2009 14:01:30 -0700 Subject: distutils-base.bbclass: Move common functionality to distutils-common-base.bbclass Create a new class distutils-common-base.bbclass which holds the common parts that can be used in native and target packages which need to use distutils funtionality. rpm, libxml2, zope are currently using them and needed to use distutils-native-base for native recipes. rpm and libxml need to defer the processing of certain configure parameters which we evaluate using python. So we need to have python-native built before we can process them. Hence we can not use EXTRA_OECONF which is a python variable and gets expanded during parsing recipes and ofcourse we have not yet built python-native. We pass these extra options as a separate shell variable to do_configure which we evaluate when that task is executing. --- recipes/zope/zope-3.3.1.inc | 45 ++++++++++++++++++++++++++++++++++++ recipes/zope/zope-native_3.3.1.bb | 7 ++---- recipes/zope/zope_3.3.1.bb | 48 ++------------------------------------- 3 files changed, 49 insertions(+), 51 deletions(-) create mode 100644 recipes/zope/zope-3.3.1.inc (limited to 'recipes/zope') diff --git a/recipes/zope/zope-3.3.1.inc b/recipes/zope/zope-3.3.1.inc new file mode 100644 index 0000000000..b06174c24c --- /dev/null +++ b/recipes/zope/zope-3.3.1.inc @@ -0,0 +1,45 @@ +DESCRIPTION = "A full fledged pluggable content management system with integrated web server and much more." +SECTION = "console/network" +PRIORITY = "optional" +LICENSE = "ZPL" +PR = "r9" + +SRC_URI = "http://www.zope.org/Products/Zope3/${PV}/Zope-${PV}.tgz" +S = "${WORKDIR}/Zope-${PV}" + +do_configure() { + ./configure --with-python=${STAGING_BINDIR_NATIVE}/python --prefix=${prefix} --force +} + +do_compile() { + oe_runmake HOST_SYS=${HOST_SYS} BUILD_SYS=${BUILD_SYS} STAGING_INCDIR=${STAGING_INCDIR} +} + +do_install() { + install -d ${D}${libdir}/${PYTHON_DIR} + oe_runmake install prefix=${D}${prefix} HOST_SYS=${HOST_SYS} BUILD_SYS=${BUILD_SYS} + mv ${D}${libdir}/python/* ${D}${libdir}/${PYTHON_DIR} + rm -rf ${D}${libdir}/${PYTHON_DIR}/twisted + rm -rf ${D}${libdir}/${PYTHON_DIR}/zope/app/twisted +} + +PACKAGES =+ "python-zopeinterface python-zopeinterface-dbg" + +FILES_${PN} = "${prefix}" +FILES_${PN}_doc = "${prefix}/doc" +FILES_${PN}-dbg += "\ +${libdir}/${PYTHON_DIR}/BTrees/.debug \ +${libdir}/${PYTHON_DIR}/persistent/.debug \ +${libdir}/${PYTHON_DIR}/zope/proxy/.debug \ +${libdir}/${PYTHON_DIR}/zope/thread/.debug \ +${libdir}/${PYTHON_DIR}/zope/security/.debug \ +${libdir}/${PYTHON_DIR}/zope/hookable/.debug \ +${libdir}/${PYTHON_DIR}/zope/app/container/.debug \ +${libdir}/${PYTHON_DIR}/zope/i18nmessageid/.debug \ +${libdir}/${PYTHON_DIR}/ZODB/.debug" +FILES_python-zopeinterface-dbg += "${libdir}/${PYTHON_DIR}/zope/interface/.debug " + +FILES_python-zopeinterface = " ${libdir}/${PYTHON_DIR}/zope/__init__.py* \ + ${libdir}/${PYTHON_DIR}/zope/interface/*.* \ + ${libdir}/${PYTHON_DIR}/zope/interface/common" + diff --git a/recipes/zope/zope-native_3.3.1.bb b/recipes/zope/zope-native_3.3.1.bb index 970df6d785..70d19e9888 100644 --- a/recipes/zope/zope-native_3.3.1.bb +++ b/recipes/zope/zope-native_3.3.1.bb @@ -1,9 +1,6 @@ -require zope_${PV}.bb -inherit native +inherit native distutils-native-base -DEPENDS = "python-native" - -inherit distutils-base +require zope-${PV}.inc export BUILD_SYS export HOST_SYS diff --git a/recipes/zope/zope_3.3.1.bb b/recipes/zope/zope_3.3.1.bb index 05df3dd48d..cf81b15fca 100644 --- a/recipes/zope/zope_3.3.1.bb +++ b/recipes/zope/zope_3.3.1.bb @@ -1,49 +1,5 @@ -DESCRIPTION = "A full fledged pluggable content management system with integrated web server and much more." -SECTION = "console/network" -PRIORITY = "optional" -DEPENDS = "python" -RDEPENDS = "python-core python-shell" -LICENSE = "ZPL" -PR = "r8" - -SRC_URI = "http://www.zope.org/Products/Zope3/${PV}/Zope-${PV}.tgz" -S = "${WORKDIR}/Zope-${PV}" +RDEPENDS = "python-shell" inherit distutils-base -do_configure() { - ./configure --with-python=${STAGING_BINDIR_NATIVE}/python --prefix=${prefix} --force -} - -do_compile() { - oe_runmake HOST_SYS=${HOST_SYS} BUILD_SYS=${BUILD_SYS} STAGING_INCDIR=${STAGING_INCDIR} -} - -do_install() { - install -d ${D}${libdir}/${PYTHON_DIR} - oe_runmake install prefix=${D}${prefix} HOST_SYS=${HOST_SYS} BUILD_SYS=${BUILD_SYS} - mv ${D}${libdir}/python/* ${D}${libdir}/${PYTHON_DIR} - rm -rf ${D}${libdir}/${PYTHON_DIR}/twisted - rm -rf ${D}${libdir}/${PYTHON_DIR}/zope/app/twisted -} - -PACKAGES =+ "python-zopeinterface python-zopeinterface-dbg" - -FILES_${PN} = "${prefix}" -FILES_${PN}_doc = "${prefix}/doc" -FILES_${PN}-dbg += "\ -${libdir}/${PYTHON_DIR}/BTrees/.debug \ -${libdir}/${PYTHON_DIR}/persistent/.debug \ -${libdir}/${PYTHON_DIR}/zope/proxy/.debug \ -${libdir}/${PYTHON_DIR}/zope/thread/.debug \ -${libdir}/${PYTHON_DIR}/zope/security/.debug \ -${libdir}/${PYTHON_DIR}/zope/hookable/.debug \ -${libdir}/${PYTHON_DIR}/zope/app/container/.debug \ -${libdir}/${PYTHON_DIR}/zope/i18nmessageid/.debug \ -${libdir}/${PYTHON_DIR}/ZODB/.debug" -FILES_python-zopeinterface-dbg += "${libdir}/${PYTHON_DIR}/zope/interface/.debug " - -FILES_python-zopeinterface = " ${libdir}/${PYTHON_DIR}/zope/__init__.py* \ - ${libdir}/${PYTHON_DIR}/zope/interface/*.* \ - ${libdir}/${PYTHON_DIR}/zope/interface/common" - +require ${PN}-${PV}.inc -- cgit 1.2.3-korg