[pkg-boost-commits] r14523 - in boost/trunk/debian: . patches

Steven Michael Robbins smr at alioth.debian.org
Sat Nov 14 19:09:14 UTC 2009


Author: smr
Date: 2009-11-14 19:09:13 +0000 (Sat, 14 Nov 2009)
New Revision: 14523

Added:
   boost/trunk/debian/patches/boost-build-pythonid.patch
Modified:
   boost/trunk/debian/changelog
   boost/trunk/debian/control
   boost/trunk/debian/patches/series
   boost/trunk/debian/rules
Log:
Apply patch from Gaudenz Steinlin to build MPI python lib.

Modified: boost/trunk/debian/changelog
===================================================================
--- boost/trunk/debian/changelog	2009-11-14 16:46:23 UTC (rev 14522)
+++ boost/trunk/debian/changelog	2009-11-14 19:09:13 UTC (rev 14523)
@@ -7,9 +7,18 @@
   * control(libboost1.40-dev): Move libboost-python1.40-dev from Depends
     to Suggests; this is possible now that -dev contains all the header
     files.  Closes: #548503, #549935.
+  
+  * patches/boost-build-pythonid.patch: New (thanks, Gaudenz
+    Steinlin).  Add --pythonid parameter to the build system to only add
+    an identification to Python libraries.
 
- -- Steve M. Robbins <smr at debian.org>  Sat, 14 Nov 2009 10:45:13 -0600
+  * control:
+  * rules: Build libboost-mpi-python1.40.0 and
+    libboost-mpi-python1.40-dev.  Thanks again to Gaudenz Steinlin.
+    Closes: #552014.
 
+ -- Steve M. Robbins <smr at debian.org>  Sat, 14 Nov 2009 12:52:42 -0600
+
 boost1.40 (1.40.0-2) unstable; urgency=low
 
   * rules:

Modified: boost/trunk/debian/control
===================================================================
--- boost/trunk/debian/control	2009-11-14 16:46:23 UTC (rev 14522)
+++ boost/trunk/debian/control	2009-11-14 19:09:13 UTC (rev 14523)
@@ -304,6 +304,38 @@
  objects for collective algorithms, and the use of modern C++ library
  techniques to maintain maximal efficiency.
 
+Package: libboost-mpi-python1.40.0
+Homepage: http://www.boost.org/doc/html/mpi/python.html
+Architecture: any
+Section: python
+Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}
+Description: C++ interface to the Message Passing Interface (MPI), Python Bindings
+ This package forms part of the Boost C++ Libraries collection.
+ .
+ The Boost.MPI library provides a C++ interface to MPI that
+ supports modern C++ development styles, including complete support for
+ user-defined data types and C++ Standard Library types, arbitrary function
+ objects for collective algorithms, and the use of modern C++ library
+ techniques to maintain maximal efficiency.
+ .
+ This package provides Python Bindings to the C++ interface.
+
+Package: libboost-mpi-python1.40-dev
+Homepage: http://www.boost.org/doc/html/mpi/python.html
+Architecture: any
+Section: python
+Depends: ${misc:Depends}, libboost-mpi1.40-dev (= ${binary:Version}), libboost-mpi-python1.40.0 (= ${binary:Version})
+Description: C++ interface to the Message Passing Interface (MPI), Python Bindings
+ This package forms part of the Boost C++ Libraries collection.
+ .
+ The Boost.MPI library provides a C++ interface to MPI that
+ supports modern C++ development styles, including complete support for
+ user-defined data types and C++ Standard Library types, arbitrary function
+ objects for collective algorithms, and the use of modern C++ library
+ techniques to maintain maximal efficiency.
+ .
+ This package provides Python Bindings to the C++ interface.
+
 Package: libboost-program-options1.40.0
 Homepage: http://www.boost.org/libs/program_options/
 Architecture: any

