Adapt editor/nano for ncurses-6.0
The OI source is from 2018. Consequently, there may be a new version of the source, or some of the bugs may have already been fixed. Though the changes have been developed on SPARC hardware, they might correct bugs in some x86 packages. In any case, they should not damage other x86 packages.
While building editor/nano, I got this error:
checking for ncursesw... no checking ncurses.h usability... yes checking ncurses.h presence... no configure: WARNING: ncurses.h: accepted by the compiler, rejected by the preprocessor! configure: WARNING: ncurses.h: proceeding with the compiler's result checking for ncurses.h... yes checking for ncursesw5-config... ncursesw5-config checking for get_wch in -lncursesw... no checking for initscr in -lncurses... yes Using ncurses as the curses library checking for use_default_colors in -lncurses... yes checking for set_escdelay in -lncurses... yes checking for key_defined in -lncurses... yes configure: error: *** UTF-8 support was requested, but insufficient UTF-8 support was *** detected in your curses and/or C libraries. Please verify that your *** slang was built with UTF-8 support or your curses was built with *** wide character support, and that your C library was built with wide *** character support. gmake: *** [/dpool.../oi-userland-apr/make-rules/configure.mk:175: .../oi-userland/components/editor/nano/build/sparcv9/.configured] Error 1
This error was caused by ncurses-6.0 that merges ncursesw with ncurses. The solution is to override pkg-config for ncursesw and ncurses. The patch Makefile.diff accomplishes this change.
With a successful build, I got these publish errors:
Couldn't find 'usr/share/doc/nano/nano.1.html' in any of the specified search directories: ... Couldn't find 'usr/share/doc/nano/nanorc.5.html' in any of the specified search directories: ... Couldn't find 'usr/share/doc/nano/rnano.1.html' in any of the specified search directories: ... gmake: *** [/dpool.../oi-userland-apr/make-rules/ips.mk:377: .../oi-userland/components/editor/nano/build/manifest-sparc-nano.depend] Error 1
In this case, the build did not create html documents. The solution is to modify the manifest by appending variant.arch=i386 to the three missing files. The patch nano.diff accomplishes this change. With this change, the publish too was successful.