From patchwork Wed Oct 9 14:19:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alvaro Gamez Machado X-Patchwork-Id: 281903 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 65F722C00E0 for ; Thu, 10 Oct 2013 01:19:34 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B3B9F32D3C; Wed, 9 Oct 2013 14:19:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jvxZyOMnCAwk; Wed, 9 Oct 2013 14:19:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 245D832BCF; Wed, 9 Oct 2013 14:19:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id A7B681BF9D0 for ; Wed, 9 Oct 2013 14:19:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A14DB8B4AE for ; Wed, 9 Oct 2013 14:19:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DfEGAk-pYFLs for ; Wed, 9 Oct 2013 14:19:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by whitealder.osuosl.org (Postfix) with ESMTPS id 8FD158B45C for ; Wed, 9 Oct 2013 14:19:25 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id cb5so822784wib.4 for ; Wed, 09 Oct 2013 07:19:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EFHOQkR2qtwqFH9IFJA9bkHlg9F5DURBcoXYrLCPGj0=; b=WlGzyCE3zunH0aZDAUhIUdIkRTu3Wf5oiN4k24ntO4MBLKjB78k8RvGVqGVdzvSe/s D4Ttk1XydOMIwxC5a/aj5IO61vDmG1ZeI4X24Wv74yX1kZuUcNGr/V6UZ6eFViSqbAWL imvMueFU0v18VTK0r6WwaB1SD8/D7s6k1uusHtccpv6dRVMJQmR2y18c/yfB6tobitXo XjrZQNDVrJCvjW9sbepVm836FJuMd1R7ZmLlceCC6hRJoIyJnTRhSAjxOop/GFkXLuV2 bCacvpMXAi9ahLFlnRig8sP9pcWb6ETs9yCSI3F/J7a511vgBs9q26yuZVuqEuTdp1So hq3Q== X-Gm-Message-State: ALoCoQmxSiUDhcyuGxQvxiaX/QRG/Yuwz5miQO7vpXhbM5uK004wtI/cMMivLx9WlfVRX8ocvNTo X-Received: by 10.180.11.6 with SMTP id m6mr1075535wib.52.1381328363949; Wed, 09 Oct 2013 07:19:23 -0700 (PDT) Received: from collins.gmr.ssr.upm.es (collins.gmr.ssr.upm.es. [138.4.36.7]) by mx.google.com with ESMTPSA id ey4sm15981327wic.11.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Oct 2013 07:19:23 -0700 (PDT) From: "Alvaro G. M" To: buildroot , Baruch Siach Date: Wed, 9 Oct 2013 16:19:10 +0200 Message-Id: <1381328350-23958-1-git-send-email-alvaro.gamez@hazent.com> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <20131009140939.GP4875@tarshish> References: <20131009140939.GP4875@tarshish> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH] libxmlrpc: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Thomas Petazzoni Signed-off-by: Alvaro G. M --- Solved sign off and reuse LIBXMLRPC_VERSION (thanks Baruch). package/Config.in | 1 + package/libxmlrpc/Config.in | 10 ++++++++ .../libxmlrpc-0001-fix-gennmtab-build.patch | 25 ++++++++++++++++++ .../libxmlrpc-0002-fix-non-cplusplus-build.patch | 27 +++++++++++++++++++ .../libxmlrpc/libxmlrpc-0003-non-wchar-build.patch | 24 +++++++++++++++++ .../libxmlrpc-0004-use-correct-curl-config.patch | 22 ++++++++++++++++ package/libxmlrpc/libxmlrpc.mk | 30 ++++++++++++++++++++++ 7 files changed, 139 insertions(+) create mode 100644 package/libxmlrpc/Config.in create mode 100644 package/libxmlrpc/libxmlrpc-0001-fix-gennmtab-build.patch create mode 100644 package/libxmlrpc/libxmlrpc-0002-fix-non-cplusplus-build.patch create mode 100644 package/libxmlrpc/libxmlrpc-0003-non-wchar-build.patch create mode 100644 package/libxmlrpc/libxmlrpc-0004-use-correct-curl-config.patch create mode 100644 package/libxmlrpc/libxmlrpc.mk diff --git a/package/Config.in b/package/Config.in index 9aa9d81..7947e8e 100644 --- a/package/Config.in +++ b/package/Config.in @@ -728,6 +728,7 @@ source "package/libroxml/Config.in" source "package/libxml-parser-perl/Config.in" source "package/libxml2/Config.in" source "package/libxmlpp/Config.in" +source "package/libxmlrpc/Config.in" source "package/libxslt/Config.in" source "package/libyaml/Config.in" source "package/mxml/Config.in" diff --git a/package/libxmlrpc/Config.in b/package/libxmlrpc/Config.in new file mode 100644 index 0000000..26e4a52 --- /dev/null +++ b/package/libxmlrpc/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBXMLRPC + bool "libxmlrpc" + select BR2_PACKAGE_LIBCURL + help + XML-RPC is a quick-and-easy way to make procedure calls over + the Internet. It converts the procedure call into an XML + document, sends it to a remote server using HTTP, and gets + back the response as XML. + + http://xmlrpc-c.sourceforge.net/ diff --git a/package/libxmlrpc/libxmlrpc-0001-fix-gennmtab-build.patch b/package/libxmlrpc/libxmlrpc-0001-fix-gennmtab-build.patch new file mode 100644 index 0000000..8cdd932 --- /dev/null +++ b/package/libxmlrpc/libxmlrpc-0001-fix-gennmtab-build.patch @@ -0,0 +1,25 @@ +Fix build of host tool + +genmtab is a tool that needs to be built for the host as it is used +during the compilation process of libxmlrpc. Its Makefile needs a bit +of tuning to use the conventional CC_FOR_BUILD, CFLAGS_FOR_BUILD and +LDFLAGS_FOR_BUILD variables. + +Signed-off-by: Thomas Petazzoni + +Index: b/lib/expat/gennmtab/Makefile +=================================================================== +--- a/lib/expat/gennmtab/Makefile ++++ b/lib/expat/gennmtab/Makefile +@@ -40,9 +40,9 @@ + dep: dep-common + + gennmtab.o:%.o:%.c +- $(BUILDTOOL_CC) -c $< -o $@ $(CFLAGS_ALL) $(INCLUDES) ++ $(CC_FOR_BUILD) -c $< -o $@ $(CFLAGS_FOR_BUILD) $(INCLUDES) + + gennmtab:%:%.o +- $(BUILDTOOL_CCLD) -o $@ $(LDFLAGS) $^ ++ $(CC_FOR_BUILD) -o $@ $(LDFLAGS_FOR_BUILD) $^ + + include depend.mk diff --git a/package/libxmlrpc/libxmlrpc-0002-fix-non-cplusplus-build.patch b/package/libxmlrpc/libxmlrpc-0002-fix-non-cplusplus-build.patch new file mode 100644 index 0000000..efeb9cc --- /dev/null +++ b/package/libxmlrpc/libxmlrpc-0002-fix-non-cplusplus-build.patch @@ -0,0 +1,27 @@ +Handle builds without C++ + +libxmlrpc nicely handles the fact of being built without C++ support, +except for one location, fixed by this patch. + +Signed-off-by: Thomas Petazzoni + +Index: b/lib/util/Makefile +=================================================================== +--- a/lib/util/Makefile ++++ b/lib/util/Makefile +@@ -41,11 +41,14 @@ + LIBOBJS = \ + casprintf.o \ + cmdline_parser.o \ +- cmdline_parser_cpp.o \ + getoptx.o \ + string_parser.o \ + stripcaseeq.o \ + ++ifeq ($(ENABLE_CPLUSPLUS),yes) ++LIBOBJS += cmdline_parser_cpp.o ++endif ++ + .PHONY: all + all: $(LIBOBJS) + diff --git a/package/libxmlrpc/libxmlrpc-0003-non-wchar-build.patch b/package/libxmlrpc/libxmlrpc-0003-non-wchar-build.patch new file mode 100644 index 0000000..1f04353 --- /dev/null +++ b/package/libxmlrpc/libxmlrpc-0003-non-wchar-build.patch @@ -0,0 +1,24 @@ +Disable wide-char specific code + +The vast majority of the libxmlrpc code nicely handles the absence of +wide char support, except at one location, which is fixed by this +patch. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/xmlrpc_decompose.c +=================================================================== +--- a/src/xmlrpc_decompose.c ++++ b/src/xmlrpc_decompose.c +@@ -217,7 +217,11 @@ + xmlrpc_strfree(*decompRootP->store.Tstring.valueP); + break; + case 'w': ++#if HAVE_UNICODE_WCHAR + free((void*)*decompRootP->store.TwideString.valueP); ++#else ++ XMLRPC_ASSERT(false); ++#endif + break; + case '6': + free((void*)*decompRootP->store.TbitString.valueP); diff --git a/package/libxmlrpc/libxmlrpc-0004-use-correct-curl-config.patch b/package/libxmlrpc/libxmlrpc-0004-use-correct-curl-config.patch new file mode 100644 index 0000000..ada0bd2 --- /dev/null +++ b/package/libxmlrpc/libxmlrpc-0004-use-correct-curl-config.patch @@ -0,0 +1,22 @@ +Use correct curl-config program + +Instead of calling again curl-config in src/Makefile (which ends up +calling the wrong curl-config: the one in the PATH instead of the one +pointed at by the environment variables at configure time), let's use +the CURL_LDADD variable which was computed at configure time. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -56,7 +56,7 @@ + TRANSPORT_MODS += blddir/lib/curl_transport/curltransaction + TRANSPORT_MODS += blddir/lib/curl_transport/curlmulti + TRANSPORT_MODS += blddir/lib/curl_transport/lock_pthread +- TRANSPORT_LIBDEP += $(shell curl-config --libs) ++ TRANSPORT_LIBDEP += $(CURL_LDADD) + endif + ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes) + TRANSPORT_MODS += blddir/lib/libwww_transport/xmlrpc_libwww_transport diff --git a/package/libxmlrpc/libxmlrpc.mk b/package/libxmlrpc/libxmlrpc.mk new file mode 100644 index 0000000..3d1af7e --- /dev/null +++ b/package/libxmlrpc/libxmlrpc.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# libxmlrpc +# +################################################################################ + +LIBXMLRPC_VERSION = 1.25.26 +LIBXMLRPC_SOURCE = xmlrpc-c-$(LIBXMLRPC_VERSION).tgz +LIBXMLRPC_SITE = http://downloads.sourceforge.net/project/xmlrpc-c/Xmlrpc-c%20Super%20Stable/$(LIBXMLRPC_VERSION) +LIBXMLRPC_LICENSE = BSD-3c (xml-rpc main code and abyss web server), BSD like (lib/expat), Python 1.5.2 license (parts of xmlrpc_base64.c) +LIBXMLRPC_LICENSE_FILES = doc/COPYING +LIBXMLRPC_INSTALL_STAGING = YES +LIBXMLRPC_DEPENDENCIES = libcurl +LIBXMLRPC_CONFIG_SCRIPTS = xmlrpc-c-config + +LIBXMLRPC_CONF_OPT = \ + $(if $(BR2_USE_WCHAR),,ac_cv_header_wchar_h=no) \ + $(if $(BR2_INSTALL_LIBSTDCPP),,--disable-cplusplus) \ + have_curl_config=$(STAGING_DIR)/usr/bin/curl-config \ + CURL_CONFIG=$(STAGING_DIR)/usr/bin/curl-config + +# Our package uses autoconf, but not automake, so we need to pass +# those variables at compile time as well. +LIBXMLRPC_MAKE_ENV = \ + CC_FOR_BUILD="$(HOSTCC)" \ + LD_FOR_BUILD="$(HOSTLD)" \ + CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \ + LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" + +$(eval $(autotools-package))