tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Doing more with curses.buildlink3.mk



Dieter Baron wrote:
In article <47BEFD99.5030007%pkgsrc.org@localhost> Johnny wrote:
: Please review the attached patch to curses.buildlink3.mk. The goal of : the patch is to allow a user to choose to use ncurses over whatever : curses is installed in the base system. This can be done by setting the : following in /etc/mk.conf:

:         CURSES_DEFAULT= ncurses

  Why not use PREFER_PKGSRC, like the other checks wether to use a
native or a pkgsrc implementation?

You're envisioning something like the following?

        PREFER_PKGSRC+= curses  # use a pkgsrc curses.

I rejected this because I was looking at adding support for different curses implementations in pkgsrc, and the PREFER mechanism doesn't encompass that. Eventually, I'd like for CURSES_DEFAULT to allow the following values:

        curses, ncurses, ncursesw, pdcurses

I'd eventually like to make using ncursesw more transparent, so that all packages that link against curses and use ncursesw instead.

The current changes I'm proposing for curses.buildlink3.mk should allow a user to decide to use pkgsrc to supply the curses implementation by doing the following:

        CURSES_DEFAULT= ncurses
        PREFER_PKGSRC+= ncurses

The user still has to pick the desired curses implementation, but then all packages that include curses.buildlink3.mk will use that implementation. These changes aren't entirely complete -- currently, I'm relying on the package's configure script to look for curses then ncurses (this is incredibly common), but not all packages look for ncursesw yet, so I'll be adding some code later to allow "<curses.h>" and "-lcurses" to mean the right headers and libraries instead.

        Cheers,

        -- Johnny C. Lam


Home | Main Index | Thread Index | Old Index