allejo / LeagueOverseer

A BZFlag plug-in to relay information from BZFlag servers to a website, such as player info or match reports
Other
5 stars 5 forks source link

json-c package change in Debian based distros #51

Open allejo opened 6 years ago

allejo commented 6 years ago

Thanks to @macsforme for letting me know, but it seems that libjson0-dev no longer exists in Ubuntu 17.10 (at least) and has been replaced/renamed with libjson-c-dev.

The package rename exists in both Ubuntu and Debian LTS, so that's good.

Changes required courtesy of @macsforme

diff --git a/Makefile.am b/Makefile.am
index 3cd41c9..9cd6157 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@ lib_LTLIBRARIES = leagueOverSeer.la

 leagueOverSeer_la_SOURCES = leagueOverSeer.cpp
 leagueOverSeer_la_CXXFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/plugins/plu
gin_utils
-leagueOverSeer_la_LDFLAGS = -module -avoid-version -shared -ljson
+leagueOverSeer_la_LDFLAGS = -module -avoid-version -shared -ljson-c
 leagueOverSeer_la_LIBADD = $(top_builddir)/plugins/plugin_utils/libplugin_utils
.la

 AM_CPPFLAGS = $(CONF_CPPFLAGS)
diff --git a/leagueOverSeer.cpp b/leagueOverSeer.cpp
index d243286..8283faa 100644
--- a/leagueOverSeer.cpp
+++ b/leagueOverSeer.cpp
@@ -23,7 +23,7 @@ League Overseer
 #include <fstream>
 #include <iostream>
 #include <iomanip>
-#include <json/json.h>
+#include <json-c/json.h>
 #include <math.h>
 #include <memory>
 #include <sstream>

The official way to link to this library according to the project's README is via json-c. Is this backwards compatible?

However... How would these changes affect Redhat/Cent distributions. To be determined!