The attached patch updates mapnik from 3.0.10 to 3.1.0.

  * This resolves the undefined unicode string that broke
    earlier releases of mapnik. 

  * I am unable to figure out how to set the XMLPARSER to
    libxml2 so that OpenStreetMap map files can be parsed
    by mapnik-render.  I've tried setting it in MODSCONS_FLAGS,
    and in this patch set it is currently set in MODSCONS_ENV.
    The XML parsing issue is described at:

       https://github.com/mapnik/mapnik/wiki/InstallationTroubleshooting
diff --git a/graphics/mapnik/Makefile b/graphics/mapnik/Makefile
index 06069ab7617..6413f46db4e 100644
--- a/graphics/mapnik/Makefile
+++ b/graphics/mapnik/Makefile
@@ -1,19 +1,19 @@
 # $OpenBSD: Makefile,v 1.37 2021/02/23 19:39:25 sthen Exp $
 
-BROKEN =       undefined reference to '_ZN6icu_5613UnicodeStringC1EOS0_'
-
 # out of memory, renderer_common/process_group_symbolizer.cpp
 # powerpc &sparc64 OOM's on expression_grammar.cpp
 ONLY_FOR_ARCHS =       amd64
 
 COMMENT =      toolkit for developing mapping applications
 
-DISTNAME =     mapnik-v3.0.10
-PKGNAME =      ${DISTNAME:S/v//}
-EXTRACT_SUFX = .tar.bz2
-REVISION =     5
+V =            3.1.0
+DISTNAME =     mapnik-${V}
+
+GH_ACCOUNT =    mapnik
+GH_PROJECT =    mapnik
+GH_TAGNAME =    v${V}
 
-SHARED_LIBS =  mapnik 3.0 #3.0
+SHARED_LIBS =  mapnik 3.1 #3.1
 CATEGORIES =   graphics geo
 
 HOMEPAGE =     http://mapnik.org/
@@ -23,14 +23,13 @@ DPB_PROPERTIES = nojunk
 # LGPLv2.1
 PERMIT_PACKAGE =       Yes
 
-WANTLIB += X11 Xau Xdmcp Xext Xrender boost_filesystem-mt
-WANTLIB += boost_program_options-mt boost_regex-mt harfbuzz webp
-WANTLIB += boost_system-mt c cairo expat fontconfig freetype 
-WANTLIB += gdal glib-2.0 gobject-2.0 iconv icuuc intl jpeg m pcre pixman-1
-WANTLIB += png>=17.0 pq proj pthread sqlite3 tiff
-WANTLIB += xcb xcb-render xcb-shm z ${COMPILER_LIBCXX}
+WANTLIB += X11 Xau Xdmcp Xext Xrender boost_filesystem
+WANTLIB += boost_program_options boost_regex harfbuzz webp
+WANTLIB += boost_system ffi icudata icui18n c cairo expat fontconfig freetype
+WANTLIB += gdal glib-2.0 gobject-2.0 icuuc intl jpeg m pcre pixman-1
+WANTLIB += png>=17.0 pq pthread sqlite3 tiff
+WANTLIB += xcb xcb-render xcb-shm xml2 z ${COMPILER_LIBCXX}
 
-MASTER_SITES = http://mapnik.s3.amazonaws.com/dist/v3.0.10/
 MODULES =      devel/scons \
                lang/python
 MODPY_VERSION =        ${MODPY_DEFAULT_VERSION_2}
@@ -42,14 +41,16 @@ MODGCC4_ARCHS =     amd64 i386 powerpc sparc64
 TEST_DEPENDS = shells/bash \
                ${BUILD_PKGPATH}
 
+BUILD_DEPENDS = geo/osrm-backend
+
 LIB_DEPENDS =  devel/boost>=1.58 \
                databases/sqlite3 \
                graphics/cairo \
                graphics/libwebp \
-               devel/proj \
                devel/harfbuzz \
                geo/gdal \
-               textproc/icu4c
+               textproc/icu4c \
+               textproc/libxml
 
 # Scons sucks. Use WARNING_CXXFLAGS as a way to pass freetype2 includes
 MODSCONS_FLAGS =       PREFIX="${TRUEPREFIX}" \
@@ -61,8 +62,12 @@ MODSCONS_FLAGS =     PREFIX="${TRUEPREFIX}" \
                        WARNING_CXXFLAGS="-I${X11BASE}/include/freetype2" \
                        SYSTEM_FONTS=${X11BASE}/lib/X11/fonts/TTF/ \
                        FAST=yes \
+                       CUSTOM_LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
                        INPUT_PLUGINS=raster,postgis,shape,gdal,ogr,sqlite
 
+MODSCONS_ENV =         XMLPARSER=libxml2
+
+
 pre-configure:
        # subst shlib version
        ${SUBST_CMD} ${WRKSRC}/src/build.py
diff --git a/graphics/mapnik/distinfo b/graphics/mapnik/distinfo
index a85213a8ed8..124442ccf58 100644
--- a/graphics/mapnik/distinfo
+++ b/graphics/mapnik/distinfo
@@ -1,2 +1,2 @@
-SHA256 (mapnik-v3.0.10.tar.bz2) = NkC87Bl6NO4HgVPmZ8NEM9pbceAvH6fBSAEtl702qjk=
-SIZE (mapnik-v3.0.10.tar.bz2) = 86209028
+SHA256 (mapnik-3.1.0.tar.gz) = R8RLUIqZEIDcCj1CKa30vf+C/KjXv5QYVkRHVHeutl4=
+SIZE (mapnik-3.1.0.tar.gz) = 10473693
diff --git a/graphics/mapnik/patches/patch-SConstruct 
b/graphics/mapnik/patches/patch-SConstruct
index 6646a9a0c61..d3982ff3403 100644
--- a/graphics/mapnik/patches/patch-SConstruct
+++ b/graphics/mapnik/patches/patch-SConstruct
@@ -1,8 +1,8 @@
 $OpenBSD: patch-SConstruct,v 1.7 2016/09/04 16:46:57 landry Exp $
 2nd chunk is needed for proper boost_thread detection
---- SConstruct.orig    Fri Feb 26 03:02:05 2016
-+++ SConstruct Sun Sep  4 17:29:08 2016
-@@ -290,7 +290,7 @@ opts.AddVariables(
+--- SConstruct.orig    Fri Jan  8 06:20:06 2021
++++ SConstruct Sat May 15 02:43:25 2021
+@@ -297,7 +297,7 @@
      ('CUSTOM_LDFLAGS', 'Custom linker flags, e.g. -L<lib dir> if you have 
libraries in a nonstandard directory <lib dir>', ''),
      EnumVariable('LINKING', "Set library format for libmapnik",'shared', 
['shared','static']),
      EnumVariable('RUNTIME_LINK', "Set preference for linking 
dependencies",'shared', ['shared','static']),
@@ -10,14 +10,13 @@ $OpenBSD: patch-SConstruct,v 1.7 2016/09/04 16:46:57 landry 
Exp $
 +    EnumVariable('OPTIMIZATION','Set compiler optimization level','2', 
['0','1','2','3','4','s']),
      # Note: setting DEBUG=True will override any custom OPTIMIZATION level
      BoolVariable('DEBUG', 'Compile a debug version of Mapnik', 'False'),
-     BoolVariable('DEBUG_UNDEFINED', 'Compile a version of Mapnik using 
clang/llvm undefined behavior asserts', 'False'),
-@@ -1415,6 +1415,9 @@ if not preconfigured:
-             # of attaching to cxxflags after configure
-             if env['PLATFORM'] == 'SunOS':
-                 env.Append(CXXFLAGS = '-pthreads')
-+            if env['PLATFORM'] == 'OpenBSD':
-+                env.Append(CXXFLAGS = '-pthread')
-+
+     BoolVariable('COVERAGE', 'Compile a libmapnik and plugins with 
--coverage', 'False'),
+@@ -1363,7 +1363,7 @@
+     ### platform specific bits
+ 
+     thread_suffix = 'mt'
+-    if env['PLATFORM'] == 'FreeBSD':
++    if env['PLATFORM'] == 'FreeBSD' or env['PLATFORM'] == 'OpenBSD':
+         thread_suffix = ''
+         env.Append(LIBS = 'pthread')
  
-         # if requested, sort LIBPATH and CPPPATH before running 
CheckLibWithHeader tests
-         if env['PRIORITIZE_LINKING']:
diff --git a/graphics/mapnik/patches/patch-test_run 
b/graphics/mapnik/patches/patch-test_run
index 762b6788d23..e07379c18a9 100644
--- a/graphics/mapnik/patches/patch-test_run
+++ b/graphics/mapnik/patches/patch-test_run
@@ -1,17 +1,18 @@
 $OpenBSD: patch-test_run,v 1.1 2015/09/18 20:07:09 landry Exp $
 find -quit is only in gfind
---- test/run.orig      Sat Aug  8 17:20:43 2015
-+++ test/run   Sat Aug  8 17:20:55 2015
-@@ -19,12 +19,10 @@ if [ -d "test/data" ]; then
-     failures=$((failures+$?))
+--- test/run.orig      Fri Jan  8 06:20:06 2021
++++ test/run   Sat May 15 02:34:08 2021
+@@ -29,13 +29,11 @@
  
      run_substep "Running standalone C++ tests..."
+     found_test=false
 -    if [ -n "$(find test/standalone/ -maxdepth 1 -name '*-bin' -print -quit)" 
]; then
          for FILE in test/standalone/*-bin; do
-             ${FILE};
-           failures=$((failures+$?))
+           found_test=true
+           ran_a_test=true
+           ${FILE} || failures=$((failures+$?))
          done
 -    fi
- 
-     if [ -d "test/data-visual/styles" ]; then
-         run_substep "Running visual tests..."
+     if [[ $found_test == false ]]; then
+         run_warn "Skipping standalone tests since they were not built"
+     fi
diff --git a/graphics/mapnik/pkg/PLIST b/graphics/mapnik/pkg/PLIST
index adc2d464da9..1fd879afbc4 100644
--- a/graphics/mapnik/pkg/PLIST
+++ b/graphics/mapnik/pkg/PLIST
@@ -1,6 +1,7 @@
 @comment $OpenBSD: PLIST,v 1.4 2015/09/18 20:07:09 landry Exp $
 bin/mapnik-config
-@bin bin/nik2img
+@bin bin/mapnik-index
+@bin bin/mapnik-render
 @bin bin/shapeindex
 include/mapnik/
 include/mapnik/agg/
@@ -139,11 +140,13 @@ include/mapnik/attribute_collector.hpp
 include/mapnik/attribute_descriptor.hpp
 include/mapnik/boolean.hpp
 include/mapnik/box2d.hpp
+include/mapnik/box2d_impl.hpp
 include/mapnik/cairo/
 include/mapnik/cairo/cairo_context.hpp
 include/mapnik/cairo/cairo_image_util.hpp
 include/mapnik/cairo/cairo_render_vector.hpp
 include/mapnik/cairo/cairo_renderer.hpp
+include/mapnik/cairo/render_polygon_pattern.hpp
 include/mapnik/cairo_io.hpp
 include/mapnik/color.hpp
 include/mapnik/color_factory.hpp
@@ -154,6 +157,9 @@ include/mapnik/css_color_grammar.hpp
 include/mapnik/css_color_grammar_impl.hpp
 include/mapnik/csv/
 include/mapnik/csv/csv_grammar.hpp
+include/mapnik/csv/csv_grammar_impl.hpp
+include/mapnik/csv/csv_types.hpp
+include/mapnik/cxx11_support.hpp
 include/mapnik/datasource.hpp
 include/mapnik/datasource_cache.hpp
 include/mapnik/datasource_geometry_type.hpp
@@ -194,6 +200,7 @@ include/mapnik/geometry_fusion_adapted.hpp
 include/mapnik/geometry_is_empty.hpp
 include/mapnik/geometry_is_simple.hpp
 include/mapnik/geometry_is_valid.hpp
+include/mapnik/geometry_remove_empty.hpp
 include/mapnik/geometry_reprojection.hpp
 include/mapnik/geometry_reprojection_impl.hpp
 include/mapnik/geometry_strategy.hpp
@@ -201,7 +208,6 @@ include/mapnik/geometry_to_path.hpp
 include/mapnik/geometry_transform.hpp
 include/mapnik/geometry_type.hpp
 include/mapnik/geometry_types.hpp
-include/mapnik/geometry_unique.hpp
 include/mapnik/global.hpp
 include/mapnik/gradient.hpp
 include/mapnik/grid/
@@ -213,8 +219,8 @@ include/mapnik/grid/grid_render_marker.hpp
 include/mapnik/grid/grid_renderer.hpp
 include/mapnik/grid/grid_renderer_base.hpp
 include/mapnik/grid/grid_rendering_buffer.hpp
-include/mapnik/grid/grid_util.hpp
 include/mapnik/grid/grid_view.hpp
+include/mapnik/grid_vertex_converter.hpp
 include/mapnik/group/
 include/mapnik/group/group_layout.hpp
 include/mapnik/group/group_layout_manager.hpp
@@ -248,6 +254,7 @@ include/mapnik/image_view_impl.hpp
 include/mapnik/image_view_null.hpp
 include/mapnik/jpeg_io.hpp
 include/mapnik/json/
+include/mapnik/json/attribute_value_visitor.hpp
 include/mapnik/json/error_handler.hpp
 include/mapnik/json/extract_bounding_box_grammar.hpp
 include/mapnik/json/extract_bounding_box_grammar_impl.hpp
@@ -266,11 +273,12 @@ include/mapnik/json/geometry_grammar.hpp
 include/mapnik/json/geometry_grammar_impl.hpp
 include/mapnik/json/geometry_parser.hpp
 include/mapnik/json/geometry_util.hpp
+include/mapnik/json/positions.hpp
 include/mapnik/json/positions_grammar.hpp
 include/mapnik/json/positions_grammar_impl.hpp
 include/mapnik/json/properties_generator_grammar.hpp
 include/mapnik/json/properties_generator_grammar_impl.hpp
-include/mapnik/json/symbolizer_grammar.hpp
+include/mapnik/json/stringifier.hpp
 include/mapnik/json/topojson_grammar.hpp
 include/mapnik/json/topojson_grammar_impl.hpp
 include/mapnik/json/topojson_utils.hpp
@@ -287,6 +295,7 @@ include/mapnik/marker_cache.hpp
 include/mapnik/marker_helpers.hpp
 include/mapnik/markers_placement.hpp
 include/mapnik/markers_placements/
+include/mapnik/markers_placements/basic.hpp
 include/mapnik/markers_placements/interior.hpp
 include/mapnik/markers_placements/line.hpp
 include/mapnik/markers_placements/point.hpp
@@ -294,7 +303,6 @@ include/mapnik/markers_placements/vertext_first.hpp
 include/mapnik/markers_placements/vertext_last.hpp
 include/mapnik/memory_datasource.hpp
 include/mapnik/memory_featureset.hpp
-include/mapnik/miniz_png.hpp
 include/mapnik/octree.hpp
 include/mapnik/offset_converter.hpp
 include/mapnik/palette.hpp
@@ -341,6 +349,7 @@ include/mapnik/sparsehash/template_util.h
 include/mapnik/sparsehash/type_traits.h
 include/mapnik/sql_utils.hpp
 include/mapnik/sse.hpp
+include/mapnik/stringify_macro.hpp
 include/mapnik/svg/
 include/mapnik/svg/geometry_svg_generator.hpp
 include/mapnik/svg/geometry_svg_generator_impl.hpp
@@ -351,11 +360,14 @@ include/mapnik/svg/svg_path_adapter.hpp
 include/mapnik/svg/svg_path_attributes.hpp
 include/mapnik/svg/svg_path_commands.hpp
 include/mapnik/svg/svg_path_grammar.hpp
+include/mapnik/svg/svg_path_grammar_impl.hpp
 include/mapnik/svg/svg_path_parser.hpp
 include/mapnik/svg/svg_points_grammar.hpp
+include/mapnik/svg/svg_points_grammar_impl.hpp
 include/mapnik/svg/svg_renderer_agg.hpp
 include/mapnik/svg/svg_storage.hpp
 include/mapnik/svg/svg_transform_grammar.hpp
+include/mapnik/svg/svg_transform_grammar_impl.hpp
 include/mapnik/symbolizer.hpp
 include/mapnik/symbolizer_base.hpp
 include/mapnik/symbolizer_default_values.hpp
@@ -407,6 +419,7 @@ include/mapnik/transform_path_adapter.hpp
 include/mapnik/transform_processor.hpp
 include/mapnik/unicode.hpp
 include/mapnik/util/
+include/mapnik/util/char_array_buffer.hpp
 include/mapnik/util/const_rendering_buffer.hpp
 include/mapnik/util/container_adapter.hpp
 include/mapnik/util/conversions.hpp
@@ -423,12 +436,12 @@ include/mapnik/util/geometry_to_wkt.hpp
 include/mapnik/util/hsl.hpp
 include/mapnik/util/is_clockwise.hpp
 include/mapnik/util/math.hpp
+include/mapnik/util/name_to_int.hpp
 include/mapnik/util/noncopyable.hpp
 include/mapnik/util/path_iterator.hpp
-include/mapnik/util/recursive_wrapper.hpp
 include/mapnik/util/rounding_cast.hpp
 include/mapnik/util/singleton.hpp
-include/mapnik/util/spirit_transform_attribute.hpp
+include/mapnik/util/spatial_index.hpp
 include/mapnik/util/timer.hpp
 include/mapnik/util/trim.hpp
 include/mapnik/util/utf_conv_win.hpp
@@ -447,6 +460,8 @@ include/mapnik/vertex_processor.hpp
 include/mapnik/vertex_vector.hpp
 include/mapnik/view_strategy.hpp
 include/mapnik/view_transform.hpp
+include/mapnik/warning_ignore.hpp
+include/mapnik/warning_ignore_agg.hpp
 include/mapnik/warp.hpp
 include/mapnik/webp_io.hpp
 include/mapnik/well_known_srs.hpp
@@ -461,8 +476,8 @@ include/mapnik/xml_attribute_cast.hpp
 include/mapnik/xml_loader.hpp
 include/mapnik/xml_node.hpp
 include/mapnik/xml_tree.hpp
-lib/libmapnik-json.a
-lib/libmapnik-wkt.a
+@static-lib lib/libmapnik-json.a
+@static-lib lib/libmapnik-wkt.a
 @lib lib/libmapnik.so.${LIBmapnik_VERSION}
 lib/mapnik/
 lib/mapnik/input/

Reply via email to