[120994] trunk/dports/devel/boost

devans at macports.org devans at macports.org
Fri Jun 13 13:00:51 PDT 2014


Revision: 120994
          https://trac.macports.org/changeset/120994
Author:   devans at macports.org
Date:     2014-06-13 13:00:51 -0700 (Fri, 13 Jun 2014)
Log Message:
-----------
boost: fix clang configuration error on OS X versions that use libstdc++ by default, fixes build of libcdr in those cases, see comments for details.

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

Added Paths:
-----------
    trunk/dports/devel/boost/files/patch-apple-clang-no-libcxx.diff

Modified: trunk/dports/devel/boost/Portfile
===================================================================
--- trunk/dports/devel/boost/Portfile	2014-06-13 19:36:01 UTC (rev 120993)
+++ trunk/dports/devel/boost/Portfile	2014-06-13 20:00:51 UTC (rev 120994)
@@ -10,7 +10,7 @@
 
 name            boost
 version         1.55.0
-revision        4
+revision        5
 license         Boost-1
 categories      devel
 platforms       darwin
@@ -42,6 +42,7 @@
                 patch-libs-context-130308-0.diff \
                 patch-bootstrap.sh.diff \
                 patch-boost-archive-interactors-transform_width.hpp.diff \
+                patch-apple-clang-no-libcxx.diff \
                 patch-atomic.diff
                 # patch-boost-archive-interactors-transform_width.hpp.diff
                 # fixes builds using transform_width.hpp with libc++
@@ -55,6 +56,18 @@
                 # https://svn.boost.org/trac/boost/ticket/9670
                 # https://svn.boost.org/trac/boost/ticket/9727
                 #
+                # patch-apple-clang-no-libcxx.diff fixes a clang configuration
+                # error that occurs on OS X 10.7 and 10.8 due to the assumption
+                # that if clang is the compiler in use it must be using libc++.
+                # Apple Clang uses libstdc++ by default on these OS versions.
+                # The patch adds an additional configuration flag in the BOOST
+                # style that is set if Apple clang is being used and the OS version
+                # is 10.8 or less.  This flag is then used to prevent boost or a
+                # dependent package from using functions such as std::forward that
+                # are only available in libc++.  Fixes build of libcdr on these
+                # OS versions without effecting build on 10.6 and less (where clang is not
+                # the default compiler) and 10.9 and up where libc++ is the default.
+                #
                 # patch-atomic.diff can be removed once 1.55.1 or 1.56.0 is released.
 
 post-patch {

Added: trunk/dports/devel/boost/files/patch-apple-clang-no-libcxx.diff
===================================================================
--- trunk/dports/devel/boost/files/patch-apple-clang-no-libcxx.diff	                        (rev 0)
+++ trunk/dports/devel/boost/files/patch-apple-clang-no-libcxx.diff	2014-06-13 20:00:51 UTC (rev 120994)
@@ -0,0 +1,31 @@
+--- boost/config/compiler/clang.hpp.orig	2014-06-13 09:35:07.000000000 -0700
++++ boost/config/compiler/clang.hpp	2014-06-13 09:50:36.000000000 -0700
+@@ -168,6 +168,16 @@
+ #  define BOOST_NO_CXX11_INLINE_NAMESPACES
+ #endif
+ 
++// Apple Clang uses libc++ by default on Mavericks (OS X 10.9)  and higher
++// Apple Clang uses libstdc++ by default on Mountain Lion (OS X 10.8) and lower
++
++#ifdef __APPLE__
++#include <Availability.h>
++#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1080
++#  define BOOST_APPLE_CLANG_NO_LIBCXX
++#endif
++#endif
++
+ // Clang always supports variadic macros
+ // Clang always supports extern templates
+ 
+--- boost/multi_index/detail/vartempl_support.hpp.orig	2014-06-13 09:57:53.000000000 -0700
++++ boost/multi_index/detail/vartempl_support.hpp	2014-06-13 09:59:52.000000000 -0700
+@@ -42,7 +42,8 @@
+ #include <boost/config.hpp>
+ 
+ #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)||\
+-    defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
++    defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)||\
++    defined(BOOST_APPLE_CLANG_NO_LIBCXX)
+ 
+ #include <boost/move/core.hpp>
+ #include <boost/move/utility.hpp>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140613/e93f022c/attachment.html>


More information about the macports-changes mailing list