summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/boost
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@googlemail.com>2015-07-22 10:21:10 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-10 12:40:19 -0700
commita9b41dbfc2d93496da33df7f4abf5c003b3c6006 (patch)
treec303f8bbe0441946f2a566c8c029eb7663218663 /meta/recipes-support/boost
parentc75cefe8a382a63f625123c156137782db118f64 (diff)
downloadpoky-a9b41dbfc2d93496da33df7f4abf5c003b3c6006.tar.gz
boost: add python3 support
* Both - python/python3 - libs are build by adding 'python' to PACKAGECONFIG but are packed into separate packages * Indention was wrong in __anonymous() (From OE-Core rev: 0069b5f4fb0986a55a0a7844952b1a3b277292f8) Signed-off-by: Andreas Müller <schnitzeltony@googlemail.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.inc17
1 files changed, 12 insertions, 5 deletions
diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index 27d489f487..3288e845f9 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -24,8 +24,8 @@ BOOST_LIBS = "\
24 24
25# optional boost-python library 25# optional boost-python library
26PACKAGECONFIG ??= "" 26PACKAGECONFIG ??= ""
27PACKAGECONFIG[python] = ",,python" 27PACKAGECONFIG[python] = ",,python python3"
28BOOST_LIBS += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" 28BOOST_LIBS += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)}"
29inherit python-dir 29inherit python-dir
30PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}" 30PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}"
31 31
@@ -35,9 +35,16 @@ python __anonymous () {
35 packages = [] 35 packages = []
36 extras = [] 36 extras = []
37 for lib in d.getVar('BOOST_LIBS', True).split( ): 37 for lib in d.getVar('BOOST_LIBS', True).split( ):
38 pkg = "boost-%s" % lib.replace("_", "-") 38 # BJAM does not know '--with-python3' (only --with-python)
39 if lib != "python3":
39 extras.append("--with-%s" % lib) 40 extras.append("--with-%s" % lib)
40 packages.append(pkg) 41 pkg = "boost-%s" % lib.replace("_", "-")
42 packages.append(pkg)
43 if lib == "python":
44 # special: python*.so matches python3.so !!
45 if not d.getVar("FILES_%s" % pkg, True):
46 d.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s.so.*" % lib)
47 else:
41 if not d.getVar("FILES_%s" % pkg, True): 48 if not d.getVar("FILES_%s" % pkg, True):
42 d.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s*.so.*" % lib) 49 d.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s*.so.*" % lib)
43 d.setVar("BOOST_PACKAGES", " ".join(packages)) 50 d.setVar("BOOST_PACKAGES", " ".join(packages))
@@ -101,7 +108,6 @@ BJAM_TOOLS = "--ignore-site-config \
101 '-sGCC_INCLUDE_DIRECTORY=${STAGING_INCDIR}' \ 108 '-sGCC_INCLUDE_DIRECTORY=${STAGING_INCDIR}' \
102 '-sGCC_STDLIB_DIRECTORY=${STAGING_LIBDIR}' \ 109 '-sGCC_STDLIB_DIRECTORY=${STAGING_LIBDIR}' \
103 '-sBUILD=release <optimization>space <threading>multi <inlining>on <debug-symbols>off' \ 110 '-sBUILD=release <optimization>space <threading>multi <inlining>on <debug-symbols>off' \
104 '-sPYTHON_VERSION=${PYTHON_BASEVERSION}' \
105 '-sPYTHON_ROOT=${PYTHON_ROOT}' \ 111 '-sPYTHON_ROOT=${PYTHON_ROOT}' \
106 '--layout=system' \ 112 '--layout=system' \
107 " 113 "
@@ -149,6 +155,7 @@ do_boostconfig() {
149 sed -i "/^using python : ${PYTHON_BASEVERSION}"/d ${S}/tools/build/example/user-config.jam 155 sed -i "/^using python : ${PYTHON_BASEVERSION}"/d ${S}/tools/build/example/user-config.jam
150 echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${S}/tools/build/example/user-config.jam 156 echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${S}/tools/build/example/user-config.jam
151 echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${S}/tools/build/example/user-config.jam 157 echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${S}/tools/build/example/user-config.jam
158 echo "using python : 3.4 : : ${STAGING_INCDIR}/python3.4m ;" >> ${S}/tools/build/example/user-config.jam
152 159
153 CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT} 160 CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT}
154 sed -i '/^using python/d' project-config.jam 161 sed -i '/^using python/d' project-config.jam