2010-07-06 12:07:49 +00:00
|
|
|
require python.inc
|
2012-07-26 20:34:19 +00:00
|
|
|
|
|
|
|
EXTRANATIVEPATH += "bzip2-native"
|
|
|
|
DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native"
|
2012-07-19 17:46:06 +00:00
|
|
|
PR = "${INC_PR}.1"
|
2010-11-08 18:34:46 +00:00
|
|
|
|
2013-05-08 08:29:48 +00:00
|
|
|
SRC_URI += "\
|
2010-07-06 12:07:49 +00:00
|
|
|
file://05-enable-ctypes-cross-build.patch \
|
2011-05-11 08:40:17 +00:00
|
|
|
file://06-ctypes-libffi-fix-configure.patch \
|
2010-07-06 12:07:49 +00:00
|
|
|
file://10-distutils-fix-swig-parameter.patch \
|
|
|
|
file://11-distutils-never-modify-shebang-line.patch \
|
|
|
|
file://12-distutils-prefix-is-inside-staging-area.patch \
|
|
|
|
file://debug.patch \
|
2011-07-28 07:20:36 +00:00
|
|
|
file://unixccompiler.patch \
|
2011-10-14 07:06:13 +00:00
|
|
|
file://nohostlibs.patch \
|
2011-12-28 00:12:01 +00:00
|
|
|
file://multilib.patch \
|
|
|
|
file://add-md5module-support.patch \
|
2012-11-14 14:31:24 +00:00
|
|
|
file://builddir.patch \
|
2013-11-25 17:25:24 +00:00
|
|
|
file://parallel-makeinst-create-bindir.patch \
|
2014-04-03 07:52:22 +00:00
|
|
|
file://python-fix-build-error-with-Readline-6.3.patch \
|
2014-05-21 12:57:12 +00:00
|
|
|
file://gcc-4.8-fix-configure-Wformat.patch \
|
2011-12-28 00:12:01 +00:00
|
|
|
"
|
2010-07-06 12:07:49 +00:00
|
|
|
S = "${WORKDIR}/Python-${PV}"
|
|
|
|
|
2014-05-12 13:55:35 +00:00
|
|
|
FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
|
2012-11-19 22:16:22 +00:00
|
|
|
|
2010-07-06 12:07:49 +00:00
|
|
|
inherit native
|
|
|
|
|
2013-07-01 11:01:53 +00:00
|
|
|
RPROVIDES += "python-distutils-native python-compression-native python-textutils-native python-codecs-native python-core-native"
|
2011-12-17 10:08:53 +00:00
|
|
|
|
2012-07-22 13:20:26 +00:00
|
|
|
EXTRA_OECONF_append = " --bindir=${bindir}/${PN}"
|
2012-07-19 17:46:06 +00:00
|
|
|
|
2010-07-06 12:07:49 +00:00
|
|
|
EXTRA_OEMAKE = '\
|
|
|
|
BUILD_SYS="" \
|
|
|
|
HOST_SYS="" \
|
|
|
|
LIBC="" \
|
|
|
|
STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
|
|
|
|
STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
|
|
|
|
'
|
|
|
|
|
2011-05-11 08:40:17 +00:00
|
|
|
do_configure_prepend() {
|
|
|
|
autoreconf --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf"
|
|
|
|
}
|
|
|
|
|
2010-07-06 12:07:49 +00:00
|
|
|
do_install() {
|
|
|
|
oe_runmake 'DESTDIR=${D}' install
|
2012-07-19 17:46:06 +00:00
|
|
|
install -d ${D}${bindir}/${PN}
|
|
|
|
install -m 0755 Parser/pgen ${D}${bindir}/${PN}
|
2011-07-18 16:19:07 +00:00
|
|
|
|
|
|
|
# Make sure we use /usr/bin/env python
|
2012-07-19 17:46:06 +00:00
|
|
|
for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
|
2011-07-18 16:19:07 +00:00
|
|
|
sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
|
|
|
|
done
|
2013-06-12 16:25:05 +00:00
|
|
|
|
|
|
|
# Add a symlink to the native Python so that scripts can just invoke
|
|
|
|
# "nativepython" and get the right one without needing absolute paths
|
|
|
|
# (these often end up too long for the #! parser in the kernel as the
|
|
|
|
# buffer is 128 bytes long).
|
|
|
|
ln -s python-native/python ${D}${bindir}/nativepython
|
2010-07-06 12:07:49 +00:00
|
|
|
}
|