[Git][debian-gis-team/mapnik][master] 2 commits: Add upstream patch for Boost 1.73 compatibility. (closes: #975593)

Bas Couwenberg gitlab at salsa.debian.org
Sat Dec 12 12:25:53 GMT 2020



Bas Couwenberg pushed to branch master at Debian GIS Project / mapnik


Commits:
a401f163 by Bas Couwenberg at 2020-12-12T13:05:28+01:00
Add upstream patch for Boost 1.73 compatibility. (closes: #975593)

- - - - -
dacaf98f by Bas Couwenberg at 2020-12-12T13:05:43+01:00
Set distribution to unstable.

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/mapnik-boost173.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,8 +1,10 @@
-mapnik (3.0.23+ds-3) UNRELEASED; urgency=medium
+mapnik (3.0.23+ds-3) unstable; urgency=medium
 
   * Bump Standards-Version to 4.5.1, no changes.
+  * Add upstream patch for Boost 1.73 compatibility.
+    (closes: #975593)
 
- -- Bas Couwenberg <sebastic at debian.org>  Sat, 28 Nov 2020 13:49:47 +0100
+ -- Bas Couwenberg <sebastic at debian.org>  Sat, 12 Dec 2020 13:05:32 +0100
 
 mapnik (3.0.23+ds-2) unstable; urgency=medium
 


=====================================
debian/patches/mapnik-boost173.patch
=====================================
@@ -0,0 +1,474 @@
+Description: Add support for boost 1.73
+Author: Artem Pavlenko <artem at mapnik.org>
+Origin: https://src.fedoraproject.org/rpms/mapnik/blob/master/f/mapnik-boost173.patch
+Bug: https://src.fedoraproject.org/rpms/mapnik/blob/master/f/mapnik-boost173.patch
+
+--- a/include/mapnik/json/feature_generator_grammar.hpp
++++ b/include/mapnik/json/feature_generator_grammar.hpp
+@@ -30,88 +30,86 @@
+ #include <mapnik/json/properties_generator_grammar.hpp>
+ 
+ // boost
++#include <boost/spirit/home/support/attributes.hpp>
+ #include <boost/spirit/include/karma.hpp>
++#include <boost/fusion/include/adapt_adt.hpp>
++#include <boost/spirit/include/support_adapt_adt_attributes.hpp>
++
++namespace mapnik {
++
++struct kv_store
++{
++    using value_type = mapnik::feature_impl::value_type;
++    using iterator_type = mapnik::feature_kv_iterator2;
++    kv_store(mapnik::feature_impl const& f)
++        : start_(mapnik::value_not_null(),f.begin(),f.end()),
++          end_(mapnik::value_not_null(),f.end(),f.end())
++    {}
++    iterator_type start_;
++    iterator_type end_;
++};
++
++}
+ 
+ namespace boost { namespace spirit { namespace traits {
+ 
+ template <>
+-struct is_container<mapnik::feature_impl const> : mpl::false_ {} ;
++struct is_container<mapnik::kv_store const> : mpl::false_ {} ;
+ 
+ template <>
+-struct container_iterator<mapnik::feature_impl const>
++struct container_iterator<mapnik::kv_store const>
+ {
+-    using type = mapnik::feature_kv_iterator2;
++    using type = mapnik::kv_store::iterator_type;
+ };
+ 
+ template <>
+-struct begin_container<mapnik::feature_impl const>
++struct begin_container<mapnik::kv_store const>
+ {
+-    static mapnik::feature_kv_iterator2
+-    call (mapnik::feature_impl const& f)
++    static mapnik::kv_store::iterator_type
++    call (mapnik::kv_store const& kv)
+     {
+-        return mapnik::feature_kv_iterator2(mapnik::value_not_null(),f.begin(),f.end());
++        return kv.start_;
+     }
+ };
+ 
+ template <>
+-struct end_container<mapnik::feature_impl const>
++struct end_container<mapnik::kv_store const>
+ {
+-    static mapnik::feature_kv_iterator2
+-    call (mapnik::feature_impl const& f)
++    static mapnik::kv_store::iterator_type
++    call (mapnik::kv_store const& kv)
+     {
+-        return mapnik::feature_kv_iterator2(mapnik::value_not_null(),f.end(),f.end());
++        return kv.end_;
+     }
+ };
+ 
+-#if BOOST_VERSION >= 106900
+-template <>
+-struct transform_attribute<const mapnik::feature_impl, const mapnik::feature_impl &, boost::spirit::karma::domain, void>
+-    : detail::transform_attribute_base<mapnik::feature_impl const, mapnik::feature_impl const&,  boost::spirit::karma::domain>
+-{};
+-
+-template <>
+-struct transform_attribute<const boost::fusion::cons<const mapnik::feature_impl &, boost::fusion::nil_>, const mapnik::feature_impl &,
+-      boost::spirit::karma::domain, void>
+-    : detail::transform_attribute_base<const boost::fusion::cons<const mapnik::feature_impl &, boost::fusion::nil_>, mapnik::feature_impl const&,  boost::spirit::karma::domain>
+-{};
+-#endif
+ }}}
+ 
+-namespace mapnik { namespace json {
+-
+-namespace karma = boost::spirit::karma;
++BOOST_FUSION_ADAPT_ADT(
++    mapnik::feature_impl,
++    (int, int, obj.id(), /**/)
++    (mapnik::geometry::geometry<double>const&, mapnik::geometry::geometry<double> const&, obj.get_geometry(),/**/)
++    (mapnik::kv_store const, mapnik::kv_store const, mapnik::kv_store(obj), /**/))
+ 
++namespace mapnik { namespace json {
++namespace detail {
+ template <typename T>
+-struct get_id
+-{
+-    using feature_type = T;
+-    using result_type = mapnik::value_integer;
+-    result_type operator() (feature_type const& f) const
+-    {
+-        return f.id();
+-    }
+-};
++#if BOOST_VERSION >= 107000
++struct attribute_type { using type = T();};
++#else
++struct attribute_type { using type = T const&();};
++#endif
++}
+ 
+-struct extract_geometry
+-{
+-    using result_type = mapnik::geometry::geometry<double> const&;
+-    template <typename T>
+-    result_type operator() (T const& f) const
+-    {
+-        return f.get_geometry();
+-    }
+-};
++namespace karma = boost::spirit::karma;
+ 
+ template <typename OutputIterator, typename FeatureType>
+ struct feature_generator_grammar :
+-        karma::grammar<OutputIterator, FeatureType const&()>
++        karma::grammar<OutputIterator, typename detail::attribute_type<FeatureType>::type>
+ {
+     feature_generator_grammar();
+-    karma::rule<OutputIterator, FeatureType const&()> feature;
+-    geometry_generator_grammar<OutputIterator, mapnik::geometry::geometry<double> > geometry;
+-    properties_generator_grammar<OutputIterator, FeatureType> properties;
+-    boost::phoenix::function<get_id<FeatureType> > id_;
+-    boost::phoenix::function<extract_geometry> geom_;
++    karma::rule<OutputIterator, typename detail::attribute_type<FeatureType>::type> feature;
++    geometry_generator_grammar<OutputIterator, mapnik::geometry::geometry<double>> geometry;
++    properties_generator_grammar<OutputIterator, mapnik::kv_store> properties;
+ };
+ 
+ }}
+--- a/include/mapnik/json/feature_generator_grammar_impl.hpp
++++ b/include/mapnik/json/feature_generator_grammar_impl.hpp
+@@ -29,13 +29,11 @@ feature_generator_grammar<OutputIterator
+   : feature_generator_grammar::base_type(feature)
+ {
+     boost::spirit::karma::lit_type lit;
+-    boost::spirit::karma::uint_type uint_;
+-    boost::spirit::karma::_val_type _val;
+-    boost::spirit::karma::_1_type _1;
++    boost::spirit::karma::int_type int_;
+ 
+-    feature = lit("{\"type\":\"Feature\",\"id\":")
+-        << uint_[_1 = id_(_val)]
+-        << lit(",\"geometry\":") << geometry[_1 = geom_(_val)]
++    feature  = lit("{\"type\":\"Feature\"")
++        << lit(",\"id\":") << int_
++        << lit(",\"geometry\":") << geometry
+         << lit(",\"properties\":") << properties
+         << lit('}')
+         ;
+--- a/include/mapnik/json/properties_generator_grammar.hpp
++++ b/include/mapnik/json/properties_generator_grammar.hpp
+@@ -30,6 +30,7 @@
+ #include <mapnik/warning_ignore.hpp>
+ #include <boost/spirit/include/karma.hpp>
+ #include <boost/spirit/include/phoenix_function.hpp>
++#include <boost/spirit/home/karma/domain.hpp>
+ #pragma GCC diagnostic pop
+ 
+ #include <string>
+@@ -50,7 +51,7 @@ struct escaped_string
+ 
+ struct extract_string
+ {
+-    using result_type = std::tuple<std::string,bool>;
++    using result_type = std::tuple<std::string, bool>;
+ 
+     result_type operator() (mapnik::value const& val) const
+     {
+@@ -60,19 +61,17 @@ struct extract_string
+ };
+ 
+ template <typename OutputIterator, typename KeyValueStore>
+-struct properties_generator_grammar : karma::grammar<OutputIterator, KeyValueStore const&()>
+-
++struct properties_generator_grammar
++    : karma::grammar<OutputIterator, KeyValueStore()>
+ {
+     using pair_type = std::tuple<std::string, mapnik::value>;
+     properties_generator_grammar();
+     // rules
+-    karma::rule<OutputIterator, KeyValueStore const&()> properties;
++    karma::rule<OutputIterator, KeyValueStore()> properties;
+     karma::rule<OutputIterator, pair_type()> pair;
+     karma::rule<OutputIterator, std::tuple<std::string,bool>()> value;
+-    karma::rule<OutputIterator, mapnik::value_null()> value_null_;
+-    karma::rule<OutputIterator, mapnik::value_unicode_string()> ustring;
++    //
+     escaped_string<OutputIterator> escaped_string_;
+-    typename karma::int_generator<mapnik::value_integer,10, false> int__;
+     boost::phoenix::function<extract_string> extract_string_;
+     std::string quote_;
+ };
+--- a/include/mapnik/json/properties_generator_grammar_impl.hpp
++++ b/include/mapnik/json/properties_generator_grammar_impl.hpp
+@@ -69,6 +69,7 @@ properties_generator_grammar<OutputItera
+     boost::spirit::karma::string_type kstring;
+     boost::spirit::karma::eps_type eps;
+     using boost::phoenix::at_c;
++
+     properties = lit('{')
+         << -(pair % lit(','))
+         << lit('}')
+@@ -84,7 +85,6 @@ properties_generator_grammar<OutputItera
+         |
+         kstring[_1 = at_c<0>(_val)]
+         ;
+-
+ }
+ 
+ }}
+--- a/include/mapnik/util/spirit_transform_attribute.hpp
++++ /dev/null
+@@ -1,216 +0,0 @@
+-/*****************************************************************************
+- *
+- * This file is part of Mapnik (c++ mapping toolkit)
+- *
+- * Copyright (C) 2015 Artem Pavlenko
+- *
+- * This library is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Lesser General Public
+- * License as published by the Free Software Foundation; either
+- * version 2.1 of the License, or (at your option) any later version.
+- *
+- * This library is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+- * Lesser General Public License for more details.
+- *
+- * You should have received a copy of the GNU Lesser General Public
+- * License along with this library; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+- *
+- *****************************************************************************/
+-
+-#ifndef MAPNIK_UTIL_SPIRIT_TRANSFORM_ATTRIBUTE_HPP
+-#define MAPNIK_UTIL_SPIRIT_TRANSFORM_ATTRIBUTE_HPP
+-
+-#include <mapnik/geometry.hpp>
+-#include <mapnik/util/variant.hpp>
+-
+-#include <cstdint>
+-
+-#pragma GCC diagnostic push
+-#include <mapnik/warning_ignore.hpp>
+-#include <boost/spirit/include/karma.hpp>
+-#pragma GCC diagnostic pop
+-
+-namespace boost { namespace spirit { namespace traits {
+-
+-    template <>
+-    struct transform_attribute<mapnik::geometry::geometry<double> const,
+-                               mapnik::geometry::point<double> const&, karma::domain>
+-    {
+-        using type = mapnik::geometry::point<double> const&;
+-        static type pre(mapnik::geometry::geometry<double> const& geom)
+-        {
+-            return mapnik::util::get<mapnik::geometry::point<double> >(geom);
+-        }
+-    };
+-
+-    template <>
+-    struct transform_attribute<mapnik::geometry::geometry<double> const,
+-                               mapnik::geometry::line_string<double> const&, karma::domain>
+-    {
+-        using type = mapnik::geometry::line_string<double> const&;
+-        static type pre(mapnik::geometry::geometry<double> const& geom)
+-        {
+-            return mapnik::util::get<mapnik::geometry::line_string<double> >(geom);
+-        }
+-    };
+-
+-    template <>
+-    struct transform_attribute<mapnik::geometry::geometry<double> const,
+-                               mapnik::geometry::polygon<double> const&, karma::domain>
+-    {
+-        using type = mapnik::geometry::polygon<double> const&;
+-        static type pre(mapnik::geometry::geometry<double> const& geom)
+-        {
+-            return mapnik::util::get<mapnik::geometry::polygon<double> >(geom);
+-        }
+-    };
+-
+-    template <>
+-    struct transform_attribute<mapnik::geometry::polygon<double> const,
+-                               mapnik::geometry::polygon<double>::rings_container const&, karma::domain>
+-    {
+-        using type = mapnik::geometry::polygon<double>::rings_container const&;
+-        static type pre(mapnik::geometry::polygon<double> const& poly)
+-        {
+-            return poly.interior_rings;
+-        }
+-    };
+-
+-    template <>
+-    struct transform_attribute<mapnik::geometry::geometry<double> const,
+-                               mapnik::geometry::multi_point<double> const&, karma::domain>
+-    {
+-        using type = mapnik::geometry::multi_point<double> const&;
+-        static type pre(mapnik::geometry::geometry<double> const& geom)
+-        {
+-            return mapnik::util::get<mapnik::geometry::multi_point<double> >(geom);
+-        }
+-    };
+-
+-    template <>
+-    struct transform_attribute<mapnik::geometry::geometry<double> const,
+-                               mapnik::geometry::multi_line_string<double> const&, karma::domain>
+-    {
+-        using type = mapnik::geometry::multi_line_string<double> const&;
+-        static type pre(mapnik::geometry::geometry<double> const& geom)
+-        {
+-            return mapnik::util::get<mapnik::geometry::multi_line_string<double> >(geom);
+-        }
+-    };
+-
+-    template <>
+-    struct transform_attribute<mapnik::geometry::geometry<double> const,
+-                               mapnik::geometry::multi_polygon<double> const&, karma::domain>
+-    {
+-        using type = mapnik::geometry::multi_polygon<double> const&;
+-        static type pre(mapnik::geometry::geometry<double> const& geom)
+-        {
+-            return mapnik::util::get<mapnik::geometry::multi_polygon<double> >(geom);
+-        }
+-    };
+-
+-    template <>
+-    struct transform_attribute<mapnik::geometry::geometry<double> const,
+-                               mapnik::geometry::geometry_collection<double> const&, karma::domain>
+-    {
+-        using type = mapnik::geometry::geometry_collection<double> const&;
+-        static type pre(mapnik::geometry::geometry<double> const& geom)
+-        {
+-            return mapnik::util::get<mapnik::geometry::geometry_collection<double> >(geom);
+-        }
+-    };
+-
+-    template <>
+-    struct transform_attribute<mapnik::geometry::geometry<std::int64_t> const,
+-                               mapnik::geometry::point<std::int64_t> const&, karma::domain>
+-    {
+-        using type = mapnik::geometry::point<std::int64_t> const&;
+-        static type pre(mapnik::geometry::geometry<std::int64_t> const& geom)
+-        {
+-            return mapnik::util::get<mapnik::geometry::point<std::int64_t> >(geom);
+-        }
+-    };
+-
+-    template <>
+-    struct transform_attribute<mapnik::geometry::geometry<std::int64_t> const,
+-                               mapnik::geometry::line_string<std::int64_t> const&, karma::domain>
+-    {
+-        using type = mapnik::geometry::line_string<std::int64_t> const&;
+-        static type pre(mapnik::geometry::geometry<std::int64_t> const& geom)
+-        {
+-            return mapnik::util::get<mapnik::geometry::line_string<std::int64_t> >(geom);
+-        }
+-    };
+-
+-    template <>
+-    struct transform_attribute<mapnik::geometry::geometry<std::int64_t> const,
+-                               mapnik::geometry::polygon<std::int64_t> const&, karma::domain>
+-    {
+-        using type = mapnik::geometry::polygon<std::int64_t> const&;
+-        static type pre(mapnik::geometry::geometry<std::int64_t> const& geom)
+-        {
+-            return mapnik::util::get<mapnik::geometry::polygon<std::int64_t> >(geom);
+-        }
+-    };
+-
+-    template <>
+-    struct transform_attribute<mapnik::geometry::polygon<std::int64_t> const,
+-                               mapnik::geometry::polygon<std::int64_t>::rings_container const&, karma::domain>
+-    {
+-        using type = mapnik::geometry::polygon<std::int64_t>::rings_container const&;
+-        static type pre(mapnik::geometry::polygon<std::int64_t> const& poly)
+-        {
+-            return poly.interior_rings;
+-        }
+-    };
+-
+-    template <>
+-    struct transform_attribute<mapnik::geometry::geometry<std::int64_t> const,
+-                               mapnik::geometry::multi_point<std::int64_t> const&, karma::domain>
+-    {
+-        using type = mapnik::geometry::multi_point<std::int64_t> const&;
+-        static type pre(mapnik::geometry::geometry<std::int64_t> const& geom)
+-        {
+-            return mapnik::util::get<mapnik::geometry::multi_point<std::int64_t> >(geom);
+-        }
+-    };
+-
+-    template <>
+-    struct transform_attribute<mapnik::geometry::geometry<std::int64_t> const,
+-                               mapnik::geometry::multi_line_string<std::int64_t> const&, karma::domain>
+-    {
+-        using type = mapnik::geometry::multi_line_string<std::int64_t> const&;
+-        static type pre(mapnik::geometry::geometry<std::int64_t> const& geom)
+-        {
+-            return mapnik::util::get<mapnik::geometry::multi_line_string<std::int64_t> >(geom);
+-        }
+-    };
+-
+-    template <>
+-    struct transform_attribute<mapnik::geometry::geometry<std::int64_t> const,
+-                               mapnik::geometry::multi_polygon<std::int64_t> const&, karma::domain>
+-    {
+-        using type = mapnik::geometry::multi_polygon<std::int64_t> const&;
+-        static type pre(mapnik::geometry::geometry<std::int64_t> const& geom)
+-        {
+-            return mapnik::util::get<mapnik::geometry::multi_polygon<std::int64_t> >(geom);
+-        }
+-    };
+-
+-    template <>
+-    struct transform_attribute<mapnik::geometry::geometry<std::int64_t> const,
+-                               mapnik::geometry::geometry_collection<std::int64_t> const&, karma::domain>
+-    {
+-        using type = mapnik::geometry::geometry_collection<std::int64_t> const&;
+-        static type pre(mapnik::geometry::geometry<std::int64_t> const& geom)
+-        {
+-            return mapnik::util::get<mapnik::geometry::geometry_collection<std::int64_t> >(geom);
+-        }
+-    };
+-
+-}}}
+-
+-#endif // MAPNIK_UTIL_SPIRIT_TRANSFORM_ATTRIBUTE_HPP
+--- a/include/mapnik/wkt/wkt_grammar.hpp
++++ b/include/mapnik/wkt/wkt_grammar.hpp
+@@ -29,6 +29,7 @@
+ #pragma GCC diagnostic push
+ #include <mapnik/warning_ignore.hpp>
+ #include <boost/assert.hpp>
++#include <boost/phoenix/core/reference.hpp>
+ #include <boost/spirit/include/qi.hpp>
+ #include <boost/spirit/include/phoenix_function.hpp>
+ #pragma GCC diagnostic pop
+--- a/src/json/mapnik_json_generator_grammar.cpp
++++ b/src/json/mapnik_json_generator_grammar.cpp
+@@ -29,6 +29,6 @@
+ 
+ using sink_type = std::back_insert_iterator<std::string>;
+ 
+-template struct mapnik::json::properties_generator_grammar<sink_type, mapnik::feature_impl>;
++template struct mapnik::json::properties_generator_grammar<sink_type, mapnik::kv_store>;
+ template struct mapnik::json::feature_generator_grammar<sink_type, mapnik::feature_impl>;
+ template struct mapnik::json::geometry_generator_grammar<sink_type, mapnik::geometry::geometry<double> >;
+--- a/src/tiff_reader.cpp
++++ b/src/tiff_reader.cpp
+@@ -39,6 +39,7 @@ extern "C"
+ #endif
+ 
+ // stl
++#include <algorithm>
+ #include <memory>
+ #include <fstream>
+ 


=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
 0001-Use-pkg-config-to-find-FreeType2-if-available.patch
 libxml2.patch
+mapnik-boost173.patch



View it on GitLab: https://salsa.debian.org/debian-gis-team/mapnik/-/compare/2fe51de0d9579da159cd99bb779b6bc688c7ba4e...dacaf98f62d7dda7ce98e52f4569363b854e3527

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapnik/-/compare/2fe51de0d9579da159cd99bb779b6bc688c7ba4e...dacaf98f62d7dda7ce98e52f4569363b854e3527
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20201212/5bc09049/attachment-0001.html>


More information about the Pkg-grass-devel mailing list