Created attachment 190521 [details]
ports ncurses build fix
After switch to clang for build, ghc fails to build with ncurses from ports:
configure: error: in `/usr/local/ports/lang/ghc/work/ghc-8.0.2/libraries/terminfo':
configure: error: curses headers could not be found, so this package cannot be built
See `config.log' for more details
NCURSESINC points to NCURSESBASE/include/ncurses while ncurses.h includes files with path relative to include directory:
In file included from conftest.c:52:
/usr/local/include/ncurses/ncurses.h:60:10: fatal error: 'ncurses/ncurses_dll.h' file not found
1 error generated.
Proposed patch fixes build by altering NCURSESINC. Was tested with ncurses from base and ports on all supported releases.
I poked around it a bit and concluded that this looks like a bug in ncurses.mk. I don't see how ncurses from ports can be usable when setting NCURSESINC to /usr/local/include/ncurses
For the time being, I think this can be commited as a sensible workaround. When I find spare time I'll go over the ports tree to fix NCURSESINC usage.
I've included your patch in the last GHC update. Sorry for not giving you credits in the commit message, there was too much changes :<