The yajl package provides a JSON library.
The upstream for yajl has been abandoned, but at present contains several security and build issues. Apply a patch to fix them:
patch -Np1 -i ../yajl-2.1.0-third_party_fixes-1.patch
Install yajl by running the following commands:
mkdir build &&
cd build &&
cmake -D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_BUILD_TYPE=Release \
-D BUILD_SHARED_LIBS=ON \
-D CMAKE_SKIP_INSTALL_RPATH=ON \
-W no-dev -G Ninja .. &&
ninja
Now, as the root user:
ninja install && rm -vf /usr/lib/libyajl_s.a
-D
CMAKE_SKIP_INSTALL_RPATH=ON: This switch makes
cmake remove
hardcoded library search paths (rpath) when installing a binary
executable file or a shared library. This package does not need
rpath once it's installed into the standard location, and rpath may
sometimes cause unwanted effects or even security issues.
rm -vf /usr/lib/libyajl_s.a: This command removes a useless static library.