From 7511ca180548be3b5562defe6154d804d73c0726 Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Fri, 17 Apr 2020 17:25:56 +0800 Subject: [PATCH] boost: add support to build with python2 and python3 Add support to build with python2 and python3 so other packages like ceph can choose to build against python2 or python3. fix #483 fix #497 Signed-off-by: Jackie Huang Signed-off-by: Babak Sarashki --- .../boost/boost_1.69.0.bbappend | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 meta-stx-integ/recipes-support/boost/boost_1.69.0.bbappend diff --git a/meta-stx-integ/recipes-support/boost/boost_1.69.0.bbappend b/meta-stx-integ/recipes-support/boost/boost_1.69.0.bbappend new file mode 100644 index 0000000..9541e2b --- /dev/null +++ b/meta-stx-integ/recipes-support/boost/boost_1.69.0.bbappend @@ -0,0 +1,31 @@ +DEP_PYTHON = "\ + python \ + python-native \ + python-numpy-native \ + python3 \ + python3-native \ + python3-numpy-native \ +" + +PACKAGECONFIG = "locale python" +PACKAGECONFIG[python] = ",,${DEP_PYTHON}" + +BJAM_OPTS += "${@bb.utils.contains('BOOST_LIBS', 'python', 'python=${PYTHON_BASEVERSION},2.7', '', d)}" + +do_configure_append () { + if ${@bb.utils.contains('BOOST_LIBS', 'python', 'true', 'false', d)}; then + echo "using python : 2.7 : ${STAGING_BINDIR_NATIVE}/python-native/python : ${STAGING_INCDIR}/python2.7 : ${STAGING_LIBDIR}/python2.7 ;" >> ${WORKDIR}/user-config.jam + sed -i -e 's|${STAGING_DIR_HOST}${bindir}/python3|${STAGING_BINDIR_NATIVE}/python3-native/python3|' ${WORKDIR}/user-config.jam + fi +} + +PACKAGES += "${PN}-python3" + +FILES_${PN}-python = " \ + ${libdir}/libboost_python2*.so.* \ + ${libdir}/libboost_numpy2*.so.* \ +" +FILES_${PN}-python3 = " \ + ${libdir}/libboost_python3*.so.* \ + ${libdir}/libboost_numpy3*.so.* \ +"