Created
February 10, 2018 16:47
-
-
Save kelunik/e4445f751078a4b123ed0f27fbea100d 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
#!/bin/bash | |
set -e | |
set -x | |
rm -rf ~/.php-build | |
mkdir ~/.php-build | |
cd ~/.php-build | |
if [ $1 == "master" ] | |
then | |
wget https://github.com/php/php-src/archive/master.zip -O master.zip | |
rm -rf php-src-master | |
unzip -q master.zip | |
rm -rf release | |
mv php-src-master release | |
elif [ ${#1} == 40 ] | |
then | |
wget https://github.com/php/php-src/archive/$1.zip -O $1.zip | |
rm -rf php-src-$1 | |
unzip -q $1.zip | |
rm -rf release | |
mv php-src-$1 release | |
else | |
wget https://github.com/php/php-src/archive/php-$1.zip -q -O $1.zip | |
rm -rf php-src-php-$1 | |
unzip -q $1.zip | |
rm -rf release | |
mv php-src-php-$1 release | |
fi | |
cd release | |
# wget https://github.com/krakjoe/pthreads/archive/master.zip -q -O pthreads.zip | |
# rm -rf pthreads-master ext/pthreads | |
# unzip pthreads.zip | |
# mv pthreads-master ext/pthreads | |
# wget https://github.com/krakjoe/apcu-bc/archive/master.zip -q -O apcu-bc.zip | |
# unzip apcu-bc.zip | |
# mv apcu-bc-master ext/apcu-bc | |
# wget https://github.com/krakjoe/apcu/archive/master.zip -q -O apcu.zip | |
# unzip apcu.zip | |
# mv apcu-master ext/apcu | |
./buildconf --force | |
echo "buildconf successful" | |
./configure \ | |
--prefix=$HOME/.phpenv/versions/$1 \ | |
--with-config-file-path=/etc/php \ | |
--with-config-file-scan-dir=$HOME/.phpenv/versions/$1 \ | |
--enable-phpdbg \ | |
--with-libdir=/lib/x86_64-linux-gnu \ | |
--disable-all \ | |
--enable-debug \ | |
--with-sodium \ | |
--with-pdo-mysql \ | |
--with-pdo-sqlite \ | |
--with-sqlite3 \ | |
--with-openssl \ | |
--with-zlib \ | |
--with-curl \ | |
--with-xsl \ | |
--with-gd \ | |
--with-iconv \ | |
--with-readline \ | |
--with-bz2 \ | |
--with-mysqli \ | |
--with-freetype-dir \ | |
--with-libzip \ | |
--enable-shmop \ | |
--enable-sysvmsg \ | |
--enable-opcache \ | |
--enable-bcmath \ | |
--enable-pdo \ | |
--enable-fileinfo \ | |
--enable-sockets \ | |
--enable-mbstring \ | |
--enable-phar \ | |
--enable-ctype \ | |
--enable-hash \ | |
--enable-json \ | |
--enable-filter \ | |
--enable-zip \ | |
--enable-pdo \ | |
--enable-xml \ | |
--enable-session \ | |
--enable-libxml \ | |
--enable-simplexml \ | |
--enable-xmlreader \ | |
--enable-xmlwriter \ | |
--enable-dom \ | |
--enable-intl \ | |
--enable-tokenizer \ | |
--enable-posix \ | |
--enable-pcntl | |
make -j4 install > /dev/null | |
cd .. | |
rm -rf release |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment