Simple question about ncurses and ncursesw

Ryan Schmidt ryandesign at
Mon Mar 15 16:40:14 PDT 2010

On Mar 15, 2010, at 10:49, Scott Haneda wrote:

> I think it will be rare enough that MacPorts needs to accomodate this scenario. Rare enough it would not be worth a change to the MP base to add multiple compile stages.

It is already possible to do with MacPorts, though not easy. See the muniversal and php5extension portgroups for possible strategies.

> If this is common with ncurses, why would ncurses simply not go forward with a flag of --with-wide-and-narrow or whatever.

> Perhaps that is where the bug report needs to be focused? Is there any reason that would be objectionable?

They probably wouldn't want a combined option like that. ncurses currently builds with wide character support if the --enable-widec option is given and builds with narrow character support if that option is not given. IMHO supporting something like "--enable-widec --enable-narrowc" would make sense to me.

> How does this even work? If I build software x with foo support and then build it again with widefoo support, the foo version will be overwritten and I end up with just foowide. Or, I otherwise end up with the last options of which I installed. Installing by hand has always meant a new install, not an appending ofan existing install, sans config files perhaps. Aside from making a second installation prefix.

If you look at the files actually installed by the ncurses and ncursesw ports, you will see the files are named differently. ncurses installs headers into include/ncurses and installs the library libncurses.dylib, while ncursesw installs headers into include/ncursesw and installs the library libncursesw.dylib. If you look at the portfiles, there's nothing there that causes this to happen; the upstream ncurses software package does this automatically depending on whether --enable-widec is given.

> I suppose a config file to enable wide character support would be another option.

It seems there are things that need to be built at compile time in order to support either wide or narrow characters. We want both available simultaneously, so we compile twice. A config file is not appropriate, if you mean that in the config file the user would indicate whether they want wide or narrow, both because the user is not the individual who should need to know this (the maintainer of the various dependent ports is), and because different dependent ports require different ncurses capabilities, thus we really need both at the same time.

> I'm curious why this is this way from an ncurses perspective?

You will have to ask the developers of that software.

> I seem to recall that ncurses is one that takes a long while to install no less.

Yes it does.

More information about the macports-users mailing list