ncurses: refactor configure to avoid configuring widec when disabled
cover ncurses: refactor configure to avoid configuring widec when disabled
The following changes since commit e5226b1e44052b2fe5370f4922397a1d68985aaf:
clutter-1.8: add bbappend for new clutter-1.8 recipe (2011-11-08 17:53:18 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib dvhart/tiny
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/tiny
Darren Hart (1):
ncurses: refactor configure to avoid configuring widec when disabled
meta/recipes-core/ncurses/ncurses.inc | 64 +++++++++++++++++--------------- 1 files changed, 34 insertions(+), 30 deletions(-)
Signature · 1 line
1.7.6.4
PATCH 1/1 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.
--- meta/recipes-core/ncurses/ncurses.inc | 64 +++++++++++++++++--------------- 1 files changed, 34 insertions(+), 30 deletions(-)
meta/recipes-core/ncurses/ncurses.inc +34 -30
@@ -26,6 +26,36 @@ ENABLE_WIDEC = "true" # builds. BUILD_CPPFLAGS += "-D_GNU_SOURCE" +# Helper function for do_configure to allow multiple configurations +# $1 the directory to run configure in +# $@ the arguments to pass to configure +ncurses_configure() { + mkdir -p $1 + cd $1 + shift + oe_runconf \ + --disable-static \ + --without-debug \ + --without-ada \ + --without-gpm \ + --enable-hard-tabs \ + --enable-xmc-glitch \ + --enable-colorfgbg \ + --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \ + --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \ + --with-shared \ + --disable-big-core \ + --program-prefix= \ + --with-ticlib \ + --with-termlib=tinfo \ + --enable-sigwinch \ + --enable-pc-files \ + --disable-rpath-hack \ + --with-manpage-format=normal \ + "$@" || return 1 + cd .. +} + # Override the function from the autotools class; ncurses requires a # patched autoconf213 to generate the configure script. This autoconf # is not available so that the shipped script will be used.
@@ -35,36 +65,10 @@ do_configure() { # not the case for /dev/null redirections) export cf_cv_working_poll=yes - for i in \ - 'narrowc' \ - 'widec --enable-widec --without-progs'; do - set -- $i - mkdir -p $1 - cd $1 - shift - - oe_runconf \ - --disable-static \ - --without-debug \ - --without-ada \ - --without-gpm \ - --enable-hard-tabs \ - --enable-xmc-glitch \ - --enable-colorfgbg \ - --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \ - --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \ - --with-shared \ - --disable-big-core \ - --program-prefix= \ - --with-ticlib \ - --with-termlib=tinfo \ - --enable-sigwinch \ - --enable-pc-files \ - --disable-rpath-hack \ - --with-manpage-format=normal \ - "$@" - cd .. - done + ncurses_configure "narrowc" || \ + return 1 + ! ${ENABLE_WIDEC} || \ + ncurses_configure "widec" "--enable-widec" "--without-progs" } do_compile() {
Signature · 1 line
1.7.6.4
Quoted 24 lines · Darren Hart
The
ENABLE_WIDECvariable can be used to disable ncurses wide character support when your C library doesn't support it. Currently, thedo_configurestep configures for both narrow and wide characters regardless and only checksENABLE_WIDECduring compilation. This leads to QA failures with host contamination during configure if the C library doesn't support wide characters.Refactor
do_configurewith a newncurses_configurehelper function and only configure for wide character support ifENABLE_WIDECis true.Ensure that configure errors are propogated back through to
do_configure.Tested with
ENABLE_WIDECas true and false via an ncurses bbappend on i586, including basic error injection.Signed-off-by Darren Hart<[email protected]>--- meta/recipes-core/ncurses/ncurses.inc | 64 +++++++++++++++++--------------- 1 files changed, 34 insertions(+), 30 deletions(-)meta/recipes-core/ncurses/ncurses.inc +0
-0
meta/recipes-core/ncurses/ncurses.inc ENABLE_WIDEC = "true" · line 28
Quoted 3 lines
meta/recipes-core/ncurses/ncurses.inc +0
-0@@ -26,6 +26,36 @@ ENABLE_WIDEC = "true" # builds. BUILD_CPPFLAGS += "-D_GNU_SOURCE"
No PR Bump!
Sau!
Quoted 74 lines
meta/recipes-core/ncurses/ncurses.inc +34
-30+# Helper function for do_configure to allow multiple configurations +# $1 the directory to run configure in +# $@ the arguments to pass to configure +ncurses_configure() { + mkdir -p $1 + cd $1 + shift + oe_runconf \ + --disable-static \ + --without-debug \ + --without-ada \ + --without-gpm \ + --enable-hard-tabs \ + --enable-xmc-glitch \ + --enable-colorfgbg \ + --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \ + --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \ + --with-shared \ + --disable-big-core \ + --program-prefix= \ + --with-ticlib \ + --with-termlib=tinfo \ + --enable-sigwinch \ + --enable-pc-files \ + --disable-rpath-hack \ + --with-manpage-format=normal \ + "$@" || return 1 + cd .. +} + # Override the function from the autotools class; ncurses requires a # patched autoconf213 to generate the configure script. This autoconf # is not available so that the shipped script will be used.@@ -35,36 +65,10 @@ do_configure() { # not the case for /dev/null redirections) export cf_cv_working_poll=yes - for i in \ - 'narrowc' \ - 'widec --enable-widec --without-progs'; do - set -- $i - mkdir -p $1 - cd $1 - shift - - oe_runconf \ - --disable-static \ - --without-debug \ - --without-ada \ - --without-gpm \ - --enable-hard-tabs \ - --enable-xmc-glitch \ - --enable-colorfgbg \ - --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \ - --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \ - --with-shared \ - --disable-big-core \ - --program-prefix= \ - --with-ticlib \ - --with-termlib=tinfo \ - --enable-sigwinch \ - --enable-pc-files \ - --disable-rpath-hack \ - --with-manpage-format=normal \ - "$@" - cd .. - done + ncurses_configure "narrowc" || \ + return 1 + ! ${ENABLE_WIDEC} || \ + ncurses_configure "widec" "--enable-widec" "--without-progs" } do_compile() {
Quoted 20 lines · Saul Wold
Quoted 19 lines · Darren Hart
The
ENABLE_WIDECvariable can be used to disable ncurses wide character support when your C library doesn't support it. Currently, thedo_configurestep configures for both narrow and wide characters regardless and only checksENABLE_WIDECduring compilation. This leads to QA failures with host contamination during configure if the C library doesn't support wide characters.Refactor
do_configurewith a newncurses_configurehelper function and only configure for wide character support ifENABLE_WIDECis true.Ensure that configure errors are propogated back through to
do_configure.Tested with
ENABLE_WIDECas true and false via an ncurses bbappend on i586, including basic error injection.Signed-off-by Darren Hart<[email protected]>--- meta/recipes-core/ncurses/ncurses.inc | 64 +++++++++++++++++--------------- 1 files changed, 34 insertions(+), 30 deletions(-)
Quoted 9 lines
meta/recipes-core/ncurses/ncurses.inc ENABLE_WIDEC = "true" · line 28
Quoted 8 lines
meta/recipes-core/ncurses/ncurses.inc +0
-0@@ -26,6 +26,36 @@ ENABLE_WIDEC = "true" # builds. BUILD_CPPFLAGS += "-D_GNU_SOURCE"No PR Bump!
Right, duh. Thanks for catching. I've pushed to the same location having added:
-INC_PR = "r1"
+INC_PR = "r2"
Thanks,
Signature · 3 lines
Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel
Saul Wold
AppliedQuoted 8 lines · Darren Hart
The following changes since commit
e5226b1e44052b2fe5370f4922397a1d68985aaf:clutter-1.8: add bbappend for new clutter-1.8 recipe (2011-11-08 17:53:18 +0000)are available in the git repository at:
git://git.pokylinux.org/poky-contribdvhart/tiny
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/tiny
Quoted 6 lines
Darren Hart (1):
ncurses: refactor configure to avoid configuring widec when disabledmeta/recipes-core/ncurses/ncurses.inc | 64 +++++++++++++++++--------------- 1 files changed, 34 insertions(+), 30 deletions(-)
Merged into OE-Core
Thanks
Sau!