Some ports conflict with themselves. New versions use installed headers/libraries of their own previous versions, and break. The statement > CONFLICTS_BUILD= ${PKGBASE} should be able to at least prevent the confusion, but this statement has no effect for some reason. (I tried it on databases/sqlitestudio.) Could you please fix it?
A port cannot conflict with all versions of itself. If a port conflicts with previous versions of itself, it should be possible to write a *correct* CONFLICTS_BUILD using globs, like this: https://www.freebsd.org/doc/en/books/porters-handbook/conflicts.html#conflicts-ex2
(In reply to Mathieu Arnold from comment #1) In databases/sqlitestudio, I tried > CONFLICTS_BUILD= ${PKGBASE}-3.1.1 > CONFLICTS_BUILD= ${PKGBASE}-3.1.[0-3]* > CONFLICTS_BUILD= ${PKGBASE}-3.1.1_5 none of them work when the previous version sqlitestudio-3.1.1_5 is installed.
It should be just > CONFLICTS_BUILD= ${PKGBASE} because it is meaningless to build when it grabs installed libs instead of freshly built ones.
It is also possible that PKGBASE is created to late for conflicts handling. As there is little chance "sqlitestudio" to change you should probably use a litteral instead of a variable.
the only way that syntax can ever work would be to append it after the last inclusion of bsd.port.mk which in anycase would be ugly (and not sure it will work) In general ports that are conflicting with themselves mean they have buggy build system, usually meaning they messup with some flags (CFLAGS, CPPFLAGS or LDFLAGS depending on the failure). They should be fixed in the ports tree (and then upstream) rather than mark as self conflicting (of course it is not always that easy, but most of the time it is doable)
Closing this bug report. As mentioned in the last comment, if a ports is conflicting during the build phase with itself, the fix should be in the port flags.