mirror of
				https://github.com/shivammathur/setup-php.git
				synced 2025-10-31 07:16:22 +07:00 
			
		
		
		
	Use EXTENSION_PATH to specify subdirectory in add_extension_from_source
This commit is contained in:
		| @ -43,7 +43,7 @@ add_cubrid_helper() { | ||||
|     patch_phpize | ||||
|     read -r "${ext}_PREFIX_CONFIGURE_OPTS" <<< "CFLAGS=-Wno-implicit-function-declaration" | ||||
|     read -r "${ext}_CONFIGURE_OPTS" <<< "--with-php-config=$(command -v php-config)" | ||||
|     add_extension_from_source "$ext" https://github.com CUBRID "$cubrid_repo" . "$cubrid_branch" extension | ||||
|     add_extension_from_source "$ext" https://github.com CUBRID "$cubrid_repo" "$cubrid_branch" extension | ||||
|     restore_phpize | ||||
|   fi | ||||
| } | ||||
|  | ||||
| @ -12,7 +12,8 @@ add_firebird_helper() { | ||||
|   tag="$(php_src_tag)" | ||||
|   export PDO_FIREBIRD_CONFIGURE_OPTS="--with-pdo-firebird=$firebird_dir" | ||||
|   export PDO_FIREBIRD_LINUX_LIBS="firebird-dev" | ||||
|   add_extension_from_source pdo_firebird https://github.com php php-src ext/pdo_firebird "$tag" extension get | ||||
|   export PDO_FIREBIRD_PATH="ext/pdo_firebird" | ||||
|   add_extension_from_source pdo_firebird https://github.com php php-src "$tag" extension get | ||||
| } | ||||
|  | ||||
| add_firebird() { | ||||
|  | ||||
| @ -2,7 +2,7 @@ | ||||
| add_geos_helper() { | ||||
|   export GEOS_LINUX_LIBS='libgeos-dev' | ||||
|   export GEOS_DARWIN_LIBS='geos' | ||||
|   add_extension_from_source geos https://github.com libgeos php-geos . 1.0.0 extension get | ||||
|   add_extension_from_source geos https://github.com libgeos php-geos 1.0.0 extension get | ||||
| } | ||||
|  | ||||
| # Function to add geos | ||||
|  | ||||
| @ -68,9 +68,9 @@ add_http_helper() { | ||||
|   export HTTP_LINUX_LIBS="zlib1g libbrotli-dev libcurl4-openssl-dev libevent-dev libicu-dev libidn2-dev" | ||||
|   export HTTP_DARWIN_LIBS="brotli curl icu4c libevent libidn2" | ||||
|   if [[ "${version:?}" =~ ${nightly_versions:?} ]]; then | ||||
|     add_extension_from_source http https://github.com m6w6 ext-http . master extension | ||||
|     add_extension_from_source http https://github.com m6w6 ext-http master extension | ||||
|   else | ||||
|     add_extension_from_source pecl_http https://pecl.php.net http http . "${ext##*-}" extension pecl | ||||
|     add_extension_from_source pecl_http https://pecl.php.net http http "${ext##*-}" extension pecl | ||||
|   fi | ||||
| } | ||||
|  | ||||
|  | ||||
| @ -37,8 +37,9 @@ add_oci_helper() { | ||||
|     status='Installed and enabled' | ||||
|     read -r "${ext}_LINUX_LIBS" <<< "libaio-dev" | ||||
|     read -r "${ext}_CONFIGURE_OPTS" <<< "--with-php-config=$(command -v php-config) --with-${ext/_/-}=instantclient,$oracle_client" | ||||
|     read -r "${ext}_PATH" <<< "ext/$ext" | ||||
|     patch_phpize | ||||
|     add_extension_from_source "$ext" https://github.com php php-src ext/"$ext" "$(php_src_tag)" extension get | ||||
|     add_extension_from_source "$ext" https://github.com php php-src "$(php_src_tag)" extension get | ||||
|     restore_phpize | ||||
|   fi | ||||
| } | ||||
|  | ||||
| @ -5,7 +5,7 @@ parse_args() { | ||||
|   up_ext_name=$(echo "$extension" | tr '[:lower:]' '[:upper:]') | ||||
|   var="${extension}_${suffix}" | ||||
|   up_var="${up_ext_name}_${suffix}" | ||||
|   ! [[ "$suffix" =~ .*PREFIX|LIBS.* ]] && hyp='-' | ||||
|   ! [[ "$suffix" =~ .*PREFIX|LIBS|PATH.* ]] && hyp='-' | ||||
|   output=$(echo "${!var} ${!up_var}" | sed "s/, *$hyp/ $hyp/g" | sed -E "s/^,|,$//g") | ||||
|   echo "$output" | xargs -n 1 | sort | uniq | xargs | ||||
| } | ||||
| @ -114,16 +114,16 @@ add_extension_from_source() { | ||||
|   url=$2 | ||||
|   org=$3 | ||||
|   repo=$4 | ||||
|   sub_dir=$5 | ||||
|   release=$6 | ||||
|   prefix=$7 | ||||
|   fetch=${8:-clone} | ||||
|   release=$5 | ||||
|   prefix=$6 | ||||
|   fetch=${7:-clone} | ||||
|   slug="$extension-$release" | ||||
|   source="$url/$org/$repo" | ||||
|   libraries="$(parse_args "$extension" LIBS) $(parse_args "$extension" "$(uname -s)"_LIBS)" | ||||
|   opts="$(parse_args "$extension" CONFIGURE_OPTS)" | ||||
|   prefix_opts="$(parse_args "$extension" CONFIGURE_PREFIX_OPTS)" | ||||
|   suffix_opts="$(parse_args "$extension" CONFIGURE_SUFFIX_OPTS)" | ||||
|   sub_dir="$(parse_args "$extension" PATH)" | ||||
|   step_log "Setup $slug" | ||||
|   ( | ||||
|     add_devtools phpize >/dev/null 2>&1 | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Shivam Mathur
					Shivam Mathur