tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: boost-mpi package

On Thu, 23 Feb 2012 08:55:50 +0100
Thomas Klausner <> wrote:
> The usual solutions is to modify the Makefiles of the package so that
> boost-mpi links against Boost.Serialization from ${PREFIX} instead of
> building it (again).

Of course, boost uses bjam so this is a little tricky.

However, I think the correct solution is to add an option to the boost
packages specifying whether or not to include MPI support.  In this
way, the boost-libs package can be customized either way depending on
the option setting.  I have included a patch below that illustrates how
this would work and will commit this after a bit if there are no
further comments or better ideas.

Note that although adding MPI support to boost also brings in the
parallel graph library, I think calling the option 'mpi' rather than
'parallel-graph' makes sense as it is more general (Boost.MPI may be
used without the graph code) and anyone working with the parallel graph
library will understand that MPI is necessary.  Thoughts?


Index: meta-pkgs/boost/
RCS file: /cvsroot/pkgsrc/meta-pkgs/boost/,v
retrieving revision 1.1
diff -u -r1.1
--- meta-pkgs/boost/  3 Mar 2009 08:57:58 -0000       1.1
+++ meta-pkgs/boost/  23 Feb 2012 16:22:51 -0000
@@ -1,7 +1,7 @@
 # $NetBSD:,v 1.1 2009/03/03 08:57:58 jmmv Exp $
-PKG_SUPPORTED_OPTIONS= debug expat icu
+PKG_SUPPORTED_OPTIONS= debug expat icu mpi 
 .include "../../mk/"
@@ -18,4 +18,15 @@
 .  include "../../textproc/icu/"
+.if !empty(PKG_OPTIONS:Mmpi)
+BJAM_ARGS+=            --user-config=${WRKSRC}/user-config.jam
+PLIST_MPI=             ${PKGDIR}/PLIST.mpi
+       ${ECHO} 'using mpi : ;' > ${WRKSRC}/user-config.jam
+.include "../../mk/"
 .endif # ${BOOST_PACKAGE} == "libs"
Index: devel/boost-libs/Makefile
RCS file: /cvsroot/pkgsrc/devel/boost-libs/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- devel/boost-libs/Makefile   26 Nov 2010 20:47:00 -0000      1.16
+++ devel/boost-libs/Makefile   23 Feb 2012 16:22:51 -0000
@@ -13,6 +13,8 @@
 .include "../../devel/boost-jam/"
+post-configure: mpi-user-config
 do-build: bjam-build
 do-install: boost-install-libs
@@ -21,3 +23,6 @@
 .include "../../devel/zlib/"
 .include "../../mk/"
 .include "../../mk/"
+# XXX - must follow because this is added to the end of the list

Home | Main Index | Thread Index | Old Index