[87836] trunk/dports/graphics/ogre
Ryan Schmidt
ryandesign at macports.org
Wed Dec 7 15:58:11 PST 2011
This seems to be the only reinplace that replaces /opt/local with ${prefix}:
# Support any kind of MacPorts prefix in the Tutorial code
reinplace "s|/opt/local|${prefix}|g" \
${worksrcpath}/Tutorials/CMakeLists.txt
However, a patchfile also inserts this line into the top-level CMakeLists.txt:
set(MACPORTS_DOC_DIR "/opt/local/share/doc" CACHE STRING
And in one place a patch of Tutorials/CMakeLists.txt contains this:
LIST(APPEND CMAKE_FRAMEWORK_PATH "/opt/local/Library/Frameworks")
That should not merely have /opt/local replaced with ${prefix}; the entire path should instead be replaced with ${frameworks_dir} (which is not necessarily ${prefix}/Library/Frameworks).
We usually handle this by putting placeholders into the patchfiles, instead of actual paths. So, we would use "@PREFIX@" instead of /opt/local in the patchfiles, and "@FRAMEWORKS_DIR@" instead of /opt/local/Library/Frameworks. Then you'd use reinplace to change @PREFIX@ and @FRAMEWORKS_DIR@ into their current values.
More information about the macports-dev
mailing list