summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@gmail.com>2025-03-02 16:50:55 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-03 18:01:30 +0000
commit8401052ffdec4ab104be93f4e94cae038d194ab7 (patch)
treeb75d41366d00b440027c05b66661fa4df7a09796
parent79d1fd08811c33aae6bdbadff77209bf72908874 (diff)
downloadpoky-8401052ffdec4ab104be93f4e94cae038d194ab7.tar.gz
boost: Use PN/BPN for naming of packages
Rework the anon Python so that it doesn't expect to find non-MLPREFIXed FILES overrides which are then mapped into MLPREFIXed versions, this allows the apparent hardcoding of boost-{test,serialization} to be written more naturally (and is significantly less surprising). With this, and a change to lookup ${BPN} when generating split package names, generating an explicitly versioned boost package (e.g. "boost-1.82") alongside the main boost package ("boost") can be done by copying/renaming the older recipe. This is useful when upstream code hasn't yet been ported to newer boost and an older version is required. (From OE-Core rev: b0770990a8b332dd2de802091164c9506882a465) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/boost/boost.inc19
1 files changed, 7 insertions, 12 deletions
diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index b8aba94d9b..ee490cee0a 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -43,6 +43,9 @@ BOOST_LIBS = "\
43 type_erasure \ 43 type_erasure \
44 url \ 44 url \
45 wave \ 45 wave \
46 ${@bb.utils.filter('PACKAGECONFIG', 'locale python', d)} \
47 ${@bb.utils.contains('PACKAGECONFIG', 'graph_parallel', 'graph_parallel mpi', \
48 bb.utils.filter('PACKAGECONFIG', 'mpi', d), d)} \
46 " 49 "
47 50
48# optional libraries 51# optional libraries
@@ -52,12 +55,6 @@ PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich"
52PACKAGECONFIG[mpi] = ",,mpich" 55PACKAGECONFIG[mpi] = ",,mpich"
53PACKAGECONFIG[python] = ",,python3" 56PACKAGECONFIG[python] = ",,python3"
54 57
55BOOST_LIBS += "\
56 ${@bb.utils.filter('PACKAGECONFIG', 'locale python', d)} \
57 ${@bb.utils.contains('PACKAGECONFIG', 'graph_parallel', 'graph_parallel mpi', \
58 bb.utils.filter('PACKAGECONFIG', 'mpi', d), d)} \
59"
60
61inherit python3-dir 58inherit python3-dir
62PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}" 59PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}"
63 60
@@ -70,14 +67,12 @@ python __anonymous () {
70 mlprefix = d.getVar("MLPREFIX") 67 mlprefix = d.getVar("MLPREFIX")
71 for lib in d.getVar('BOOST_LIBS').split(): 68 for lib in d.getVar('BOOST_LIBS').split():
72 extras.append("--with-%s" % lib) 69 extras.append("--with-%s" % lib)
73 pkg = "boost-%s" % (lib.replace("_", "-")) 70 pkg = "%s-%s" % (d.getVar("BPN"), lib.replace("_", "-"))
74 if "-native" in pn: 71 if "-native" in pn:
75 pkg = pkg + "-native" 72 pkg = pkg + "-native"
76 packages.append(mlprefix + pkg) 73 packages.append(mlprefix + pkg)
77 if not d.getVar("FILES:%s" % pkg): 74 if not d.getVar("FILES:%s%s" % (mlprefix, pkg)):
78 d.setVar("FILES:%s%s" % (mlprefix, pkg), "${libdir}/libboost_%s*.so.*" % lib) 75 d.setVar("FILES:%s%s" % (mlprefix, pkg), "${libdir}/libboost_%s*.so.*" % lib)
79 else:
80 d.setVar("FILES:%s%s" % (mlprefix, pkg), d.getVar("FILES:%s" % pkg))
81 76
82 d.setVar("BOOST_PACKAGES", " ".join(packages)) 77 d.setVar("BOOST_PACKAGES", " ".join(packages))
83 d.setVar("BJAM_EXTRA", " ".join(extras)) 78 d.setVar("BJAM_EXTRA", " ".join(extras))
@@ -87,9 +82,9 @@ python __anonymous () {
87FILES:${PN}-graph_parallel = "${libdir}/libboost_graph_parallel.so.*" 82FILES:${PN}-graph_parallel = "${libdir}/libboost_graph_parallel.so.*"
88FILES:${PN}-locale = "${libdir}/libboost_locale.so.*" 83FILES:${PN}-locale = "${libdir}/libboost_locale.so.*"
89FILES:${PN}-mpi = "${libdir}/mpi.so ${libdir}/libboost_mpi*.so.*" 84FILES:${PN}-mpi = "${libdir}/mpi.so ${libdir}/libboost_mpi*.so.*"
90FILES:boost-serialization = "${libdir}/libboost_serialization*.so.* \ 85FILES:${PN}-serialization = "${libdir}/libboost_serialization*.so.* \
91 ${libdir}/libboost_wserialization*.so.*" 86 ${libdir}/libboost_wserialization*.so.*"
92FILES:boost-test = "${libdir}/libboost_prg_exec_monitor*.so.* \ 87FILES:${PN}-test = "${libdir}/libboost_prg_exec_monitor*.so.* \
93 ${libdir}/libboost_unit_test_framework*.so.*" 88 ${libdir}/libboost_unit_test_framework*.so.*"
94 89
95# -dev last to pick up the remaining stuff 90# -dev last to pick up the remaining stuff