Patchwork [1/1] openpgm: new package

login
register
mail settings
Submitter Alexander Lukichev
Date Feb. 12, 2013, 10:47 a.m.
Message ID <1360666051-16475-2-git-send-email-alexander.lukichev@gmail.com>
Download mbox | patch
Permalink /patch/219783/
State Superseded
Headers show

Comments

Alexander Lukichev - Feb. 12, 2013, 10:47 a.m.
From: Alexander Lukichev <alexander.lukichev@espotel.com>

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 <alexander.lukichev@gmail.com>
---
 package/Config.in                           |  1 +
 package/openpgm/Config.in                   | 10 ++++++++++
 package/openpgm/openpgm-cross-compile.patch | 30 +++++++++++++++++++++++++++++
 package/openpgm/openpgm.mk                  | 18 +++++++++++++++++
 4 files changed, 59 insertions(+)
 create mode 100644 package/openpgm/Config.in
 create mode 100644 package/openpgm/openpgm-cross-compile.patch
 create mode 100644 package/openpgm/openpgm.mk
Thomas Petazzoni - Feb. 12, 2013, 10:53 a.m.
Dear Alexander Lukichev,

Looks really good now. The only thing missing I believe is a
description + Signed-off-by line in the
package/openpgm/openpgm-cross-compile.patch file.

Also, did you test this package against uClibc or glibc? If against
glibc, then you should make a test against a minimal uClibc
configuration (no thread, no largefile, no IPv6, no RPC, no wchar, no
locale), to check that your package indeed doesn't depend on any of
these uClibc features. If you don't want to build a minimal uClibc
toolchain from scratch, you may use
http://autobuild.buildroot.org/toolchains/tarballs/br-arm-basic.tar.bz2.

Best regards,

Thomas

On Tue, 12 Feb 2013 12:47:31 +0200, Alexander Lukichev wrote:
> From: Alexander Lukichev <alexander.lukichev@espotel.com>
> 
> 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 <alexander.lukichev@gmail.com>
> ---
>  package/Config.in                           |  1 +
>  package/openpgm/Config.in                   | 10 ++++++++++
>  package/openpgm/openpgm-cross-compile.patch | 30 +++++++++++++++++++++++++++++
>  package/openpgm/openpgm.mk                  | 18 +++++++++++++++++
>  4 files changed, 59 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 2fad94d..bfaf944 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -524,6 +524,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..e9e5ee6
> --- /dev/null
> +++ b/package/openpgm/Config.in
> @@ -0,0 +1,10 @@
> +config BR2_PACKAGE_OPENPGM
> +	bool "OpenPGM"
> +	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/
> diff --git a/package/openpgm/openpgm-cross-compile.patch b/package/openpgm/openpgm-cross-compile.patch
> new file mode 100644
> index 0000000..67fc9cf
> --- /dev/null
> +++ b/package/openpgm/openpgm-cross-compile.patch
> @@ -0,0 +1,30 @@
> +--- 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..34c5965
> --- /dev/null
> +++ b/package/openpgm/openpgm.mk
> @@ -0,0 +1,18 @@
> +#############################################################
> +#
> +# openpgm
> +#
> +#############################################################
> +
> +OPENPGM_VERSION = 5.2.121~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))
Alexander Lukichev - Feb. 12, 2013, 10:57 a.m.
Hi, Thomas!

On 02/12/2013 12:53 PM, Thomas Petazzoni wrote:
> The only thing missing I believe is a
> description + Signed-off-by line in the
> package/openpgm/openpgm-cross-compile.patch file.

Oops! I intended to do so but it fell out of my head. Will be fixed.

> Also, did you test this package against uClibc or glibc?
uClibc 0.9.33 only with largefile, threads and all the friends. I guess, threads are mandatory for this library. I'll set the correct dependencies and test with different base libs. Thanks.

--
Best regards,
  Alexander Lukichev
Arnout Vandecappelle - Feb. 12, 2013, 5:47 p.m.
On 12/02/13 11:57, Alexander Lukichev wrote:
> Hi, Thomas!
>
> On 02/12/2013 12:53 PM, Thomas Petazzoni wrote:
>> The only thing missing I believe is a
>> description + Signed-off-by line in the
>> package/openpgm/openpgm-cross-compile.patch file.
>
> Oops! I intended to do so but it fell out of my head. Will be fixed.
>
>> Also, did you test this package against uClibc or glibc?
> uClibc 0.9.33 only with largefile, threads and all the friends. I guess, threads are mandatory for this library. I'll set the correct dependencies and test with different base libs. Thanks.

  When you resubmit, please also:

- set the patch prefix to 'PATCH v3', using

git send-email --subject-prefix='PATCH v3' ...

- Include the changelog (which you now had in a separate mail) in the 
commit message itself, like so:

====================
openpgm: new package

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 <alexander.lukichev@gmail.com>
---
v3: Added Signed-off-by to the patch

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.
====================


  Regards,
  Arnout
Alexander Lukichev - Feb. 13, 2013, 7:30 a.m.
Hi, Arnout, All!

On 02/12/2013 07:47 PM, Arnout Vandecappelle wrote:
>  When you resubmit, please also:
> - set the patch prefix to 'PATCH v3', using
> - Include the changelog (which you now had in a separate mail) in the commit message itself, like so:
I will. Thanks!

--
Best regards,
  Alexander Lukichev

Patch

diff --git a/package/Config.in b/package/Config.in
index 2fad94d..bfaf944 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -524,6 +524,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..e9e5ee6
--- /dev/null
+++ b/package/openpgm/Config.in
@@ -0,0 +1,10 @@ 
+config BR2_PACKAGE_OPENPGM
+	bool "OpenPGM"
+	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/
diff --git a/package/openpgm/openpgm-cross-compile.patch b/package/openpgm/openpgm-cross-compile.patch
new file mode 100644
index 0000000..67fc9cf
--- /dev/null
+++ b/package/openpgm/openpgm-cross-compile.patch
@@ -0,0 +1,30 @@ 
+--- 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..34c5965
--- /dev/null
+++ b/package/openpgm/openpgm.mk
@@ -0,0 +1,18 @@ 
+#############################################################
+#
+# openpgm
+#
+#############################################################
+
+OPENPGM_VERSION = 5.2.121~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))