Building cmake-2.8.8-r2 in sparc-solaris prefix fails because the "bootstrap" script uses bash substitutions, while having only #!/bin/sh shebang. Replacing the shebang with "#!/usr/bin/env bash" makes cmake build and install successfully. >>> Emerging (1 of 1) dev-util/cmake-2.8.8-r2 * cmake-2.8.8.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] * Fixing java access violations ... >>> Unpacking source... >>> Unpacking cmake-2.8.8.tar.gz to /tmp/chithanh/portage/dev-util/cmake-2.8.8-r2/work >>> Source unpacked in /tmp/chithanh/portage/dev-util/cmake-2.8.8-r2/work >>> Preparing source in /tmp/chithanh/portage/dev-util/cmake-2.8.8-r2/work/cmake-2.8.8 ... * Applying cmake-2.6.3-darwin-bundle.patch ... [ ok ] * Applying cmake-2.6.3-no-duplicates-in-rpath.patch ... [ ok ] * Applying cmake-2.6.3-fix_broken_lfs_on_aix.patch ... [ ok ] * Applying cmake-2.8.0-darwin-default-install_name.patch ... [ ok ] * Applying cmake-2.8.1-libform.patch ... [ ok ] * Applying cmake-2.8.4-FindPythonLibs.patch ... [ ok ] * Applying cmake-2.8.7-FindBoost-python.patch ... [ ok ] * Applying cmake-2.8.7-FindBLAS.patch ... [ ok ] * Applying cmake-2.8.7-FindLAPACK.patch ... [ ok ] * Applying cmake-2.8.8-FindPkgConfig.patch ... [ ok ] * Applying cmake-2.8.8-more-no_host_paths.patch ... [ ok ] * Applying cmake-2.8.8-tests.patch ... [ ok ] * Applying cmake-2.8.8-pkgconfig.patch ... [ ok ] ./bootstrap: bad substitution ./bootstrap: bad substitution * ERROR: dev-util/cmake-2.8.8-r2 failed (prepare phase): * Bootstrap failed
I fixed this yesterday by running bootstrap with ${CONFIG_SHELL:-sh}.