generic-poky/meta/recipes-devtools/python/python_2.7.3.bb

169 lines
6.1 KiB
BlitzBasic
Raw Normal View History

require python.inc
DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib"
PR = "${INC_PR}.3"
DISTRO_SRC_URI ?= "file://sitecustomize.py"
DISTRO_SRC_URI_linuxstdbase = ""
SRC_URI += "\
file://01-use-proper-tools-for-cross-build.patch \
file://03-fix-tkinter-detection.patch \
file://05-enable-ctypes-cross-build.patch \
file://06-ctypes-libffi-fix-configure.patch \
file://06-avoid_usr_lib_termcap_path_in_linking.patch \
${DISTRO_SRC_URI} \
file://multilib.patch \
file://cgi_py.patch \
file://remove_sqlite_rpath.patch \
file://setup_py_skip_cross_import_check.patch \
file://add-md5module-support.patch \
file://host_include_contamination.patch \
file://fix_for_using_different_libdir.patch \
file://setuptweaks.patch \
file://check-if-target-is-64b-not-host.patch \
file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
file://avoid_warning_about_tkinter.patch \
file://avoid_warning_for_sunos_specific_module.patch \
file://python-2.7.3-berkeley-db-5.3.patch \
file://python-2.7.3-remove-bsdb-rpath.patch \
file://builddir.patch \
file://python-2.7.3-CVE-2012-2135.patch \
file://gcc-4.8-fix-configure-Wformat.patch \
file://fix-makefile-for-ptest.patch \
file://run-ptest \
file://CVE-2013-4073_py27.patch \
file://pypirc-secure.patch \
"
S = "${WORKDIR}/Python-${PV}"
inherit autotools multilib_header pythonnative
# The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
#Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
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"
}
python: Unbreak Python third-party extensions This patch fixes compilation/linking of python third-party extensions, i.e. Extensions that ship with C code. Problem: Python uses distutils(-native) to compile third-party extensions. distutils uses its own sysconfig module to get the options for compiling and linking. Since third-party extensions have to be linked against this libpython it important that -L points into staging. This is not the case because distutils.sysconfig uses a special Makefile that is shipped with python determine the paths. The Makefile is the same that would be used on the target to build third-party extensions. It therefore points into /usr/lib instead of staging. Solution: Stage a modified version of the Makefile where the paths (incdir, libdir) have been replaced by ones that point into staging. Side-problem: The recipe actually should not stage files itself in do_compile, but rather handle everything that needs to be staged in do_install. This is currently not possible because python compiles itself using distutils-native. Distutils on the other hand does only allow to add a path, but not to substitute it, requiring a staged Makefile and libpython.so before the actual python compilation is triggered. The second step to solve this would be to either patch distutils, or split python into python-initial and python. The -initial part could create the Makefile and the library, while the main part focuses on the target. For further references see: http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/001752.html (From OE-Core rev: 413e7e5a5d6db45a6fbca5044246d6696d9d5711) Signed-off-by: Michael Lippautz <michael.lippautz@gmail.com> Acked-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-03 16:40:34 +00:00
do_compile() {
# regenerate platform specific files, because they depend on system headers
cd Lib/plat-linux2
include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
${S}/Tools/scripts/h2py.py -i '(u_long)' \
${STAGING_INCDIR}/dlfcn.h \
${STAGING_INCDIR}/linux/cdrom.h \
${STAGING_INCDIR}/netinet/in.h \
${STAGING_INCDIR}/sys/types.h
sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
cd -
python: Unbreak Python third-party extensions This patch fixes compilation/linking of python third-party extensions, i.e. Extensions that ship with C code. Problem: Python uses distutils(-native) to compile third-party extensions. distutils uses its own sysconfig module to get the options for compiling and linking. Since third-party extensions have to be linked against this libpython it important that -L points into staging. This is not the case because distutils.sysconfig uses a special Makefile that is shipped with python determine the paths. The Makefile is the same that would be used on the target to build third-party extensions. It therefore points into /usr/lib instead of staging. Solution: Stage a modified version of the Makefile where the paths (incdir, libdir) have been replaced by ones that point into staging. Side-problem: The recipe actually should not stage files itself in do_compile, but rather handle everything that needs to be staged in do_install. This is currently not possible because python compiles itself using distutils-native. Distutils on the other hand does only allow to add a path, but not to substitute it, requiring a staged Makefile and libpython.so before the actual python compilation is triggered. The second step to solve this would be to either patch distutils, or split python into python-initial and python. The -initial part could create the Makefile and the library, while the main part focuses on the target. For further references see: http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/001752.html (From OE-Core rev: 413e7e5a5d6db45a6fbca5044246d6696d9d5711) Signed-off-by: Michael Lippautz <michael.lippautz@gmail.com> Acked-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-03 16:40:34 +00:00
# remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144
sed -i -e s,ccache,'$(CCACHE)', Makefile
# remove any bogus LD_LIBRARY_PATH
sed -i -e s,RUNSHARED=.*,RUNSHARED=, 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
# 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
install -m 0644 Makefile Makefile.sysroot
export CROSS_COMPILE="${TARGET_PREFIX}"
export PYTHONBUILDDIR="${S}"
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
STAGING_LIBDIR=${STAGING_LIBDIR} \
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
OPT="${CFLAGS}"
}
do_install() {
python: Unbreak Python third-party extensions This patch fixes compilation/linking of python third-party extensions, i.e. Extensions that ship with C code. Problem: Python uses distutils(-native) to compile third-party extensions. distutils uses its own sysconfig module to get the options for compiling and linking. Since third-party extensions have to be linked against this libpython it important that -L points into staging. This is not the case because distutils.sysconfig uses a special Makefile that is shipped with python determine the paths. The Makefile is the same that would be used on the target to build third-party extensions. It therefore points into /usr/lib instead of staging. Solution: Stage a modified version of the Makefile where the paths (incdir, libdir) have been replaced by ones that point into staging. Side-problem: The recipe actually should not stage files itself in do_compile, but rather handle everything that needs to be staged in do_install. This is currently not possible because python compiles itself using distutils-native. Distutils on the other hand does only allow to add a path, but not to substitute it, requiring a staged Makefile and libpython.so before the actual python compilation is triggered. The second step to solve this would be to either patch distutils, or split python into python-initial and python. The -initial part could create the Makefile and the library, while the main part focuses on the target. For further references see: http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/001752.html (From OE-Core rev: 413e7e5a5d6db45a6fbca5044246d6696d9d5711) Signed-off-by: Michael Lippautz <michael.lippautz@gmail.com> Acked-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-03 16:40:34 +00:00
# make install needs the original Makefile, or otherwise the inclues would
# go to ${D}${STAGING...}/...
install -m 0644 Makefile.orig Makefile
export CROSS_COMPILE="${TARGET_PREFIX}"
export PYTHONBUILDDIR="${S}"
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
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
python: Unbreak Python third-party extensions This patch fixes compilation/linking of python third-party extensions, i.e. Extensions that ship with C code. Problem: Python uses distutils(-native) to compile third-party extensions. distutils uses its own sysconfig module to get the options for compiling and linking. Since third-party extensions have to be linked against this libpython it important that -L points into staging. This is not the case because distutils.sysconfig uses a special Makefile that is shipped with python determine the paths. The Makefile is the same that would be used on the target to build third-party extensions. It therefore points into /usr/lib instead of staging. Solution: Stage a modified version of the Makefile where the paths (incdir, libdir) have been replaced by ones that point into staging. Side-problem: The recipe actually should not stage files itself in do_compile, but rather handle everything that needs to be staged in do_install. This is currently not possible because python compiles itself using distutils-native. Distutils on the other hand does only allow to add a path, but not to substitute it, requiring a staged Makefile and libpython.so before the actual python compilation is triggered. The second step to solve this would be to either patch distutils, or split python into python-initial and python. The -initial part could create the Makefile and the library, while the main part focuses on the target. For further references see: http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/001752.html (From OE-Core rev: 413e7e5a5d6db45a6fbca5044246d6696d9d5711) Signed-off-by: Michael Lippautz <michael.lippautz@gmail.com> Acked-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-03 16:40:34 +00:00
install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
if [ -e ${WORKDIR}/sitecustomize.py ]; then
install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
fi
oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
python: Unbreak Python third-party extensions This patch fixes compilation/linking of python third-party extensions, i.e. Extensions that ship with C code. Problem: Python uses distutils(-native) to compile third-party extensions. distutils uses its own sysconfig module to get the options for compiling and linking. Since third-party extensions have to be linked against this libpython it important that -L points into staging. This is not the case because distutils.sysconfig uses a special Makefile that is shipped with python determine the paths. The Makefile is the same that would be used on the target to build third-party extensions. It therefore points into /usr/lib instead of staging. Solution: Stage a modified version of the Makefile where the paths (incdir, libdir) have been replaced by ones that point into staging. Side-problem: The recipe actually should not stage files itself in do_compile, but rather handle everything that needs to be staged in do_install. This is currently not possible because python compiles itself using distutils-native. Distutils on the other hand does only allow to add a path, but not to substitute it, requiring a staged Makefile and libpython.so before the actual python compilation is triggered. The second step to solve this would be to either patch distutils, or split python into python-initial and python. The -initial part could create the Makefile and the library, while the main part focuses on the target. For further references see: http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/001752.html (From OE-Core rev: 413e7e5a5d6db45a6fbca5044246d6696d9d5711) Signed-off-by: Michael Lippautz <michael.lippautz@gmail.com> Acked-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-03 16:40:34 +00:00
}
do_install_append_class-nativesdk () {
create_wrapper ${D}${bindir}/python2.7 TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
}
do_install_ptest() {
cp ${B}/Makefile ${D}${PTEST_PATH}
sed -i s:LIBDIR:${libdir}:g ${D}${PTEST_PATH}/run-ptest
}
python: add Makefile to SSTATE_SCAN_FILES * it contains sysroot specific paths, this is from om-gta04 sysroot and notice nokia900 ./usr/lib/python2.7/config/Makefile:CC= arm-oe-linux-gnueabi-gcc -march=armv7-a -fno-tree-vectorize -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -D__SOFTFP__ --sysroot=/OE/shr-core/tmp-eglibc/sysroots/nokia900 ./usr/lib/python2.7/config/Makefile:CXX= arm-oe-linux-gnueabi-g++ -march=armv7-a -fno-tree-vectorize -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -D__SOFTFP__ --sysroot=/OE/shr-core/tmp-eglibc/sysroots/nokia900 ./usr/lib/python2.7/config/Makefile:LDFLAGS=-L. -L/OE/shr-core/tmp-eglibc/sysroots/nokia900/usr/lib -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed ./usr/lib/python2.7/config/Makefile:LIBDIR= /OE/shr-core/tmp-eglibc/sysroots/nokia900/usr/lib ./usr/lib/python2.7/config/Makefile:INCLUDEDIR= /OE/shr-core/tmp-eglibc/sysroots/nokia900/usr/include ./usr/lib/python2.7/config/Makefile:CONFIG_ARGS= '--build=x86_64-linux' '--host=arm-oe-linux-gnueabi' '--target=arm-oe-linux-gnueabi' '--prefix=/usr' '--exec_prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--libexecdir=/OE/shr-core/tmp-eglibc/sysroots/nokia900/usr/libexec' '--datadir=/usr/share' '--sysconfdir=/etc' '--sharedstatedir=/com' '--localstatedir=/var' '--libdir=/usr/lib' '--includedir=/OE/shr-core/tmp-eglibc/sysroots/nokia900/usr/include' '--oldincludedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--disable-silent-rules' '--disable-dependency-tracking' \ '--with-libtool-sysroot=/OE/shr-core/tmp-eglibc/sysroots/nokia900' '--with-threads' '--with-pymalloc' '--with-cyclic-gc' '--without-cxx' '--with-signal-module' '--with-wctype-functions' '--enable-shared' 'build_alias=x86_64-linux' 'host_alias=arm-oe-linux-gnueabi' 'target_alias=arm-oe-linux-gnueabi' 'CC=arm-oe-linux-gnueabi-gcc -march=armv7-a -fno-tree-vectorize -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -D__SOFTFP__ --sysroot=/OE/shr-core/tmp-eglibc/sysroots/nokia900' 'CFLAGS=-O2 -pipe -g -feliminate-unused-debug-types' 'LDFLAGS=-L. -L/OE/shr-core/tmp-eglibc/sysroots/nokia900/usr/lib-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed' 'CPPFLAGS=' 'CPP=arm-oe-linux-gnueabi-gcc -E --sysroot=/OE/shr-core/tmp-eglibc/sysroots/nokia900 -march=armv7-a -fno-tree-vectorize -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -D__SOFTFP__' ./usr/lib/python2.7/config/Makefile: $(RUNSHARED) /OE/shr-core/tmp-eglibc/sysroots/nokia900/usr/libexec/oah/translate ./$(BUILDPYTHON) -E -tt $(TESTPROG) -uall $(TESTOPTS) (From OE-Core rev: bf1628286987ad6b4a762b0aeb6aece4a51e7255) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-23 10:43:40 +00:00
SSTATE_SCAN_FILES += "Makefile"
python: Unbreak Python third-party extensions This patch fixes compilation/linking of python third-party extensions, i.e. Extensions that ship with C code. Problem: Python uses distutils(-native) to compile third-party extensions. distutils uses its own sysconfig module to get the options for compiling and linking. Since third-party extensions have to be linked against this libpython it important that -L points into staging. This is not the case because distutils.sysconfig uses a special Makefile that is shipped with python determine the paths. The Makefile is the same that would be used on the target to build third-party extensions. It therefore points into /usr/lib instead of staging. Solution: Stage a modified version of the Makefile where the paths (incdir, libdir) have been replaced by ones that point into staging. Side-problem: The recipe actually should not stage files itself in do_compile, but rather handle everything that needs to be staged in do_install. This is currently not possible because python compiles itself using distutils-native. Distutils on the other hand does only allow to add a path, but not to substitute it, requiring a staged Makefile and libpython.so before the actual python compilation is triggered. The second step to solve this would be to either patch distutils, or split python into python-initial and python. The -initial part could create the Makefile and the library, while the main part focuses on the target. For further references see: http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/001752.html (From OE-Core rev: 413e7e5a5d6db45a6fbca5044246d6696d9d5711) Signed-off-by: Michael Lippautz <michael.lippautz@gmail.com> Acked-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-03 16:40:34 +00:00
PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
py_package_preprocess () {
# copy back the old Makefile to fix target package
python-2.6.6: py_package_preprocess should change Makefile only in PKGD not D * PACKAGEFUNCS ?= "perform_packagecopy \ ${PACKAGE_PREPROCESS_FUNCS} \ our py_package_preprocess is called after perform_packagecopy which does copy D to PKGD so we change it to target version in D (image/) before populating sysroot (sysroot-destdir/) while keeping Makefile.sysroot version in PKGD which was created before calling py_package_preprocess, so both package for runtime and sysroot end wrong * I haven't seen this problem on faster builder, I guess because do_package and do_populate_sysroot can run in paralell and I was lucky that do_populate_sysroot finished before py_package_preprocess was started, but if you build python step by step -c package first you should see it every time * here is proof that with PKGD it works better: $ bitbake -c cleanall python $ bitbake -c install python $ grep LIBDIR= \ ./packages-split/python-distutils/usr/lib/python2.6/config/Makefile \ ./package/usr/lib/python2.6/config/Makefile \ ./sysroot-destdir/usr/lib/python2.6/config/Makefile \ ./image/usr/lib/python2.6/config/Makefile \ ./Python-2.6.6/Makefile \ ~/shr-core/tmp/sysroots/om-gta02/usr/lib/python2.6/config/Makefile grep: ./packages-split/python-distutils/usr/lib/python2.6/config/Makefile: No such file or directory grep: ./package/usr/lib/python2.6/config/Makefile: No such file or directory grep: ./sysroot-destdir/usr/lib/python2.6/config/Makefile: No such file or directory ./image/usr/lib/python2.6/config/Makefile:LIBDIR= /OE/shr-core/tmp/sysroots/om-gta02/usr/lib ./Python-2.6.6/Makefile:LIBDIR= /usr/lib /OE/shr-core/tmp/sysroots/om-gta02/usr/lib/python2.6/config/Makefile:LIBDIR= /OE/shr-core/tmp/sysroots/om-gta02/usr/lib $ bitbake -c package python $ grep LIBDIR= \ ./packages-split/python-distutils/usr/lib/python2.6/config/Makefile \ ./package/usr/lib/python2.6/config/Makefile \ ./sysroot-destdir/usr/lib/python2.6/config/Makefile \ ./image/usr/lib/python2.6/config/Makefile \ ./Python-2.6.6/Makefile \ ~/shr-core/tmp/sysroots/om-gta02/usr/lib/python2.6/config/Makefile ./packages-split/python-distutils/usr/lib/python2.6/config/Makefile:LIBDIR= /usr/lib ./package/usr/lib/python2.6/config/Makefile:LIBDIR= /usr/lib grep: ./sysroot-destdir/usr/lib/python2.6/config/Makefile: No such file or directory ./image/usr/lib/python2.6/config/Makefile:LIBDIR= /OE/shr-core/tmp/sysroots/om-gta02/usr/lib ./Python-2.6.6/Makefile:LIBDIR= /usr/lib /OE/shr-core/tmp/sysroots/om-gta02/usr/lib/python2.6/config/Makefile:LIBDIR= /OE/shr-core/tmp/sysroots/om-gta02/usr/lib $ bitbake -c package python $ grep LIBDIR= \ ./packages-split/python-distutils/usr/lib/python2.6/config/Makefile \ ./package/usr/lib/python2.6/config/Makefile \ ./sysroot-destdir/usr/lib/python2.6/config/Makefile \ ./image/usr/lib/python2.6/config/Makefile \ ./Python-2.6.6/Makefile \ ~/shr-core/tmp/sysroots/om-gta02/usr/lib/python2.6/config/Makefile ./packages-split/python-distutils/usr/lib/python2.6/config/Makefile:LIBDIR= /usr/lib ./package/usr/lib/python2.6/config/Makefile:LIBDIR= /usr/lib ./sysroot-destdir/usr/lib/python2.6/config/Makefile:LIBDIR= /OE/shr-core/tmp/sysroots/om-gta02/usr/lib ./image/usr/lib/python2.6/config/Makefile:LIBDIR= /OE/shr-core/tmp/sysroots/om-gta02/usr/lib ./Python-2.6.6/Makefile:LIBDIR= /usr/lib /OE/shr-core/tmp/sysroots/om-gta02/usr/lib/python2.6/config/Makefile:LIBDIR= /OE/shr-core/tmp/sysroots/om-gta02/usr/lib * without this patch we have /usr/lib/ in image/sysroot-destdir and SYSROOT_LIBDIR in package/packages-split $ grep LIBDIR= \ ./packages-split/python-distutils/usr/lib/python2.6/config/Makefile \ ./package/usr/lib/python2.6/config/Makefile \ ./sysroot-destdir/usr/lib/python2.6/config/Makefile \ ./image/usr/lib/python2.6/config/Makefile \ ./Python-2.6.6/Makefile \ ~/shr-core/tmp/sysroots/om-gta02/usr/lib/python2.6/config/Makefile ./packages-split/python-distutils/usr/lib/python2.6/config/Makefile:LIBDIR= /OE/shr-core/tmp/sysroots/om-gta02/usr/lib ./package/usr/lib/python2.6/config/Makefile:LIBDIR= /OE/shr-core/tmp/sysroots/om-gta02/usr/lib ./sysroot-destdir/usr/lib/python2.6/config/Makefile:LIBDIR= /usr/lib ./image/usr/lib/python2.6/config/Makefile:LIBDIR= /usr/lib ./Python-2.6.6/Makefile:LIBDIR= /usr/lib /OE/shr-core/tmp/sysroots/om-gta02/usr/lib/python2.6/config/Makefile:LIBDIR= /usr/lib (From OE-Core rev: 2ba5ce85dcc3c6812b10073bfc4ab600ca169df1) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-25 12:40:05 +00:00
install -m 0644 Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
# Remove references to buildmachine paths in target Makefile
sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
}
require python-${PYTHON_MAJMIN}-manifest.inc
# manual dependency additions
RPROVIDES_${PN}-core = "${PN}"
RRECOMMENDS_${PN}-core = "${PN}-readline"
RRECOMMENDS_${PN}-crypt = "openssl"
RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
# package libpython2
PACKAGES =+ "lib${BPN}2"
FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
# catch debug extensions (isn't that already in python-core-dbg?)
FILES_${PN}-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug"
# catch all the rest (unsorted)
PACKAGES += "${PN}-misc"
FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-misc"
#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
inherit ptest
# catch manpage
PACKAGES += "${PN}-man"
FILES_${PN}-man = "${datadir}/man"
BBCLASSEXTEND = "nativesdk"