pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

devel/doxygen + MacOS



I am having trouble with the devel/doxygen package (pkgsrc-2016Q4) on MacOS.  The problem is that it ends up using devel/flex, which is version 2.6.2nb3, and fails.  This is a known problem; see for example https://github.com/LLNL/spack/issues/2554.

The culprit is that the logic in mk/tools/flex.mk does not correctly identify the version of the native flex (which is 2.5.35) and incorrectly chooses the bad pkgsrc version, even though devel/doxygen is marked as requiring flex v2.5.35.  Specifically, the relevant portion of mk/tools/flex.mk is the following

_TOOLS_VERSION.flex!= \
${TOOLS_PLATFORM.flex} --version | \
${SED} -e 's/\(.*\) \(.*\)$$/\2/'

which extracts the last word from the version string to use as the version number.  Unfortunately, the MacOS flex does not follow that pattern; /usr/bin/flex —version yields the following string:

flex 2.5.35 Apple(flex-31)

If the sed command is changed to capture the correct, i.e., second not last, word, all is well and doxygen builds correctly with the native flex.

So, what is the correct solution here?

My best idea is to replace the sed _expression_ with something that is more properly anchored to capture the second word, something like ’s/^\([^ ]+\) \([^ ]+\).*$$/\2/‘, but I am not sure if that would work for all versions of sed.

Please advise on how to handle this so we can fix the decision logic for selecting the correct version of flex.

Thanks a lot.

Cheers,
Brook







Home | Main Index | Thread Index | Old Index