From: "David Seifert" <soap@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/boost/files/, dev-libs/boost/
Date: Sun, 22 Dec 2019 23:12:40 +0000 (UTC) [thread overview]
Message-ID: <1577056348.af50ab943bce9e10c97e47ea5c7da87e11b51be9.soap@gentoo> (raw)
commit: af50ab943bce9e10c97e47ea5c7da87e11b51be9
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 22 23:12:28 2019 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Dec 22 23:12:28 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af50ab94
dev-libs/boost: Fix Boost.MPI with python
* A big thanks goes out to @pdimov in helping me patch
Boost.Build to produce per py-impl MPI variants.
Closes: boostorg/mpi#112
Closes: https://bugs.gentoo.org/703036
Package-Manager: Portage-2.3.82, Repoman-2.3.20
Signed-off-by: David Seifert <soap <AT> gentoo.org>
dev-libs/boost/boost-1.72.0.ebuild | 21 ++++++++-
.../files/boost-1.72.0-boost-mpi-python.patch | 50 ++++++++++++++++++++++
2 files changed, 70 insertions(+), 1 deletion(-)
diff --git a/dev-libs/boost/boost-1.72.0.ebuild b/dev-libs/boost/boost-1.72.0.ebuild
index ca52c5105fe..3417b408e43 100644
--- a/dev-libs/boost/boost-1.72.0.ebuild
+++ b/dev-libs/boost/boost-1.72.0.ebuild
@@ -56,6 +56,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.71.0-build-auto_index-tool.patch
# Bug 703294, incomplete Boost.Serialization refactoring
"${FILESDIR}"/${PN}-1.72.0-missing-serialization-split_member-include.patch
+ # Bug 703036, per python-impl Boost.MPI
+ "${FILESDIR}"/${PN}-1.72.0-boost-mpi-python.patch
)
python_bindings_needed() {
@@ -217,7 +219,24 @@ multilib_src_install_all() {
rm -r "${ED}"/usr/include/boost/python/numpy* || die
fi
- if ! use python; then
+ if use python; then
+ if use mpi; then
+ move_mpi_py_into_sitedir() {
+ local pyver="${EPYTHON#python}"
+ python_moduleinto boost
+ python_domodule "${ED}"/usr/$(get_libdir)/mpi${pyver/./}.so
+ rm "${ED}"/usr/$(get_libdir)/mpi${pyver/./}* || die
+ dosym mpi${pyver/./}.so $(python_get_sitedir)/boost/mpi.so
+
+ # create a proper python package
+ touch "${D}"/$(python_get_sitedir)/boost/__init__.py || die
+ python_optimize
+ }
+ python_foreach_impl move_mpi_py_into_sitedir
+ else
+ rm -r "${ED}"/usr/include/boost/mpi/python* || die
+ fi
+ else
rm -r "${ED}"/usr/include/boost/{python*,mpi/python*,parameter/aux_/python,parameter/python*} || die
fi
diff --git a/dev-libs/boost/files/boost-1.72.0-boost-mpi-python.patch b/dev-libs/boost/files/boost-1.72.0-boost-mpi-python.patch
new file mode 100644
index 00000000000..8fb164a6278
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.72.0-boost-mpi-python.patch
@@ -0,0 +1,50 @@
+Tag Boost.MPI python impls properly to avoid name clash
+https://github.com/boostorg/mpi/issues/112
+
+--- a/boostcpp.jam
++++ b/boostcpp.jam
+@@ -185,7 +185,7 @@
+
+ rule tag ( name : type ? : property-set )
+ {
+- if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
++ if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB PYTHON_EXTENSION
+ {
+ local args = $(.format-name-args) ;
+ if $(layout) = versioned
+@@ -223,7 +223,7 @@
+ {
+ local result = $(name) ;
+
+- if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
++ if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB PYTHON_EXTENSION
+ {
+ # Add Python version suffix
+
+--- a/libs/mpi/build/Jamfile.v2
++++ b/libs/mpi/build/Jamfile.v2
+@@ -58,13 +58,13 @@
+ rule python-tag ( name : type ? : property-set )
+ {
+ local result = $(name) ;
+- if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
++ if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB PYTHON_EXTENSION
+ {
+ local version = [ $(property-set).get <python> ] ;
+ local lib-suffix = [ version-suffix $(version) ] ;
+ result = $(result)$(lib-suffix) ;
+ }
+- if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB && $(PYTHON_ID)
++ if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB PYTHON_EXTENSION && $(PYTHON_ID)
+ {
+ result = $(result)-$(PYTHON_ID) ;
+ }
+@@ -168,6 +168,8 @@
+ <link>shared:<define>BOOST_PYTHON_DYN_LINK=1
+ <link>shared <runtime-link>shared
+ <python-debugging>on:<define>BOOST_DEBUG_PYTHON
++ -<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
++ <tag>@$(__name__).python-tag
+ ;
+
+ mpi_python_libs = boost_mpi_python mpi ;
next reply other threads:[~2019-12-22 23:12 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-22 23:12 David Seifert [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-07-28 14:15 [gentoo-commits] repo/gentoo:master commit in: dev-libs/boost/files/, dev-libs/boost/ David Seifert
2025-07-22 20:49 Andreas Sturmlechner
2025-05-07 10:50 Sam James
2025-05-07 10:50 Sam James
2025-04-28 14:33 Sam James
2025-04-17 18:37 Fabian Groffen
2025-03-07 13:49 Sam James
2024-05-31 22:38 Sam James
2024-05-20 7:00 Sam James
2024-02-20 20:49 Andreas Sturmlechner
2024-01-23 16:32 David Seifert
2023-12-14 8:12 Sam James
2023-04-30 17:16 Andreas Sturmlechner
2022-12-20 23:57 Sam James
2022-09-10 10:59 Sam James
2022-09-03 20:28 David Seifert
2022-07-06 10:27 Andreas Sturmlechner
2022-07-03 8:33 WANG Xuerui
2022-05-08 13:35 Andreas Sturmlechner
2022-01-15 12:28 David Seifert
2021-11-20 7:07 Sam James
2021-09-05 2:22 Sam James
2021-08-23 16:17 Sam James
2021-05-31 12:15 Sam James
2021-03-21 21:15 Andreas Sturmlechner
2020-12-24 22:14 Andreas K. Hüttel
2020-12-22 21:22 Andreas K. Hüttel
2019-12-29 13:06 David Seifert
2019-04-16 12:09 David Seifert
2018-11-24 19:27 David Seifert
2018-07-31 22:27 Patrick McLean
2017-04-04 17:54 David Seifert
2016-01-27 6:21 Sergey Popov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1577056348.af50ab943bce9e10c97e47ea5c7da87e11b51be9.soap@gentoo \
--to=soap@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox