diff options
author | Maxin B. John <maxin.john@intel.com> | 2016-02-25 12:30:26 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-28 11:33:06 +0000 |
commit | 6c8abead0f2d7a06adf6cc4c16047a86ab3ff73d (patch) | |
tree | fa77907c88d796ef40e024d3f685d067f70efe18 /meta/recipes-support | |
parent | c7e5a38d232b97da81eb87aa1ef520c65c4692b4 (diff) | |
download | poky-6c8abead0f2d7a06adf6cc4c16047a86ab3ff73d.tar.gz |
uclibc support for rng-tools
Uclibc has its own argp implemented as libuargp. So, we add a new
option --enable-uclibc to select it.
(From OE-Core rev: 0bbbc0b377e4fd9a788f5aa7688afa5516e263dd)
Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r-- | meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch | 63 | ||||
-rw-r--r-- | meta/recipes-support/rng-tools/rng-tools_5.bb | 4 |
2 files changed, 66 insertions, 1 deletions
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 0000000000..e691315d16 --- /dev/null +++ b/meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch | |||
@@ -0,0 +1,63 @@ | |||
1 | In case of uclibc, use libuargp | ||
2 | |||
3 | If we use uclibc for system libraries, select libuargp | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
8 | --- | ||
9 | diff -Naur rng-tools-5-orig/configure.ac rng-tools-5/configure.ac | ||
10 | --- rng-tools-5-orig/configure.ac 2016-02-24 18:11:24.023690235 +0200 | ||
11 | +++ rng-tools-5/configure.ac 2016-02-24 18:14:49.763118138 +0200 | ||
12 | @@ -39,6 +39,13 @@ | ||
13 | [with_libargp=check] | ||
14 | ) | ||
15 | |||
16 | +AC_ARG_ENABLE([uclibc], | ||
17 | + AS_HELP_STRING([--enable-uclibc], [Use uclibc for system libraries]), | ||
18 | + use_uclibc=yes, use_uclibc=no) | ||
19 | +AM_CONDITIONAL(USE_UCLIBC, test "x$use_uclibc" = "xyes") | ||
20 | +AS_IF([test "x$use_uclibc" = "xyes"], [AC_DEFINE(USE_UCLIBC)]) | ||
21 | +AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.]) | ||
22 | + | ||
23 | dnl Make sure anyone changing configure.ac/Makefile.am has a clue | ||
24 | AM_MAINTAINER_MODE | ||
25 | |||
26 | @@ -101,7 +108,7 @@ | ||
27 | [need_libargp=no], | ||
28 | [need_libargp=yes | ||
29 | if test "x$with_libargp" = "xno"; then | ||
30 | - AC_MSG_FAILURE([libargp disabled and libc does not have argp]) | ||
31 | + AC_MSG_WARN([libargp disabled and libc does not have argp]) | ||
32 | fi] | ||
33 | ) | ||
34 | ], | ||
35 | @@ -110,7 +117,7 @@ | ||
36 | |||
37 | dnl Check for libargp | ||
38 | AS_IF( | ||
39 | - [test "x$need_libargp" = "xyes"], | ||
40 | + [test "x$need_libargp" = "xyes" -a "x$use_uclibc" = "xno"], | ||
41 | [ | ||
42 | AC_CHECK_LIB( | ||
43 | [argp], | ||
44 | @@ -120,6 +127,19 @@ | ||
45 | ) | ||
46 | ] | ||
47 | ) | ||
48 | + | ||
49 | +dnl Check for libuargp | ||
50 | +AS_IF( | ||
51 | + [test "x$use_uclibc" = "xyes"], | ||
52 | + [ | ||
53 | + AC_CHECK_LIB( | ||
54 | + [uargp], | ||
55 | + [argp_parse], | ||
56 | + [LIBS="$LIBS -luargp"], | ||
57 | + [AC_MSG_FAILURE([libuargp not found])] | ||
58 | + ) | ||
59 | + ] | ||
60 | +) | ||
61 | |||
62 | dnl ----------------- | ||
63 | 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 bc679904eb..53d2d6165e 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 \ | |||
6 | file://0001-If-the-libc-is-lacking-argp-use-libargp.patch \ | 6 | file://0001-If-the-libc-is-lacking-argp-use-libargp.patch \ |
7 | file://0002-Add-argument-to-control-the-libargp-dependency.patch \ | 7 | file://0002-Add-argument-to-control-the-libargp-dependency.patch \ |
8 | file://underquote.patch \ | 8 | file://underquote.patch \ |
9 | file://uclibc-libuargp-configure.patch \ | ||
9 | file://init \ | 10 | file://init \ |
10 | file://default" | 11 | file://default" |
11 | 12 | ||
@@ -23,8 +24,9 @@ inherit autotools update-rc.d | |||
23 | 24 | ||
24 | PACKAGECONFIG = "libgcrypt" | 25 | PACKAGECONFIG = "libgcrypt" |
25 | PACKAGECONFIG_libc-musl = "libargp" | 26 | PACKAGECONFIG_libc-musl = "libargp" |
26 | PACKAGECONFIG_libc-uclibc = "libargp" | 27 | PACKAGECONFIG_libc-uclibc = "libuargp" |
27 | PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone," | 28 | PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone," |
29 | PACKAGECONFIG[libuargp] = "--enable-uclibc,,," | ||
28 | PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt," | 30 | PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt," |
29 | 31 | ||
30 | do_install_append() { | 32 | do_install_append() { |