Use the CPack DragNDrop generator instead of the deprecated PackageMaker
tool to package CMake itself. This provides an installation experience
that is more consistent with other products on OS X and allows users to
select the destination directory easily. It also avoids installing
"/private/var/db/receipts/com.Kitware.CMake.*" receipts that must be
removed by "pkgutil --forget com.Kitware.CMake" before another version
of CMake can be installed.
The DragNDrop installer does not support a post-flight script, so drop
our configuration of it. The cmake-gui has an option for installing
symbolic links to enable command-line use. In practice users may simply
add "/Applications/CMake.app/Contents/bin" to their PATH instead.
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block. This is no longer the preferred style.
Run the following shell code:
for c in else endif endforeach endfunction endmacro endwhile; do
echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed