[MacPorts] #19781: modify cmake Modules for MacPorts prefix
MacPorts
noreply at macports.org
Mon Jun 1 17:52:15 PDT 2009
#19781: modify cmake Modules for MacPorts prefix
-----------------------------------------+----------------------------------
Reporter: dweber@… | Owner: css@…
Type: enhancement | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 1.7.1
Keywords: FindITK.cmake cmake modules | Port: cmake
-----------------------------------------+----------------------------------
Comment(by dweber@…):
There is a simple solution to this, within the cmake port, using a bit of
tcl in the post-destroot phase.
These are probably all the module files that contain /usr/local (the
default prefix for most *nix open-source software):
{{{
[ dweber at X ~ ]$ grep ".*/usr/local.*"
/opt/local/share/cmake-2.6/Modules/*.cmake
/opt/local/share/cmake-2.6/Modules/CMakeDetermineJavaCompiler.cmake:
/usr/local/bin
/opt/local/share/cmake-2.6/Modules/CMakeDetermineJavaCompiler.cmake:
/usr/local/java/bin
/opt/local/share/cmake-2.6/Modules/CMakeDetermineSystem.cmake:
FIND_PROGRAM(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
/opt/local/share/cmake-2.6/Modules/CMakeGenericSystem.cmake:
SET(CMAKE_INSTALL_PREFIX "/usr/local"
/opt/local/share/cmake-2.6/Modules/FindAVIFile.cmake:
/usr/local/avifile/include
/opt/local/share/cmake-2.6/Modules/FindAVIFile.cmake:
/usr/local/include/avifile
/opt/local/share/cmake-2.6/Modules/FindAVIFile.cmake:
/usr/local/avifile/lib
/opt/local/share/cmake-2.6/Modules/FindAVIFile.cmake: /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindBLAS.cmake: PATHS /usr/local/lib
/usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH
/opt/local/share/cmake-2.6/Modules/FindBLAS.cmake: PATHS /usr/local/lib
/usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH
/opt/local/share/cmake-2.6/Modules/FindFLTK.cmake: /usr/local/lib/fltk
/opt/local/share/cmake-2.6/Modules/FindFLTK.cmake: /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindFLTK.cmake: /usr/local/fltk
/opt/local/share/cmake-2.6/Modules/FindFLTK.cmake: /usr/local/fltk
/opt/local/share/cmake-2.6/Modules/FindFLTK.cmake:
/usr/local/fltk/lib
/opt/local/share/cmake-2.6/Modules/FindFLTK2.cmake:
/usr/local/lib/fltk2
/opt/local/share/cmake-2.6/Modules/FindFLTK2.cmake: /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindFLTK2.cmake: /usr/local/fltk2
/opt/local/share/cmake-2.6/Modules/FindFLTK2.cmake:
/usr/local/include
/opt/local/share/cmake-2.6/Modules/FindFLTK2.cmake: /usr/local/fltk2
/opt/local/share/cmake-2.6/Modules/FindFLTK2.cmake: /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindFLTK2.cmake:
/usr/local/fltk2/lib
/opt/local/share/cmake-2.6/Modules/FindFreetype.cmake:
/usr/local/X11R6/include
/opt/local/share/cmake-2.6/Modules/FindFreetype.cmake:
/usr/local/X11/include
/opt/local/share/cmake-2.6/Modules/FindFreetype.cmake:
/usr/local/X11R6/include
/opt/local/share/cmake-2.6/Modules/FindFreetype.cmake:
/usr/local/X11/include
/opt/local/share/cmake-2.6/Modules/FindFreetype.cmake: /usr/local/X11R6
/opt/local/share/cmake-2.6/Modules/FindFreetype.cmake: /usr/local/X11
/opt/local/share/cmake-2.6/Modules/FindGIF.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindGTK.cmake:
/usr/local/include/glib12
/opt/local/share/cmake-2.6/Modules/FindGTK.cmake:
/usr/local/lib/glib/include
/opt/local/share/cmake-2.6/Modules/FindITK-3.12.cmake:
/usr/local/lib/InsightToolkit
/opt/local/share/cmake-2.6/Modules/FindITK.cmake:
/usr/local/lib/InsightToolkit
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake: /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:
/usr/local/lib/java/jre/lib/i386
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:
/usr/local/share/java/jre/lib/i386
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:
/usr/local/lib/java/jre/lib/amd64
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:
/usr/local/share/java/jre/lib/amd64
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:
/usr/local/lib/java/jre/lib/ppc
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:
/usr/local/share/java/jre/lib/ppc
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake: /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:
/usr/local/lib/java/include
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:
/usr/local/share/java/include
/opt/local/share/cmake-2.6/Modules/FindJava.cmake: /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindJava.cmake: /usr/local/java/bin
/opt/local/share/cmake-2.6/Modules/FindJava.cmake:
/usr/local/java/share/bin
/opt/local/share/cmake-2.6/Modules/FindKDE3.cmake: /usr/local/include/kde
/opt/local/share/cmake-2.6/Modules/FindLAPACK.cmake: PATHS
/usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH
/opt/local/share/cmake-2.6/Modules/FindLAPACK.cmake: PATHS
/usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH
/opt/local/share/cmake-2.6/Modules/FindLua50.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindLua50.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindLua50.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindLua51.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindLua51.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindMPEG.cmake: /usr/local/livid
/opt/local/share/cmake-2.6/Modules/FindMPEG.cmake:
/usr/local/livid/mpeg2dec/libmpeg2/.libs
/opt/local/share/cmake-2.6/Modules/FindMPEG.cmake:
/usr/local/livid/mpeg2dec/libvo/.libs
/opt/local/share/cmake-2.6/Modules/FindMPEG2.cmake: /usr/local/livid
/opt/local/share/cmake-2.6/Modules/FindMPEG2.cmake:
/usr/local/livid/mpeg2dec/libmpeg2/.libs
/opt/local/share/cmake-2.6/Modules/FindMPEG2.cmake:
/usr/local/livid/mpeg2dec/libvo/.libs
/opt/local/share/cmake-2.6/Modules/FindMPI.cmake: /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindMPI.cmake:
/usr/local/mpi/include
/opt/local/share/cmake-2.6/Modules/FindMPI.cmake: PATHS /usr/lib
/usr/local/lib /usr/local/mpi/lib
/opt/local/share/cmake-2.6/Modules/FindMPI.cmake: PATHS /usr/lib
/usr/local/lib /usr/local/mpi/lib
/opt/local/share/cmake-2.6/Modules/FindMatlab.cmake: /usr/local
/matlab-7sp1/bin/glnx86/
/opt/local/share/cmake-2.6/Modules/FindMatlab.cmake: /usr/local
/matlab-7sp1/bin/glnxa64/
/opt/local/share/cmake-2.6/Modules/FindMatlab.cmake: "/usr/local
/matlab-7sp1/extern/include/"
/opt/local/share/cmake-2.6/Modules/FindOpenAL.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindOpenAL.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindPHP4.cmake:
/usr/local/include/php4
/opt/local/share/cmake-2.6/Modules/FindPHP4.cmake: /usr/local/include/php
/opt/local/share/cmake-2.6/Modules/FindPHP4.cmake: /usr/local/apache/php
/opt/local/share/cmake-2.6/Modules/FindPNG.cmake:
/usr/local/include/libpng # OpenBSD
/opt/local/share/cmake-2.6/Modules/FindPhysFS.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindPhysFS.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindPike.cmake:
/usr/local/include/pike/*)
/opt/local/share/cmake-2.6/Modules/FindProducer.cmake:
/usr/local/include
/opt/local/share/cmake-2.6/Modules/FindProducer.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindQt.cmake:FILE(GLOB GLOB_TEMP_VAR
/usr/local/qt-x11-commercial-3*/bin/qmake)
/opt/local/share/cmake-2.6/Modules/FindQt.cmake:FILE(GLOB GLOB_TEMP_VAR
/usr/local/qt-x11-commercial-4*/bin/qmake)
/opt/local/share/cmake-2.6/Modules/FindQt.cmake:FILE(GLOB GLOB_TEMP_VAR
/usr/local/Trolltech/Qt-4*/bin/qmake)
/opt/local/share/cmake-2.6/Modules/FindQt.cmake: /usr/local/qt/include/Qt
/opt/local/share/cmake-2.6/Modules/FindQt.cmake: /usr/local/include/Qt
/opt/local/share/cmake-2.6/Modules/FindQt.cmake: /usr/local/qt/include
/opt/local/share/cmake-2.6/Modules/FindQt.cmake: /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindQt3.cmake: /usr/local/qt/include
/opt/local/share/cmake-2.6/Modules/FindQt3.cmake: /usr/local/qt/lib
/opt/local/share/cmake-2.6/Modules/FindQt3.cmake: /usr/local/qt/lib
/opt/local/share/cmake-2.6/Modules/FindQt3.cmake: /usr/local/qt/lib
/opt/local/share/cmake-2.6/Modules/FindQt3.cmake: /usr/local/qt/bin
/opt/local/share/cmake-2.6/Modules/FindQt3.cmake: /usr/local/qt/bin
/opt/local/share/cmake-2.6/Modules/FindSDL.cmake: /usr/local/include/SDL
/opt/local/share/cmake-2.6/Modules/FindSDL.cmake:
/usr/local/include/SDL12
/opt/local/share/cmake-2.6/Modules/FindSDL.cmake:
/usr/local/include/SDL11 # FreeBSD ports
/opt/local/share/cmake-2.6/Modules/FindSDL.cmake: /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindSDL.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindSDL.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindSDL_image.cmake:
/usr/local/include/SDL
/opt/local/share/cmake-2.6/Modules/FindSDL_image.cmake:
/usr/local/include/SDL12
/opt/local/share/cmake-2.6/Modules/FindSDL_image.cmake:
/usr/local/include/SDL11 # FreeBSD ports
/opt/local/share/cmake-2.6/Modules/FindSDL_image.cmake:
/usr/local/include
/opt/local/share/cmake-2.6/Modules/FindSDL_image.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindSDL_mixer.cmake:
/usr/local/include/SDL
/opt/local/share/cmake-2.6/Modules/FindSDL_mixer.cmake:
/usr/local/include/SDL12
/opt/local/share/cmake-2.6/Modules/FindSDL_mixer.cmake:
/usr/local/include/SDL11 # FreeBSD ports
/opt/local/share/cmake-2.6/Modules/FindSDL_mixer.cmake:
/usr/local/include
/opt/local/share/cmake-2.6/Modules/FindSDL_mixer.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindSDL_net.cmake:
/usr/local/include/SDL
/opt/local/share/cmake-2.6/Modules/FindSDL_net.cmake:
/usr/local/include/SDL12
/opt/local/share/cmake-2.6/Modules/FindSDL_net.cmake:
/usr/local/include/SDL11 # FreeBSD ports
/opt/local/share/cmake-2.6/Modules/FindSDL_net.cmake: /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindSDL_net.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:
/usr/local/include/SDL
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:
/usr/local/include/SDL12
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:
/usr/local/include/SDL11 # FreeBSD ports
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:
/usr/local/include
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake: /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:
/usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:
/usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:
/usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:
/usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:
/usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:
/usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:
/usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:
/usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_ttf.cmake:
/usr/local/include/SDL
/opt/local/share/cmake-2.6/Modules/FindSDL_ttf.cmake:
/usr/local/include/SDL12
/opt/local/share/cmake-2.6/Modules/FindSDL_ttf.cmake:
/usr/local/include/SDL11 # FreeBSD ports
/opt/local/share/cmake-2.6/Modules/FindSDL_ttf.cmake: /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindSDL_ttf.cmake: /usr/local
/opt/local/share/cmake-2.6/Modules/FindSelfPackers.cmake: /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindSelfPackers.cmake: /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindSquish.cmake: #/usr/local/squish
/opt/local/share/cmake-2.6/Modules/FindTCL.cmake: /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindTCL.cmake: /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindTclStub.cmake: /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindUnixCommands.cmake: /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindUnixCommands.cmake: /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindUnixCommands.cmake: /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindUnixCommands.cmake: /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindUnixCommands.cmake: /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindUnixCommands.cmake: /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindVTK.cmake: /usr/local/lib/vtk
/opt/local/share/cmake-2.6/Modules/GetPrerequisites.cmake:
"/usr/local/bin"
}}}
Please see the post-destroot phase for my cmake Portfile at:
https://trac.macports.org/browser/users/dweber/devel/cmake/Portfile
There are some reinplace commands that *add* the MacPorts /opt/local
prefix to the VTK and ITK cmake modules. Those modifications could be
abstracted into a foreach loop that runs over most, if not all, of the
modules listed above. When the MacPorts $prefix is added to the search
path with the right precedence, this simple solution could fix this
problem for all ports in MacPorts. The cmake port is the right place to
make this change.
If I get time, I will see about testing further modifications that will
modify all the module .cmake files listed above. There may be some
specific requirements for particular ports, where they use install paths
that are not simply a replacement of /usr/local/ for /opt/local/.
Darren
--
Ticket URL: <http://trac.macports.org/ticket/19781#comment:6>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list