summaryrefslogtreecommitdiff
path: root/meta-pkgs/boost
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2008-01-04 19:58:39 +0000
committerjmmv <jmmv@pkgsrc.org>2008-01-04 19:58:39 +0000
commit106f6e10a540663e81edcf0839ada919bf2d150b (patch)
tree9b9bd7d108a9bed0659b3ba8104a217cbf9c19d5 /meta-pkgs/boost
parentf3ff9a627fcbd371c3969c7770e0ae8ee559c394 (diff)
downloadpkgsrc-106f6e10a540663e81edcf0839ada919bf2d150b.tar.gz
Update boost to 1.34.1. This is based on the patches provided by Brook Milligan
in PR pkg/36558. Committing it right after the freeze so that we have enough time to resolve the problems that this will surely cause. New Libraries * Foreach Library: BOOST_FOREACH macro for easily iterating over the elements of a sequence, from Eric Niebler. * Statechart Library: Arbitrarily complex finite state machines can be implemented in easily readable and maintainable C++ code, from Andreas Huber. * TR1 Library: An implementation of the C++ Technical Report on Standard Library Extensions, from John Maddock. This library does not itself implement the TR1 components, rather it's a thin wrapper that will include your standard library's TR1 implementation (if it has one), otherwise it will include the Boost Library equivalents, and import them into namespace std::tr1. Highlights include: Reference Wrappers, Smart Pointers, result_of, Function Object Binders, Polymorphic function wrappers, Type Traits, Random Number Generators and Distributions, Tuples, Fixed Size Array, Hash Function Objects, Regular Expressions and Complex Number Additional Algorithms. * Typeof Library: Typeof operator emulation, from Arkadiy Vertleyb and Peder Holt. * Xpressive Library: Regular expressions that can be written as strings or as expression templates, and that can refer to each other and themselves recursively with the power of context-free grammars, from Eric Niebler. Updated Libraries * Assign Library: o Support for ptr_map<key,T> via the new function ptr_map_insert() o Support for initialization of Pointer Containers when the containers hold pointers to an abstract base class. * Date_time library: o Support for new US/Canada timezone rules and other bug fixes. See Change History for details. * Filesystem Library: Major upgrade in preparation for submission to the C++ Standards Committee for TR2. Changes include: o Internationalization, provided by class templates basic_path, basic_filesystem_error, basic_directory_iterator and basic_directory_entry. o Simplification of the path interface by eliminating special constructors to identify native formats. o Rationalization of predicate function design, including the addition of several new functions. o Clearer specification by reference to POSIX, the ISO/IEEE Single Unix Standard, with provisions for Windows and other operating systems. o Preservation of existing user code whenever possible. o More efficient directory iteration. o Addition of a recursive directory iterator. * Function Library: Boost.Function now implements a small buffer optimization, which can drastically improve the performance when copying or constructing Boost.Function objects storing small function objects. For instance, bind(&X:foo, &x, _1, _2) requires no heap allocation when placed into a Boost.Function object. * Functional/Hash Library o Use declarations for standard classes, so that the library doesn't need to include all of their headers o Deprecated the <boost/functional/hash/*.hpp> headers. o Add support for the BOOST_HASH_NO_EXTENSIONS macro, which disables the extensions to TR1 o Minor improvements to the hash functions for floating point numbers. * Graph Library: o edmonds_maximum_cardinality_matching, from Aaron Windsor. o lengauer_tarjan_dominator_tree, from JongSoo Park. o compressed_sparse_row_graph, from Jeremiah Willcock and Douglas Gregor of Indiana University. o sorted_erdos_renyi_iterator, from Jeremiah Willcock of Indiana University. o biconnected_components now supports a visitor and named parameters, from Janusz Piwowarski. o adjacency_matrix now models the Bidirectional Graph concept. o dijkstra_shortest_paths now calls vis.initialize_vertex for each vertex during initialization. o Note: the name of the compiled library for the GraphViz reader has changed to boost_graph (from bgl-viz) to match Boost conventions. o See the complete revision history for more information. * MultiArray Library: Boost.MultiArray now by default provides range-checking for operator[]. Range checking can be disabled by defining the macro BOOST_DISABLE_ASSERTS before including multi_array.hpp. A bug in multi_array::resize() related to storage orders was fixed. * Multi-index Containers Library: o New random access indices. o Non key-based indices feature new rearrange facilities. o This version also includes a number of optimizations and usage improvements. For a complete list of changes, see the library release notes. * Optional Library: o boost::none_t and boost::none now added to Optional's documentation o Relational operators now directly support arguments of type 'T' and 'none_t' o operator->() now also works with reference types. o Helper functions make_optional(val), make_optional(cond,val) and get_optional_value_or(opt,alternative_value) added. o Constructor taking a boolean condition (as well as a value) added. o Member function get_value_or(alternative_value) added. o Incompatbility bug with mpl::apply<> fixed. o Converting assignment bug with uninitialized lvalues fixed. * Parameter Library: o Every ArgumentPack is now a valid MPL Forward Sequence. o Support for unnamed arguments (those whose keyword is deduced from their types) is added. o Support for named and unnamed template arguments is added. o New overload generation macros solve the forwarding problem directly. o See also the Python library changes, below. * Pointer Container Library: o Support for serialization via Boost.Serialization. o Exceptions can be disabled by defining the macro BOOST_PTR_CONTAINER_NO_EXCEPTIONS before including any header. This macro is defined by default if BOOST_NO_EXCEPTIONS is defined. o Additional std::auto_ptr<T> overloads added s.t. one can also pass std::auto_ptr<T> instead of only T* arguments to member functions. o transfer() now has weaker requirements s.t. one can transfer objects from ptr_container<Derived> to ptr_container<Base>, * Python Library: o Boost.Python now automatically appends C++ signatures to docstrings. The new docstring_options.hpp header is available to control the content of docstrings. o stl_input_iterator, for turning a Python iterable object into an STL input iterator, from Eric Niebler. o Support for void* conversions is added. o Integrated support for wrapping C++ functions built with the parameter library; keyword names are automatically known to docsstrings. o Enhancements to the API for better embedding support (boost::python::import(), boost::python::exec() and boost::python::exec_file()). * Signals Library: More improvements to signal invocation performance from Robert Zeh. * Smart Pointers Library: o Allocator support as proposed in N1851 (162 Kb PDF). o pointer_cast and pointer_to_other utilities to allow pointer-independent code, from Ion Gaztanaga. * String Algorithm Library: o lexicographical_compare o join o New comparison predicates is_less, is_not_greater. o Negative indexes support (like Perl) in various algorihtms (*_head/tail, *_nth). * Wave Library: o Wave now correctly recognizes pp-number tokens as mandated by the C++ Standard, which are converted to C++ tokens right before they are returned from the library. o Several new preprocessing hooks have been added. For a complete description please refer to the related documentation page: The Context Policy. o Shared library (dll) support has been added for the generated Wave libraries. o The overall error handling has been improved. It is now possible to recover and continue after an error or a warning was issued. o Support for optional comment and/or full whitespace preservation in the generated output stream has been added. o The Wave library now performs automatic include guard detection to avoid accessing header files more than once, if appropriate. o Full interactive mode has been added to the Wave tool. Now the Wave tool can be used just like Python or Perl for instance to interactively try out your BOOST_PP macros. Additionally it is now possible to load and save the current state of an interactive session (macro tables et.al.). o The overall performance has been improved by upto 40-60%, depending on the concrete files to process. o Support for new pragmas has been added allowing to control certain library features from inside the preprocessed sources (partial output redirection, control of generated whitespace and #line directives). o Optional support for #pragma message "..." has been added. o This version also includes a number of bug fixes and usage improvements. For a complete list of changes, see the libraries change log.
Diffstat (limited to 'meta-pkgs/boost')
-rw-r--r--meta-pkgs/boost/Makefile.common6
-rw-r--r--meta-pkgs/boost/distinfo26
-rw-r--r--meta-pkgs/boost/patches/patch-aa48
-rw-r--r--meta-pkgs/boost/patches/patch-ab13
-rw-r--r--meta-pkgs/boost/patches/patch-ad8
-rw-r--r--meta-pkgs/boost/patches/patch-ae21
-rw-r--r--meta-pkgs/boost/patches/patch-af23
-rw-r--r--meta-pkgs/boost/patches/patch-ag12
-rw-r--r--meta-pkgs/boost/patches/patch-ah10
-rw-r--r--meta-pkgs/boost/patches/patch-ai15
-rw-r--r--meta-pkgs/boost/patches/patch-aj21
-rw-r--r--meta-pkgs/boost/patches/patch-ak8
-rw-r--r--meta-pkgs/boost/patches/patch-al42
-rw-r--r--meta-pkgs/boost/patches/patch-am12
-rw-r--r--meta-pkgs/boost/patches/patch-an160
-rw-r--r--meta-pkgs/boost/patches/patch-ao556
16 files changed, 804 insertions, 177 deletions
diff --git a/meta-pkgs/boost/Makefile.common b/meta-pkgs/boost/Makefile.common
index f80c056bdb7..7e206ae9e33 100644
--- a/meta-pkgs/boost/Makefile.common
+++ b/meta-pkgs/boost/Makefile.common
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile.common,v 1.10 2007/02/22 19:30:05 wiz Exp $
+# $NetBSD: Makefile.common,v 1.11 2008/01/04 19:58:41 jmmv Exp $
#
BOOST_PACKAGE?= undefined
BOOST_COMMENT?= undefined
-BOOST_VERSION= 1.33.1
+BOOST_VERSION= 1.34.1
BOOST_SHORT_VERSION= ${BOOST_VERSION:S/./_/:C/\..*$//}
DISTNAME= boost_${BOOST_VERSION:S/./_/g}
@@ -25,7 +25,7 @@ MAINTAINER= jmmv@NetBSD.org
HOMEPAGE= http://www.boost.org/
COMMENT= Free, peer-reviewed portable C++ source libraries ${BOOST_COMMENT}
-CONFLICTS+= boost<1.32.0
+CONFLICTS+= boost<1.34.0
DISTINFO_FILE= ${.CURDIR}/../../meta-pkgs/boost/distinfo
PATCHDIR= ${.CURDIR}/../../meta-pkgs/boost/patches
diff --git a/meta-pkgs/boost/distinfo b/meta-pkgs/boost/distinfo
index 818a141e3cb..5e09483305f 100644
--- a/meta-pkgs/boost/distinfo
+++ b/meta-pkgs/boost/distinfo
@@ -1,16 +1,14 @@
-$NetBSD: distinfo,v 1.10 2006/09/18 22:51:25 joerg Exp $
+$NetBSD: distinfo,v 1.11 2008/01/04 19:58:41 jmmv Exp $
-SHA1 (boost_1_33_1.tar.bz2) = 22682f75ff0d1ea548688e78c8cca83d599ca576
-RMD160 (boost_1_33_1.tar.bz2) = 3d5999d321b558f74d786bec52ee1b1fcd7e7152
-Size (boost_1_33_1.tar.bz2) = 11507161 bytes
-SHA1 (patch-aa) = 957dad8d5993f0d28b399eedb2d0ae14ecfebc4c
-SHA1 (patch-ab) = 197c51ac67d74923d02f8a9746b5d2e0f7b84736
+SHA1 (boost_1_34_1.tar.bz2) = b771271d5cbd3bdb0f119dd66dfd36bad7a66866
+RMD160 (boost_1_34_1.tar.bz2) = 303327ff852bc19dd7a94657fdef3c56f5882e06
+Size (boost_1_34_1.tar.bz2) = 12986931 bytes
SHA1 (patch-ac) = 453d4107df03e96e66cbdbebceebdfcbed2710c1
-SHA1 (patch-ad) = 4d8bd0cea4b6758d52890cec420892f3ece4ea09
-SHA1 (patch-ae) = e557356101204290a70084eb284d90ce8f4cbd71
-SHA1 (patch-af) = 64a6fa2be7a526a0a3e6f47d5f703d7253a51615
-SHA1 (patch-ag) = 6c862a0f50590327344d6973617ccc56df67fa76
-SHA1 (patch-ah) = e16c08bb0f63e63ae082e9d83c588e3adcf9cb3b
-SHA1 (patch-ai) = 1e2d946090093bb4b9ab8fa78ccfaa0189b1d145
-SHA1 (patch-aj) = 09d27fc296105d3a8141df26ce3e8942ca973746
-SHA1 (patch-ak) = 9eb5353855d2b9b0638c98ab3fce33ac19e0f29a
+SHA1 (patch-ad) = 074db0bdee7ca145cda2c938626b7d5e3e1e7368
+SHA1 (patch-af) = f0a1fc4b9884663fbe5b9613bc61837b8e6e6af1
+SHA1 (patch-ah) = dc5d1d90998aad0f9689470166fd82f1eccdffe3
+SHA1 (patch-ak) = 32785c636ccc9be479db2d40d170f95e77d4e291
+SHA1 (patch-al) = 23756770d17d7958b0b9423e379fe0a1a2dd83f8
+SHA1 (patch-am) = 07f1e1e15d4129c7a8762ad2e81632fdd24e9515
+SHA1 (patch-an) = 91887a9a37e9d891252e0556ee40b58a1c6bc6cf
+SHA1 (patch-ao) = a8499a326f72c9fbfd31f0b0f23014729a2a0dae
diff --git a/meta-pkgs/boost/patches/patch-aa b/meta-pkgs/boost/patches/patch-aa
deleted file mode 100644
index 39dfa037a6a..00000000000
--- a/meta-pkgs/boost/patches/patch-aa
+++ /dev/null
@@ -1,48 +0,0 @@
-$NetBSD: patch-aa,v 1.3 2006/01/20 20:40:19 jmmv Exp $
-
---- tools/build/v1/gcc-tools.jam.orig 2005-11-19 20:21:16.000000000 +0100
-+++ tools/build/v1/gcc-tools.jam
-@@ -123,6 +123,12 @@ else if $(UNIX)
- .GCC ?= cc ;
- .GXX ?= c++ ;
- }
-+ case NetBSD :
-+ {
-+ flags gcc CFLAGS <threading>multi : -pthread ;
-+ flags gcc LINKFLAGS <threading>multi : -lpthread ;
-+ # there is no -lrt on NetBSD
-+ }
- case *BSD :
- {
- flags gcc CFLAGS <threading>multi : -pthread ;
-@@ -179,7 +185,11 @@ if $(UNIX)
- SONAME = -Wl,-soname, ;
- flags gcc OBJCOPY_FLAGS <debug-symbols>on : "--set-section-flags .debug_str=contents,debug" ;
- }
-- case OpenBSD :
-+ case *BSD :
-+ {
-+ SONAME = -Wl,-soname, ;
-+ }
-+ case DragonFly :
- {
- SONAME = -Wl,-soname, ;
- }
-@@ -420,7 +430,7 @@ rule Link-action
- LNOPT on $(<) = "" ;
- }
- # do we use sonames or not?
-- if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES) && ( $(OS) = LINUX || $(OS) = OPENBSD || $(OS) = KFREEBSD ) && ! $(NO_GNU_LN)
-+ if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES) && ( $(OS) = DRAGONFLY || $(OS) = FREEBSD || $(OS) = LINUX || $(OS) = NETBSD || $(OS) = OPENBSD || $(OS) = KFREEBSD ) && ! $(NO_GNU_LN)
- {
- OUTTAG on $(<) = ".$(DLLVERSION)" ;
- SOTAG on $(<) = ".$(DLLVERSION)" ;
-@@ -466,7 +476,7 @@ rule Link-action
- gcc-spawn $(<) ;
- gcc-Link-action $(<) : $(>) ;
-
-- if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES) && ( $(OS) = LINUX || $(OS) = OPENBSD || $(OS) = KFREEBSD ) && ! $(NO_GNU_LN)
-+ if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES) && ( $(OS) = DRAGONFLY || $(OS) = FREEBSD || $(OS) = LINUX || $(OS) = NETBSD || $(OS) = OPENBSD || $(OS) = KFREEBSD ) && ! $(NO_GNU_LN)
- {
- return "$(<[1]).$(DLLVERSION)" ;
- }
diff --git a/meta-pkgs/boost/patches/patch-ab b/meta-pkgs/boost/patches/patch-ab
deleted file mode 100644
index 3d1929058e8..00000000000
--- a/meta-pkgs/boost/patches/patch-ab
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ab,v 1.1 2005/02/26 22:48:34 jmmv Exp $
-
---- libs/config/test/boost_no_cwchar.ipp.orig 2003-10-14 12:33:07.000000000 +0200
-+++ libs/config/test/boost_no_cwchar.ipp
-@@ -18,7 +18,7 @@ int test()
- {
- wchar_t c1[2] = { 0 };
- wchar_t c2[2] = { 0 };
-- if(wcscmp(c1,c2) || wcslen(c1)) return -1;
-+ if(std::wcscmp(c1,c2) || std::wcslen(c1)) return -1;
- wcscpy(c1,c2);
- wcsxfrm(c1,c2,0);
- return 0;
diff --git a/meta-pkgs/boost/patches/patch-ad b/meta-pkgs/boost/patches/patch-ad
index ee5d77c5720..2ce7e848eca 100644
--- a/meta-pkgs/boost/patches/patch-ad
+++ b/meta-pkgs/boost/patches/patch-ad
@@ -1,13 +1,13 @@
-$NetBSD: patch-ad,v 1.4 2006/01/21 09:02:16 jmmv Exp $
+$NetBSD: patch-ad,v 1.5 2008/01/04 19:58:41 jmmv Exp $
---- boost/config/suffix.hpp.orig 2006-01-20 21:59:33.000000000 +0100
+--- boost/config/suffix.hpp.orig 2007-10-13 15:10:16.000000000 +0200
+++ boost/config/suffix.hpp
-@@ -213,7 +213,7 @@
+@@ -207,7 +207,7 @@
// from here then add to the appropriate compiler section):
//
#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
- || defined(_PTHREADS)) && !defined(BOOST_HAS_THREADS)
-+ || defined(_PTHREADS) || defined(__DragonFly__) || defined(__APPLE__)) && !defined(BOOST_HAS_THREADS)
++ || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) && !defined(BOOST_HAS_THREADS)
# define BOOST_HAS_THREADS
#endif
diff --git a/meta-pkgs/boost/patches/patch-ae b/meta-pkgs/boost/patches/patch-ae
deleted file mode 100644
index cb46b29391c..00000000000
--- a/meta-pkgs/boost/patches/patch-ae
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-ae,v 1.4 2006/01/21 10:12:40 jmmv Exp $
-
---- tools/build/v1/darwin-tools.jam.orig 2005-05-11 08:15:20.000000000 +0200
-+++ tools/build/v1/darwin-tools.jam
-@@ -149,6 +149,7 @@ if -bind_at_load in $(.LINKFLAGS)
- .LINKFLAGS = [ difference $(.LINKFLAGS) : -bind_at_load ] ;
- }
- flags darwin LINKFLAGS : $(.LINKFLAGS) ;
-+flags darwin LINKFLAGS : -flat_namespace -undefined suppress ;
-
-
- #### Link ####
-@@ -187,7 +188,7 @@ actions darwin-Link-DyLib-action bind NE
- && \
- $(.GCC_BIN_DIR)$(.GXX) $(LINKFLAGS) -o "$(<[1])" "$(<[1]:S=.lo)" \
- -F$(FRAMEWORKS:D) -framework$(_)$(FRAMEWORKS:D=) \
-- -L"$(LIBPATH:T)" -L"$(STDLIBPATH:T)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) -dynamiclib -install_name "$(<[1]:D=:S=.dylib)" \
-+ -L"$(LIBPATH:T)" -L"$(STDLIBPATH:T)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) -dynamiclib -install_name "$(TARGET_LIBDIR)/$(<[1]:D=:S=.dylib)" \
- && \
- rm -f "$(<[1]:S=.lo)"
- }
diff --git a/meta-pkgs/boost/patches/patch-af b/meta-pkgs/boost/patches/patch-af
index 6c239de3058..288719240bd 100644
--- a/meta-pkgs/boost/patches/patch-af
+++ b/meta-pkgs/boost/patches/patch-af
@@ -1,24 +1,13 @@
-$NetBSD: patch-af,v 1.2 2006/01/20 20:40:19 jmmv Exp $
+$NetBSD: patch-af,v 1.3 2008/01/04 19:58:42 jmmv Exp $
---- boost/config/platform/bsd.hpp.orig 2005-08-24 17:45:17.000000000 +0200
+--- boost/config/platform/bsd.hpp.orig 2006-02-16 12:05:44.000000000 +0100
+++ boost/config/platform/bsd.hpp
-@@ -23,6 +23,10 @@
- #define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__)
- #endif
-
-+#if defined(__DragonFly__)
-+#define _REENTRANT 1
-+#endif
-+
- //
- // is this the correct version check?
- // FreeBSD has <nl_types.h> but does not
-@@ -36,20 +40,20 @@
+@@ -36,20 +36,20 @@
// FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in <pthread.h>
// and not in <unistd.h>
//
--#if defined(__FreeBSD__) && (__FreeBSD__ <= 3)
-+#if defined(__DragonFly__) || defined(__FreeBSD__) && (__FreeBSD__ <= 3)
+-#if (defined(__FreeBSD__) && (__FreeBSD__ <= 3)) || defined(__OpenBSD__)
++#if (defined(__FreeBSD__) && (__FreeBSD__ <= 3)) || defined(__OpenBSD__) || defined(__DragonFly__)
# define BOOST_HAS_PTHREADS
#endif
@@ -26,7 +15,7 @@ $NetBSD: patch-af,v 1.2 2006/01/20 20:40:19 jmmv Exp $
// No wide character support in the BSD header files:
//
-#if !(defined(__FreeBSD__) && (__FreeBSD__ >= 5))
-+#if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5))) && !defined(__DragonFly__)
++#if !(defined(__FreeBSD__) && (__FreeBSD__ >= 5)) && !defined(__DragonFly__)
# define BOOST_NO_CWCHAR
#endif
//
diff --git a/meta-pkgs/boost/patches/patch-ag b/meta-pkgs/boost/patches/patch-ag
deleted file mode 100644
index bf86a0a492e..00000000000
--- a/meta-pkgs/boost/patches/patch-ag
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ag,v 1.3 2006/01/21 09:02:16 jmmv Exp $
-
---- tools/build/v1/boost-base.jam.orig 2006-01-21 00:28:08.000000000 +0100
-+++ tools/build/v1/boost-base.jam
-@@ -2616,6 +2616,7 @@ rule common-variant-tag ( toolset varian
-
- local thread-tag = ;
- if <threading>multi in $(properties) { thread-tag = mt ; }
-+ if $(OS) = MACOSX { thread-tag = mt ; }
-
- local runtime-tag = ;
- if <runtime-link>static in $(properties) { runtime-tag += s ; }
diff --git a/meta-pkgs/boost/patches/patch-ah b/meta-pkgs/boost/patches/patch-ah
index 8ad7606d91d..0ed927c7f67 100644
--- a/meta-pkgs/boost/patches/patch-ah
+++ b/meta-pkgs/boost/patches/patch-ah
@@ -1,7 +1,7 @@
-$NetBSD: patch-ah,v 1.1 2006/01/12 22:48:46 joerg Exp $
+$NetBSD: patch-ah,v 1.2 2008/01/04 19:58:42 jmmv Exp $
---- tools/build/jam_src/jam.h.orig 2006-01-12 21:30:50.000000000 +0000
-+++ tools/build/jam_src/jam.h
+--- tools/jam/src/jam.h.orig 2005-10-16 17:34:27.000000000 +0200
++++ tools/jam/src/jam.h
@@ -250,8 +250,8 @@
# define OS_FREEBSD
# endif
@@ -13,7 +13,7 @@ $NetBSD: patch-ah,v 1.1 2006/01/12 22:48:46 joerg Exp $
# endif
# ifdef __DGUX__
# define OSMINOR "OS=DGUX"
-@@ -415,7 +415,7 @@
+@@ -419,7 +419,7 @@
# if !defined(OS_BSDI) && \
!defined(OS_FREEBSD) && \
@@ -22,7 +22,7 @@ $NetBSD: patch-ah,v 1.1 2006/01/12 22:48:46 joerg Exp $
!defined(OS_NEXT) && \
!defined(OS_MACHTEN) && \
!defined(OS_MACOSX) && \
-@@ -448,7 +448,7 @@
+@@ -452,7 +452,7 @@
defined( __i386__ ) || \
defined( _M_IX86 )
# if !defined( OS_FREEBSD ) && \
diff --git a/meta-pkgs/boost/patches/patch-ai b/meta-pkgs/boost/patches/patch-ai
deleted file mode 100644
index afa27ae3092..00000000000
--- a/meta-pkgs/boost/patches/patch-ai
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-ai,v 1.1 2006/08/24 08:45:35 jmmv Exp $
-
---- boost/python/converter/rvalue_from_python_data.hpp.orig 2006-08-23 23:48:06.000000000 +0200
-+++ boost/python/converter/rvalue_from_python_data.hpp
-@@ -94,7 +94,9 @@ struct rvalue_from_python_data : rvalue_
- # if (!defined(__MWERKS__) || __MWERKS__ >= 0x3000) \
- && (!defined(__EDG_VERSION__) || __EDG_VERSION__ >= 245) \
- && (!defined(__DECCXX_VER) || __DECCXX_VER > 60590014) \
-- && !defined(BOOST_PYTHON_SYNOPSIS) /* Synopsis' OpenCXX has trouble parsing this */
-+ && !defined(BOOST_PYTHON_SYNOPSIS) /* Synopsis' OpenCXX has trouble parsing this */ \
-+ && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, == 4)) \
-+ && !(BOOST_WORKAROUND(__GNUC__, == 4))
- // This must always be a POD struct with m_data its first member.
- BOOST_STATIC_ASSERT(BOOST_PYTHON_OFFSETOF(rvalue_from_python_storage<T>,stage1) == 0);
- # endif
diff --git a/meta-pkgs/boost/patches/patch-aj b/meta-pkgs/boost/patches/patch-aj
deleted file mode 100644
index 04fb3dab277..00000000000
--- a/meta-pkgs/boost/patches/patch-aj
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-aj,v 1.1 2006/08/24 08:45:35 jmmv Exp $
-
---- boost/python/object/instance.hpp.orig 2006-08-23 23:48:06.000000000 +0200
-+++ boost/python/object/instance.hpp
-@@ -41,9 +41,16 @@ struct additional_instance_size
- {
- typedef instance<Data> instance_data;
- typedef instance<char> instance_char;
-+#if !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, == 4)) \
-+ && !(BOOST_WORKAROUND(__GNUC__, == 4))
- BOOST_STATIC_CONSTANT(
- std::size_t, value = sizeof(instance_data)
- - BOOST_PYTHON_OFFSETOF(instance_char,storage));
-+#else
-+ BOOST_STATIC_CONSTANT(
-+ std::size_t, value = sizeof(instance_data)
-+ - (sizeof(PyVarObject) + sizeof(PyObject*) + sizeof(PyObject*) + sizeof(instance_holder*)));
-+#endif
- };
-
- }}} // namespace boost::python::object
diff --git a/meta-pkgs/boost/patches/patch-ak b/meta-pkgs/boost/patches/patch-ak
index 37e4de4262c..046a7c96f48 100644
--- a/meta-pkgs/boost/patches/patch-ak
+++ b/meta-pkgs/boost/patches/patch-ak
@@ -1,13 +1,13 @@
-$NetBSD: patch-ak,v 1.1 2006/09/18 22:51:25 joerg Exp $
+$NetBSD: patch-ak,v 1.2 2008/01/04 19:58:42 jmmv Exp $
---- boost/wave/token_ids.hpp.orig 2006-09-18 22:37:11.000000000 +0000
+--- boost/wave/token_ids.hpp.orig 2006-12-20 17:38:24.000000000 +0100
+++ boost/wave/token_ids.hpp
-@@ -23,7 +23,7 @@
+@@ -27,7 +27,7 @@
#if !defined(BOOST_WAVE_TOKEN_IDS_DEFINED)
#define BOOST_WAVE_TOKEN_IDS_DEFINED
-#if defined (__FreeBSD__) && defined (T_DIVIDE)
-+#if (defined (__FreeBSD__) || defined(__DragonFly__)) && defined (T_DIVIDE)
++#if (defined (__FreeBSD__) || defined (__DragonFly__)) && defined (T_DIVIDE)
#undef T_DIVIDE
#endif
diff --git a/meta-pkgs/boost/patches/patch-al b/meta-pkgs/boost/patches/patch-al
new file mode 100644
index 00000000000..38ec3782917
--- /dev/null
+++ b/meta-pkgs/boost/patches/patch-al
@@ -0,0 +1,42 @@
+$NetBSD: patch-al,v 1.1 2008/01/04 19:58:42 jmmv Exp $
+
+--- Jamfile.v2.orig
++++ Jamfile.v2
+@@ -106,6 +106,9 @@
+
+ constant BOOST_VERSION_TAG : $(version-tag:J="_") ;
+
++local PREFIX = [ os.environ PREFIX ] ;
++local COMPILER_RPATH_FLAG = [ os.environ COMPILER_RPATH_FLAG ] ;
++
+ local default-build ;
+ if $(__file__:D) = ""
+ {
+@@ -113,6 +116,7 @@
+ debug release
+ <threading>single <threading>multi
+ <link>shared <link>static
++ <linkflags>$(COMPILER_RPATH_FLAG)$(PREFIX)/lib
+ ;
+
+ if [ os.name ] = NT
+@@ -215,7 +216,7 @@
+ EXIT ;
+ }
+ local wrong = [ set.difference $(without-parameter) : $(existing-libraries) ] ;
+- if $(wrong)
++ if $(without-parameter) != * && $(wrong)
+ {
+ ECHO "error: wrong library name '$(wrong[1])' in the --without-<library> option." ;
+ EXIT ;
+@@ -225,6 +226,10 @@
+ {
+ return [ set.intersection $(existing-libraries) : $(with-parameter) ] ;
+ }
++ else if $(without-parameter) = *
++ {
++ return [ set.difference "" : "" ] ;
++ }
+ else
+ {
+ return [ set.difference $(existing-libraries) : $(without-parameter) ] ;
diff --git a/meta-pkgs/boost/patches/patch-am b/meta-pkgs/boost/patches/patch-am
new file mode 100644
index 00000000000..33c01da41a6
--- /dev/null
+++ b/meta-pkgs/boost/patches/patch-am
@@ -0,0 +1,12 @@
+$NetBSD: patch-am,v 1.1 2008/01/04 19:58:43 jmmv Exp $
+
+--- tools/build/v2/tools/python.jam.orig 2007-09-22 22:13:17.000000000 +0200
++++ tools/build/v2/tools/python.jam
+@@ -622,6 +622,7 @@ local rule system-library-dependencies (
+
+ case qnx* : return ;
+ case darwin : return ;
++ case netbsd : return ;
+ case windows : return ;
+
+ case hpux : return <library>rt ;
diff --git a/meta-pkgs/boost/patches/patch-an b/meta-pkgs/boost/patches/patch-an
new file mode 100644
index 00000000000..f396ab73481
--- /dev/null
+++ b/meta-pkgs/boost/patches/patch-an
@@ -0,0 +1,160 @@
+$NetBSD: patch-an,v 1.1 2008/01/04 19:58:43 jmmv Exp $
+
+Critical fix for Boost.Function, which addresses a problem in multi-threaded
+applications. Generated from complete file posted at:
+
+http://boost.org/function-1-34-fix/function_base.hpp
+
+--- boost/function/function_base.hpp 2006-10-13 16:29:45.000000000 +0200
++++ boost/function/function_base.hpp 2008-01-04 16:21:22.000000000 +0100
+@@ -15,6 +15,7 @@
+ #include <memory>
+ #include <new>
+ #include <typeinfo>
++#include <functional> // unary_function, binary_function
+ #include <boost/config.hpp>
+ #include <boost/assert.hpp>
+ #include <boost/type_traits/is_integral.hpp>
+@@ -30,6 +31,20 @@
+ #endif
+ #include <boost/function_equal.hpp>
+
++#if defined(BOOST_MSVC)
++# pragma warning( push )
++# pragma warning( disable : 4793 ) // complaint about native code generation
++# pragma warning( disable : 4127 ) // "conditional expression is constant"
++#endif
++
++// Define BOOST_FUNCTION_STD_NS to the namespace that contains type_info.
++#ifdef BOOST_NO_EXCEPTION_STD_NAMESPACE
++// Embedded VC++ does not have type_info in namespace std
++# define BOOST_FUNCTION_STD_NS
++#else
++# define BOOST_FUNCTION_STD_NS std
++#endif
++
+ // Borrowed from Boost.Python library: determines the cases where we
+ // need to use std::type_info::name to compare instead of operator==.
+ # if (defined(__GNUC__) && __GNUC__ >= 3) \
+@@ -59,7 +74,7 @@ namespace boost { namespace python { nam
+
+ #if defined (BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ || defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) \
+- || !(BOOST_STRICT_CONFIG || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540)
++ || !(defined(BOOST_STRICT_CONFIG) || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540)
+ # define BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX
+ #endif
+
+@@ -198,8 +213,8 @@ namespace boost {
+ struct reference_manager
+ {
+ static inline void
+- get(const function_buffer& in_buffer, function_buffer& out_buffer,
+- functor_manager_operation_type op)
++ manage(const function_buffer& in_buffer, function_buffer& out_buffer,
++ functor_manager_operation_type op)
+ {
+ switch (op) {
+ case clone_functor_tag:
+@@ -215,8 +230,8 @@ namespace boost {
+ // DPG TBD: Since we're only storing a pointer, it's
+ // possible that the user could ask for a base class or
+ // derived class. Is that okay?
+- const std::type_info& check_type =
+- *static_cast<const std::type_info*>(out_buffer.const_obj_ptr);
++ const BOOST_FUNCTION_STD_NS::type_info& check_type =
++ *static_cast<const BOOST_FUNCTION_STD_NS::type_info*>(out_buffer.const_obj_ptr);
+ if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(F)))
+ out_buffer.obj_ptr = in_buffer.obj_ptr;
+ else
+@@ -265,8 +280,8 @@ namespace boost {
+ else if (op == destroy_functor_tag)
+ out_buffer.func_ptr = 0;
+ else /* op == check_functor_type_tag */ {
+- const std::type_info& check_type =
+- *static_cast<const std::type_info*>(out_buffer.const_obj_ptr);
++ const BOOST_FUNCTION_STD_NS::type_info& check_type =
++ *static_cast<const BOOST_FUNCTION_STD_NS::type_info*>(out_buffer.const_obj_ptr);
+ if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(Functor)))
+ out_buffer.obj_ptr = &in_buffer.func_ptr;
+ else
+@@ -287,8 +302,8 @@ namespace boost {
+ // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type.
+ reinterpret_cast<functor_type*>(&out_buffer.data)->~Functor();
+ } else /* op == check_functor_type_tag */ {
+- const std::type_info& check_type =
+- *static_cast<const std::type_info*>(out_buffer.const_obj_ptr);
++ const BOOST_FUNCTION_STD_NS::type_info& check_type =
++ *static_cast<const BOOST_FUNCTION_STD_NS::type_info*>(out_buffer.const_obj_ptr);
+ if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(Functor)))
+ out_buffer.obj_ptr = &in_buffer.data;
+ else
+@@ -348,8 +363,8 @@ namespace boost {
+ # endif // BOOST_NO_STD_ALLOCATOR
+ out_buffer.obj_ptr = 0;
+ } else /* op == check_functor_type_tag */ {
+- const std::type_info& check_type =
+- *static_cast<const std::type_info*>(out_buffer.const_obj_ptr);
++ const BOOST_FUNCTION_STD_NS::type_info& check_type =
++ *static_cast<const BOOST_FUNCTION_STD_NS::type_info*>(out_buffer.const_obj_ptr);
+ if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(Functor)))
+ out_buffer.obj_ptr = in_buffer.obj_ptr;
+ else
+@@ -368,6 +383,15 @@ namespace boost {
+ mpl::bool_<(function_allows_small_object_optimization<functor_type>::value)>());
+ }
+
++ // For member pointers, we treat them as function objects with
++ // the small-object optimization always enabled.
++ static inline void
++ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
++ functor_manager_operation_type op, member_ptr_tag)
++ {
++ manager(in_buffer, out_buffer, op, mpl::true_());
++ }
++
+ public:
+ /* Dispatch to an appropriate manager based on whether we have a
+ function pointer or a function object pointer. */
+@@ -456,7 +480,6 @@ namespace boost {
+ */
+ struct vtable_base
+ {
+- vtable_base() : manager(0) { }
+ void (*manager)(const function_buffer& in_buffer,
+ function_buffer& out_buffer,
+ functor_manager_operation_type op);
+@@ -480,13 +503,13 @@ public:
+
+ /** Retrieve the type of the stored function object, or typeid(void)
+ if this is empty. */
+- const std::type_info& target_type() const
++ const BOOST_FUNCTION_STD_NS::type_info& target_type() const
+ {
+ if (!vtable) return typeid(void);
+
+ detail::function::function_buffer type;
+ vtable->manager(functor, type, detail::function::get_functor_type_tag);
+- return *static_cast<const std::type_info*>(type.const_obj_ptr);
++ return *static_cast<const BOOST_FUNCTION_STD_NS::type_info*>(type.const_obj_ptr);
+ }
+
+ template<typename Functor>
+@@ -558,7 +581,7 @@ public:
+ #endif
+
+ public: // should be protected, but GCC 2.95.3 will fail to allow access
+- detail::function::vtable_base* vtable;
++ const detail::function::vtable_base* vtable;
+ mutable detail::function::function_buffer functor;
+ };
+
+@@ -733,4 +756,8 @@ namespace detail {
+ #undef BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL
+ #undef BOOST_FUNCTION_COMPARE_TYPE_ID
+
++#if defined(BOOST_MSVC)
++# pragma warning( pop )
++#endif
++
+ #endif // BOOST_FUNCTION_BASE_HEADER
diff --git a/meta-pkgs/boost/patches/patch-ao b/meta-pkgs/boost/patches/patch-ao
new file mode 100644
index 00000000000..7fdcf451aad
--- /dev/null
+++ b/meta-pkgs/boost/patches/patch-ao
@@ -0,0 +1,556 @@
+$NetBSD: patch-ao,v 1.1 2008/01/04 19:58:43 jmmv Exp $
+
+Critical fix for Boost.Function, which addresses a problem in multi-threaded
+applications. Generated from complete file posted at:
+
+http://boost.org/function-1-34-fix/function_template.hpp
+
+--- boost/function/function_template.hpp 2006-09-29 19:23:28.000000000 +0200
++++ boost/function/function_template.hpp 2008-01-04 16:21:27.000000000 +0100
+@@ -11,6 +11,11 @@
+ // protection.
+ #include <boost/function/detail/prologue.hpp>
+
++#if defined(BOOST_MSVC)
++# pragma warning( push )
++# pragma warning( disable : 4127 ) // "conditional expression is constant"
++#endif
++
+ #define BOOST_FUNCTION_TEMPLATE_PARMS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, typename T)
+
+ #define BOOST_FUNCTION_TEMPLATE_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, T)
+@@ -54,12 +59,20 @@
+ BOOST_JOIN(function_ref_invoker,BOOST_FUNCTION_NUM_ARGS)
+ #define BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER \
+ BOOST_JOIN(void_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS)
++#define BOOST_FUNCTION_MEMBER_INVOKER \
++ BOOST_JOIN(member_invoker,BOOST_FUNCTION_NUM_ARGS)
++#define BOOST_FUNCTION_VOID_MEMBER_INVOKER \
++ BOOST_JOIN(void_member_invoker,BOOST_FUNCTION_NUM_ARGS)
+ #define BOOST_FUNCTION_GET_FUNCTION_INVOKER \
+ BOOST_JOIN(get_function_invoker,BOOST_FUNCTION_NUM_ARGS)
+ #define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER \
+ BOOST_JOIN(get_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS)
+ #define BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER \
+ BOOST_JOIN(get_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS)
++#define BOOST_FUNCTION_GET_MEMBER_INVOKER \
++ BOOST_JOIN(get_member_invoker,BOOST_FUNCTION_NUM_ARGS)
++#define BOOST_FUNCTION_GET_INVOKER \
++ BOOST_JOIN(get_invoker,BOOST_FUNCTION_NUM_ARGS)
+ #define BOOST_FUNCTION_VTABLE BOOST_JOIN(basic_vtable,BOOST_FUNCTION_NUM_ARGS)
+
+ #ifndef BOOST_NO_VOID_RETURNS
+@@ -70,16 +83,6 @@
+ # define BOOST_FUNCTION_RETURN(X) X; return BOOST_FUNCTION_VOID_RETURN_TYPE ()
+ #endif
+
+-#ifdef BOOST_MSVC
+-# pragma warning(push)
+-# pragma warning(disable: 4127) // conditional expression is constant.
+-#endif
+-
+-#ifdef BOOST_MSVC
+-# pragma warning(push)
+-# pragma warning(disable: 4127) // conditional expression is constant.
+-#endif
+-
+ namespace boost {
+ namespace detail {
+ namespace function {
+@@ -191,6 +194,44 @@ namespace boost {
+ }
+ };
+
++#if BOOST_FUNCTION_NUM_ARGS > 0
++ /* Handle invocation of member pointers. */
++ template<
++ typename MemberPtr,
++ typename R BOOST_FUNCTION_COMMA
++ BOOST_FUNCTION_TEMPLATE_PARMS
++ >
++ struct BOOST_FUNCTION_MEMBER_INVOKER
++ {
++ static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
++ BOOST_FUNCTION_PARMS)
++
++ {
++ MemberPtr* f =
++ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
++ return boost::mem_fn(*f)(BOOST_FUNCTION_ARGS);
++ }
++ };
++
++ template<
++ typename MemberPtr,
++ typename R BOOST_FUNCTION_COMMA
++ BOOST_FUNCTION_TEMPLATE_PARMS
++ >
++ struct BOOST_FUNCTION_VOID_MEMBER_INVOKER
++ {
++ static BOOST_FUNCTION_VOID_RETURN_TYPE
++ invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
++ BOOST_FUNCTION_PARMS)
++
++ {
++ MemberPtr* f =
++ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
++ BOOST_FUNCTION_RETURN(boost::mem_fn(*f)(BOOST_FUNCTION_ARGS));
++ }
++ };
++#endif
++
+ template<
+ typename FunctionPtr,
+ typename R BOOST_FUNCTION_COMMA
+@@ -254,12 +295,130 @@ namespace boost {
+ >::type type;
+ };
+
++#if BOOST_FUNCTION_NUM_ARGS > 0
++ /* Retrieve the appropriate invoker for a member pointer. */
++ template<
++ typename MemberPtr,
++ typename R BOOST_FUNCTION_COMMA
++ BOOST_FUNCTION_TEMPLATE_PARMS
++ >
++ struct BOOST_FUNCTION_GET_MEMBER_INVOKER
++ {
++ typedef typename mpl::if_c<(is_void<R>::value),
++ BOOST_FUNCTION_VOID_MEMBER_INVOKER<
++ MemberPtr,
++ R BOOST_FUNCTION_COMMA
++ BOOST_FUNCTION_TEMPLATE_ARGS
++ >,
++ BOOST_FUNCTION_MEMBER_INVOKER<
++ MemberPtr,
++ R BOOST_FUNCTION_COMMA
++ BOOST_FUNCTION_TEMPLATE_ARGS
++ >
++ >::type type;
++ };
++#endif
++
++ /* Given the tag returned by get_function_tag, retrieve the
++ actual invoker that will be used for the given function
++ object.
++
++ Each specialization contains an "apply" nested class template
++ that accepts the function object, return type, function
++ argument types, and allocator. The resulting "apply" class
++ contains two typedefs, "invoker_type" and "manager_type",
++ which correspond to the invoker and manager types. */
++ template<typename Tag>
++ struct BOOST_FUNCTION_GET_INVOKER { };
++
++ /* Retrieve the invoker for a function pointer. */
++ template<>
++ struct BOOST_FUNCTION_GET_INVOKER<function_ptr_tag>
++ {
++ template<typename FunctionPtr,
++ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
++ typename Allocator>
++ struct apply
++ {
++ typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER<
++ FunctionPtr,
++ R BOOST_FUNCTION_COMMA
++ BOOST_FUNCTION_TEMPLATE_ARGS
++ >::type
++ invoker_type;
++
++ typedef functor_manager<FunctionPtr, Allocator> manager_type;
++ };
++ };
++
++#if BOOST_FUNCTION_NUM_ARGS > 0
++ /* Retrieve the invoker for a member pointer. */
++ template<>
++ struct BOOST_FUNCTION_GET_INVOKER<member_ptr_tag>
++ {
++ template<typename MemberPtr,
++ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
++ typename Allocator>
++ struct apply
++ {
++ typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER<
++ MemberPtr,
++ R BOOST_FUNCTION_COMMA
++ BOOST_FUNCTION_TEMPLATE_ARGS
++ >::type
++ invoker_type;
++
++ typedef functor_manager<MemberPtr, Allocator> manager_type;
++ };
++ };
++#endif
++
++ /* Retrieve the invoker for a function object. */
++ template<>
++ struct BOOST_FUNCTION_GET_INVOKER<function_obj_tag>
++ {
++ template<typename FunctionObj,
++ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
++ typename Allocator>
++ struct apply
++ {
++ typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER<
++ FunctionObj,
++ R BOOST_FUNCTION_COMMA
++ BOOST_FUNCTION_TEMPLATE_ARGS
++ >::type
++ invoker_type;
++
++ typedef functor_manager<FunctionObj, Allocator> manager_type;
++ };
++ };
++
++ /* Retrieve the invoker for a reference to a function object. */
++ template<>
++ struct BOOST_FUNCTION_GET_INVOKER<function_obj_ref_tag>
++ {
++ template<typename RefWrapper,
++ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
++ typename Allocator>
++ struct apply
++ {
++ typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER<
++ typename RefWrapper::type,
++ R BOOST_FUNCTION_COMMA
++ BOOST_FUNCTION_TEMPLATE_ARGS
++ >::type
++ invoker_type;
++
++ typedef reference_manager<typename RefWrapper::type> manager_type;
++ };
++ };
++
+ /**
+ * vtable for a specific boost::function instance.
+ */
+ template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
+ typename Allocator>
+- struct BOOST_FUNCTION_VTABLE : vtable_base
++ struct BOOST_FUNCTION_VTABLE
+ {
+ #ifndef BOOST_NO_VOID_RETURNS
+ typedef R result_type;
+@@ -272,50 +431,25 @@ namespace boost {
+ BOOST_FUNCTION_TEMPLATE_ARGS);
+
+ template<typename F>
+- BOOST_FUNCTION_VTABLE(F f) : vtable_base(), invoker(0)
+- {
+- init(f);
+- }
+-
+- template<typename F>
+- bool assign_to(F f, function_buffer& functor)
++ bool assign_to(const F& f, function_buffer& functor) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to(f, functor, tag());
+ }
+
+- void clear(function_buffer& functor)
++ void clear(function_buffer& functor) const
+ {
+- if (manager)
+- manager(functor, functor, destroy_functor_tag);
++ if (base.manager)
++ base.manager(functor, functor, destroy_functor_tag);
+ }
+-
++#ifndef BOOST_NO_PRIVATE_IN_AGGREGATE
+ private:
+- template<typename F>
+- void init(F f)
+- {
+- typedef typename get_function_tag<F>::type tag;
+- init(f, tag());
+- }
+-
++#endif
+ // Function pointers
+ template<typename FunctionPtr>
+- void init(FunctionPtr /*f*/, function_ptr_tag)
+- {
+- typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER<
+- FunctionPtr,
+- R BOOST_FUNCTION_COMMA
+- BOOST_FUNCTION_TEMPLATE_ARGS
+- >::type
+- actual_invoker_type;
+-
+- invoker = &actual_invoker_type::invoke;
+- manager = &functor_manager<FunctionPtr, Allocator>::manage;
+- }
+-
+- template<typename FunctionPtr>
+ bool
+- assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag)
++ assign_to(FunctionPtr f, function_buffer& functor,
++ function_ptr_tag) const
+ {
+ this->clear(functor);
+ if (f) {
+@@ -331,22 +465,13 @@ namespace boost {
+ // Member pointers
+ #if BOOST_FUNCTION_NUM_ARGS > 0
+ template<typename MemberPtr>
+- void init(MemberPtr f, member_ptr_tag)
+- {
+- // DPG TBD: Add explicit support for member function
+- // objects, so we invoke through mem_fn() but we retain the
+- // right target_type() values.
+- this->init(mem_fn(f));
+- }
+-
+- template<typename MemberPtr>
+- bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag)
++ bool
++ assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
+ {
+- // DPG TBD: Add explicit support for member function
+- // objects, so we invoke through mem_fn() but we retain the
+- // right target_type() values.
+ if (f) {
+- this->assign_to(mem_fn(f), functor);
++ // Always use the small-object optimization for member
++ // pointers.
++ assign_functor(f, functor, mpl::true_());
+ return true;
+ } else {
+ return false;
+@@ -355,24 +480,11 @@ namespace boost {
+ #endif // BOOST_FUNCTION_NUM_ARGS > 0
+
+ // Function objects
+- template<typename FunctionObj>
+- void init(FunctionObj /*f*/, function_obj_tag)
+- {
+- typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER<
+- FunctionObj,
+- R BOOST_FUNCTION_COMMA
+- BOOST_FUNCTION_TEMPLATE_ARGS
+- >::type
+- actual_invoker_type;
+-
+- invoker = &actual_invoker_type::invoke;
+- manager = &functor_manager<FunctionObj, Allocator>::manage;
+- }
+-
+ // Assign to a function object using the small object optimization
+ template<typename FunctionObj>
+ void
+- assign_functor(FunctionObj f, function_buffer& functor, mpl::true_)
++ assign_functor(const FunctionObj& f, function_buffer& functor,
++ mpl::true_) const
+ {
+ new ((void*)&functor.data) FunctionObj(f);
+ }
+@@ -380,7 +492,8 @@ namespace boost {
+ // Assign to a function object allocated on the heap.
+ template<typename FunctionObj>
+ void
+- assign_functor(FunctionObj f, function_buffer& functor, mpl::false_)
++ assign_functor(const FunctionObj& f, function_buffer& functor,
++ mpl::false_) const
+ {
+ #ifndef BOOST_NO_STD_ALLOCATOR
+ typedef typename Allocator::template rebind<FunctionObj>::other
+@@ -400,7 +513,8 @@ namespace boost {
+
+ template<typename FunctionObj>
+ bool
+- assign_to(FunctionObj f, function_buffer& functor, function_obj_tag)
++ assign_to(const FunctionObj& f, function_buffer& functor,
++ function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor(f, functor,
+@@ -413,24 +527,9 @@ namespace boost {
+
+ // Reference to a function object
+ template<typename FunctionObj>
+- void
+- init(const reference_wrapper<FunctionObj>& /*f*/, function_obj_ref_tag)
+- {
+- typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER<
+- FunctionObj,
+- R BOOST_FUNCTION_COMMA
+- BOOST_FUNCTION_TEMPLATE_ARGS
+- >::type
+- actual_invoker_type;
+-
+- invoker = &actual_invoker_type::invoke;
+- manager = &reference_manager<FunctionObj>::get;
+- }
+-
+- template<typename FunctionObj>
+ bool
+ assign_to(const reference_wrapper<FunctionObj>& f,
+- function_buffer& functor, function_obj_ref_tag)
++ function_buffer& functor, function_obj_ref_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(f.get_pointer())) {
+ // DPG TBD: We might need to detect constness of
+@@ -445,6 +544,7 @@ namespace boost {
+ }
+
+ public:
++ vtable_base base;
+ invoker_type invoker;
+ };
+ } // end namespace function
+@@ -456,6 +556,17 @@ namespace boost {
+ typename Allocator = BOOST_FUNCTION_DEFAULT_ALLOCATOR
+ >
+ class BOOST_FUNCTION_FUNCTION : public function_base
++
++#if BOOST_FUNCTION_NUM_ARGS == 1
++
++ , public std::unary_function<T0,R>
++
++#elif BOOST_FUNCTION_NUM_ARGS == 2
++
++ , public std::binary_function<T0,T1,R>
++
++#endif
++
+ {
+ public:
+ #ifndef BOOST_NO_VOID_RETURNS
+@@ -537,7 +648,7 @@ namespace boost {
+ if (this->empty())
+ boost::throw_exception(bad_function_call());
+
+- return static_cast<vtable_type*>(vtable)->invoker
++ return reinterpret_cast<const vtable_type*>(vtable)->invoker
+ (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS);
+ }
+ #else
+@@ -561,12 +672,16 @@ namespace boost {
+ operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f)
+ {
+ this->clear();
++#ifndef BOOST_NO_EXCEPTIONS
+ try {
+ this->assign_to(f);
+ } catch (...) {
+ vtable = 0;
+ throw;
+ }
++#else
++ this->assign_to(f);
++#endif
+ return *this;
+ }
+
+@@ -592,12 +707,16 @@ namespace boost {
+ return *this;
+
+ this->clear();
++#ifndef BOOST_NO_EXCEPTIONS
+ try {
+ this->assign_to_own(f);
+ } catch (...) {
+ vtable = 0;
+ throw;
+ }
++#else
++ this->assign_to_own(f);
++#endif
+ return *this;
+ }
+
+@@ -615,7 +734,7 @@ namespace boost {
+ void clear()
+ {
+ if (vtable) {
+- static_cast<vtable_type*>(vtable)->clear(this->functor);
++ reinterpret_cast<const vtable_type*>(vtable)->clear(this->functor);
+ vtable = 0;
+ }
+ }
+@@ -650,10 +769,24 @@ namespace boost {
+ }
+
+ template<typename Functor>
+- void assign_to(Functor f)
++ void assign_to(const Functor& f)
+ {
+- static vtable_type stored_vtable(f);
+- if (stored_vtable.assign_to(f, functor)) vtable = &stored_vtable;
++ using detail::function::vtable_base;
++
++ typedef typename detail::function::get_function_tag<Functor>::type tag;
++ typedef detail::function::BOOST_FUNCTION_GET_INVOKER<tag> get_invoker;
++ typedef typename get_invoker::
++ template apply<Functor, R BOOST_FUNCTION_COMMA
++ BOOST_FUNCTION_TEMPLATE_ARGS, Allocator>
++ handler_type;
++
++ typedef typename handler_type::invoker_type invoker_type;
++ typedef typename handler_type::manager_type manager_type;
++
++ static const vtable_type stored_vtable =
++ { { &manager_type::manage }, &invoker_type::invoke };
++
++ if (stored_vtable.assign_to(f, functor)) vtable = &stored_vtable.base;
+ else vtable = 0;
+ }
+ };
+@@ -688,7 +821,7 @@ namespace boost {
+ if (this->empty())
+ boost::throw_exception(bad_function_call());
+
+- return static_cast<vtable_type*>(vtable)->invoker
++ return reinterpret_cast<const vtable_type*>(vtable)->invoker
+ (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS);
+ }
+ #endif
+@@ -798,21 +931,14 @@ public:
+ }
+ };
+
+-#ifdef BOOST_MSVC
+-# pragma warning(pop)
+-#endif
+-
+ #undef BOOST_FUNCTION_PARTIAL_SPEC
+ #endif // have partial specialization
+
+ } // end namespace boost
+
+-#ifdef BOOST_MSVC
+-# pragma warning(pop)
+-#endif
+-
+ // Cleanup after ourselves...
+ #undef BOOST_FUNCTION_VTABLE
++#undef BOOST_FUNCTION_GET_INVOKER
+ #undef BOOST_FUNCTION_DEFAULT_ALLOCATOR
+ #undef BOOST_FUNCTION_COMMA
+ #undef BOOST_FUNCTION_FUNCTION
+@@ -822,10 +948,12 @@ public:
+ #undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
+ #undef BOOST_FUNCTION_FUNCTION_REF_INVOKER
+ #undef BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER
++#undef BOOST_FUNCTION_MEMBER_INVOKER
++#undef BOOST_FUNCTION_VOID_MEMBER_INVOKER
+ #undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
+ #undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
+ #undef BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER
+-#undef BOOST_FUNCTION_GET_MEM_FUNCTION_INVOKER
++#undef BOOST_FUNCTION_GET_MEMBER_INVOKER
+ #undef BOOST_FUNCTION_TEMPLATE_PARMS
+ #undef BOOST_FUNCTION_TEMPLATE_ARGS
+ #undef BOOST_FUNCTION_PARMS
+@@ -835,3 +963,7 @@ public:
+ #undef BOOST_FUNCTION_ARG_TYPES
+ #undef BOOST_FUNCTION_VOID_RETURN_TYPE
+ #undef BOOST_FUNCTION_RETURN
++
++#if defined(BOOST_MSVC)
++# pragma warning( pop )
++#endif