From patchwork Thu Sep 15 06:39:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 670225 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sZTLk4gCBz9s8x for ; Thu, 15 Sep 2016 16:40:30 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=embedded.rocks header.i=@embedded.rocks header.b=udSIWEPB; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E19DB8AA0A; Thu, 15 Sep 2016 06:40:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lMhdUOYoydFE; Thu, 15 Sep 2016 06:40:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 60B8A8AA10; Thu, 15 Sep 2016 06:40:24 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 2987B1C11D2 for ; Thu, 15 Sep 2016 06:40:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 260B78A498 for ; Thu, 15 Sep 2016 06:40:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4AoanSjXUnqC for ; Thu, 15 Sep 2016 06:40:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.142]) by hemlock.osuosl.org (Postfix) with ESMTPS id 2B0F38A49E for ; Thu, 15 Sep 2016 06:40:09 +0000 (UTC) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3sZTLH3rqLzypL for ; Thu, 15 Sep 2016 08:40:07 +0200 (CEST) Authentication-Results: mail.embedded.rocks (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=embedded.rocks DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embedded.rocks; h=content-transfer-encoding:content-type:content-type :mime-version:references:in-reply-to:x-mailer:message-id:date :date:subject:subject:from:from:received:received; s=default; t= 1473921606; x=1474526407; bh=J+E7WaHz8arxEgYxdFru72VhUshsHUX2vJE 15ezqyIQ=; b=udSIWEPBLPFQFhf2SmGBG2de1ouGJBgqeYEQcukwqzAkLXXzCCG iPYzq2rYh2xeEWbhWiBxit+8LFq+9/7kBi/9QIaKCaZsfYSpH8GVHFEm0b5/P5es FclIZiggADUmdJ4UsRnDA7BSlkth0Ce6LR9AqIG54WNCb6eCJwJpN/ea1AiOFNfh 5qVN7lBvXbGL/o2OF9o43+vRPOzmqSHdFc8LLpaAz6zGh4II38F5UHJcSSXiYrze cIE5fFW5LaAa6euU/2TfHq/58vn8baXHf1FHTADrcBPN63l5fAAUzCs+GOgBtza3 y9ZzGQRA7brcsrdaet9sIhfzfVYgOREo2Ow== Received: from mail.embedded.rocks ([127.0.0.1]) by localhost (mail.embedded.rocks [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id NT_mZN_aqH5L; Thu, 15 Sep 2016 08:40:06 +0200 (CEST) Received: from nzxt.fritz.box (x4d02005d.dyn.telefonica.de [77.2.0.93]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Thu, 15 Sep 2016 08:40:06 +0200 (CEST) From: =?UTF-8?q?J=C3=B6rg=20Krause?= To: buildroot@buildroot.org Date: Thu, 15 Sep 2016 08:39:59 +0200 Message-Id: <20160915064001.8684-5-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160915064001.8684-1-joerg.krause@embedded.rocks> References: <20160915064001.8684-1-joerg.krause@embedded.rocks> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 4/6] package/upmpdcli: add patch to fix jsoncpp detection X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Although jsoncpp is present, the build system of upmpdcli does not detect it. The default installation path for the header files of jsoncpp is {prefix}/json, but some systems (Debian) prefers to install the headers in {prefix}/jsoncpp/json. The build system only checks for the header files in {prefix}/jsoncpp/json, so jsoncpp is not found. This patch from upstream handles both cases now when checking for the jsoncpp library. The patch is squashed of two commits from upstream: 1/ aba96db0cfe8a2e5c825f4448c0ad184e21b50e1 2/ ce144f19a8c2e8c1e0ec3fe53699e874e5eb43fe Fixes: http://autobuild.buildroot.net/results/5bc6c558fccea0e1e1936894ce372f2b7b8ecac2 http://autobuild.buildroot.net/results/9c2d3892f17c240c44f7255d821d66acbed361f0 http://autobuild.buildroot.net/results/4d22729535ca4e6acbb48a25145611bb49c10149 http://autobuild.buildroot.net/results/fda321774c3eb225f966dd9f83def5329b703a03 http://autobuild.buildroot.net/results/f5eb306b0032e830f7f72ce80e318aa11774a5d1 .. and many more! Signed-off-by: Jörg Krause --- package/upmpdcli/0001-fix-jsoncpp-detection.patch | 90 +++++++++++++++++++++++ package/upmpdcli/upmpdcli.mk | 3 + 2 files changed, 93 insertions(+) create mode 100644 package/upmpdcli/0001-fix-jsoncpp-detection.patch diff --git a/package/upmpdcli/0001-fix-jsoncpp-detection.patch b/package/upmpdcli/0001-fix-jsoncpp-detection.patch new file mode 100644 index 0000000..69a9a0e --- /dev/null +++ b/package/upmpdcli/0001-fix-jsoncpp-detection.patch @@ -0,0 +1,90 @@ +From 25762953c019ca0c5a047a5fa28f1fe6c78c731a Mon Sep 17 00:00:00 2001 +From: Jean-Francois Dockes +Date: Sun, 11 Sep 2016 13:43:28 +0200 +Subject: [PATCH] fix jsoncpp detection +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The default installation path for the header files is {prefix}/json, but some +system prefers to install the headers in {prefix}/jsoncpp/json. + +This patch from upstream handles both cases now when checking for the jsoncpp +library. + +The patch is squashed of two commits from upstream: +1/ aba96db0cfe8a2e5c825f4448c0ad184e21b50e1 +2/ ce144f19a8c2e8c1e0ec3fe53699e874e5eb43fe + +Signed-off-by: Jörg Krause +--- + configure.ac | 8 +++++++- + src/config.h.in | 6 ++++++ + src/mediaserver/cdplugins/plgwithslave.cxx | 5 +++++ + 3 files changed, 18 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index f191ad7..108dcce 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -43,9 +43,15 @@ SCCTL_LIBS=$LIBS + AC_CHECK_LIB([microhttpd], [MHD_queue_response], [], []) + + AC_LANG_PUSH([C++]) ++ ++AC_CHECK_HEADERS(json/json.h jsoncpp/json/json.h) + LIBS="$LIBS -ljsoncpp" + AC_LINK_IFELSE([AC_LANG_PROGRAM( +- [#include ], [Json::Features dummy])], ++ [[#ifdef HAVE_JSONCPP_JSON_JSON_H ++ #include ++ #else ++ #include ++ #endif]], [Json::Features dummy])], + [HAVE_JSONCPP=1], + [AC_MSG_ERROR([libjsoncpp not found.])]) + AC_LANG_POP +diff --git a/src/config.h.in b/src/config.h.in +index 1350308..0a33e15 100644 +--- a/src/config.h.in ++++ b/src/config.h.in +@@ -3,6 +3,12 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_INTTYPES_H + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_JSONCPP_JSON_JSON_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_JSON_JSON_H ++ + /* Define to 1 if you have the `microhttpd' library (-lmicrohttpd). */ + #undef HAVE_LIBMICROHTTPD + +diff --git a/src/mediaserver/cdplugins/plgwithslave.cxx b/src/mediaserver/cdplugins/plgwithslave.cxx +index 04f0544..545805c 100644 +--- a/src/mediaserver/cdplugins/plgwithslave.cxx ++++ b/src/mediaserver/cdplugins/plgwithslave.cxx +@@ -14,6 +14,7 @@ + * Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ ++#include "config.h" + + #include "plgwithslave.hxx" + +@@ -25,7 +26,11 @@ + #include + #include + #include ++#ifdef HAVE_JSONCPP_JSON_JSON_H + #include ++#else ++#include ++#endif + + #include "cmdtalk.h" + #include "pathut.h" +-- +2.9.3 + diff --git a/package/upmpdcli/upmpdcli.mk b/package/upmpdcli/upmpdcli.mk index 85b78fe..b70f413 100644 --- a/package/upmpdcli/upmpdcli.mk +++ b/package/upmpdcli/upmpdcli.mk @@ -9,6 +9,9 @@ UPMPDCLI_SITE = http://www.lesbonscomptes.com/upmpdcli/downloads UPMPDCLI_LICENSE = GPLv2+ UPMPDCLI_LICENSE_FILES = COPYING UPMPDCLI_DEPENDENCIES = libmpdclient libupnpp libmicrohttpd jsoncpp +# touching configure.ac in +# 0001-fix-jsoncpp-detection.patch +UPMPDCLI_AUTORECONF = YES ifeq ($(BR2_STATIC_LIBS),y) # Upmpdcli forgets to take the dependencies of libupnpp into