summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python_2.7.2.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python_2.7.2.bb')
-rw-r--r--meta/recipes-devtools/python/python_2.7.2.bb22
1 files changed, 17 insertions, 5 deletions
diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb
index 95e17a83d6..e067ba50fc 100644
--- a/meta/recipes-devtools/python/python_2.7.2.bb
+++ b/meta/recipes-devtools/python/python_2.7.2.bb
@@ -1,6 +1,6 @@
require python.inc
DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib"
-PR = "${INC_PR}.12"
+PR = "${INC_PR}.14"
DISTRO_SRC_URI ?= "file://sitecustomize.py"
DISTRO_SRC_URI_linuxstdbase = ""
@@ -21,6 +21,7 @@ SRC_URI += "\
file://host_include_contamination.patch \
file://sys_platform_is_now_always_linux2.patch \
file://fix_for_using_different_libdir.patch \
+ file://setuptweaks.patch \
"
S = "${WORKDIR}/Python-${PV}"
@@ -33,6 +34,7 @@ TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
do_configure_prepend() {
+ rm -f ${S}/Makefile.orig
autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf"
}
@@ -65,10 +67,17 @@ do_compile() {
# remove any bogus LD_LIBRARY_PATH
sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
- install -m 0644 Makefile Makefile.orig
- sed -i -e 's,${includedir},${STAGING_INCDIR},' Makefile
- sed -i -e 's,${libdir},${STAGING_LIBDIR},' Makefile
- sed -i -e 's,LDFLAGS=,LDFLAGS=-L. -L${STAGING_LIBDIR},' Makefile
+ if [ ! -f Makefile.orig ]; then
+ install -m 0644 Makefile Makefile.orig
+ fi
+ sed -i -e 's,^LDFLAGS=.*,LDFLAGS=-L. -L${STAGING_LIBDIR},g' \
+ -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
+ -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
+ -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
+ -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
+ -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
+ -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
+ Makefile
install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
# save copy of it now, because if we do it in do_install and
# then call do_install twice we get Makefile.orig == Makefile.sysroot
@@ -79,6 +88,7 @@ do_compile() {
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
STAGING_INCDIR=${STAGING_INCDIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
OPT="${CFLAGS}" libpython${PYTHON_MAJMIN}.so
@@ -89,6 +99,7 @@ do_compile() {
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
STAGING_LIBDIR=${STAGING_LIBDIR} \
STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
OPT="${CFLAGS}"
}
@@ -105,6 +116,7 @@ do_install() {
CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
STAGING_LIBDIR=${STAGING_LIBDIR} \
STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
DESTDIR=${D} LIBDIR=${libdir} install