From c2f67aef61f4acf6199790292de35da0f9e2d6f5 Mon Sep 17 00:00:00 2001 From: Alexander Aksenov Date: Thu, 27 Aug 2015 16:13:06 +0300 Subject: [PATCH] [IMPROVE] Add old json support in case of wearable Change-Id: Iabcb35f787e177849f27d3244440a3c7f968e75f Signed-off-by: Alexander Aksenov --- daemon/Makefile | 12 +++++++++++- daemon/wsi.c | 8 +++++++- packaging/swap-manager.spec | 8 +++++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/daemon/Makefile b/daemon/Makefile index 4cda24b..9882a6b 100644 --- a/daemon/Makefile +++ b/daemon/Makefile @@ -43,6 +43,10 @@ ifeq ($(PROFILE_TV),y) FLAGS += -DPROFILE_TV endif # PROFILE_TV +# set using old json +ifeq ($(OLD_JSON),y) +FLAGS += -DOLD_JSON +endif # OLD_JSON # CALL_MNGR ifeq ($(CALL_MNGR),y) @@ -66,7 +70,6 @@ LDFLAGS := \ -lecore \ -lcapi-system-info \ -lwebsockets \ - -ljson-c \ -lparserelf # CALL_MNGR @@ -74,6 +77,13 @@ ifeq ($(CALL_MNGR),y) LDFLAGS += -lcallmgr_client endif # CALL_MNGR +# set using old json +ifeq ($(OLD_JSON),y) +LDFLAGS += -ljson +else +LDFLAGS += -ljson-c +endif # OLD_JSON + SRC_C := \ buffer.c \ da_data.c \ diff --git a/daemon/wsi.c b/daemon/wsi.c index 7559c1e..f925c99 100644 --- a/daemon/wsi.c +++ b/daemon/wsi.c @@ -30,9 +30,15 @@ #include #include #include -#include #include +#ifdef OLD_JSON +#include +#else /* OLD_JSON */ +#include +#endif /* OLD_JSON */ + + #include "wsi.h" #include "swap_debug.h" #include "da_protocol.h" diff --git a/packaging/swap-manager.spec b/packaging/swap-manager.spec index 34ccb1e..3ecef63 100644 --- a/packaging/swap-manager.spec +++ b/packaging/swap-manager.spec @@ -13,7 +13,11 @@ BuildRequires: vconf-devel BuildRequires: capi-system-info-devel BuildRequires: capi-system-runtime-info-devel BuildRequires: libwebsockets-devel +%if "%{sec_product_feature_profile_wearable}" == "1" +BuildRequires: libjson-devel +%else BuildRequires: pkgconfig(json-c) +%endif BuildRequires: pkgconfig(ecore) %if "%{?tizen_profile_name}" == "mobile" BuildRequires: pkgconfig(callmgr_client) @@ -68,7 +72,9 @@ SWAP_BUILD_CMD+=" CALL_MNGR=y" %if "%{?tizen_profile_name}" == "tv" SWAP_BUILD_CMD+=" PROFILE_TV=y" %else -%if "%{sec_product_feature_profile_wearable}" != "1" +%if "%{sec_product_feature_profile_wearable}" == "1" +SWAP_BUILD_CMD+=" OLD_JSON=y" +%else SWAP_BUILD_CMD+=" WSP_SUPPORT=y" %endif %endif -- 2.7.4