mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 03:41:06 +07:00
Implement ioncube support on unix correctly
I think I jumped the shark with this one for this project
This commit is contained in:
parent
d6560b1fbb
commit
376a964e21
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@ -35,7 +35,7 @@ export async function addExtensionDarwin(
|
|||||||
// match 5.3blackfire...8.3blackfire
|
// match 5.3blackfire...8.3blackfire
|
||||||
// match 5.3blackfire-(semver)...8.3blackfire-(semver)
|
// match 5.3blackfire-(semver)...8.3blackfire-(semver)
|
||||||
// match couchbase, event, geos, pdo_oci, oci8, http, pecl_http
|
// match couchbase, event, geos, pdo_oci, oci8, http, pecl_http
|
||||||
// match 5.3ioncube...7.4ioncube
|
// match 5.3ioncube...8.2ioncube
|
||||||
// match 7.0phalcon3...7.3phalcon3, 7.2phalcon4...7.4phalcon4, and 7.4phalcon5...8.3phalcon5
|
// match 7.0phalcon3...7.3phalcon3, 7.2phalcon4...7.4phalcon4, and 7.4phalcon5...8.3phalcon5
|
||||||
// match 7.0zephir_parser...8.2zephir_parser
|
// match 7.0zephir_parser...8.2zephir_parser
|
||||||
case /^(7\.4|8\.[0-3])relay(-v?\d+\.\d+\.\d+)?$/.test(version_extension):
|
case /^(7\.4|8\.[0-3])relay(-v?\d+\.\d+\.\d+)?$/.test(version_extension):
|
||||||
@ -45,7 +45,7 @@ export async function addExtensionDarwin(
|
|||||||
case /^couchbase|^event|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(
|
case /^couchbase|^event|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(
|
||||||
extension
|
extension
|
||||||
):
|
):
|
||||||
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
|
case /^(5\.[3-6]|7\.[0-4]|8\.[0-2])ioncube$/.test(version_extension):
|
||||||
case /(5\.6|7\.[0-3])phalcon3|7\.[2-4]phalcon4|(7\.4|8\.[0-3])phalcon5?/.test(
|
case /(5\.6|7\.[0-3])phalcon3|7\.[2-4]phalcon4|(7\.4|8\.[0-3])phalcon5?/.test(
|
||||||
version_extension
|
version_extension
|
||||||
):
|
):
|
||||||
@ -137,7 +137,7 @@ export async function addExtensionWindows(
|
|||||||
// match 5.3blackfire...8.3blackfire
|
// match 5.3blackfire...8.3blackfire
|
||||||
// match 5.3blackfire-(semver)...8.3blackfire-(semver)
|
// match 5.3blackfire-(semver)...8.3blackfire-(semver)
|
||||||
// match pdo_oci and oci8
|
// match pdo_oci and oci8
|
||||||
// match 5.3ioncube...7.4ioncube
|
// match 5.3ioncube...8.2ioncube
|
||||||
// match 7.0phalcon3...7.3phalcon3, 7.2phalcon4...7.4phalcon4, and 7.4phalcon5...8.3phalcon5
|
// match 7.0phalcon3...7.3phalcon3, 7.2phalcon4...7.4phalcon4, and 7.4phalcon5...8.3phalcon5
|
||||||
// match 7.1pecl_http...8.1pecl_http and 7.1http...8.1http
|
// match 7.1pecl_http...8.1pecl_http and 7.1http...8.1http
|
||||||
// match 7.0zephir_parser...8.2zephir_parser
|
// match 7.0zephir_parser...8.2zephir_parser
|
||||||
@ -145,7 +145,7 @@ export async function addExtensionWindows(
|
|||||||
version_extension
|
version_extension
|
||||||
):
|
):
|
||||||
case /^pdo_oci$|^oci8$|^pdo_firebird$/.test(extension):
|
case /^pdo_oci$|^oci8$|^pdo_firebird$/.test(extension):
|
||||||
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
|
case /^(5\.[3-6]|7\.[0-4]|8\.[0-2])ioncube$/.test(version_extension):
|
||||||
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-3])phalcon5?$/.test(
|
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-3])phalcon5?$/.test(
|
||||||
version_extension
|
version_extension
|
||||||
):
|
):
|
||||||
@ -268,7 +268,7 @@ export async function addExtensionLinux(
|
|||||||
// match 5.3blackfire-(semver)...8.3blackfire-(semver)
|
// match 5.3blackfire-(semver)...8.3blackfire-(semver)
|
||||||
// match 5.3pdo_cubrid...7.2php_cubrid, 5.3cubrid...7.4cubrid
|
// match 5.3pdo_cubrid...7.2php_cubrid, 5.3cubrid...7.4cubrid
|
||||||
// match couchbase, geos, pdo_oci, oci8, http, pecl_http
|
// match couchbase, geos, pdo_oci, oci8, http, pecl_http
|
||||||
// match 5.3ioncube...7.4ioncube
|
// match 5.3ioncube...8.2ioncube
|
||||||
// match 7.0phalcon3...7.3phalcon3, 7.2phalcon4...7.4phalcon4, 7.4phalcon5...8.3phalcon5
|
// match 7.0phalcon3...7.3phalcon3, 7.2phalcon4...7.4phalcon4, 7.4phalcon5...8.3phalcon5
|
||||||
// match 7.0zephir_parser...8.2zephir_parser
|
// match 7.0zephir_parser...8.2zephir_parser
|
||||||
case /^(7\.4|8\.[0-3])relay(-v?\d+\.\d+\.\d+)?$/.test(version_extension):
|
case /^(7\.4|8\.[0-3])relay(-v?\d+\.\d+\.\d+)?$/.test(version_extension):
|
||||||
@ -282,7 +282,7 @@ export async function addExtensionLinux(
|
|||||||
extension
|
extension
|
||||||
):
|
):
|
||||||
case /(?<!5\.[3-5])intl-\d+\.\d+$/.test(version_extension):
|
case /(?<!5\.[3-5])intl-\d+\.\d+$/.test(version_extension):
|
||||||
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
|
case /^(5\.[3-6]|7\.[0-4]|8\.[0-2])ioncube$/.test(version_extension):
|
||||||
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-3])phalcon5?$/.test(
|
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-3])phalcon5?$/.test(
|
||||||
version_extension
|
version_extension
|
||||||
):
|
):
|
||||||
|
@ -10,12 +10,23 @@ add_ioncube() {
|
|||||||
status='Enabled'
|
status='Enabled'
|
||||||
if ! shared_extension ioncube; then
|
if ! shared_extension ioncube; then
|
||||||
status='Installed and enabled'
|
status='Installed and enabled'
|
||||||
os_name='lin' && [ "$(uname -s)" = "Darwin" ] && os_name='mac'
|
arch="$(uname -m)"
|
||||||
get -s -n "" https://downloads.ioncube.com/loader_downloads/ioncube_loaders_"$os_name"_x86-64.tar.gz | tar -xzf - -C /tmp
|
if [ "$(uname -s)" = "Darwin" ]; then
|
||||||
sudo mv /tmp/ioncube/ioncube_loader_"$os_name"_"${version:?}".so "${ext_dir:?}/ioncube.so"
|
[ "$arch" = "arm64" ] && os_suffix="dar_arm64" || os_suffix="mac_x86-64"
|
||||||
sudo cp /tmp/ioncube/LICENSE.txt "$ext_dir"/IONCUBE_LICENSE.txt
|
else
|
||||||
|
[[ "$arch" = "i386" || "$arch" = "i686" ]] && arch=x86
|
||||||
|
[[ "$arch" = "x86_64" ]] && arch=x86-64
|
||||||
|
os_suffix="lin_$arch"
|
||||||
|
fi
|
||||||
|
ts_part="" && [ "${ts:?}" = "zts" ] && ts_part="_ts"
|
||||||
|
get -s -n "" https://downloads.ioncube.com/loader_downloads/ioncube_loaders_"$os_suffix".tar.gz | tar -xzf - -C /tmp
|
||||||
|
loader_file=/tmp/ioncube/ioncube_loader_"${os_suffix%%_*}_${version:?}$ts_part".so
|
||||||
|
if [ -e "$loader_file" ]; then
|
||||||
|
sudo mv /tmp/ioncube/ioncube_loader_"${os_suffix%%_*}_${version:?}$ts_part".so "${ext_dir:?}/ioncube.so"
|
||||||
|
sudo cp /tmp/ioncube/LICENSE.txt "$ext_dir"/IONCUBE_LICENSE.txt
|
||||||
|
echo "zend_extension=$ext_dir/ioncube.so" | sudo tee "${scan_dir:?}/00-ioncube.ini" >/dev/null 2>&1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
echo "zend_extension=$ext_dir/ioncube.so" | sudo tee "${scan_dir:?}/00-ioncube.ini" >/dev/null 2>&1
|
|
||||||
add_extension_log "ioncube" "$status"
|
add_extension_log "ioncube" "$status"
|
||||||
check_extension "ioncube" && add_license_log
|
check_extension "ioncube" && add_license_log
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user