handle json-c update, tidy some whitespace in Makefile while there

This commit is contained in:
sthen 2014-04-24 15:58:54 +00:00
parent a527602d82
commit 028ef12442
2 changed files with 28 additions and 10 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.45 2014/04/07 21:16:45 steven Exp $
# $OpenBSD: Makefile,v 1.46 2014/04/24 15:58:54 sthen Exp $
COMMENT= syslogd replacement
@ -23,14 +23,14 @@ SHARED_LIBS = syslog-ng 0.0 \
syslog-ng-${V} 0.0
MODULES = devel/gettext
WANTLIB = c m pcre crypto ssl evtlog dbi ivykis pthread \
glib-2.0 gmodule-2.0 gthread-2.0 json-c
LIB_DEPENDS = devel/glib2 \
devel/json-c \
devel/libivykis \
sysutils/eventlog \
LIB_DEPENDS = devel/glib2 \
devel/json-c \
devel/libivykis \
sysutils/eventlog \
databases/libdbi
CONFIGURE_STYLE = gnu
@ -49,6 +49,9 @@ CONFIGURE_ENV += OPENSSL_CFLAGS="-I/usr/include/openssl" \
OPENSSL_LIBS="-lssl -lcrypto" \
LIBDBI_CFLAGS="-I/usr/include/openssl" \
LIBDBI_LIBS="-ldbi"
# json-c only installs libjson-c.pc; syslog-ng checks for libjson.pc
CONFIGURE_ENV += JSON_C_CFLAGS="`pkg-config json-c --cflags`" \
JSON_C_LIBS="`pkg-config json-c --libs`"
USE_GMAKE = Yes
USE_GROFF = Yes
@ -56,13 +59,13 @@ SYSCONFDIR = ${BASESYSCONFDIR}/syslog-ng
CFLAGS += -I${LOCALBASE}/include
SUBST_VARS += V
DOC = ${PREFIX}/share/doc/syslog-ng/
EXAMPLES = ${PREFIX}/share/examples/syslog-ng/
pre-install:
cd ${WRKSRC}/doc/man && perl -pi -e 's@/opt/syslog\\-ng/etc/syslog\\-ng/@${SYSCONFDIR:S/-/\\-/g}/@g' *.[158]
post-install:
mv ${WRKINST}/etc/syslog-ng ${EXAMPLES}
${INSTALL_DATA} ${FILESDIR}/syslog-ng.conf \

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-modules_json_jsonparser_c,v 1.1 2014/04/24 15:58:54 sthen Exp $
old api was deprecated in json-c 0.12
--- modules/json/jsonparser.c.orig Thu Apr 24 16:47:42 2014
+++ modules/json/jsonparser.c Thu Apr 24 16:55:21 2014
@@ -185,7 +185,7 @@ log_json_parser_process (LogParser *s, LogMessage **pm
if (tok->err != json_tokener_success)
{
msg_error ("Unparsable JSON stream encountered",
- evt_tag_str ("error", json_tokener_errors[tok->err]), NULL);
+ evt_tag_str ("error", json_tokener_error_desc(tok->err)), NULL);
json_tokener_free (tok);
return FALSE;
}