[51635] users/dweber/graphics/InsightToolkit/Portfile
dweber at macports.org
dweber at macports.org
Fri May 29 15:32:59 PDT 2009
Revision: 51635
http://trac.macports.org/changeset/51635
Author: dweber at macports.org
Date: 2009-05-29 15:32:58 -0700 (Fri, 29 May 2009)
Log Message:
-----------
-m "Assume that cmake port will create FindITK.cmake with a generic MacPorts library path, then copy the file into FindITK-3.12.cmake and modify the paths so this port version will have precedence in the search path. Project files should use FIND_PACKAGE(ITK-3.12 REQUIRED) to link to this version specific port installation."
Modified Paths:
--------------
users/dweber/graphics/InsightToolkit/Portfile
Modified: users/dweber/graphics/InsightToolkit/Portfile
===================================================================
--- users/dweber/graphics/InsightToolkit/Portfile 2009-05-29 22:02:10 UTC (rev 51634)
+++ users/dweber/graphics/InsightToolkit/Portfile 2009-05-29 22:32:58 UTC (rev 51635)
@@ -126,10 +126,15 @@
set findITK [glob ${prefix}/share/cmake-*/Modules/FindITK.cmake]
set findITKbranch [strsed ${findITK} #FindITK#FindITK-${branch}#]
copy ${findITK} ${destroot}${findITKbranch}
- # Change the content of $findITKbranch, to find MacPorts lib
+ # Change the content of $findITKbranch, to find this port installation,
+ # then a generic ITK installation within MacPorts ${prefix}/lib, and
+ # then other generic installation locations
set stdlib /usr/local/lib/InsightToolkit
set maclib ${prefix}/lib/InsightToolkit
- reinplace "s|${stdlib}|${maclib}\\\n ${maclib}-${branch}\\\n ${stdlib}|g" ${destroot}${findITKbranch}
+ # First replace any generic MacPorts lib paths
+ reinplace "\$!N;s|^.*${maclib}.*\\n||g" ${destroot}${findITKbranch}
+ # Now insert all the additional library paths, with the right precedence
+ reinplace "s|${stdlib}|${maclib}-${branch}\\\n ${maclib}\\\n ${stdlib}|g" ${destroot}${findITKbranch}
# Change the content of ITKConfig.cmake
reinplace "s|${itkName}|${distname}|g" ${destroot}${itkLibPath}/ITKConfig.cmake
copy ${destroot}${itkLibPath}/ITKConfig.cmake ${destroot}${itkLibPath}/itk-${branch}-config.cmake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090529/3c1dbc48/attachment.html>
More information about the macports-changes
mailing list