[88202] trunk/dports/devel/boost

adfernandes at macports.org adfernandes at macports.org
Wed Dec 21 14:04:34 PST 2011


Revision: 88202
          http://trac.macports.org/changeset/88202
Author:   adfernandes at macports.org
Date:     2011-12-21 14:04:30 -0800 (Wed, 21 Dec 2011)
Log Message:
-----------
devel/boost: should fix #32558 (also mentioned in #32443)

Modified Paths:
--------------
    trunk/dports/devel/boost/Portfile

Added Paths:
-----------
    trunk/dports/devel/boost/files/patch-boost-foreach.diff

Modified: trunk/dports/devel/boost/Portfile
===================================================================
--- trunk/dports/devel/boost/Portfile	2011-12-21 21:46:22 UTC (rev 88201)
+++ trunk/dports/devel/boost/Portfile	2011-12-21 22:04:30 UTC (rev 88202)
@@ -5,7 +5,7 @@
 
 name            boost
 version         1.48.0
-revision        2
+revision        3
 license         Boost-1.0
 categories      devel
 platforms       darwin
@@ -35,7 +35,8 @@
 patchfiles      patch-tools_build_v2_engine_src_build.sh.diff \
                 patch-tools_build_v2_engine_src_build.jam.diff \
                 patch-thread_visibility.diff \
-                patch-bootstrap.sh.diff
+                patch-bootstrap.sh.diff \
+                patch-boost-foreach.diff
 
 post-patch {
     reinplace "s|%%CONFIGURE.CC%%|${configure.cc}|g" ${worksrcpath}/tools/build/v2/engine/build.sh
@@ -155,23 +156,23 @@
     set c [lreplace ${pythons_ports} ${i} ${i}]
     eval [subst {
         variant ${p} description "Build Boost.Python for Python ${v}" conflicts ${c} debug {
-            
+
             # There is a conflict with python and debug support, so we should really change the 'variant' line above
             # to end with "conflicts ${c} debug" above. However, we leave it enabled for those who want to try it.
             # The issue has been reported to both the MacPorts team and the boost team, as per:
             # <http://trac.macports.org/ticket/23667> and <https://svn.boost.org/trac/boost/ticket/4461>
-            
+
             depends_lib-append      port:${p}
             configure.args-delete   --without-libraries=python
             configure.args-append   --with-python=${prefix}/bin/python${v}
-            
+
             patchfiles-append   patch-tools-build-v2-tools-python.jam.diff \
                                 patch-tools-build-v2-tools-python-2.jam.diff
-            
+
             post-patch {
                 reinplace s|@PREFIX@|${prefix}| ${worksrcpath}/tools/build/v2/tools/python.jam
             }
-            
+
         }
     }]
 }
@@ -192,7 +193,7 @@
 }
 
 variant openmpi conflicts debug description {Build Boost.MPI} {
-    
+
     # There is a conflict with python and debug support, so we should really change the 'variant' line above
     # to end with "conflicts debug" above. However, we leave it enabled for those who want to try it.
     # The issue has been reported to both the MacPorts team and the boost team, as per:
@@ -206,22 +207,22 @@
     }
 
     if {![catch python_dir]} {
-        
+
         patchfiles-append patch-libs-mpi-build-Jamfile.v2.diff
-    
+
         post-destroot {
             set site_packages [python_dir]
             xinstall -d ${destroot}${site_packages}/boost
             xinstall -m 644 ${worksrcpath}/libs/mpi/build/__init__.py \
                 ${destroot}${site_packages}/boost
-    
+
             set l ${site_packages}/boost/mpi.so
             move ${destroot}${prefix}/lib/mpi.so ${destroot}${l}
             system "install_name_tool -id ${l} ${destroot}${l}"
         }
 
     }
-    
+
 }
 
 variant regex_match_extra description \

Added: trunk/dports/devel/boost/files/patch-boost-foreach.diff
===================================================================
--- trunk/dports/devel/boost/files/patch-boost-foreach.diff	                        (rev 0)
+++ trunk/dports/devel/boost/files/patch-boost-foreach.diff	2011-12-21 22:04:30 UTC (rev 88202)
@@ -0,0 +1,62 @@
+# https://svn.boost.org/trac/boost/ticket/6131
+# https://svn.boost.org/trac/boost/changeset/75540
+Index: boost/foreach_fwd.hpp
+===================================================================
+--- boost/foreach_fwd.hpp	(revision 62661)
++++ boost/foreach_fwd.hpp	(revision 75540)
+@@ -15,4 +15,6 @@
+ #define BOOST_FOREACH_FWD_HPP
+ 
++#include <utility> // for std::pair
++
+ // This must be at global scope, hence the uglified name
+ enum boost_foreach_argument_dependent_lookup_hack
+@@ -26,4 +28,7 @@
+ namespace foreach
+ {
++    template<typename T>
++    std::pair<T, T> in_range(T begin, T end);
++
+     ///////////////////////////////////////////////////////////////////////////////
+     // boost::foreach::tag
+@@ -47,4 +52,22 @@
+ } // namespace foreach
+ 
++// Workaround for unfortunate https://svn.boost.org/trac/boost/ticket/6131
++namespace BOOST_FOREACH
++{
++    using foreach::in_range;
++    using foreach::tag;
++
++    template<typename T>
++    struct is_lightweight_proxy
++      : foreach::is_lightweight_proxy<T>
++    {};
++
++    template<typename T>
++    struct is_noncopyable
++      : foreach::is_noncopyable<T>
++    {};
++
++} // namespace BOOST_FOREACH
++
+ } // namespace boost
+ 
+Index: boost/foreach.hpp
+===================================================================
+--- boost/foreach.hpp	(revision 75077)
++++ boost/foreach.hpp	(revision 75540)
+@@ -166,5 +166,5 @@
+ //   at the global namespace for your type.
+ template<typename T>
+-inline boost::foreach::is_lightweight_proxy<T> *
++inline boost::BOOST_FOREACH::is_lightweight_proxy<T> *
+ boost_foreach_is_lightweight_proxy(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; }
+ 
+@@ -191,5 +191,5 @@
+ //   at the global namespace for your type.
+ template<typename T>
+-inline boost::foreach::is_noncopyable<T> *
++inline boost::BOOST_FOREACH::is_noncopyable<T> *
+ boost_foreach_is_noncopyable(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; }
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111221/d64a3448/attachment.html>


More information about the macports-changes mailing list