Created
August 19, 2019 18:22
-
-
Save oleg-andreyev/5fbe07cfa1787403f9dbbdcfdf9bcc8f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Follow https://gist.github.com/oleg-andreyev/05fae22548ccdff8deebde144c4cbe7f | |
# nproc alias https://gist.github.com/oleg-andreyev/053b90ef33d2c29446ef466a2817d01c | |
function is_osx { | |
local uname=$(uname) | |
if [ "$uname" = "Darwin" ]; then | |
return 0 | |
else | |
return 1 | |
fi | |
} | |
function osx_major { | |
if is_osx ; then | |
local osxVersionString=$(sw_vers -productVersion) | |
local osx_major=${osxVersionString%%.*} | |
echo $osx_major | |
fi | |
return 0 | |
} | |
function osx_minor { | |
if is_osx ; then | |
local osxVersionString=$(sw_vers -productVersion) | |
local tmp=${osxVersionString#*.} | |
local osx_minor=${tmp%%.*} | |
echo $osx_minor | |
fi | |
return 0 | |
} | |
# MacOS has some bundled libraries link them to / | |
sudo installer -pkg "/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_$(osx_major).$(osx_minor).pkg" -target / | |
# avoid brew cleanup | |
export HOMEBREW_NO_INSTALL_CLEANUP=1 | |
# icu4c must be >= 64.0 | |
brew install icu4c [email protected] krb5 oniguruma libedit | |
export CONFIGURE_OPTS="-C" # configure cache | |
export PHP_BUILD_DEBUG=1 | |
export PHP_BUILD_EXTRA_MAKE_ARGUMENTS="-j$(nproc)" | |
export PHP_BUILD_CONFIGURE_OPTS="--with-gd --without-tidy --enable-intl --with-pear" | |
phpenv install -v 7.3.8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment