Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: detect webp, libzip, libedit, bzip2 #21

Merged
merged 1 commit into from
Nov 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -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 --with-curl --without-gmp --without-snmp --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd --enable-pcntl --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data"
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-mhash --with-xmlrpc --with-curl --without-gmp --without-snmp --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd --enable-pcntl --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data"

if [ "$PHP_CONFIGURE_OPTIONS" = "" ]; then
local configure_options="$(os_based_configure_options) $global_config"
Expand Down Expand Up @@ -87,13 +87,17 @@ os_based_configure_options() {
local bison27_path=$(homebrew_package_path bison@2.7)
local gettext_path=$(homebrew_package_path gettext)
local icu4c_path=$(homebrew_package_path icu4c)
local webp_path=$(homebrew_package_path webp)
local jpeg_path=$(homebrew_package_path jpeg)
local libpng_path=$(homebrew_package_path libpng)
local openssl_path=$(homebrew_package_path openssl)
local libxml2_path=$(homebrew_package_path libxml2)
local zlib_path=$(homebrew_package_path zlib)
local readline_path=$(homebrew_package_path readline)
local libedit_path=$(homebrew_package_path libedit)
local iconv_path=$(homebrew_package_path libiconv)
local bzip2_path=$(homebrew_package_path bzip2)
local libzip_path=$(homebrew_package_path libzip)

if [ "$freetype_path" = "" ]; then
export ASDF_PKG_MISSING="freetype"
Expand Down Expand Up @@ -123,6 +127,12 @@ os_based_configure_options() {
configure_options="$configure_options --with-jpeg-dir=$jpeg_path"
fi

if [ "$webp_path" = "" ]; then
export ASDF_PKG_MISSING="$ASDF_PKG_MISSING webp"
else
configure_options="$configure_options --with-webp-dir=$webp_path"
fi

if [ "$libpng_path" = "" ]; then
export ASDF_PKG_MISSING="$ASDF_PKG_MISSING libpng"
else
Expand All @@ -147,10 +157,22 @@ os_based_configure_options() {
configure_options="$configure_options --with-zlib-dir=$zlib_path"
fi

if [ "$libzip_path" != "" ]; then
configure_options="$configure_options --with-libzip=$libzip_path"
fi

if [ "$readline_path" != "" ]; then
configure_options="$configure_options --with-readline=$readline_path"
fi

if [ "$libedit_path" != "" ]; then
configure_options="$configure_options --with-libedit=$libedit_path"
fi

if [ "$bzip2_path" != "" ]; then
configure_options="$configure_options --with-bz2=$bzip2_path"
fi

if [ "$iconv_path" != "" ]; then
configure_options="$configure_options --with-iconv=$iconv_path"
else
Expand Down