summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/boost
diff options
context:
space:
mode:
authorLukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>2013-09-16 04:59:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-24 17:24:13 +0100
commit44d74f6ca4cef96bb2ac80da454933040d3b777e (patch)
tree39c9adfa441948c6938ea42a5fa0f66139fbb281 /meta/recipes-support/boost
parentf9c1ac34b6229eb7703de4b61075905f5e2929af (diff)
downloadpoky-44d74f6ca4cef96bb2ac80da454933040d3b777e.tar.gz
boost: set up PACKAGECONFIG for boost-python library
Until now, the comment in the boost.inc file suggested to enable the boost-python library by uncommenting some lines in that file. Using the new PACKAGECONFIG feature, boost-python can now be added optionally without need to modify the file or copying those lines into a bbappend file. Furthermore, we obtain the python version by inheriting python-dir instead of fixing the python version in this file. This commit is motivated by the need in the meta-ros layer, as discussed in the issue #145 of the meta-ros issue tracker [1]. [1] https://github.com/bmwcarit/meta-ros/pull/145 (From OE-Core rev: 7568bfdd114597956a1da68746f207ec7f93a48d) Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/boost')
-rw-r--r--meta/recipes-support/boost/boost.inc15
1 files changed, 8 insertions, 7 deletions
diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index 5a219c5030..f13051c454 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -18,11 +18,12 @@ BOOST_LIBS = "\
18 thread \ 18 thread \
19 " 19 "
20 20
21# To enable python, uncomment the following: 21# optional boost-python library
22#BOOST_LIBS += "python" 22PACKAGECONFIG ??= ""
23#DEPENDS += "python" 23PACKAGECONFIG[python] = ",,python"
24#PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}" 24BOOST_LIBS += "${@base_contains('PACKAGECONFIG', 'python', 'python', '', d)}"
25#PYTHON_VERSION = "2.7" 25inherit python-dir
26PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}"
26 27
27# Make a package for each library, plus -dev 28# Make a package for each library, plus -dev
28PACKAGES = "${PN}-dbg ${BOOST_PACKAGES}" 29PACKAGES = "${PN}-dbg ${BOOST_PACKAGES}"
@@ -95,7 +96,7 @@ BJAM_TOOLS = "-sTOOLS=gcc \
95 '-sGCC_INCLUDE_DIRECTORY=${STAGING_INCDIR}' \ 96 '-sGCC_INCLUDE_DIRECTORY=${STAGING_INCDIR}' \
96 '-sGCC_STDLIB_DIRECTORY=${STAGING_LIBDIR}' \ 97 '-sGCC_STDLIB_DIRECTORY=${STAGING_LIBDIR}' \
97 '-sBUILD=release <optimization>space <threading>multi <inlining>on <debug-symbols>off' \ 98 '-sBUILD=release <optimization>space <threading>multi <inlining>on <debug-symbols>off' \
98 '-sPYTHON_VERSION=${PYTHON_VERSION}' \ 99 '-sPYTHON_VERSION=${PYTHON_BASEVERSION}' \
99 '-sPYTHON_ROOT=${PYTHON_ROOT}' \ 100 '-sPYTHON_ROOT=${PYTHON_ROOT}' \
100 '--layout=system' \ 101 '--layout=system' \
101 " 102 "
@@ -136,7 +137,7 @@ do_boostconfig() {
136 echo 'using gcc : 4.3.1 : ${CXX} : compileflags -DBOOST_SP_USE_PTHREADS -I${includedir} linkflags -L${libdir} ;' >> ${S}/tools/build/v2/user-config.jam 137 echo 'using gcc : 4.3.1 : ${CXX} : compileflags -DBOOST_SP_USE_PTHREADS -I${includedir} linkflags -L${libdir} ;' >> ${S}/tools/build/v2/user-config.jam
137 fi 138 fi
138 139
139 echo "using python : ${PYTHON_VERSION} : : ${STAGING_INCDIR}/python${PYTHON_VERSION} ;" >> ${S}/tools/build/v2/user-config.jam 140 echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${S}/tools/build/v2/user-config.jam
140 141
141 CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT} 142 CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT}
142 sed -i '/^using python/d' project-config.jam 143 sed -i '/^using python/d' project-config.jam