Bug 235053 - cad/verilator: remove unnecessary BUILD_DEPENDS=flex
Summary: cad/verilator: remove unnecessary BUILD_DEPENDS=flex
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-18 20:16 UTC by John Hein
Modified: 2019-01-27 12:35 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (kevinz5000)


Attachments
Patch (539 bytes, patch)
2019-01-19 15:46 UTC, Kevin Zheng
kevinz5000: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2019-01-18 20:16:21 UTC
Is BUILD_DEPENDS=flex:textproc/flex necessary?  The port detects and uses /usr/bin/flex whether the port is installed or not.
Comment 1 Kevin Zheng 2019-01-18 20:49:42 UTC
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.
Comment 2 Kevin Zheng 2019-01-19 15:46:00 UTC
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?
Comment 3 John Hein 2019-01-21 19:25:21 UTC
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.
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-01-27 12:35:12 UTC
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
Comment 5 Steve Wills freebsd_committer freebsd_triage 2019-01-27 12:35:43 UTC
Committed, thanks!