Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 367023 - mail-client/mutt-1.5.21-r1: build is dependent on USE flag "unicode", but the ebuild doesn't recognise this.
Summary: mail-client/mutt-1.5.21-r1: build is dependent on USE flag "unicode", but the...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-12 19:02 UTC by Alan Mackenzie
Modified: 2011-05-14 08:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Mackenzie 2011-05-12 19:02:14 UTC
1. Build a gentoo system, including mutt, with the USE flag "unicode" disabled.
2. Change "unicode" to enabled and do "merge -ND @world".  This fails to rebuild mutt.
Mutt needs rebuilding since it formerly linked with libncurses.so, yet now must link with libncursesW.so.

Reproducible: Always

Steps to Reproduce:
1.See above
2.
3.
Actual Results:  
The 8-bit mutt in a unicode environment outputs rubbish where non-ASCII characters are output.
Comment 1 Rafał Mużyło 2011-05-12 19:59:37 UTC
In what way exactly does it fail ?
Do you mean "mutt needs a 'unicode? (ncurses[unicode=]) ' dep" ?
Comment 2 Alan Mackenzie 2011-05-12 20:35:28 UTC
mutt (built with libncurses.so) fails in a UTF-8 locale thus: Go to the message index screen; in place of the expected line graphics appear ASCIIified strings like "M-b~T~\".  Non-ASCII alphabetic characters are also mangled.

> Do you mean "mutt needs a 'unicode? (ncurses[unicode=]) ' dep" ?
I think so.  I don't fully understand the above code snippet.
Comment 3 Fabian Groffen gentoo-dev 2011-05-13 06:50:35 UTC
I don't quite understand yet what you want.

Is it that you want an unicode flag which forces mutt to use ncursesw vs ncurses?
Comment 4 Alan Mackenzie 2011-05-13 07:27:36 UTC
I want a _change_ in the unicode flag to trigger a rebuild of mutt.
Comment 5 Fabian Groffen gentoo-dev 2011-05-13 08:10:17 UTC
since mutt doesn't have a unicode flag, it means one has to be added
Comment 6 Alan Mackenzie 2011-05-13 08:19:28 UTC
Yes.  This is hopfully straightforward.
Comment 7 Fabian Groffen gentoo-dev 2011-05-13 17:29:50 UTC
I looked briefly at the code, and unfortunately it isn't.

I don't consider this to be a common case (what you did), but patches are welcome.
Comment 8 Alan Mackenzie 2011-05-13 18:59:52 UTC
No, this will happen only rarely.  Nevertheless it is a bug.  Simply inserting "unicode" into IUSE fixes it for me:

acm@acm /usr/portage/mail-client/mutt $ diff -u mutt-1.5.21-r1.ebuild{~,}
--- mutt-1.5.21-r1.ebuild~	2011-04-17 18:31:15.000000000 +0000
+++ mutt-1.5.21-r1.ebuild	2011-05-13 18:28:22.000000000 +0000
@@ -13,7 +13,7 @@
 SRC_URI="ftp://ftp.mutt.org/mutt/devel/${P}.tar.gz
 	mirror://gentoo/${P}-gentoo-patches${PATCHSET_REV}.tar.bz2
 	http://dev.gentoo.org/~grobian/distfiles/${P}-gentoo-patches${PATCHSET_REV}.tar.bz2"
-IUSE="berkdb crypt debug doc gdbm gnutls gpg idn imap mbox nls nntp pop qdbm sasl sidebar smime smtp ssl tokyocabinet"
+IUSE="berkdb crypt debug doc gdbm gnutls gpg idn imap mbox nls nntp pop qdbm sasl sidebar smime smtp ssl tokyocabinet unicode"
 SLOT="0"
 LICENSE="GPL-2"
 KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
Comment 9 Fabian Groffen gentoo-dev 2011-05-13 20:47:32 UTC
yeah, but it doesn't do anything

USE=unicode emerge mutt doesn't pull in ncurses[unicode], and even if that dep is set, it isn't enforced by the configure script.
Comment 10 Fabian Groffen gentoo-dev 2011-05-13 20:47:59 UTC
IOW: if your ncurses has unicode, USE=-unicode emerge mutt will still give you a mutt linked to ncursesw.
Comment 11 Alan Mackenzie 2011-05-13 21:15:01 UTC
(In reply to comment #9)
> yeah, but it doesn't do anything

Oh it does.  In the situation I was previously in (unicode changing from - to +, mutt still linked with ncurses), the change to the ebuild causes mutt to be rebuilt and linked to (the newly built) ncursesw.

> USE=unicode emerge mutt doesn't pull in ncurses[unicode], and even if that dep
> is set, it isn't enforced by the configure script.

mutt's configure script searches for ncursesw and uses it if it finds it.  Otherwise it falls back to using ncurses.

If -unicode, ncursesw shouldn't exist.
Comment 12 Fabian Groffen gentoo-dev 2011-05-14 08:39:03 UTC
(In reply to comment #11)
> If -unicode, ncursesw shouldn't exist.

only if you put it in your global USE, and keep your system in shape...