I got an MBP modern enough to run Ventura. (My workhorse MBA cannot go above
High Sierra).
For my personal needs I prefer nvi over vim that comes with macOS. This is my
daily driver on MBA.
I can build nvi on High Sierra just fine, also binary package for High Sierra
is available from buildbots.
When I tried to install nvi on Ventura, first I noticed absence of binary
package. Next, my attempt to build port failed miserably.
I also found ticket #64197 on trac.
My first instinct was to try clang of the same version as on High Sierra
(clang-9.0), but that did not make any change. Build was still failing.
Then I checked nvi on homebrew and found out that it builds there on all macOS
versions and they have binaries available.
Homebrew formula adds this flag to configure:
# Xcode 12 needs the "-Wno-implicit-function-declaration" to compile
successfully
# The usual trick of setting $CFLAGS in the environment doesn't work for
this
# configure file though, but specifying an explicit CC setting does
system "./configure", "--prefix=#{prefix}",
"--program-prefix=n",
"--disable-dependency-tracking",
"CC=" + ENV.cc + "
-Wno-implicit-function-declaration"
This got me over the error "implicit declaration of function 'conv_enc'", but
the build was still breaking on the linking step.
What I found next was that configure script populates libtool with correct
setting of allow_undefined_flag on High Sierra, but not on Ventura. Apparently,
the logic in configure works for MACOSX_DEPLOYMENT_TARGET 10.* but not on any
higher versions of macOS.
I guess homebrew works around it by running autoreconfigure, but I was
unsuccessful in that as it complained about missing configure.ac file.
So my crude fix was a patch for configure script (with appropriate adjustments
to the portfile).
With this patch I was able to build nvi, and it is quite usable (in my limited
testing)
I commented on my findings in https://trac.macports.org/ticket/64197.
Thanks,
Kastus