$OpenBSD: patch-include_mapnik_json_geometry_grammar_hpp,v 1.1 2015/07/01 08:45:19 jasper Exp $

From 76f111cc97a86cb029682f92b3d212f105f46aa6 Mon Sep 17 00:00:00 2001
From: Dane Springmeyer <dane@dbsgeo.com>
Date: Sat, 27 Jul 2013 01:57:24 -0400
Subject: [PATCH] support optionally compiling with -std=c++11 on OSX / clang / apple libc++ / boost 1.53 - refs #1683

--- include/mapnik/json/geometry_grammar.hpp.orig	Tue Jun  4 03:35:27 2013
+++ include/mapnik/json/geometry_grammar.hpp	Mon Jun 29 09:08:51 2015
@@ -37,9 +37,58 @@ namespace qi = boost::spirit::qi;
 namespace standard_wide =  boost::spirit::standard_wide;
 using standard_wide::space_type;
 
+#ifdef BOOST_SPIRIT_USE_PHOENIX_V3
 struct push_vertex
 {
+    typedef void result_type;
+
     template <typename T0,typename T1, typename T2, typename T3>
+    result_type operator() (T0 c, T1 path, T2 x, T3 y) const
+    {
+        BOOST_ASSERT( path!=0 );
+        path->push_vertex(x,y,c);
+    }
+};
+
+struct close_path
+{
+    typedef void result_type;
+
+    template <typename T>
+    result_type operator() (T path) const
+    {
+        BOOST_ASSERT( path!=0 );
+        path->close_path();
+    }
+};
+
+struct cleanup
+{
+    typedef void result_type;
+    template <typename T0>
+    void operator() (T0 & path) const
+    {
+        if (path) delete path, path=0;
+    }
+};
+
+struct where_message
+{
+    typedef std::string result_type;
+
+    template <typename Iterator>
+    std::string operator() (Iterator first, Iterator last, std::size_t size) const
+    {
+        std::string str(first, last);
+        if (str.length() > size)
+            return str.substr(0, size) + "..." ;
+        return str;
+    }
+};
+#else
+struct push_vertex
+{
+    template <typename T0,typename T1, typename T2, typename T3>
     struct result
     {
         typedef void type;
@@ -101,12 +150,13 @@ struct where_message
         return str;
     }
 };
+#endif
 
 
 template <typename Iterator>
 struct geometry_grammar :
         qi::grammar<Iterator,qi::locals<int>, void(boost::ptr_vector<mapnik::geometry_type>& )
-                   , space_type>
+        , space_type>
 {
     geometry_grammar();
     qi::rule<Iterator, qi::locals<int>, void(boost::ptr_vector<mapnik::geometry_type>& ),space_type> geometry;
