Is BUILD_DEPENDS=flex:textproc/flex necessary? The port detects and uses /usr/bin/flex whether the port is installed or not.
Didn't realize I'd get a PR this soon! The prerequisites are documented here: https://www.veripool.org/projects/verilator/wiki/Installing It specifies flex as a dependency, but I'm not sure if it just wants a generic Lex or if it uses flex-specific features, so I included it for safety. I'll take a closer look.
Created attachment 201268 [details] Patch I agree: since flex is part of the base system, and explicit dependency is probably not required. I was looking at other ports when I put in this dependency line, specifically net-mgmt/docsis which has a similar dependency line. Maintainer approval with the attached patch; but can the committer check that this is the right thing to do?
Removing the BUILD_DEPENDS for the flex port looks good to me. Your builds and testing have probably been using the base version of flex anyway. I have not tried to ascertain if verilator depends on features of the port version of flex vs base (both come from the same code base now on github but they are different versions - 2.5.37 vs 2.6.4) other than to see that verilator builds and seems to run fine without using the port version of flex. It may be that the base version could be updated to the latest, but someone would have to do that analysis. If someone shows a case where the base version of flex fails in some important case, then we can explicitly depend on the flex port (and specifically a particular version). Glancing at the verilator code, it seems to try to work with various versions of flex (see the flexfix script). Glancing at the flex NEWS file, most of the changes probably won't matter, but I could see some edge cases triggering different behavior depending on which version of flex is used. Until any such cases are identified, not requiring the ports version of flex looks correct to me.
A commit references this bug: Author: swills Date: Sun Jan 27 12:34:35 UTC 2019 New revision: 491344 URL: https://svnweb.freebsd.org/changeset/ports/491344 Log: cad/verilator: remove unnecessary BUILD_DEPENDS PR: 235053 Submitted by: John Hein <jcfyecrayz@liamekaens.com> Approved by: Kevin Zheng <kevinz5000@gmail.com> (maintainer) Changes: head/cad/verilator/Makefile
Committed, thanks!