public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: <Openembedded-core@lists.openembedded.org>
Subject: [PATCH] ncurses.inc: Fix display corruption and add fallback for sstate compiled paths
Date: Sat, 9 Feb 2013 16:06:57 -0600	[thread overview]
Message-ID: <1360447617-26341-1-git-send-email-jason.wessel@windriver.com> (raw)

CQID: WIND00402979

Display corruption was occurring on 64 bit hosts using menuconfig for
the kernel and busybox with the ncurses-native or ncurses-nativesdk
because the configure arguments were not sufficient vs the expected
use from the upstream source.

Also changed in this commit is to provide a fallback to the hard
compiled paths for the terminfo and termcap.  Eventually this needs to
be fixed another way if we want a truly portable SDK because any SDK
that is relocated or native binaries pulled out of the sstate can end
up referencing terminfo files that no longer are in the same location.
Because the host system has terminfo files that ncurses will happily
use we might as well have a fall back to buy some time for a better
fix, vs having thing just not work occasionally when using sstate.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
 meta/recipes-core/ncurses/ncurses.inc |   32 +++++++++++++++++++++++++++++---
 1 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
index 5fdd994..9250e9d 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
 SECTION = "libs"
 DEPENDS = "ncurses-native"
 DEPENDS_class-native = ""
-INC_PR = "r13"
+INC_PR = "r14"
 
 inherit autotools binconfig multilib_header
 
@@ -29,6 +29,31 @@ BUILD_CPPFLAGS += "-D_GNU_SOURCE"
 # natives don't generally look in base_libdir
 base_libdir_class-native = "${libdir}"
 
+# Display corruption occurs on 64 bit hosts without these settings
+# This was derrived from the upstream debian ncurses which uses
+# these settings for 32 and 64 bit hosts.
+EXCONFIG_ARGS = ""
+EXCONFIG_ARGS_virtclass-native = " \
+		--disable-lp64 \
+		--with-chtype='long' \
+		--with-mmask-t='long'"
+EXCONFIG_ARGS_virtclass-nativesdk = " \
+		--disable-lp64 \
+		--with-chtype='long' \
+		--with-mmask-t='long'"
+
+# Fall back to the host termcap / terminfo for -nativesdk and -native
+# The reality is a work around for strange problems with things like
+# "bitbake -c menuconfig busybox" where it cannot find the terminfo
+# because the sstate had a hard coded search path.  Until this is fixed
+# another way this is deemed good enough.
+EX_TERMCAP = ""
+EX_TERMCAP_virtclass-native = ":/etc/termcap:/usr/share/misc/termcap"
+EX_TERMCAP_virtclass-nativesdk = ":/etc/termcap:/usr/share/misc/termcap"
+EX_TERMINFO = ""
+EX_TERMINFO_virtclass-native = ":/etc/terminfo:/usr/share/misc/terminfo:/lib/terminfo"
+EX_TERMINFO_virtclass-nativesdk = ":/etc/terminfo:/usr/share/misc/terminfo:/lib/terminfo"
+
 # Helper function for do_configure to allow multiple configurations
 # $1 the directory to run configure in
 # $@ the arguments to pass to configure
@@ -44,8 +69,8 @@ ncurses_configure() {
 	        --enable-hard-tabs \
 	        --enable-xmc-glitch \
 	        --enable-colorfgbg \
-	        --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \
-	        --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \
+	        --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap${EX_TERMCAP}' \
+	        --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo${EX_TERMINFO}' \
 	        --with-shared \
 	        --disable-big-core \
 	        --program-prefix= \
@@ -54,6 +79,7 @@ ncurses_configure() {
 	        --enable-sigwinch \
 	        --enable-pc-files \
 	        --disable-rpath-hack \
+		${EXCONFIG_ARGS} \
 	        --with-manpage-format=normal \
 	        "$@" || return 1
 	cd ..
-- 
1.7.1




                 reply	other threads:[~2013-02-09 22:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360447617-26341-1-git-send-email-jason.wessel@windriver.com \
    --to=jason.wessel@windriver.com \
    --cc=Openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox