diff options
| author | Darren Hart <dvhart@linux.intel.com> | 2011-11-08 10:21:28 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-10 12:08:57 +0000 |
| commit | 90c789e57671475d6ebbc715e8070aec99e3137d (patch) | |
| tree | d7d569bd5f3daa63eab8426e8e172f27cdc68ba7 | |
| parent | c7dc1283f456e480b36ee627d9ef95cdeb84b9e0 (diff) | |
| download | poky-90c789e57671475d6ebbc715e8070aec99e3137d.tar.gz | |
ncurses: refactor configure to avoid configuring widec when disabled
The ENABLE_WIDEC variable can be used to disable ncurses wide character support
when your C library doesn't support it. Currently, the do_configure step
configures for both narrow and wide characters regardless and only checks
ENABLE_WIDEC during compilation. This leads to QA failures with host
contamination during configure if the C library doesn't support wide characters.
Refactor do_configure with a new ncurses_configure helper function and only
configure for wide character support if ENABLE_WIDEC is true.
Ensure that configure errors are propogated back through to do_configure.
Tested with ENABLE_WIDEC as true and false via an ncurses bbappend on i586,
including basic error injection.
V2: INC_PR bump
(From OE-Core rev: 8b995deb046469c1c713fa053510d2fe94454133)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/ncurses/ncurses.inc | 66 |
1 files changed, 35 insertions, 31 deletions
diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc index be7d387c9c..df9252a03b 100644 --- a/meta/recipes-core/ncurses/ncurses.inc +++ b/meta/recipes-core/ncurses/ncurses.inc | |||
| @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://ncurses/base/version.c;beginline=1;endline=27;md5=cbc | |||
| 6 | SECTION = "libs" | 6 | SECTION = "libs" |
| 7 | DEPENDS = "ncurses-native" | 7 | DEPENDS = "ncurses-native" |
| 8 | DEPENDS_virtclass-native = "" | 8 | DEPENDS_virtclass-native = "" |
| 9 | INC_PR = "r1" | 9 | INC_PR = "r2" |
| 10 | 10 | ||
| 11 | inherit autotools binconfig multilib_header | 11 | inherit autotools binconfig multilib_header |
| 12 | 12 | ||
| @@ -26,6 +26,36 @@ ENABLE_WIDEC = "true" | |||
| 26 | # builds. | 26 | # builds. |
| 27 | BUILD_CPPFLAGS += "-D_GNU_SOURCE" | 27 | BUILD_CPPFLAGS += "-D_GNU_SOURCE" |
| 28 | 28 | ||
| 29 | # Helper function for do_configure to allow multiple configurations | ||
| 30 | # $1 the directory to run configure in | ||
| 31 | # $@ the arguments to pass to configure | ||
| 32 | ncurses_configure() { | ||
| 33 | mkdir -p $1 | ||
| 34 | cd $1 | ||
| 35 | shift | ||
| 36 | oe_runconf \ | ||
| 37 | --disable-static \ | ||
| 38 | --without-debug \ | ||
| 39 | --without-ada \ | ||
| 40 | --without-gpm \ | ||
| 41 | --enable-hard-tabs \ | ||
| 42 | --enable-xmc-glitch \ | ||
| 43 | --enable-colorfgbg \ | ||
| 44 | --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \ | ||
| 45 | --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \ | ||
| 46 | --with-shared \ | ||
| 47 | --disable-big-core \ | ||
| 48 | --program-prefix= \ | ||
| 49 | --with-ticlib \ | ||
| 50 | --with-termlib=tinfo \ | ||
| 51 | --enable-sigwinch \ | ||
| 52 | --enable-pc-files \ | ||
| 53 | --disable-rpath-hack \ | ||
| 54 | --with-manpage-format=normal \ | ||
| 55 | "$@" || return 1 | ||
| 56 | cd .. | ||
| 57 | } | ||
| 58 | |||
| 29 | # Override the function from the autotools class; ncurses requires a | 59 | # Override the function from the autotools class; ncurses requires a |
| 30 | # patched autoconf213 to generate the configure script. This autoconf | 60 | # patched autoconf213 to generate the configure script. This autoconf |
| 31 | # is not available so that the shipped script will be used. | 61 | # is not available so that the shipped script will be used. |
| @@ -35,36 +65,10 @@ do_configure() { | |||
| 35 | # not the case for /dev/null redirections) | 65 | # not the case for /dev/null redirections) |
| 36 | export cf_cv_working_poll=yes | 66 | export cf_cv_working_poll=yes |
| 37 | 67 | ||
| 38 | for i in \ | 68 | ncurses_configure "narrowc" || \ |
| 39 | 'narrowc' \ | 69 | return 1 |
| 40 | 'widec --enable-widec --without-progs'; do | 70 | ! ${ENABLE_WIDEC} || \ |
| 41 | set -- $i | 71 | ncurses_configure "widec" "--enable-widec" "--without-progs" |
| 42 | mkdir -p $1 | ||
| 43 | cd $1 | ||
| 44 | shift | ||
| 45 | |||
| 46 | oe_runconf \ | ||
| 47 | --disable-static \ | ||
| 48 | --without-debug \ | ||
| 49 | --without-ada \ | ||
| 50 | --without-gpm \ | ||
| 51 | --enable-hard-tabs \ | ||
| 52 | --enable-xmc-glitch \ | ||
| 53 | --enable-colorfgbg \ | ||
| 54 | --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \ | ||
| 55 | --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \ | ||
| 56 | --with-shared \ | ||
| 57 | --disable-big-core \ | ||
| 58 | --program-prefix= \ | ||
| 59 | --with-ticlib \ | ||
| 60 | --with-termlib=tinfo \ | ||
| 61 | --enable-sigwinch \ | ||
| 62 | --enable-pc-files \ | ||
| 63 | --disable-rpath-hack \ | ||
| 64 | --with-manpage-format=normal \ | ||
| 65 | "$@" | ||
| 66 | cd .. | ||
| 67 | done | ||
| 68 | } | 72 | } |
| 69 | 73 | ||
| 70 | do_compile() { | 74 | do_compile() { |