Added: boost/trunk/debian/patches/boost-build-pythonid.patch
===================================================================
--- boost/trunk/debian/patches/boost-build-pythonid.patch	                        (rev 0)
+++ boost/trunk/debian/patches/boost-build-pythonid.patch	2009-11-14 19:09:13 UTC (rev 14523)
@@ -0,0 +1,96 @@
+Add --pythonid parameter to the build system to only add an identification 
+to Python libraries. The existing --buildid parameter adds an id to all 
+libraries and leads to uneccessary duplication of libraries if only the 
+Python version for the build is different.
+
+--- boost_1_40_0/Jamroot	2009-08-23 18:17:37.000000000 +0200
++++ boost1.40-1.40.0/Jamroot	2009-10-21 20:06:00.223496183 +0200
+@@ -339,6 +339,12 @@
+     constant BUILD_ID : [ regex.replace $(build-id) "[*\\/:.\"\' ]" "_" ] ;
+ }
+ 
++# Python build id (only for Python libraries)
++local python-id = [ MATCH "^--pythonid=(.*)" : [ modules.peek : ARGV ] ] ;
++if $(python-id)
++{
++    constant PYTHON_ID : [ regex.replace $(python-id) "[*\\/:.\"\']" "_" ] ;
++}
+ 
+ # This rule is called by Boost.Build to determine the name of target. We use it
+ # to encode the build variant, compiler name and boost version in the target
+--- boost_1_40_0/libs/python/build/Jamfile.v2	2007-11-25 19:38:02.000000000 +0100
++++ boost1.40-1.40.0/libs/python/build/Jamfile.v2	2009-10-21 18:21:56.656818332 +0200
+@@ -3,6 +3,7 @@
+ # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ 
+ import os ;
++import indirect ;
+ import modules ;
+ 
+ import python ;
+@@ -24,8 +25,27 @@
+ 
+ project boost/python
+   : source-location ../src
++  : requirements
++    -<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
++    <tag>@$(__name__).tag
+   ;
+ 
++rule tag ( name : type ? : property-set )
++{
++    local result = $(name) ;
++    if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
++    {
++        if $(name) = boost_python && $(PYTHON_ID)
++        {
++            result = $(result)-$(PYTHON_ID) ;
++        }
++    }
++    
++    # forward to the boost tagging rule
++    return  [ indirect.call $(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag 
++                $(result) : $(type) : $(property-set) ] ;
++}
++
+ rule cond ( test ? : yes * : no * ) { if $(test) { return $(yes) ; } else { return $(no) ; } }
+ rule unless ( test ? : yes * : no * ) { if ! $(test) { return $(yes) ; } else { return $(no) ; } }
+ 
+--- boost_1_40_0/libs/mpi/build/Jamfile.v2	2009-08-06 21:04:54.000000000 +0200
++++ boost1.40-1.40.0/libs/mpi/build/Jamfile.v2	2009-10-21 18:22:35.870246226 +0200
+@@ -9,6 +9,7 @@
+ #           Andrew Lumsdaine
+ 
+ import mpi ;
++import indirect ;
+ import python ;
+ 
+ libraries = ;
+@@ -18,8 +19,27 @@
+ 
+ project boost/mpi
+   : source-location ../src
++  : requirements
++    -<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
++    <tag>@$(__name__).tag
+   ;
+ 
++rule tag ( name : type ? : property-set )
++{
++    local result = $(name) ;
++    if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
++    {
++        if $(name) = boost_mpi_python && $(PYTHON_ID)
++        {
++            result = $(result)-$(PYTHON_ID) ;
++        }
++    }
++    
++    # forward to the boost tagging rule
++    return  [ indirect.call $(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag 
++                $(result) : $(type) : $(property-set) ] ;
++}
++
+ lib boost_mpi 
+   : 
+     broadcast.cpp

Modified: boost/trunk/debian/patches/series
===================================================================
--- boost/trunk/debian/patches/series	2009-11-14 16:46:23 UTC (rev 14522)
+++ boost/trunk/debian/patches/series	2009-11-14 19:09:13 UTC (rev 14523)
@@ -7,3 +7,4 @@
 date_time_date_formatting_hpp.patch
 jam-wall-clean.patch
 sh4.patch
+boost-build-pythonid.patch

Modified: boost/trunk/debian/rules
===================================================================
--- boost/trunk/debian/rules	2009-11-14 16:46:23 UTC (rev 14522)
+++ boost/trunk/debian/rules	2009-11-14 19:09:13 UTC (rev 14523)
@@ -16,19 +16,20 @@
 SHLIBS_VERSION = (>= 1.40.0-1)
 
 # Boost libraries for which we want separate packages
-boost_libs := date-time filesystem graph-parallel graph iostreams math mpi	       \
+boost_libs := date-time filesystem graph-parallel graph iostreams math \
+	mpi mpi-python						       \
 	program-options python regex serialization signals system test \
 	thread wave
 
 # these are special cases, where shared library has not the same name of the Boost library
 boost_lib_math := math_c99 math_c99f math_tr1 math_tr1f
 boost_lib_math_long_double := math_c99l math_tr1l
-#TODO: boost_lib_mpi := mpi mpi_python
 boost_lib_serialization := serialization wserialization
 boost_lib_test := prg_exec_monitor unit_test_framework
 
-# These are special cases for suffixes.  Generally come from --buildid, so begin with a dash.
+# These are special cases for suffixes.  Generally come from --pythonid, so begin with a dash.
 boost_suffixes_python := -py24 -py25
+boost_suffixes_mpi-python := $(boost_suffixes_python)
 
 # Files that are generated by filtering a template
 filtered_files = \
@@ -164,8 +165,11 @@
 	dh_testdir
 
 	$(JAM) --without-python                        
-	$(JAM) --with-python --buildid=py24 python=2.4 
-	$(JAM) --with-python --buildid=py25 python=2.5 
+	$(JAM) --with-python --with-mpi --pythonid=py24 python=2.4
+	# save mpi.so (pythonid is not (yet) used for the python module)
+	mv stage/lib/mpi.so stage/lib/mpi-py24.so
+	$(JAM) --with-python --with-mpi --pythonid=py25 python=2.5 
+	mv stage/lib/mpi.so stage/lib/mpi-py25.so
 
 	cd tools/bcp && $(JAM)
 	cd tools/inspect/build && $(JAM)
@@ -219,8 +223,8 @@
 	@$(call cp_debhelper,libboost-python-dev,libboost-python$(PKGVERSION)-dev)
 
 	$(JAM) --prefix=$(CURDIR)/debian/tmp/usr install --without-python                        
-	$(JAM) --prefix=$(CURDIR)/debian/tmp/usr install --with-python --buildid=py24 python=2.4 
-	$(JAM) --prefix=$(CURDIR)/debian/tmp/usr install --with-python --buildid=py25 python=2.5 
+	$(JAM) --prefix=$(CURDIR)/debian/tmp/usr install --with-python --with-mpi --pythonid=py24 python=2.4 
+	$(JAM) --prefix=$(CURDIR)/debian/tmp/usr install --with-python --with-mpi --pythonid=py25 python=2.5 
 
 	install --mode=755 -D debian/rtupdate debian/tmp/usr/share/python/runtime.d/libboost-python$(PKGVERSION)-dev.rtupdate
 
@@ -305,6 +309,18 @@
 	dh_install -plibboost-mpi$(PKGVERSION)-dev
 	dh_link -plibboost-mpi$(PKGVERSION)-dev
 
+	# package libboost-mpi-python$(SOVERSION)
+	dh_install -plibboost-mpi-python$(SOVERSION)
+	dh_install -plibboost-mpi-python$(SOVERSION) libs/mpi/build/__init__.py usr/lib/python2.4/site-packages/boost
+	dh_install -plibboost-mpi-python$(SOVERSION) libs/mpi/build/__init__.py usr/lib/python2.5/site-packages/boost
+	dh_installdirs -plibboost-mpi-python$(SOVERSION) usr/lib/python2.4/site-packages/boost
+	dh_installdirs -plibboost-mpi-python$(SOVERSION) usr/lib/python2.5/site-packages/boost
+	cp stage/lib/mpi-py24.so debian/libboost-mpi-python$(SOVERSION)/usr/lib/python2.4/site-packages/boost/mpi.so
+	cp stage/lib/mpi-py25.so debian/libboost-mpi-python$(SOVERSION)/usr/lib/python2.5/site-packages/boost/mpi.so
+	# package libboost-mpi-python$(PKGVERSION)-dev
+	dh_install -plibboost-mpi-python$(PKGVERSION)-dev
+	dh_link -plibboost-mpi$(PKGVERSION)-dev
+
 	# package libboost-program-options$(SOVERSION)
 	dh_install -plibboost-program-options$(SOVERSION)
 	# package libboost-program-options$(PKGVERSION)-dev




More information about the pkg-boost-commits mailing list