$OpenBSD: patch-meson_build,v 1.3 2017/09/06 08:04:05 dcoppa Exp $

commit 49da91c786855228158cb8937c972cd741bd4c79
Author: Martin Dagarin <SloCompTech@users.noreply.github.com>
Date:   Mon Sep 4 19:10:15 2017

Fixed compile bug

Index: meson.build
--- meson.build.orig
+++ meson.build
@@ -18,13 +18,14 @@ jsoncpp_cdata.set('JSONCPP_VERSION', meson.project_ver
 jsoncpp_cdata.set('JSONCPP_VERSION_MAJOR', jsoncpp_major_version)
 jsoncpp_cdata.set('JSONCPP_VERSION_MINOR', jsoncpp_minor_version)
 jsoncpp_cdata.set('JSONCPP_VERSION_PATCH', jsoncpp_patch_version)
+jsoncpp_cdata.set('JSONCPP_USE_SECURE_MEMORY',0)
 
 jsoncpp_gen_sources = configure_file(
   input : 'src/lib_json/version.h.in',
   output : 'version.h',
   configuration : jsoncpp_cdata,
   install : true,
-  install_dir : join_paths(get_option('prefix'), get_option('includedir'), 'json')
+  install_dir : join_paths(get_option('prefix'), get_option('includedir'), 'jsoncpp', 'json')
 )
 
 jsoncpp_headers = [
@@ -42,8 +43,11 @@ jsoncpp_include_directories = include_directories('inc
 
 install_headers(
   jsoncpp_headers,
-  subdir : 'json')
+  subdir : 'jsoncpp/json')
 
+thread_dep = dependency('threads')
+no_asneeded = '-Wl,--no-as-needed'
+
 jsoncpp_lib = library(
   'jsoncpp',
   [ jsoncpp_gen_sources,
@@ -52,7 +56,9 @@ jsoncpp_lib = library(
     'src/lib_json/json_reader.cpp',
     'src/lib_json/json_value.cpp',
     'src/lib_json/json_writer.cpp'],
-  soversion : 19,
+  soversion : '${LIBjsoncpp_VERSION}',
+  dependencies : thread_dep,
+  link_args : no_asneeded,
   install : true,
   include_directories : jsoncpp_include_directories)
 
@@ -60,6 +66,7 @@ import('pkgconfig').generate(
   libraries : jsoncpp_lib,
   version : meson.project_version(),
   name : 'jsoncpp',
+  subdirs : 'jsoncpp',
   filebase : 'jsoncpp',
   description : 'A C++ library for interacting with JSON')
 
@@ -80,6 +87,8 @@ jsoncpp_test = executable(
     'src/test_lib_json/main.cpp'],
   include_directories : jsoncpp_include_directories,
   link_with : jsoncpp_lib,
+  dependencies : thread_dep,
+  link_args : no_asneeded,
   install : false)
 test(
   'unittest_jsoncpp_test',
@@ -90,6 +99,8 @@ jsontestrunner = executable(
   'src/jsontestrunner/main.cpp',
   include_directories : jsoncpp_include_directories,
   link_with : jsoncpp_lib,
+  dependencies : thread_dep,
+  link_args : no_asneeded,
   install : false)
 test(
   'unittest_jsontestrunner',
