Date: 10 Sep 2012 15:50:10 -0000 From: Michael Gmelin <freebsd@grem.de> To: FreeBSD-gnats-submit@FreeBSD.org Cc: churanov.port.maintainer@gmail.com Subject: ports/171523: [PATCH] devel/boost-libs: Allow building using Clang, C++11 and libc++ Message-ID: <20120910155010.46243.qmail@mail.grem.de> Resent-Message-ID: <201209101600.q8AG0CLu047612@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 171523 >Category: ports >Synopsis: [PATCH] devel/boost-libs: Allow building using Clang, C++11 and libc++ >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Sep 10 16:00:11 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Michael Gmelin >Release: FreeBSD 9.1-RC1 amd64 >Organization: Grem Equity GmbH >Environment: System: FreeBSD clangcompile 9.1-RC1 FreeBSD 9.1-RC1 #1 r240177: Fri Sep 7 14:37:21 UTC 2012 >Description: This brings in the following patches from upstream: https://svn.boost.org/trac/boost/changeset/78286 (compile time) https://svn.boost.org/trac/boost/changeset/79575 (compile time) https://svn.boost.org/trac/boost/changeset/79732 (runtime) Using these patches boost can be compiled and installed and at least one obvious runtime error is corrected. There are more patches that could be imported from upstream, but at this point it seems to make more sense to wait for a new boost release. Caveat: There are probably more compatibility issues in the boost sources, which might surface at runtime, but at least the frequently used parts of boost are made accessible to users of the new GNU free FreeBSD toolchain this way. I also did minor changes to the Makefile structure, so that porttools/portlint won't abort with fatal errors. Added file(s): - files/patch-boost-xpressive-traits-cpp_regex_traits.hpp - files/patch-libs-signals-src-named_slot_map.cpp - files/patch-libs-xpressive-doc-acknowledgements.qbk Port maintainer (churanov.port.maintainer@gmail.com) is cc'd. Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: suffix) >How-To-Repeat: Build boost-libs on 9.1 RC1 using clang and libc++ (CXX=clang++ CXXFLAGS=-std=c++11 -stdlib=libc++) >Fix: Apply patches --- boost-libs-1.48.0_2.patch begins here --- diff -ruN --exclude=CVS ../boost-libs.orig/Makefile ./Makefile --- ../boost-libs.orig/Makefile 2012-09-10 16:52:14.753732697 +0200 +++ ./Makefile 2012-09-10 17:32:01.204350862 +0200 @@ -6,9 +6,9 @@ # PORTNAME= boost-libs -PORTREVISION= 1 +PORTREVISION= 2 + COMMENT= Free portable C++ libraries (without Boost.Python) -USE_BZIP2= yes BUILD_DEPENDS+= bjam:${PORTSDIR}/devel/boost-jam @@ -23,6 +23,8 @@ serialization signals system thread unit_test_framework\ wave wserialization +USE_BZIP2= yes + .include <bsd.port.pre.mk> .include "${PORTSDIR}/devel/boost-all/common.mk" .include "${PORTSDIR}/devel/boost-all/compiled.mk" diff -ruN --exclude=CVS ../boost-libs.orig/files/patch-boost-xpressive-traits-cpp_regex_traits.hpp ./files/patch-boost-xpressive-traits-cpp_regex_traits.hpp --- ../boost-libs.orig/files/patch-boost-xpressive-traits-cpp_regex_traits.hpp 1970-01-01 01:00:00.000000000 +0100 +++ ./files/patch-boost-xpressive-traits-cpp_regex_traits.hpp 2012-09-10 17:08:08.080854719 +0200 @@ -0,0 +1,28 @@ +--- boost/xpressive/traits/cpp_regex_traits.hpp.orig ++++ boost/xpressive/traits/cpp_regex_traits.hpp +@@ -24,6 +24,7 @@ + #include <boost/assert.hpp> + #include <boost/integer.hpp> + #include <boost/mpl/assert.hpp> ++#include <boost/static_assert.hpp> + #include <boost/detail/workaround.hpp> + #include <boost/type_traits/is_same.hpp> + #include <boost/xpressive/detail/detail_fwd.hpp> +@@ -89,7 +90,7 @@ namespace detail + template<umaskex_t In, umaskex_t Out = highest_bit, bool Done = (0 == (Out & In))> + struct unused_mask + { +- BOOST_MPL_ASSERT_RELATION(1, !=, Out); ++ BOOST_STATIC_ASSERT(1 != Out); + BOOST_STATIC_CONSTANT(umaskex_t, value = (unused_mask<In, (Out >> 1)>::value)); + }; + +@@ -121,6 +122,8 @@ namespace detail + umaskex_t const std_ctype_reserved = 0x8000; + #elif defined(_CPPLIB_VER) && defined(BOOST_WINDOWS) + umaskex_t const std_ctype_reserved = 0x8200; ++ #elif defined(_LIBCPP_VERSION) ++ umaskex_t const std_ctype_reserved = 0x8000; + #else + umaskex_t const std_ctype_reserved = 0; + #endif diff -ruN --exclude=CVS ../boost-libs.orig/files/patch-libs-signals-src-named_slot_map.cpp ./files/patch-libs-signals-src-named_slot_map.cpp --- ../boost-libs.orig/files/patch-libs-signals-src-named_slot_map.cpp 1970-01-01 01:00:00.000000000 +0100 +++ ./files/patch-libs-signals-src-named_slot_map.cpp 2012-09-10 17:08:18.683921310 +0200 @@ -0,0 +1,20 @@ +--- libs/signals/src/named_slot_map.cpp.orig ++++ libs/signals/src/named_slot_map.cpp +@@ -102,7 +102,7 @@ void named_slot_map::disconnect(const stored_group& name) + i->first.disconnect(); + i = next; + } +- groups.erase(group); ++ groups.erase((const_group_iterator) group); + } + } + +@@ -125,7 +125,7 @@ void named_slot_map::remove_disconnected_slots() + } + + // Clear out empty groups +- if (empty(g)) groups.erase(g++); ++ if (empty(g)) groups.erase((const_group_iterator) g++); + else ++g; + } + } diff -ruN --exclude=CVS ../boost-libs.orig/files/patch-libs-xpressive-doc-acknowledgements.qbk ./files/patch-libs-xpressive-doc-acknowledgements.qbk --- ../boost-libs.orig/files/patch-libs-xpressive-doc-acknowledgements.qbk 1970-01-01 01:00:00.000000000 +0100 +++ ./files/patch-libs-xpressive-doc-acknowledgements.qbk 2012-09-10 17:08:29.544828493 +0200 @@ -0,0 +1,12 @@ +--- libs/xpressive/doc/acknowledgements.qbk.orig ++++ libs/xpressive/doc/acknowledgements.qbk +@@ -29,6 +29,9 @@ Xpressive's ternary search trie implementation is David's, as is the number + parser example in [^libs/xpressive/example/numbers.cpp] and the documentation + for symbol tables and attributes. + ++Thanks to John Fletcher for helping track down a runtime assertion when using ++xpressive with Howard Hinnant's most excellent libc++. ++ + Finally, I would like to thank [@http://boost.org/people/thomas_witt.html Thomas Witt] + for acting as xpressive's review manager. + --- boost-libs-1.48.0_2.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120910155010.46243.qmail>