I was thinking, we need a Makefile overlay for BSD's, that's separate from the Makefile in ports. One where we don't fork the source, except for the Makefile only. Maybe there could be Makefile tools, that tell us what's needed, and what is called for. The Makefile adjustments could be with the same function as a patch, but part of the ports framework, where we tell it where to get the Makefile, or simply have Makefile.bsd in the ports directory, with a full replacement, or replacement per particular line.The amount of projects I instead just extract the .c, .cpp, .h files from and quickly knock up my own Makefiles...
Already you can override some settings like GCC from the source Makefiles with CC in the FreeBSD Makefiles, if it builds correctly.
Code:
MAKE_ARGS= CC="cc"
Maybe we should learn about Meson (https://docs.freebsd.org/en/books/porters-handbook/book/#using-meson) and its dependency of Ninja, and see if those are worth looking into. Meson and Ninja also rely on Python. I don't know how long Python will be relevant. As a math like scripting language it's good, as for the disappointment of the changes in the newer version and because of Mojo possibly replacing it, we don't know how long those will be relevant. There's also Muon is a Meson substitute, and devel/samurai as a ninja substitute.
I always see ninja pulled in when cmake was used. They're not listed as dependencies, and I don't see it in
make config
, but ninja can be called on in Makefiles according to https://docs.freebsd.org/en/books/porters-handbook/book/#uses-cmake.devel/scons has a section in the Porter's Handbook https://docs.freebsd.org/en/books/porters-handbook/book/#using-scons. devel/bam which uses Lua is also interesting.
IIRC Makefile.am is a RedHat construct.