[oe-commits] [openembedded-core] 09/20: boost: add support for additional boost libs

git at git.openembedded.org git at git.openembedded.org
Tue Sep 27 08:14:00 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 3f4671ac13e373423bdbe6df2d8c7985b19ab6e8
Author: Jackie Huang <jackie.huang at windriver.com>
AuthorDate: Mon Sep 26 15:56:29 2016 +0800

    boost: add support for additional boost libs
    
    * Added libs:
      - container
      - context
      - coroutine
      - exception
      - graph_parallel
      - locale
      - math
      - mpi
      - wave
    
    * Add PACKAGECONFIG to add proper dependencies for:
      graph_parallel, locale, and mpi.
    
    * boost-mpi depends on mpich which is in meta-oe,
      and boost-graph_parallel depends on boost-mpi,
      so they are disabled by default, but can be enabled
      in a distro that needs them.
    
    * context and coroutine are added only for x86 and powerpc.
    
    Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-support/boost/boost.inc | 33 ++++++++++++++++++++++++++++++---
 1 file changed, 30 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index 5696b6a..7637a4e 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -8,11 +8,14 @@ ARM_INSTRUCTION_SET_armv5 = "arm"
 BOOST_LIBS = "\
 	atomic \
 	chrono \
+	container \
 	date_time \
+	exception \
 	filesystem \
 	graph \
 	iostreams \
 	log \
+	math \
 	program_options \
 	random \
 	regex \
@@ -22,12 +25,28 @@ BOOST_LIBS = "\
 	timer \
 	test \
 	thread \
+	wave \
 	"
 
-# optional boost-python library
-PACKAGECONFIG ??= ""
+# only supported by x86 and powerpc
+BOOST_LIBS_append_x86 = " context coroutine"
+BOOST_LIBS_append_x86-64 = " context coroutine"
+BOOST_LIBS_append_powerpc = " context coroutine"
+
+# optional libraries
+PACKAGECONFIG ??= "locale"
+PACKAGECONFIG[locale] = ",,icu"
+PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich"
+PACKAGECONFIG[mpi] = ",,mpich"
 PACKAGECONFIG[python] = ",,python python3"
-BOOST_LIBS += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)}"
+
+BOOST_LIBS += "\
+    ${@bb.utils.contains('PACKAGECONFIG', 'locale', 'locale', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'graph_parallel', 'graph_parallel mpi', \
+                         bb.utils.contains('PACKAGECONFIG', 'mpi', 'mpi', '', d), d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)} \
+"
+
 inherit python-dir
 PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}"
 
@@ -54,6 +73,10 @@ python __anonymous () {
 }
 
 # Override the contents of specific packages
+FILES_${PN}-graph = "${libdir}/libboost_graph.so.*"
+FILES_${PN}-graph_parallel = "${libdir}/libboost_graph_parallel.so.*"
+FILES_${PN}-locale = "${libdir}/libboost_locale.so.*"
+FILES_${PN}-mpi = "${libdir}/mpi.so ${libdir}/libboost_mpi*.so.*"
 FILES_boost-serialization = "${libdir}/libboost_serialization*.so.* \
 	${libdir}/libboost_wserialization*.so.*"
 FILES_boost-test = "${libdir}/libboost_prg_exec_monitor*.so.* \
@@ -159,6 +182,10 @@ do_configure() {
 	echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${WORKDIR}/user-config.jam
 	echo "using python : 3.5 : : ${STAGING_INCDIR}/python3.5m ;" >> ${WORKDIR}/user-config.jam
 
+	if ${@bb.utils.contains('BOOST_LIBS', 'mpi', 'true', 'false', d)}; then
+		echo "using mpi : : <find-shared-library>mpi ;" >> ${WORKDIR}/user-config.jam
+	fi
+
 	CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT}
 	sed -i '/^using python/d' ${S}/project-config.jam
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list