Port conflict between p5-Mail-SPF-Query and p5-Mail-SPF while installing Maia port in FreeBSD

If you are trying to install Maia or any other port which depends upon p5-Mail-SPF-Query, and your server already has p5-Mail-SPF installed, you will not be allowed to do so as both install files at the same location. You would be receiving errors like:


===>  p5-Mail-SPF-Query-1.999.1 conflicts with installed package(s): 

According to this post at FreeBSD forums, p5-Mail-SPF should be preferred. An easy way to do is to edit the Makefile of the port (in my case it’s Maia) to replace the dependency line. Edit /usr/ports/security/maia/Makefile (replace path based on your port) in your favorite editor and search for

.if defined(WITH_SPFQUERY)
RUN_DEPENDS+=   ${SITE_PERL}/Mail/SPF/Query.pm:${PORTSDIR}/mail/p5-Mail-SPF-Query

and replace it with

.if defined(WITH_SPFQUERY)
RUN_DEPENDS+=   ${SITE_PERL}/Mail/SPF/Query.pm:${PORTSDIR}/mail/p5-Mail-SPF

That should be it unless you have some other conflicts in your package.

Amitabh Kant