Upgrading qt5-core port from 5.13.2 to 5.14.2 will fail if devel/qt5-buildtools was not upgraded first.
This dependency is not reflected in the qt5-core package though neither before nor after upgrading:
$ pkg info -d qt5-core-5.14.2_2
Depends on :
> make -VBUILD_DEPENDS -C devel/qt5-core
pkgconf>=1.3.0_1:devel/pkgconf /usr/local/lib/qt5/bin/moc:devel/qt5-buildtools /usr/local/lib/qt5/bin/qmake:devel/qt5-qmake
It alraedy depends on buildtools.
This report might be as well moot then. Although it is somewhat weird that it's possible to overlook such hard dependency as long as one has the previous non satisfiable version installed, which was the case on my part.
Created attachment 213821 [details]
A proposal to address the problem
I am attaching a patch to the devel/qt5-core Makefile that demonstrates certain approach to the dependency.
Thanks for the patch!... But...
Such a patch will not be committed. The port already depends on buildtools, and it's the duty of the port-building tool to resolve the order correctly.
I'm not sure what tool you are using for upgrading, but something seems to go wrong there -- I would suggest this PR is moved to the tool, instead of qt5-core, and fixed there :)
Let me know if I can help you with that.
Hmm, I guess, I disagree.
This will bite people even if one builds ports manually and qt5-buildtools older version is installed. That was my case.
FWIW, over 20 years I have seen such protections in ports or documented in UPDATING quite often, one notorious example would be each major Xorg upgrade.
Created attachment 216568 [details]
Alternative versioning fix
Here is an alternative fix -- relatively untested, in the sense that it doesn't break a poudriere build where the update-from-old-versions problem doesn't exist, but I have not bothered to set up a mixed-version system using other port-building tools.
This uses the minimal-version feature described in PHB 5.9.9 at https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-depend.html : since qmake and buildtools (moc) are executables, use the version-of-package syntax to pull in the right one: the specific version of Qt we're building right now.
The latest patch indeed enforces qt5-buildtools upgrade before qt5-core upgrade is approached on my box. Thank you.