Bug 243068 - devel/cmake: share/cmake/Modules/FindFLEX.cmake looks for FlexLexer.h in a wrong location
Summary: devel/cmake: share/cmake/Modules/FindFLEX.cmake looks for FlexLexer.h in a wr...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-03 21:54 UTC by Yuri Victorovich
Modified: 2020-01-19 09:27 UTC (History)
1 user (show)

See Also:
tcberner: maintainer-feedback+


Attachments
v1 (2.12 KB, patch)
2020-01-19 09:08 UTC, Tobias C. Berner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2020-01-03 21:54:59 UTC
> find_path(FLEX_INCLUDE_DIR FlexLexer.h
>  DOC "Path to the flex headers")

can never find port's FlexLexer.h that is installed into /usr/local/include/flex/FlexLexer.h

Ports should use flex from ports, not from the base, because port have a generally newer version.

The above place in share/cmake/Modules/FindFLEX.cmake should be:
> find_path(FLEX_INCLUDE_DIR flex/FlexLexer.h
>  DOC "Path to the flex headers")
Comment 1 Tobias C. Berner freebsd_committer freebsd_triage 2020-01-19 07:50:21 UTC
Moin moin 

Sorry, I overlooked this PR.

We could add some path hints to make it also look in localbase too for headers and libraries of flex.
Do you have a port in mind to test it against?
 


mfg Tobias


[1] https://cmake.org/cmake/help/v3.16/command/find_path.html
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2020-01-19 07:54:51 UTC
The port is cad/cascade-compiler.

files/patch-CMakeLists.txt removes FLEX_INCLUDE_DIRS because it is wrong (not from ports).
Comment 3 Tobias C. Berner freebsd_committer freebsd_triage 2020-01-19 09:08:58 UTC
Created attachment 210859 [details]
v1

Could you try the attached patch to devel/cmake?

mfg Tobias
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2020-01-19 09:22:04 UTC
Now FLEX_INCLUDE_DIRS=/usr/local/include/flex.

Thank you for working on this!
Comment 5 Tobias C. Berner freebsd_committer freebsd_triage 2020-01-19 09:27:17 UTC
Committed. Let's hope there is no fallout :-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2020-01-19 09:27:21 UTC
A commit references this bug:

Author: tcberner
Date: Sun Jan 19 09:26:55 UTC 2020
New revision: 523523
URL: https://svnweb.freebsd.org/changeset/ports/523523

Log:
  devel/cmake: Make Flex find module look in ${LOCALBASE}

  PR:		243068
  Reported by:	yuri

Changes:
  head/devel/cmake/Makefile
  head/devel/cmake/files/patch-Modules_FindFLEX.cmake