From 0a1ee39b74ab557e404844d05f699387503699b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20de=20Arriba?= Date: Sat, 15 Oct 2016 14:33:55 +0200 Subject: [PATCH 1/4] Add openssl. --- README.md | 14 ++++++++++---- bin/install | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b675536..9b52f33 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,18 @@ asdf plugin-add php https://github.com/Stratus3D/asdf-php.git ``` -### macOS - -In oprder to compile PHP on macOS machines, you must install some brew packages first: +## Linux ``` -brew install freetype bison27 gettext icu4c jpeg libpng openssl readline homebrew/dupes/zlib +sudo apt-get install curl build-essential autoconf libjpeg-dev libpng12-dev openssl libssl-dev libcurl4-openssl-dev libreadline-dev libedit-dev zlib1g-dev libicu-dev libxml2-dev gettext bison libmysqlclient-dev libpq-dev +``` + +### macOS + +In order to compile PHP on macOS machines, you must install some brew packages first: + +``` +brew install freetype bison27 gettext icu4c jpeg libpng openssl readline homebrew/dupes/zlib curl ``` and, in order to compile 5.x versions of PHP, you **must** link `bison27` package: diff --git a/bin/install b/bin/install index 5360e19..6ff8a75 100644 --- a/bin/install +++ b/bin/install @@ -41,7 +41,7 @@ install_php() { construct_configure_options() { local install_path=$1 - global_config="--prefix=$install_path --sysconfdir=$install_path --with-config-file-path=$install_path --with-config-file-scan-dir=$install_path/conf.d --enable-bcmath --enable-calendar --enable-dba --enable-exif --enable-ftp --enable-gd-native-ttf --enable-intl --enable-mbregex --enable-mbstring --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-zip --with-gd --with-libedit --with-mhash --with-xmlrpc --without-gmp --without-snmp --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd" + global_config="--prefix=$install_path --sysconfdir=$install_path --with-config-file-path=$install_path --with-config-file-scan-dir=$install_path/conf.d --enable-bcmath --enable-calendar --enable-dba --enable-exif --enable-ftp --enable-gd-native-ttf --enable-intl --enable-mbregex --enable-mbstring --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-zip --with-gd --with-libedit –with-openssl --with-curl --with-mhash --with-xmlrpc --without-gmp --without-snmp --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd" if [ "$PHP_CONFIGURE_OPTIONS" = "" ]; then local configure_options="$(os_based_configure_options) $global_config" From ef22479106c83a2a2a3abac1dff49589c1960837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20de=20Arriba?= Date: Sat, 15 Oct 2016 14:36:29 +0200 Subject: [PATCH 2/4] Fix flag. --- bin/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/install b/bin/install index 6ff8a75..ed05558 100644 --- a/bin/install +++ b/bin/install @@ -41,7 +41,7 @@ install_php() { construct_configure_options() { local install_path=$1 - global_config="--prefix=$install_path --sysconfdir=$install_path --with-config-file-path=$install_path --with-config-file-scan-dir=$install_path/conf.d --enable-bcmath --enable-calendar --enable-dba --enable-exif --enable-ftp --enable-gd-native-ttf --enable-intl --enable-mbregex --enable-mbstring --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-zip --with-gd --with-libedit –with-openssl --with-curl --with-mhash --with-xmlrpc --without-gmp --without-snmp --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd" + global_config="--prefix=$install_path --sysconfdir=$install_path --with-config-file-path=$install_path --with-config-file-scan-dir=$install_path/conf.d --enable-bcmath --enable-calendar --enable-dba --enable-exif --enable-ftp --enable-gd-native-ttf --enable-intl --enable-mbregex --enable-mbstring --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-zip --with-gd --with-libedit -–with-openssl --with-curl --with-mhash --with-xmlrpc --without-gmp --without-snmp --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd" if [ "$PHP_CONFIGURE_OPTIONS" = "" ]; then local configure_options="$(os_based_configure_options) $global_config" From ea12bcbab4646d5e5469f363bed7d8a2acd99f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20de=20Arriba?= Date: Sat, 15 Oct 2016 14:54:25 +0200 Subject: [PATCH 3/4] Fix installer. --- bin/install | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/bin/install b/bin/install index ed05558..8f3a471 100644 --- a/bin/install +++ b/bin/install @@ -41,7 +41,7 @@ install_php() { construct_configure_options() { local install_path=$1 - global_config="--prefix=$install_path --sysconfdir=$install_path --with-config-file-path=$install_path --with-config-file-scan-dir=$install_path/conf.d --enable-bcmath --enable-calendar --enable-dba --enable-exif --enable-ftp --enable-gd-native-ttf --enable-intl --enable-mbregex --enable-mbstring --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-zip --with-gd --with-libedit -–with-openssl --with-curl --with-mhash --with-xmlrpc --without-gmp --without-snmp --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd" + global_config="--prefix=$install_path --sysconfdir=$install_path --with-config-file-path=$install_path --with-config-file-scan-dir=$install_path/conf.d --enable-bcmath --enable-calendar --enable-dba --enable-exif --enable-ftp --enable-gd-native-ttf --enable-intl --enable-mbregex --enable-mbstring --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-zip --with-gd --with-libedit --with-mhash --with-xmlrpc --without-gmp --without-snmp --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd" if [ "$PHP_CONFIGURE_OPTIONS" = "" ]; then local configure_options="$(os_based_configure_options) $global_config" @@ -86,6 +86,8 @@ os_based_configure_options() { local jpeg_path=$(homebrew_package_path jpeg) local libpng_path=$(homebrew_package_path libpng) local openssl_path=$(homebrew_package_path openssl) + local curl_path=$(homebrew_package_path curl) + local libxml2_path=$(homebrew_package_path libxml2) local zlib_path=$(homebrew_package_path zlib) local readline_path=$(homebrew_package_path readline) @@ -126,7 +128,19 @@ os_based_configure_options() { if [ "$openssl_path" = "" ]; then export ASDF_PKG_MISSING="$ASDF_PKG_MISSING openssl" else - configure_options="$configure_options --with-openssl=$openssl_path" + configure_options="$configure_options --with-openssl-dir=$openssl_path" + fi + + if [ "$curl_path" = "" ]; then + export ASDF_PKG_MISSING="$ASDF_PKG_MISSING curl" + else + configure_options="$configure_options --with-curl=$curl_path" + fi + + if [ "$libxml2_path" = "" ]; then + export ASDF_PKG_MISSING="$ASDF_PKG_MISSING libxml2" + else + configure_options="$configure_options --with-libxml-dir=$libxml2_path" fi if [ "$zlib_path" = "" ]; then @@ -136,8 +150,10 @@ os_based_configure_options() { fi if [ "$readline_path" != "" ]; then - configure_options="$configure_options --with-readline-dir=$readline_path" + configure_options="$configure_options --with-readline=$readline_path" fi + else + configure_options="--with-openssl --with-curl --with-zlib --with-readline --with-gettext" fi echo $configure_options From dc3f391072228fab6590deb92f69b5567fd6ed93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20de=20Arriba?= Date: Sat, 15 Oct 2016 15:12:05 +0200 Subject: [PATCH 4/4] Improve README. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b52f33..66590fe 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,10 @@ asdf plugin-add php https://github.com/Stratus3D/asdf-php.git ## Linux +You may need this libraries and packages to be able to compile PHP compiler versions: + ``` -sudo apt-get install curl build-essential autoconf libjpeg-dev libpng12-dev openssl libssl-dev libcurl4-openssl-dev libreadline-dev libedit-dev zlib1g-dev libicu-dev libxml2-dev gettext bison libmysqlclient-dev libpq-dev +sudo apt-get install curl build-essential autoconf libjpeg-dev libpng12-dev openssl libssl-dev libcurl4-openssl-dev pkg-config libsslcommon2-dev libreadline-dev libedit-dev zlib1g-dev libicu-dev libxml2-dev gettext bison libmysqlclient-dev libpq-dev ``` ### macOS