* [PATCH] uclibc support for rng-tools
@ 2016-02-25 10:30 Maxin B. John
2016-02-26 8:01 ` Khem Raj
0 siblings, 1 reply; 2+ messages in thread
From: Maxin B. John @ 2016-02-25 10:30 UTC (permalink / raw)
To: openembedded-core
Uclibc has its own argp implemented as libuargp. So, we add a new
option --enable-uclibc to select it.
Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
.../rng-tools/uclibc-libuargp-configure.patch | 63 ++++++++++++++++++++++
meta/recipes-support/rng-tools/rng-tools_5.bb | 4 +-
2 files changed, 66 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch
diff --git a/meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch b/meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch
new file mode 100644
index 0000000..e691315
--- /dev/null
+++ b/meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch
@@ -0,0 +1,63 @@
+In case of uclibc, use libuargp
+
+If we use uclibc for system libraries, select libuargp
+
+Upstream-Status: Pending
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+diff -Naur rng-tools-5-orig/configure.ac rng-tools-5/configure.ac
+--- rng-tools-5-orig/configure.ac 2016-02-24 18:11:24.023690235 +0200
++++ rng-tools-5/configure.ac 2016-02-24 18:14:49.763118138 +0200
+@@ -39,6 +39,13 @@
+ [with_libargp=check]
+ )
+
++AC_ARG_ENABLE([uclibc],
++ AS_HELP_STRING([--enable-uclibc], [Use uclibc for system libraries]),
++ use_uclibc=yes, use_uclibc=no)
++AM_CONDITIONAL(USE_UCLIBC, test "x$use_uclibc" = "xyes")
++AS_IF([test "x$use_uclibc" = "xyes"], [AC_DEFINE(USE_UCLIBC)])
++AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.])
++
+ dnl Make sure anyone changing configure.ac/Makefile.am has a clue
+ AM_MAINTAINER_MODE
+
+@@ -101,7 +108,7 @@
+ [need_libargp=no],
+ [need_libargp=yes
+ if test "x$with_libargp" = "xno"; then
+- AC_MSG_FAILURE([libargp disabled and libc does not have argp])
++ AC_MSG_WARN([libargp disabled and libc does not have argp])
+ fi]
+ )
+ ],
+@@ -110,7 +117,7 @@
+
+ dnl Check for libargp
+ AS_IF(
+- [test "x$need_libargp" = "xyes"],
++ [test "x$need_libargp" = "xyes" -a "x$use_uclibc" = "xno"],
+ [
+ AC_CHECK_LIB(
+ [argp],
+@@ -120,6 +127,19 @@
+ )
+ ]
+ )
++
++dnl Check for libuargp
++AS_IF(
++ [test "x$use_uclibc" = "xyes"],
++ [
++ AC_CHECK_LIB(
++ [uargp],
++ [argp_parse],
++ [LIBS="$LIBS -luargp"],
++ [AC_MSG_FAILURE([libuargp not found])]
++ )
++ ]
++)
+
+ dnl -----------------
+ dnl Configure options
diff --git a/meta/recipes-support/rng-tools/rng-tools_5.bb b/meta/recipes-support/rng-tools/rng-tools_5.bb
index bc67990..53d2d61 100644
--- a/meta/recipes-support/rng-tools/rng-tools_5.bb
+++ b/meta/recipes-support/rng-tools/rng-tools_5.bb
@@ -6,6 +6,7 @@ SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/gkernel/${BP}.tar.gz \
file://0001-If-the-libc-is-lacking-argp-use-libargp.patch \
file://0002-Add-argument-to-control-the-libargp-dependency.patch \
file://underquote.patch \
+ file://uclibc-libuargp-configure.patch \
file://init \
file://default"
@@ -23,8 +24,9 @@ inherit autotools update-rc.d
PACKAGECONFIG = "libgcrypt"
PACKAGECONFIG_libc-musl = "libargp"
-PACKAGECONFIG_libc-uclibc = "libargp"
+PACKAGECONFIG_libc-uclibc = "libuargp"
PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone,"
+PACKAGECONFIG[libuargp] = "--enable-uclibc,,,"
PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt,"
do_install_append() {
--
2.4.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] uclibc support for rng-tools
2016-02-25 10:30 [PATCH] uclibc support for rng-tools Maxin B. John
@ 2016-02-26 8:01 ` Khem Raj
0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2016-02-26 8:01 UTC (permalink / raw)
To: Maxin B. John; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 4095 bytes --]
its better fix
> On Feb 25, 2016, at 2:30 AM, Maxin B. John <maxin.john@intel.com> wrote:
>
> Uclibc has its own argp implemented as libuargp. So, we add a new
> option --enable-uclibc to select it.
>
> Signed-off-by: Maxin B. John <maxin.john@intel.com>
> ---
> .../rng-tools/uclibc-libuargp-configure.patch | 63 ++++++++++++++++++++++
> meta/recipes-support/rng-tools/rng-tools_5.bb | 4 +-
> 2 files changed, 66 insertions(+), 1 deletion(-)
> create mode 100644 meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch
>
> diff --git a/meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch b/meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch
> new file mode 100644
> index 0000000..e691315
> --- /dev/null
> +++ b/meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch
> @@ -0,0 +1,63 @@
> +In case of uclibc, use libuargp
> +
> +If we use uclibc for system libraries, select libuargp
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Maxin B. John <maxin.john@intel.com>
> +---
> +diff -Naur rng-tools-5-orig/configure.ac rng-tools-5/configure.ac
> +--- rng-tools-5-orig/configure.ac 2016-02-24 18:11:24.023690235 +0200
> ++++ rng-tools-5/configure.ac 2016-02-24 18:14:49.763118138 +0200
> +@@ -39,6 +39,13 @@
> + [with_libargp=check]
> + )
> +
> ++AC_ARG_ENABLE([uclibc],
> ++ AS_HELP_STRING([--enable-uclibc], [Use uclibc for system libraries]),
> ++ use_uclibc=yes, use_uclibc=no)
> ++AM_CONDITIONAL(USE_UCLIBC, test "x$use_uclibc" = "xyes")
> ++AS_IF([test "x$use_uclibc" = "xyes"], [AC_DEFINE(USE_UCLIBC)])
> ++AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.])
> ++
> + dnl Make sure anyone changing configure.ac/Makefile.am has a clue
> + AM_MAINTAINER_MODE
> +
> +@@ -101,7 +108,7 @@
> + [need_libargp=no],
> + [need_libargp=yes
> + if test "x$with_libargp" = "xno"; then
> +- AC_MSG_FAILURE([libargp disabled and libc does not have argp])
> ++ AC_MSG_WARN([libargp disabled and libc does not have argp])
> + fi]
> + )
> + ],
> +@@ -110,7 +117,7 @@
> +
> + dnl Check for libargp
> + AS_IF(
> +- [test "x$need_libargp" = "xyes"],
> ++ [test "x$need_libargp" = "xyes" -a "x$use_uclibc" = "xno"],
> + [
> + AC_CHECK_LIB(
> + [argp],
> +@@ -120,6 +127,19 @@
> + )
> + ]
> + )
> ++
> ++dnl Check for libuargp
> ++AS_IF(
> ++ [test "x$use_uclibc" = "xyes"],
> ++ [
> ++ AC_CHECK_LIB(
> ++ [uargp],
> ++ [argp_parse],
> ++ [LIBS="$LIBS -luargp"],
> ++ [AC_MSG_FAILURE([libuargp not found])]
> ++ )
> ++ ]
> ++)
> +
> + dnl -----------------
> + dnl Configure options
> diff --git a/meta/recipes-support/rng-tools/rng-tools_5.bb b/meta/recipes-support/rng-tools/rng-tools_5.bb
> index bc67990..53d2d61 100644
> --- a/meta/recipes-support/rng-tools/rng-tools_5.bb
> +++ b/meta/recipes-support/rng-tools/rng-tools_5.bb
> @@ -6,6 +6,7 @@ SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/gkernel/${BP}.tar.gz \
> file://0001-If-the-libc-is-lacking-argp-use-libargp.patch \
> file://0002-Add-argument-to-control-the-libargp-dependency.patch \
> file://underquote.patch \
> + file://uclibc-libuargp-configure.patch \
is there tab and space mix here ?
> file://init \
> file://default"
>
> @@ -23,8 +24,9 @@ inherit autotools update-rc.d
>
> PACKAGECONFIG = "libgcrypt"
> PACKAGECONFIG_libc-musl = "libargp"
> -PACKAGECONFIG_libc-uclibc = "libargp"
> +PACKAGECONFIG_libc-uclibc = "libuargp"
> PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone,"
> +PACKAGECONFIG[libuargp] = "--enable-uclibc,,,"
> PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt,"
>
> do_install_append() {
> --
> 2.4.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-26 8:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-25 10:30 [PATCH] uclibc support for rng-tools Maxin B. John
2016-02-26 8:01 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.