mirror of
https://git.yoctoproject.org/poky
synced 2026-09-15 15:49:32 +02:00
python: add PACKAGECONFIG for Berkeley DB module
The bsddb module is deprecated and requires an old version of Berkeley DB that some may be unhappy with even shipping, so expose a way to disable the module. (From OE-Core rev: 701250dae6c5d3f464bf6d7c46c19d59d1c00bec) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
55d9753639
commit
97a6212442
@@ -1,5 +1,5 @@
|
|||||||
require python.inc
|
require python.inc
|
||||||
DEPENDS = "python-native libffi bzip2 db gdbm openssl readline sqlite3 zlib"
|
DEPENDS = "python-native libffi bzip2 gdbm openssl readline sqlite3 zlib"
|
||||||
PR = "${INC_PR}"
|
PR = "${INC_PR}"
|
||||||
|
|
||||||
DISTRO_SRC_URI ?= "file://sitecustomize.py"
|
DISTRO_SRC_URI ?= "file://sitecustomize.py"
|
||||||
@@ -39,6 +39,9 @@ CONFIGUREOPTS += " --with-system-ffi "
|
|||||||
|
|
||||||
EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
|
EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
|
||||||
|
|
||||||
|
PACKAGECONFIG ??= "bdb"
|
||||||
|
PACKAGECONFIG[bdb] = ",,db"
|
||||||
|
|
||||||
do_configure_append() {
|
do_configure_append() {
|
||||||
rm -f ${S}/Makefile.orig
|
rm -f ${S}/Makefile.orig
|
||||||
autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
|
autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
|
||||||
@@ -118,6 +121,10 @@ do_install() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
|
oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
|
||||||
|
|
||||||
|
if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'bdb', d)}" ]; then
|
||||||
|
rm -rf ${D}/${libdir}/python${PYTHON_MAJMIN}/bsddb
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install_append_class-nativesdk () {
|
do_install_append_class-nativesdk () {
|
||||||
@@ -154,6 +161,8 @@ FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
|
|||||||
PACKAGES += "${PN}-misc"
|
PACKAGES += "${PN}-misc"
|
||||||
FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
|
FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
|
||||||
RDEPENDS_${PN}-modules += "${PN}-misc"
|
RDEPENDS_${PN}-modules += "${PN}-misc"
|
||||||
|
|
||||||
|
# ptest
|
||||||
RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests"
|
RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests"
|
||||||
#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
|
#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
|
||||||
inherit ptest
|
inherit ptest
|
||||||
@@ -180,4 +189,7 @@ do_install_ptest() {
|
|||||||
PACKAGES += "${PN}-man"
|
PACKAGES += "${PN}-man"
|
||||||
FILES_${PN}-man = "${datadir}/man"
|
FILES_${PN}-man = "${datadir}/man"
|
||||||
|
|
||||||
|
# Nasty but if bdb isn't enabled the package won't be generated
|
||||||
|
RDEPENDS_${PN}-modules_remove = "${@bb.utils.contains('PACKAGECONFIG', 'bdb', '', '${PN}-bsddb', d)}"
|
||||||
|
|
||||||
BBCLASSEXTEND = "nativesdk"
|
BBCLASSEXTEND = "nativesdk"
|
||||||
|
|||||||
Reference in New Issue
Block a user