From fc41b9fcb6c5f35462401132e1d063fb8422337a Mon Sep 17 00:00:00 2001
From: Kubat <mael.martin31@gmail.com>
Date: Fri, 15 Jan 2021 22:35:51 +0100
Subject: [PATCH] DOC: Edit doc to delete json-c references and set version to
 2.2 in configure.ac

---
 CHANGELOG                |  2 ++
 README.md                |  3 ---
 configure                | 20 ++++++++++----------
 configure.ac             |  2 +-
 inc/lektor/net.h         |  1 -
 src/module/module_repo.c |  1 +
 6 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 1d5036d8..7964fd4a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,7 @@
 # Next
 
+- Replace json-c by the json.h library to reduce dependencies number
+
 # v2.2 (78143fa3)
 
 - Download the bakabase with obfuscation or not
diff --git a/README.md b/README.md
index 37e3e1ae..a1486cfd 100644
--- a/README.md
+++ b/README.md
@@ -30,7 +30,6 @@ For the module sdl2, you will need the folowing prerequisites:
 
 For the module repo, you will need the folowing prerequisites:
 
-- the [json-c](https://github.com/json-c/json-c) development library
 - the [libcurl](https://github.com/curl/curl) developmemt library
 
 You will also need the following executables, with their path setted in the
@@ -52,8 +51,6 @@ If you use the configure with the `--with-depends` option (needed on debian
 - the [wget](https://www.gnu.org/software/wget/) command line utility. Can be
   replaced by curl command line utility.
 - the [git](https://git-scm.com/) command line utility
-- the [cmake](https://cmake.org/download/) command line utility (to be deleted
-  when use of json-c is dropped)
 
 Note that because of the use of `curl` and `get`, building behind a proxy may
 be challenging.
diff --git a/configure b/configure
index 8b4008be..868fd837 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for lektor 2.0.
+# Generated by GNU Autoconf 2.69 for lektor 2.2.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='lektor'
 PACKAGE_TARNAME='lektor'
-PACKAGE_VERSION='2.0'
-PACKAGE_STRING='lektor 2.0'
+PACKAGE_VERSION='2.2'
+PACKAGE_STRING='lektor 2.2'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1353,7 +1353,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures lektor 2.0 to adapt to many kinds of systems.
+\`configure' configures lektor 2.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1424,7 +1424,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of lektor 2.0:";;
+     short | recursive ) echo "Configuration of lektor 2.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1544,7 +1544,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-lektor configure 2.0
+lektor configure 2.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2006,7 +2006,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by lektor $as_me 2.0, which was
+It was created by lektor $as_me 2.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -4852,7 +4852,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='lektor'
- VERSION='2.0'
+ VERSION='2.2'
 
 
 # Some tools Automake needs.
@@ -14281,7 +14281,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by lektor $as_me 2.0, which was
+This file was extended by lektor $as_me 2.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14347,7 +14347,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-lektor config.status 2.0
+lektor config.status 2.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 11f33641..4d63bd34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([lektor], [2.0])
+AC_INIT([lektor], [2.2])
 
 AC_CONFIG_AUX_DIR([config])
 AC_CONFIG_MACRO_DIRS([config/m4])
diff --git a/inc/lektor/net.h b/inc/lektor/net.h
index 386b2a1b..3fc0eda1 100644
--- a/inc/lektor/net.h
+++ b/inc/lektor/net.h
@@ -13,7 +13,6 @@
 #include <mpv/client.h>
 #include <curl/curl.h>
 #include <sqlite3.h>
-#include <json-c/json.h>
 #include <inttypes.h>
 #include <stdbool.h>
 
diff --git a/src/module/module_repo.c b/src/module/module_repo.c
index 10c73ba5..c24f09a5 100644
--- a/src/module/module_repo.c
+++ b/src/module/module_repo.c
@@ -2,6 +2,7 @@
 
 #define __LKT_MODULE_MAIN_SOURCE__
 #include <lektor/lktmodule.h>
+#include <lektor/json.h>
 
 #include "worker.h"
 
-- 
GitLab