From 8fa2284ca5f198210d353fbbec876c1800a7f029 Mon Sep 17 00:00:00 2001 From: jmmv Date: Sat, 13 Sep 2008 16:14:13 +0000 Subject: Update boost to 1.36.0. Way too many changes since 1.34 to be listed here. Based on patches sent by Brook Milligan through private mail with some minimal changes by me to fix boost-python and builds on Mac OS X. Tested on NetBSD/amd64 current and Tiger. --- meta-pkgs/boost/Makefile | 3 +- meta-pkgs/boost/Makefile.common | 21 +- meta-pkgs/boost/distinfo | 20 +- meta-pkgs/boost/patches/patch-ad | 6 +- meta-pkgs/boost/patches/patch-ah | 33 --- meta-pkgs/boost/patches/patch-al | 42 --- meta-pkgs/boost/patches/patch-am | 13 +- meta-pkgs/boost/patches/patch-an | 160 ---------- meta-pkgs/boost/patches/patch-ao | 556 ----------------------------------- meta-pkgs/boost/patches/patch-ap | 23 ++ meta-pkgs/boost/patches/patch-aq | 13 + meta-pkgs/boost/patches/patch-r42674 | 50 ---- meta-pkgs/boost/patches/patch-r42745 | 13 - 13 files changed, 73 insertions(+), 880 deletions(-) delete mode 100644 meta-pkgs/boost/patches/patch-ah delete mode 100644 meta-pkgs/boost/patches/patch-al delete mode 100644 meta-pkgs/boost/patches/patch-an delete mode 100644 meta-pkgs/boost/patches/patch-ao create mode 100644 meta-pkgs/boost/patches/patch-ap create mode 100644 meta-pkgs/boost/patches/patch-aq delete mode 100644 meta-pkgs/boost/patches/patch-r42674 delete mode 100644 meta-pkgs/boost/patches/patch-r42745 (limited to 'meta-pkgs') diff --git a/meta-pkgs/boost/Makefile b/meta-pkgs/boost/Makefile index ae54b4ab873..086ee8e26e6 100644 --- a/meta-pkgs/boost/Makefile +++ b/meta-pkgs/boost/Makefile @@ -1,9 +1,8 @@ -# $NetBSD: Makefile,v 1.11 2008/06/15 09:51:59 joerg Exp $ +# $NetBSD: Makefile,v 1.12 2008/09/13 16:14:13 jmmv Exp $ # BOOST_PACKAGE= meta-pkg BOOST_COMMENT= (meta package) -PKGREVISION= 3 META_PACKAGE= yes diff --git a/meta-pkgs/boost/Makefile.common b/meta-pkgs/boost/Makefile.common index 2f5359a4146..194cf24d11d 100644 --- a/meta-pkgs/boost/Makefile.common +++ b/meta-pkgs/boost/Makefile.common @@ -1,10 +1,10 @@ -# $NetBSD: Makefile.common,v 1.14 2008/05/26 02:13:22 joerg Exp $ +# $NetBSD: Makefile.common,v 1.15 2008/09/13 16:14:13 jmmv Exp $ # BOOST_PACKAGE?= undefined BOOST_COMMENT?= undefined -BOOST_VERSION= 1.34.1 +BOOST_VERSION= 1.36.0 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.34.0 +CONFLICTS+= boost<1.36.0 DISTINFO_FILE= ${.CURDIR}/../../meta-pkgs/boost/distinfo PATCHDIR= ${.CURDIR}/../../meta-pkgs/boost/patches @@ -34,6 +34,21 @@ USE_TOOLS+= pax USE_LANGUAGES= c c++ GCC_REQD+= 3.2 # if using gcc; ignored otherwise +SUBST_CLASSES+= fix-prefix +SUBST_STAGE.fix-prefix= pre-configure +SUBST_MESSAGE.fix-prefix= Fixing prefix. +SUBST_FILES.fix-prefix= Jamroot +SUBST_VARS.fix-prefix= PREFIX + +.include "../../mk/bsd.prefs.mk" + +.if ${OPSYS} == "Darwin" +# Prevent using a pkgsrc libtool in OS X because the darwin toolset needs +# the native libtool from /usr/bin. +post-wrapper: + @ln -s /usr/bin/libtool ${WRAPPER_BINDIR}/libtool +.endif + # We can't do this at post-extract because the extract cookie will get a # future timestamp than the sources. If this happens, print-PLIST does # not work. diff --git a/meta-pkgs/boost/distinfo b/meta-pkgs/boost/distinfo index b67746c27d3..b2dfbc26993 100644 --- a/meta-pkgs/boost/distinfo +++ b/meta-pkgs/boost/distinfo @@ -1,16 +1,12 @@ -$NetBSD: distinfo,v 1.14 2008/05/01 09:23:49 jmmv Exp $ +$NetBSD: distinfo,v 1.15 2008/09/13 16:14:13 jmmv Exp $ -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 (boost_1_36_0.tar.bz2) = b8f0f5d90b260aff995ef38fad4eee5e73d00810 +RMD160 (boost_1_36_0.tar.bz2) = 0ac38ee3c355c22fd5534bc806bf516890e5182d +Size (boost_1_36_0.tar.bz2) = 28839275 bytes SHA1 (patch-ac) = 453d4107df03e96e66cbdbebceebdfcbed2710c1 -SHA1 (patch-ad) = 074db0bdee7ca145cda2c938626b7d5e3e1e7368 +SHA1 (patch-ad) = cf9811e3ce56e0d32a63eeb86eaf520f730ab70f 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 -SHA1 (patch-r42674) = 1b35084bedbc64307efc6f1c831c611c1167e6bd -SHA1 (patch-r42745) = a3d5024e90446535bdc521060986f352b4401079 +SHA1 (patch-am) = 1b49351c5172903956886959859f4fd97fdf060c +SHA1 (patch-ap) = 41960933cc1b59b13a3346d31393b1ccd917e147 +SHA1 (patch-aq) = e76dbb67925682a8daa2cc5da2f7f127f8f1c346 diff --git a/meta-pkgs/boost/patches/patch-ad b/meta-pkgs/boost/patches/patch-ad index 2ce7e848eca..27fc16ab616 100644 --- a/meta-pkgs/boost/patches/patch-ad +++ b/meta-pkgs/boost/patches/patch-ad @@ -1,8 +1,8 @@ -$NetBSD: patch-ad,v 1.5 2008/01/04 19:58:41 jmmv Exp $ +$NetBSD: patch-ad,v 1.6 2008/09/13 16:14:13 jmmv Exp $ ---- boost/config/suffix.hpp.orig 2007-10-13 15:10:16.000000000 +0200 +--- boost/config/suffix.hpp.orig 2008-07-15 04:41:52.000000000 -0600 +++ boost/config/suffix.hpp -@@ -207,7 +207,7 @@ +@@ -215,7 +215,7 @@ // from here then add to the appropriate compiler section): // #if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \ diff --git a/meta-pkgs/boost/patches/patch-ah b/meta-pkgs/boost/patches/patch-ah deleted file mode 100644 index 0ed927c7f67..00000000000 --- a/meta-pkgs/boost/patches/patch-ah +++ /dev/null @@ -1,33 +0,0 @@ -$NetBSD: patch-ah,v 1.2 2008/01/04 19:58:42 jmmv Exp $ - ---- 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 - # ifdef __DragonFly__ --# define OSMINOR "OS=DRAGONFLYBSD" --# define OS_DRAGONFLYBSD -+# define OSMINOR "OS=DRAGONFLY" -+# define OS_DRAGONFLY - # endif - # ifdef __DGUX__ - # define OSMINOR "OS=DGUX" -@@ -419,7 +419,7 @@ - - # if !defined(OS_BSDI) && \ - !defined(OS_FREEBSD) && \ -- !defined(OS_DRAGONFLYBSD) && \ -+ !defined(OS_DRAGONFLY) && \ - !defined(OS_NEXT) && \ - !defined(OS_MACHTEN) && \ - !defined(OS_MACOSX) && \ -@@ -452,7 +452,7 @@ - defined( __i386__ ) || \ - defined( _M_IX86 ) - # if !defined( OS_FREEBSD ) && \ -- !defined( OS_DRAGONFLYBSD ) && \ -+ !defined( OS_DRAGONFLY ) && \ - !defined( OS_OS2 ) && \ - !defined( OS_AS400 ) - # define OSPLAT "OSPLAT=X86" diff --git a/meta-pkgs/boost/patches/patch-al b/meta-pkgs/boost/patches/patch-al deleted file mode 100644 index 38ec3782917..00000000000 --- a/meta-pkgs/boost/patches/patch-al +++ /dev/null @@ -1,42 +0,0 @@ -$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 - single multi - shared static -+ $(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- 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 index 33c01da41a6..25b4a26e38e 100644 --- a/meta-pkgs/boost/patches/patch-am +++ b/meta-pkgs/boost/patches/patch-am @@ -1,12 +1,13 @@ -$NetBSD: patch-am,v 1.1 2008/01/04 19:58:43 jmmv Exp $ +$NetBSD: patch-am,v 1.2 2008/09/13 16:14:13 jmmv Exp $ ---- tools/build/v2/tools/python.jam.orig 2007-09-22 22:13:17.000000000 +0200 +--- tools/build/v2/tools/python.jam.orig 2008-07-15 09:53:41.000000000 -0400 +++ tools/build/v2/tools/python.jam -@@ -622,6 +622,7 @@ local rule system-library-dependencies ( - - case qnx* : return ; +@@ -649,6 +649,8 @@ local rule system-library-dependencies ( case darwin : return ; -+ case netbsd : return ; case windows : return ; ++ case *bsd : return pthread gcc:util ; ++ case hpux : return rt ; + + case aix : return pthread dl ; diff --git a/meta-pkgs/boost/patches/patch-an b/meta-pkgs/boost/patches/patch-an deleted file mode 100644 index f396ab73481..00000000000 --- a/meta-pkgs/boost/patches/patch-an +++ /dev/null @@ -1,160 +0,0 @@ -$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 - #include - #include -+#include // unary_function, binary_function - #include - #include - #include -@@ -30,6 +31,20 @@ - #endif - #include - -+#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(out_buffer.const_obj_ptr); -+ const BOOST_FUNCTION_STD_NS::type_info& check_type = -+ *static_cast(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(out_buffer.const_obj_ptr); -+ const BOOST_FUNCTION_STD_NS::type_info& check_type = -+ *static_cast(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(&out_buffer.data)->~Functor(); - } else /* op == check_functor_type_tag */ { -- const std::type_info& check_type = -- *static_cast(out_buffer.const_obj_ptr); -+ const BOOST_FUNCTION_STD_NS::type_info& check_type = -+ *static_cast(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(out_buffer.const_obj_ptr); -+ const BOOST_FUNCTION_STD_NS::type_info& check_type = -+ *static_cast(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::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(type.const_obj_ptr); -+ return *static_cast(type.const_obj_ptr); - } - - template -@@ -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 deleted file mode 100644 index 7fdcf451aad..00000000000 --- a/meta-pkgs/boost/patches/patch-ao +++ /dev/null @@ -1,556 +0,0 @@ -$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 - -+#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(&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(&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::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 -+ struct BOOST_FUNCTION_GET_INVOKER { }; -+ -+ /* Retrieve the invoker for a function pointer. */ -+ template<> -+ struct BOOST_FUNCTION_GET_INVOKER -+ { -+ template -+ struct apply -+ { -+ typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER< -+ FunctionPtr, -+ R BOOST_FUNCTION_COMMA -+ BOOST_FUNCTION_TEMPLATE_ARGS -+ >::type -+ invoker_type; -+ -+ typedef functor_manager manager_type; -+ }; -+ }; -+ -+#if BOOST_FUNCTION_NUM_ARGS > 0 -+ /* Retrieve the invoker for a member pointer. */ -+ template<> -+ struct BOOST_FUNCTION_GET_INVOKER -+ { -+ template -+ struct apply -+ { -+ typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER< -+ MemberPtr, -+ R BOOST_FUNCTION_COMMA -+ BOOST_FUNCTION_TEMPLATE_ARGS -+ >::type -+ invoker_type; -+ -+ typedef functor_manager manager_type; -+ }; -+ }; -+#endif -+ -+ /* Retrieve the invoker for a function object. */ -+ template<> -+ struct BOOST_FUNCTION_GET_INVOKER -+ { -+ template -+ 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 manager_type; -+ }; -+ }; -+ -+ /* Retrieve the invoker for a reference to a function object. */ -+ template<> -+ struct BOOST_FUNCTION_GET_INVOKER -+ { -+ template -+ 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 manager_type; -+ }; -+ }; -+ - /** - * vtable for a specific boost::function instance. - */ - template -- 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 -- BOOST_FUNCTION_VTABLE(F f) : vtable_base(), invoker(0) -- { -- init(f); -- } -- -- template -- bool assign_to(F f, function_buffer& functor) -+ bool assign_to(const F& f, function_buffer& functor) const - { - typedef typename get_function_tag::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 -- void init(F f) -- { -- typedef typename get_function_tag::type tag; -- init(f, tag()); -- } -- -+#endif - // Function pointers - template -- 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::manage; -- } -- -- template - 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 -- 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 -- 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 -- 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::manage; -- } -- - // Assign to a function object using the small object optimization - template - 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 - 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::other -@@ -400,7 +513,8 @@ namespace boost { - - template - 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 -- void -- init(const reference_wrapper& /*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::get; -- } -- -- template - bool - assign_to(const reference_wrapper& 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 -+ -+#elif BOOST_FUNCTION_NUM_ARGS == 2 -+ -+ , public std::binary_function -+ -+#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)->invoker -+ return reinterpret_cast(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)->clear(this->functor); -+ reinterpret_cast(vtable)->clear(this->functor); - vtable = 0; - } - } -@@ -650,10 +769,24 @@ namespace boost { - } - - template -- 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::type tag; -+ typedef detail::function::BOOST_FUNCTION_GET_INVOKER get_invoker; -+ typedef typename get_invoker:: -+ template apply -+ 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)->invoker -+ return reinterpret_cast(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 diff --git a/meta-pkgs/boost/patches/patch-ap b/meta-pkgs/boost/patches/patch-ap new file mode 100644 index 00000000000..1fffe735ff4 --- /dev/null +++ b/meta-pkgs/boost/patches/patch-ap @@ -0,0 +1,23 @@ +$NetBSD: patch-ap,v 1.1 2008/09/13 16:14:13 jmmv Exp $ + +--- Jamroot.orig 2008-07-22 06:27:10.000000000 -0600 ++++ Jamroot 2008-08-19 12:59:31.000000000 -0600 +@@ -241,6 +241,10 @@ + ECHO "error: both --with- and --without- specified" ; + EXIT ; + } ++ if $(without-parameter) && $(without-parameter) = "*" ++ { ++ without-parameter = $(existing-libraries) ; ++ } + + local wrong = [ set.difference $(with-parameter) : $(existing-libraries) ] ; + if $(wrong) +@@ -384,6 +388,7 @@ + : $(stage-locate)/lib + on LIB + on ++ @PREFIX@/lib + ; + explicit stage-proper ; + diff --git a/meta-pkgs/boost/patches/patch-aq b/meta-pkgs/boost/patches/patch-aq new file mode 100644 index 00000000000..d83cf163aae --- /dev/null +++ b/meta-pkgs/boost/patches/patch-aq @@ -0,0 +1,13 @@ +$NetBSD: patch-aq,v 1.1 2008/09/13 16:14:13 jmmv Exp $ + +--- boost/test/impl/execution_monitor.ipp.orig 2007-11-25 11:07:19.000000000 -0700 ++++ boost/test/impl/execution_monitor.ipp +@@ -139,7 +139,7 @@ + # define BOOST_TEST_USE_ALT_STACK + # endif + +-# if !defined(__CYGWIN__) && !(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) ++# if !defined(__CYGWIN__) && !(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && !defined(__NetBSD__) + # define BOOST_TEST_CATCH_SIGPOLL + # endif + diff --git a/meta-pkgs/boost/patches/patch-r42674 b/meta-pkgs/boost/patches/patch-r42674 deleted file mode 100644 index c2ae5814ac2..00000000000 --- a/meta-pkgs/boost/patches/patch-r42674 +++ /dev/null @@ -1,50 +0,0 @@ -$NetBSD: patch-r42674,v 1.3 2008/05/01 09:23:49 jmmv Exp $ - -Fix for CVE-2008-0171. Patch from Boost's svn repository, r42674. - ---- boost/regex/v4/basic_regex_parser.hpp (revision 38864) -+++ boost/regex/v4/basic_regex_parser.hpp (revision 42674) -@@ -785,4 +785,5 @@ - case syntax_element_jump: - case syntax_element_startmark: -+ case syntax_element_backstep: - // can't legally repeat any of the above: - fail(regex_constants::error_badrepeat, m_position - m_base); -@@ -1870,4 +1871,5 @@ - { - re_syntax_base* b = this->getaddress(expected_alt_point); -+ // Make sure we have exactly one alternative following this state: - if(b->type != syntax_element_alt) - { -@@ -1878,4 +1880,13 @@ - { - fail(regex_constants::error_bad_pattern, m_position - m_base); -+ return false; -+ } -+ // check for invalid repetition of next state: -+ b = this->getaddress(expected_alt_point); -+ b = this->getaddress(static_cast(b)->next.i, b); -+ if((b->type != syntax_element_assert_backref) -+ && (b->type != syntax_element_startmark)) -+ { -+ fail(regex_constants::error_badrepeat, m_position - m_base); - return false; - } ---- libs/regex/test/regress/test_perl_ex.cpp (revision 30980) -+++ libs/regex/test/regress/test_perl_ex.cpp (revision 42674) -@@ -122,4 +122,15 @@ - TEST_INVALID_REGEX("(?:(a)|b)(?(?<", perl); - TEST_INVALID_REGEX("(?:(a)|b)(?(?