Cmake build problem workaround

Randolph M. Fritz rmfritz3 at gmail.com
Mon Jun 18 16:43:39 UTC 2018


This is a continuation of work on a very old problem, which you can see at:
  https://lists.macports.org/pipermail/macports-dev/2012-August/020015.html

I picked this up again, after an absence of years, and have made some
progress. There is a problem with DESTDIR and the generated cmake
dependencies file, which I can repair with the following pre-destroot
command:

pre-destroot {
>     # This fixes what may be a cmake error. (It also confuses emacs
> tcl-mode.)
>     reinplace {/fixup_bundle("/s//&$ENV{DESTDIR}/}
> ${workpath}/build/InstallRules/dependencies.cmake
> }


Problem is, if this problem is the result of a cmake bug, as I suspect, and
that bug is fixed, this portfile will break. So I would like to write
something like:
  if { {${workpath}/build/InstallRules/dependencies.cmake} does not contain
… } then {
     reinplace …
  }

This looks like a fairly straightforward thing to do, but when I try to
code it, it elaborates into some fairly messy code. Does anyone have
suggestions as to how to approach this problem?
-- 
Randolph M. Fritz || +1 206 659-8617 || rmfritz3 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20180618/80666f14/attachment.html>


More information about the macports-dev mailing list