Subject: Re: Mutt, problems with colors
To: None <netbsd-users@netbsd.org>
From: Jan Schaumann <jschauma@netbsd.org>
List: netbsd-users
Date: 02/03/2002 18:34:58
Julio Merino <juli@merino.net> wrote:
 
> /usr/pkg/bin/mutt:
> 	 -lcurses.5 => /usr/lib/libcurses.so.5
 
> In fact, it is linked against curses... ooops, should it be ncurses?
> (with the N)?

Yes, it should.  Here's what I found out:

,----[ /usr/pkgsrc/mail/mutt-devel/Makefile ]
| [...]
| .if defined(MUTT_USE_SLANG) && ${MUTT_USE_SLANG} != NO
| .include "../../devel/libslang/buildlink.mk" 
| CONFIGURE_ARGS+=        --with-slang=${BUILDLINK_DIR}
| .else
| .include "../../devel/ncurses/buildlink.mk"
| CONFIGURE_ARGS+=        --with-curses=${BUILDLINK_DIR}
| .endif
| [...]
|
`----

Thus:

,----[ /usr/pkgsrc/devel/ncurses/buildlink.mk ]
| [...]
| .if defined(USE_NCURSES)
| _NEED_NCURSES=      YES
| .else
| .include "../../mk/bsd.prefs.mk"
| _NEED_NCURSES=      NO
| [...]
|
`----

And finally:

$ cd /usr/pkgsrc/mail/mutt-devel/
$ export USE_NCURSES=YES
$ make
$ ldd work.i386/work.i386/mutt-1.3.27/mutt
work.i386/mutt-1.3.27/mutt:
         -lncurses.5 => /usr/pkg/lib/libncurses.so.5
[...]

And this allows you to use "default" in your .muttrc.

Phew.  Took me a moment to figure it out after fuzzing around with
various "--with-curses=" options to "./configure", until I read the
complete Makefile and followed the includes...

Cool, this had been bugging me a bit for a while, too. :)

Alternatively, you can also build mutt against SLang instead, and that
also should allow you to use "default".  Haven't tried it, though.

-Jan

-- 
finger jschauma@netmeister.org