-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp_install.sh
executable file
·35 lines (32 loc) · 1012 Bytes
/
php_install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# ------------ install packages for php-build
brew install autoconf
brew install bison
brew install bzip2
brew install curl
brew install icu4c
brew install libedit
brew install libjpeg
brew install libiconv
brew install libpng
brew install libxml2
brew install libzip
brew install openssl
brew install re2c
brew install tidy-html5
brew install zlib
brew install oniguruma
# ------------------------- install php
PKG_CONFIGS=(
`brew --prefix krb5`/lib/pkgconfig
`brew --prefix zlib`/lib/pkgconfig
`brew --prefix libxml2`/lib/pkgconfig
`brew --prefix [email protected]`/lib/pkgconfig
`brew --prefix icu4c`/lib/pkgconfig
`brew --prefix oniguruma`/lib/pkgconfig
`brew --prefix libedit`/lib/pkgconfig
)
export PKG_CONFIG_PATH="${(j.:.)PKG_CONFIGS}:$PKG_CONFIG_PATH"
# ------------------------- install php
LATEST_PHP=`phpenv install --list | grep -v snapshot | grep -v master | sort -V | tail -1`
PHP_BUILD_CONFIGURE_OPTS="--with-libedit=$(brew --prefix libedit)" phpenv install -s $LATEST_PHP