From patchwork Mon Mar 4 09:48:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Lukichev X-Patchwork-Id: 224666 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 6D7AD2C07F9 for ; Mon, 4 Mar 2013 20:48:53 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 22222A01D1; Mon, 4 Mar 2013 09:48:53 +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 87ltsdkCU-iR; Mon, 4 Mar 2013 09:48:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 9F827A022A; Mon, 4 Mar 2013 09:48:45 +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 AD1A98F753 for ; Mon, 4 Mar 2013 09:48:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0C2E78CEAB for ; Mon, 4 Mar 2013 09:48:42 +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 VoFYhV45cIjP for ; Mon, 4 Mar 2013 09:48:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com [209.85.217.177]) by whitealder.osuosl.org (Postfix) with ESMTPS id 81ABD8CE04 for ; Mon, 4 Mar 2013 09:48:39 +0000 (UTC) Received: by mail-lb0-f177.google.com with SMTP id go11so3799734lbb.36 for ; Mon, 04 Mar 2013 01:48:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=QC0Fk8prKVCAIJKUG1aHNmjP6dTB/yaS595Ln7p91og=; b=xxBPP+yJ6SfZZB6gLGeNeXvBvO2cXORgC7WLBWnDxmcVOsDFkr8pBYjB2GbnB2JlkA 7+zXN9423AZZCW3BU0qvHNfiohczbgfFVfYNDG4kxcl67JZBDrN7UyjOs5L9zft9xwYy S6R2MtYDduUhw1/yOnFYM/N4wyxaVp2nN8AG7YVJZT2skWjvpdZUOleaXyOUj5RpLqwl pa5lNnbAtiMR6w2wMSEbL0CfZ/cazZLHoptg+wZhl0UU9c+/rixTDnK8cMAsQoOM5zxQ PQTKCgq9TuHE/x/d+Pk8Len6tei4WE/9ow7ZkSyXPFFnj2/ZAAh7ZAqdZuXu1OsMW5hu IKvw== X-Received: by 10.112.102.197 with SMTP id fq5mr4098170lbb.83.1362390517395; Mon, 04 Mar 2013 01:48:37 -0800 (PST) Received: from localhost.localdomain (37-136-181-113.nat.bb.dnainternet.fi. [37.136.181.113]) by mx.google.com with ESMTPS id iq6sm452740lab.10.2013.03.04.01.48.34 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 04 Mar 2013 01:48:37 -0800 (PST) From: Alexander Lukichev To: buildroot@busybox.net Date: Mon, 4 Mar 2013 11:48:11 +0200 Message-Id: <1362390492-22434-1-git-send-email-alexander.lukichev@gmail.com> X-Mailer: git-send-email 1.8.0.1 Cc: Alexander Lukichev Subject: [Buildroot] [PATCH v4 1/2] openpgm: 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 From: Alexander Lukichev OpenPGM is an open source implementation of the Pragmatic General Multicast (PGM) specification in RFC 3208 available at www.ietf.org. It is required for PGM/EPGM support in ZeroMQ library. Signed-off-by: Alexander Lukichev Acked-by: Thomas Petazzoni --- v4: - included into a patch series to add PGM/EPGM support to zeromq; - downgraded to version 5.1.118~dfsg as zeromq needs openpgm 5.1.x. v3: improved according to community suggestions: - added Signed-off-by and the reason to the cross-compilation patch; - specified toolchain requirements in Config.in. The package can be built without WCHAR but this is supported only by its SCons and CMake build systems (for development). Autotools based build system (for releases) does not support this. IPV6 and thread support requirements are mandatory. v2: improved according to community suggestions: - legal information supplied; - OPENPGM_SUBDIR is used instead of a post extract hook; - more recent release of the package is used; - cross-compilation fix uses cached values instead of hard-coded ones. The last thing has been implemented as recommended in Autoconf manual (http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Runtime.html#Runtime) for cross-compilation-friendly runtime tests. Direct caching of pgm_unaligned_pointers variable produced a warning during autoreconfigure that said that only variables containing _cv_ were cached, and ac_cv_lbl_unaligned_fail was already used in Buildroot, so I based the test on that one and set pgm_unaligned_pointers later from its result. --- package/Config.in | 1 + package/openpgm/Config.in | 16 ++++++++++++ package/openpgm/openpgm-cross-compile.patch | 38 +++++++++++++++++++++++++++++ package/openpgm/openpgm.mk | 18 ++++++++++++++ 4 files changed, 73 insertions(+) create mode 100644 package/openpgm/Config.in create mode 100644 package/openpgm/openpgm-cross-compile.patch create mode 100644 package/openpgm/openpgm.mk diff --git a/package/Config.in b/package/Config.in index 8a02506..b405922 100644 --- a/package/Config.in +++ b/package/Config.in @@ -527,6 +527,7 @@ source "package/libtorrent/Config.in" source "package/libupnp/Config.in" source "package/libvncserver/Config.in" source "package/nss-mdns/Config.in" +source "package/openpgm/Config.in" source "package/ortp/Config.in" source "package/slirp/Config.in" source "package/usbredir/Config.in" diff --git a/package/openpgm/Config.in b/package/openpgm/Config.in new file mode 100644 index 0000000..1b385a3 --- /dev/null +++ b/package/openpgm/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_OPENPGM + bool "openpgm" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INET_IPV6 + depends on BR2_USE_WCHAR + help + OpenPGM is an open source implementation of the Pragmatic General + Multicast (PGM) specification in RFC 3208 available at www.ietf.org. + PGM is a reliable and scalable multicast protocol that enables + receivers to detect loss, request retransmission of lost data, or + notify an application of unrecoverable loss. + + http://code.google.com/p/openpgm/ + +comment "openpgm needs a toolchain with WCHAR, threads and IPv6 support" + depends on !(BR2_TOOLCHAIN_HAS_THREADS && BR2_INET_IPV6 && BR2_USE_WCHAR) diff --git a/package/openpgm/openpgm-cross-compile.patch b/package/openpgm/openpgm-cross-compile.patch new file mode 100644 index 0000000..07a2449 --- /dev/null +++ b/package/openpgm/openpgm-cross-compile.patch @@ -0,0 +1,38 @@ +configure.ac: cross-compilation fix + +This patch enables to configure the package when cross-compiling in a way +recommended by Autoconf manual (see manual for version 2.69, Section 6.6 +Checking Runtime Behavior). + +Signed-off-by: Alexander Lukichev + +--- a/openpgm/pgm/configure.ac 2011-09-27 20:59:08.000000000 +0300 ++++ b/openpgm/pgm/configure.ac 2013-02-12 10:33:53.000000000 +0200 +@@ -272,14 +272,19 @@ uint32_t add32_with_carry (uint32_t a, u + ;; + esac + # ticket spinlock friendly: unaligned pointers & atomic ops (excl. Sun Pro) +-AC_MSG_CHECKING([for unaligned pointers]) +-AC_RUN_IFELSE( +- [AC_LANG_PROGRAM([[char* nezumi = "mouse";]], +- [[short x = *(short*)(nezumi + 2)]])], +- [AC_MSG_RESULT([yes]) +- pgm_unaligned_pointers=yes], +- [AC_MSG_RESULT([no]) +- pgm_unaligned_pointers=no]) ++AC_CACHE_CHECK([if unaligned access fails], [ac_cv_lbl_unaligned_fail], ++ [AC_RUN_IFELSE( ++ [AC_LANG_PROGRAM([[char* nezumi = "mouse";]], ++ [[short x = *(short*)(nezumi + 2)]])], ++ [ac_cv_lbl_unaligned_fail=no], ++ [ac_cv_lbl_unaligned_fail=yes], ++ [ac_cv_lbl_unaligned_fail=yes]) ++ ]) ++if test "$ac_cv_lbl_unaligned_fail" = yes; then ++ pgm_unaligned_pointers=no ++else ++ pgm_unaligned_pointers=yes ++fi + AC_MSG_CHECKING([for intrinsic atomic ops]) + # AC_PREPROC_IFELSE not always portable + AC_COMPILE_IFELSE( diff --git a/package/openpgm/openpgm.mk b/package/openpgm/openpgm.mk new file mode 100644 index 0000000..c476014 --- /dev/null +++ b/package/openpgm/openpgm.mk @@ -0,0 +1,18 @@ +############################################################# +# +# openpgm +# +############################################################# + +OPENPGM_VERSION = 5.1.118~dfsg +OPENPGM_SOURCE = libpgm-$(OPENPGM_VERSION).tar.gz +OPENPGM_SITE = http://openpgm.googlecode.com/files/ +OPENPGM_LICENSE = LGPLv2.1+ +OPENPGM_LICENSE_FILES = openpgm/pgm/LICENSE +OPENPGM_INSTALL_STAGING = YES +OPENPGM_AUTORECONF = YES +OPENPGM_SUBDIR = openpgm/pgm/ +OPENPGM_CONF_ENV = ac_cv_file__proc_cpuinfo=yes ac_cv_file__dev_rtc=no \ + ac_cv_file__dev_hpet=no + +$(eval $(autotools-package))