generic-poky/meta/recipes-devtools/gdb/gdb_7.9.1.bb
Andreas Oberritter 612244675d gdb: Add missing runtime dependency for python option
With python enabled, gdb refuses to start without core
python modules:

| Could not find platform independent libraries <prefix>
| Could not find platform dependent libraries <exec_prefix>
| Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
| ImportError: No module named site

It also complains if python-codecs is missing.

(From OE-Core rev: 646adb4d90030970f6e2136f65b51b3c8b0c9d5c)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27 22:42:51 +01:00

25 lines
734 B
BlitzBasic

require gdb.inc
require gdb-${PV}.inc
inherit python-dir
PACKAGECONFIG ??= ""
PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python,python python-codecs"
PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
do_configure_prepend() {
if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" ]; then
cat > ${WORKDIR}/python << EOF
#!/bin/sh
case "\$2" in
--includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}/" ;;
--ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
--exec-prefix) echo "${exec_prefix}" ;;
*) exit 1 ;;
esac
exit 0
EOF
chmod +x ${WORKDIR}/python
fi
}