summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2013-06-05 16:38:55 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-13 17:37:53 +0100
commitb255ebbf8283568d732827086bf0bd2b8db1d905 (patch)
tree6e4a80158256d194b69bbd242525fe1524a3de6e
parentee95048cf0c79dc52857dbc0e5da9363f2ad8b9b (diff)
downloadopenembedded-core-b255ebbf8283568d732827086bf0bd2b8db1d905.tar.gz
openembedded-core-b255ebbf8283568d732827086bf0bd2b8db1d905.tar.bz2
openembedded-core-b255ebbf8283568d732827086bf0bd2b8db1d905.zip
libnewt: split python module into libnewt-python
This is useful as it avoids pulling python into a build just to build chkconfig. The python recipe uses the libnewt installed in the sysroot by the main package, so there's little loss of build time, other than the additional unpack/patch. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
-rw-r--r--meta/recipes-extended/newt/libnewt-python_0.52.14.bb26
-rw-r--r--meta/recipes-extended/newt/libnewt_0.52.14.bb15
2 files changed, 31 insertions, 10 deletions
diff --git a/meta/recipes-extended/newt/libnewt-python_0.52.14.bb b/meta/recipes-extended/newt/libnewt-python_0.52.14.bb
new file mode 100644
index 0000000000..9af2d5d91f
--- /dev/null
+++ b/meta/recipes-extended/newt/libnewt-python_0.52.14.bb
@@ -0,0 +1,26 @@
+require recipes-extended/newt/libnewt_${PV}.bb
+
+SUMMARY .= " - python"
+DEPENDS = "libnewt python"
+RDEPENDS_${PN} += "python-core"
+
+inherit pythonnative python-dir
+
+EXTRA_OECONF += "--with-python"
+EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}"
+
+
+do_compile () {
+ VERSION="$(sed -n 's/^VERSION = //p' Makefile)"
+ oe_runmake "LIBNEWTSH=${STAGING_LIBDIR}/libnewt.so.$VERSION" _snackmodule.so
+}
+
+do_install () {
+ install -d ${D}${PYTHON_SITEPACKAGES_DIR}
+ install -m 0755 ${PYTHON_DIR}/_snackmodule.so ${D}${PYTHON_SITEPACKAGES_DIR}/
+ install -m 0644 snack.py ${D}${PYTHON_SITEPACKAGES_DIR}/
+}
+
+
+FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
diff --git a/meta/recipes-extended/newt/libnewt_0.52.14.bb b/meta/recipes-extended/newt/libnewt_0.52.14.bb
index 54da15df34..ee8206e4b4 100644
--- a/meta/recipes-extended/newt/libnewt_0.52.14.bb
+++ b/meta/recipes-extended/newt/libnewt_0.52.14.bb
@@ -15,7 +15,7 @@ LICENSE = "LGPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
# slang needs to be >= 2.2
-DEPENDS = "slang popt python"
+DEPENDS = "slang popt"
PR = "r2"
@@ -30,11 +30,9 @@ SRC_URI[sha256sum] = "f70f4f58baa60388ddf2e39249ffb00898fb40f2b2767e42e2ab51fe4b
S = "${WORKDIR}/newt-${PV}"
-EXTRA_OECONF = "--without-tcl"
+EXTRA_OECONF = "--without-tcl --without-python"
-inherit autotools pythonnative python-dir
-
-EXTRA_OEMAKE = "PYTHONVERS=${PYTHON_DIR}"
+inherit autotools
export STAGING_INCDIR
export STAGING_LIBDIR
@@ -42,13 +40,10 @@ export STAGING_LIBDIR
export BUILD_SYS
export HOST_SYS
-PACKAGES_prepend = "whiptail ${PN}-python "
+PACKAGES_prepend = "whiptail "
do_configure_prepend() {
- ( cd ${S}; sh autogen.sh )
+ sh autogen.sh
}
FILES_whiptail = "${bindir}/whiptail"
-FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
-FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*"
-FILES_${PN}-staticdev = "${libdir}/*.a"