From 4c56797d14237809ebffdf89239ffce27856e7bd Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 12 Apr 2022 00:50:58 +0800 Subject: [PATCH] Add exif, pdo_sqlite, shmop, soap extensions --- README-en.md | 6 +++++- README.md | 6 +++++- docker/Dockerfile | 2 +- docker/check-extensions.sh | 9 ++++++++- docker/download.sh | 2 +- docker/extensions.txt | 4 ++++ docker/fast-compiler.sh | 2 +- 7 files changed, 25 insertions(+), 6 deletions(-) diff --git a/README-en.md b/README-en.md index 65172b72..ea081617 100755 --- a/README-en.md +++ b/README-en.md @@ -3,7 +3,7 @@ Compile A Statically Linked PHP With Swoole and other Extensions. BTW, It's only for CLI mode. -[![version](https://img.shields.io/badge/version-1.4.0-green.svg)]() +[![version](https://img.shields.io/badge/version-1.4.2-green.svg)]() ![Build Actions](https://github.com/crazywhalecc/static-php-cli/actions/workflows/build-php.yml/badge.svg) ## Compilation Requirements @@ -47,6 +47,7 @@ To customize PHP extensions, edit `docker/extensions.txt` file, and rules below: | yes | curl | * | | | yes | dom | * | | | | event | | | +| yes | exif | * | | | yes | filter | * | | | yes | fileinfo | * | | | yes | gd | * | | @@ -63,11 +64,14 @@ To customize PHP extensions, edit `docker/extensions.txt` file, and rules below: | yes | pcntl | * | | | yes | pdo | * | | | yes | pdo_mysql | * | | +| yes | pdo_sqlite | * | | | | pdo_pgsql | * | | | yes | phar | * | | | yes | posix | * | | | yes | redis | * | | +| yes | shmop | * | | | yes | simplexml | * | | +| yes | soap | * | | | yes | sockets | * | | | yes | sqlite3 | * | | | yes | swoole | >=4.6.6 | support mysqlnd, sockets, openssl, redis | diff --git a/README.md b/README.md index a8d14663..0d1350ba 100755 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Compile A Statically Linked PHP With Swoole and other Extensions. [English READM 注:只能编译 CLI 模式,暂不支持 CGI 和 FPM 模式 -[![版本](https://img.shields.io/badge/script--version-1.4.0-green.svg)]() +[![版本](https://img.shields.io/badge/script--version-1.4.2-green.svg)]() [![License](https://img.shields.io/badge/License-MIT-blue.svg)]() ![Build Actions](https://github.com/crazywhalecc/static-php-cli/actions/workflows/build-php.yml/badge.svg) @@ -50,6 +50,7 @@ file ./php | yes, enabled | curl | * | 自带下载编译 curl 库 | | yes, enabled | dom | * | | | | event | | | +| yes, enabled | exif | * | | | yes, enabled | filter | * | | | yes, enabled | fileinfo | * | | | yes, enabled | gd | * | | @@ -66,11 +67,14 @@ file ./php | yes, enabled | pcntl | * | | | yes, enabled | pdo | * | | | yes, enabled | pdo_mysql | * | | +| yes, enabled | pdo_sqlite | * | | | | pdo_pgsql | * | | | yes, enabled | phar | * | | | yes, enabled | posix | * | | | yes, enabled | redis | * | 从 pecl 或镜像站下载的源码 | +| yes, enabled | shmop | * | | | yes, enabled | simplexml | * | | +| yes, enabled | soap | * | | | yes, enabled | sockets | * | | | yes, enabled | sqlite3 | * | | | yes, enabled | swoole | >=4.6.6 | 使用参数 `--enable-openssl --with-openssl --with-openssl-dir=/usr`,从 pecl 或镜像站下载的源码 | diff --git a/docker/Dockerfile b/docker/Dockerfile index 3683382e..99361d01 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,7 +2,7 @@ FROM alpine:latest # define script basic information # Version of this Dockerfile -ENV SCRIPT_VERSION=1.4.1 +ENV SCRIPT_VERSION=1.4.2 # Download address uses backup address ARG USE_BACKUP_ADDRESS diff --git a/docker/check-extensions.sh b/docker/check-extensions.sh index 8bb63520..a6a02fd8 100755 --- a/docker/check-extensions.sh +++ b/docker/check-extensions.sh @@ -59,6 +59,7 @@ function check_before_configure() { bcmath) ;; calendar) ;; ctype) ;; + exif) ;; filter) ;; fileinfo) ;; gd) ;; @@ -71,8 +72,10 @@ function check_before_configure() { pcntl) ;; pdo) ;; pdo_mysql) ;; + pdo_sqlite) ;; phar) ;; posix) ;; + shmop) ;; sockets) ;; sqlite3) ;; tokenizer) ;; @@ -87,7 +90,7 @@ function check_before_configure() { exit 1 fi ;; - dom|xml|libxml|xmlreader|xmlwriter|simplexml) + dom|xml|libxml|xmlreader|xmlwriter|simplexml|soap) if [ "$xml_sign" = "no" ]; then if [ ! -f "$self_dir/source/.xml_compiled" ]; then do_xml_compiler @@ -157,6 +160,7 @@ function check_in_configure() { ctype) php_configure="$php_configure --enable-ctype" ;; curl) php_configure="$php_configure --with-curl" ;; dom) php_configure="$php_configure --enable-dom" ;; + exif) php_configure="$php_configure --enable-exif" ;; event) php_configure="$php_configure --with-event-core --with-event-extra --with-event-openssl --with-event-extra --disable-event-sockets" ;; filter) php_configure="$php_configure --enable-filter" ;; fileinfo) php_configure="$php_configure --enable-fileinfo" ;; @@ -194,9 +198,12 @@ function check_in_configure() { phar) php_configure="$php_configure --enable-phar" ;; posix) php_configure="$php_configure --enable-posix" ;; redis) php_configure="$php_configure --enable-redis --disable-redis-session" ;; + shmop) php_configure="$php_configure --enable-shmop" ;; simplexml) php_configure="$php_configure --enable-simplexml" ;; sockets) php_configure="$php_configure --enable-sockets" ;; + soap) php_configure="$php_configure --enable-soap" ;; sqlite3) php_configure="$php_configure --with-sqlite3" ;; + pdo_sqlite) php_configure="$php_configure --with-pdo-sqlite" ;; swoole) php_configure="$php_configure --enable-swoole" diff --git a/docker/download.sh b/docker/download.sh index d409e0be..586b0347 100755 --- a/docker/download.sh +++ b/docker/download.sh @@ -37,7 +37,7 @@ else if [ "$3" != "" ]; then wget -q "$(readconf ".$1.link$_use_backup" | sed 's/{version}/'$3'/g')" else - echo "Downloading" + echo "Downloading $1" wget -q "$(readconf ".$1.link$_use_backup" | sed 's/{version}/'$(readconf ".$1.version")'/g')" fi diff --git a/docker/extensions.txt b/docker/extensions.txt index 4e1d66ca..ba283dc1 100755 --- a/docker/extensions.txt +++ b/docker/extensions.txt @@ -3,6 +3,7 @@ calendar ctype curl dom +exif fileinfo filter gd @@ -18,10 +19,13 @@ openssl pcntl pdo pdo_mysql +pdo_sqlite phar posix redis +shmop simplexml +soap sockets sqlite3 swoole diff --git a/docker/fast-compiler.sh b/docker/fast-compiler.sh index 84d2cf4f..39448786 100755 --- a/docker/fast-compiler.sh +++ b/docker/fast-compiler.sh @@ -2,7 +2,7 @@ # This script needs alpine linux system. -VER_PHP="7.4.23" +VER_PHP="7.4.28" USE_BACKUP="no" LINK_APK_REPO='mirrors.ustc.edu.cn'