Fix build, broken in the json-c 0.12 upgrade. Given the nature of the errors there

are likely other ports that will fail in similar ways. (i.e. libjson.so->libjson-c.so,
and json/json.h -> json-c/json.h).

While here, use OPTIONS helpers to avoid unnecessary bsd.port.options.mk inclusion.
This commit is contained in:
Adam Weinberger 2014-08-20 14:30:58 +00:00
parent eb6bb0eeb1
commit 16786c6c15
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=365465
4 changed files with 39 additions and 22 deletions

View file

@ -17,7 +17,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libconfig.so:${PORTSDIR}/devel/libconfig \
libuuid.so:${PORTSDIR}/misc/e2fsprogs-libuuid \
libcurl.so:${PORTSDIR}/ftp/curl \
libjson.so:${PORTSDIR}/devel/json-c
libjson-c.so:${PORTSDIR}/devel/json-c
OPTIONS_DEFINE= DEBUG ASSERT CNC_DEBUG STOMP_DEBUG
@ -27,31 +27,15 @@ STOMP_DEBUG_DESC= Enable STOMP Debug
GNU_CONFIGURE= yes
USES= libtool pathfix pkgconfig
USE_LDCONFIG= yes
USE_AUTOTOOLS= autoconf
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
BROKEN_sparc64= Does not compile on sparc64
.include <bsd.port.options.mk>
.if !empty(PORT_OPTIONS:MDEBUG)
CONFIGURE_ARGS+=--enable-debug
.endif
.if !empty(PORT_OPTIONS:MASSERT)
CONFIGURE_ARGS+=--enable-assert
.endif
.if !empty(PORT_OPTIONS:MCNC_DEBUG)
CONFIGURE_ARGS+=--enable-cnc-debug
.endif
.if !empty(PORT_OPTIONS:MSTOMP_DEBUG)
CONFIGURE_ARGS+=--enable-stomp-debug
.endif
post-patch:
@${REINPLACE_CMD} -e "s/-Werror//g" \
${WRKSRC}/configure
DEBUG_CONFIGURE_ENABLE= debug
ASSERT_CONFIGURE_ENABLE= assert
CNC_DEBUG_CONFIGURE_ENABLE= cnc-debug
STOMP_DEBUG_CONFIGURE_ENABLE= stomp-debug
.include <bsd.port.mk>

View file

@ -0,0 +1,11 @@
--- ./common_m4/api_deps.m4.orig 2014-08-20 10:21:22.000000000 -0400
+++ ./common_m4/api_deps.m4 2014-08-20 10:21:36.000000000 -0400
@@ -55,7 +55,7 @@
# [AC_MSG_ERROR("curl header file not found")]
# )
-PKG_CHECK_MODULES([JSON], [json >= 0.9])
+PKG_CHECK_MODULES([JSON], [json-c >= 0.9])
CFLAGS="$JSON_CFLAGS $CFLAGS"
LIBS="$JSON_LIBS $LIBS"

View file

@ -0,0 +1,11 @@
--- ./common_m4/compiler_options.m4.orig 2014-08-20 10:21:07.000000000 -0400
+++ ./common_m4/compiler_options.m4 2014-08-20 10:21:17.000000000 -0400
@@ -28,7 +28,7 @@
CFLAGS="$CFLAGS -std=c99 -fno-strict-aliasing"
CPPFLAGS="$CPPFLAGS -fno-strict-aliasing"
- CWARNINGS="$CWARNINGS -Wall -Werror -Wwrite-strings -Wformat -fdiagnostics-show-option -Wextra -Wformat-security -Wsign-compare -Wcast-align -Wno-unused-parameter"
+ CWARNINGS="$CWARNINGS -Wall -Wwrite-strings -Wformat -fdiagnostics-show-option -Wextra -Wformat-security -Wsign-compare -Wcast-align -Wno-unused-parameter"
if test "x$NOT_PEDANTIC" = "x"; then
CWARNINGS="$CWARNINGS -pedantic"
fi

View file

@ -0,0 +1,11 @@
--- ./include/razorback/json_buffer.h.orig 2014-08-20 10:25:03.000000000 -0400
+++ ./include/razorback/json_buffer.h 2014-08-20 10:25:26.000000000 -0400
@@ -9,7 +9,7 @@
#include <razorback/messages.h>
#include <razorback/ntlv.h>
-#include <json/json.h>
+#include <json-c/json.h>
#ifdef __cplusplus
extern "C" {