Add exif, pdo_sqlite, shmop, soap extensions

This commit is contained in:
crazywhalecc 2022-04-12 00:50:58 +08:00
parent 247da4010a
commit 4c56797d14
7 changed files with 25 additions and 6 deletions

View File

@ -3,7 +3,7 @@ Compile A Statically Linked PHP With Swoole and other Extensions.
BTW, It's only for CLI mode. 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) ![Build Actions](https://github.com/crazywhalecc/static-php-cli/actions/workflows/build-php.yml/badge.svg)
## Compilation Requirements ## Compilation Requirements
@ -47,6 +47,7 @@ To customize PHP extensions, edit `docker/extensions.txt` file, and rules below:
| yes | curl | * | | | yes | curl | * | |
| yes | dom | * | | | yes | dom | * | |
| | event | | | | | event | | |
| yes | exif | * | |
| yes | filter | * | | | yes | filter | * | |
| yes | fileinfo | * | | | yes | fileinfo | * | |
| yes | gd | * | | | yes | gd | * | |
@ -63,11 +64,14 @@ To customize PHP extensions, edit `docker/extensions.txt` file, and rules below:
| yes | pcntl | * | | | yes | pcntl | * | |
| yes | pdo | * | | | yes | pdo | * | |
| yes | pdo_mysql | * | | | yes | pdo_mysql | * | |
| yes | pdo_sqlite | * | |
| | pdo_pgsql | * | | | | pdo_pgsql | * | |
| yes | phar | * | | | yes | phar | * | |
| yes | posix | * | | | yes | posix | * | |
| yes | redis | * | | | yes | redis | * | |
| yes | shmop | * | |
| yes | simplexml | * | | | yes | simplexml | * | |
| yes | soap | * | |
| yes | sockets | * | | | yes | sockets | * | |
| yes | sqlite3 | * | | | yes | sqlite3 | * | |
| yes | swoole | >=4.6.6 | support mysqlnd, sockets, openssl, redis | | yes | swoole | >=4.6.6 | support mysqlnd, sockets, openssl, redis |

View File

@ -5,7 +5,7 @@ Compile A Statically Linked PHP With Swoole and other Extensions. [English READM
注:只能编译 CLI 模式,暂不支持 CGI 和 FPM 模式 注:只能编译 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)]() [![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) ![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 | curl | * | 自带下载编译 curl 库 |
| yes, enabled | dom | * | | | yes, enabled | dom | * | |
| | event | | | | | event | | |
| yes, enabled | exif | * | |
| yes, enabled | filter | * | | | yes, enabled | filter | * | |
| yes, enabled | fileinfo | * | | | yes, enabled | fileinfo | * | |
| yes, enabled | gd | * | | | yes, enabled | gd | * | |
@ -66,11 +67,14 @@ file ./php
| yes, enabled | pcntl | * | | | yes, enabled | pcntl | * | |
| yes, enabled | pdo | * | | | yes, enabled | pdo | * | |
| yes, enabled | pdo_mysql | * | | | yes, enabled | pdo_mysql | * | |
| yes, enabled | pdo_sqlite | * | |
| | pdo_pgsql | * | | | | pdo_pgsql | * | |
| yes, enabled | phar | * | | | yes, enabled | phar | * | |
| yes, enabled | posix | * | | | yes, enabled | posix | * | |
| yes, enabled | redis | * | 从 pecl 或镜像站下载的源码 | | yes, enabled | redis | * | 从 pecl 或镜像站下载的源码 |
| yes, enabled | shmop | * | |
| yes, enabled | simplexml | * | | | yes, enabled | simplexml | * | |
| yes, enabled | soap | * | |
| yes, enabled | sockets | * | | | yes, enabled | sockets | * | |
| yes, enabled | sqlite3 | * | | | yes, enabled | sqlite3 | * | |
| yes, enabled | swoole | >=4.6.6 | 使用参数 `--enable-openssl --with-openssl --with-openssl-dir=/usr`,从 pecl 或镜像站下载的源码 | | yes, enabled | swoole | >=4.6.6 | 使用参数 `--enable-openssl --with-openssl --with-openssl-dir=/usr`,从 pecl 或镜像站下载的源码 |

View File

@ -2,7 +2,7 @@ FROM alpine:latest
# define script basic information # define script basic information
# Version of this Dockerfile # Version of this Dockerfile
ENV SCRIPT_VERSION=1.4.1 ENV SCRIPT_VERSION=1.4.2
# Download address uses backup address # Download address uses backup address
ARG USE_BACKUP_ADDRESS ARG USE_BACKUP_ADDRESS

View File

@ -59,6 +59,7 @@ function check_before_configure() {
bcmath) ;; bcmath) ;;
calendar) ;; calendar) ;;
ctype) ;; ctype) ;;
exif) ;;
filter) ;; filter) ;;
fileinfo) ;; fileinfo) ;;
gd) ;; gd) ;;
@ -71,8 +72,10 @@ function check_before_configure() {
pcntl) ;; pcntl) ;;
pdo) ;; pdo) ;;
pdo_mysql) ;; pdo_mysql) ;;
pdo_sqlite) ;;
phar) ;; phar) ;;
posix) ;; posix) ;;
shmop) ;;
sockets) ;; sockets) ;;
sqlite3) ;; sqlite3) ;;
tokenizer) ;; tokenizer) ;;
@ -87,7 +90,7 @@ function check_before_configure() {
exit 1 exit 1
fi fi
;; ;;
dom|xml|libxml|xmlreader|xmlwriter|simplexml) dom|xml|libxml|xmlreader|xmlwriter|simplexml|soap)
if [ "$xml_sign" = "no" ]; then if [ "$xml_sign" = "no" ]; then
if [ ! -f "$self_dir/source/.xml_compiled" ]; then if [ ! -f "$self_dir/source/.xml_compiled" ]; then
do_xml_compiler do_xml_compiler
@ -157,6 +160,7 @@ function check_in_configure() {
ctype) php_configure="$php_configure --enable-ctype" ;; ctype) php_configure="$php_configure --enable-ctype" ;;
curl) php_configure="$php_configure --with-curl" ;; curl) php_configure="$php_configure --with-curl" ;;
dom) php_configure="$php_configure --enable-dom" ;; 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" ;; 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" ;; filter) php_configure="$php_configure --enable-filter" ;;
fileinfo) php_configure="$php_configure --enable-fileinfo" ;; fileinfo) php_configure="$php_configure --enable-fileinfo" ;;
@ -194,9 +198,12 @@ function check_in_configure() {
phar) php_configure="$php_configure --enable-phar" ;; phar) php_configure="$php_configure --enable-phar" ;;
posix) php_configure="$php_configure --enable-posix" ;; posix) php_configure="$php_configure --enable-posix" ;;
redis) php_configure="$php_configure --enable-redis --disable-redis-session" ;; redis) php_configure="$php_configure --enable-redis --disable-redis-session" ;;
shmop) php_configure="$php_configure --enable-shmop" ;;
simplexml) php_configure="$php_configure --enable-simplexml" ;; simplexml) php_configure="$php_configure --enable-simplexml" ;;
sockets) php_configure="$php_configure --enable-sockets" ;; sockets) php_configure="$php_configure --enable-sockets" ;;
soap) php_configure="$php_configure --enable-soap" ;;
sqlite3) php_configure="$php_configure --with-sqlite3" ;; sqlite3) php_configure="$php_configure --with-sqlite3" ;;
pdo_sqlite) php_configure="$php_configure --with-pdo-sqlite" ;;
swoole) swoole)
php_configure="$php_configure --enable-swoole" php_configure="$php_configure --enable-swoole"

View File

@ -37,7 +37,7 @@ else
if [ "$3" != "" ]; then if [ "$3" != "" ]; then
wget -q "$(readconf ".$1.link$_use_backup" | sed 's/{version}/'$3'/g')" wget -q "$(readconf ".$1.link$_use_backup" | sed 's/{version}/'$3'/g')"
else else
echo "Downloading" echo "Downloading $1"
wget -q "$(readconf ".$1.link$_use_backup" | sed 's/{version}/'$(readconf ".$1.version")'/g')" wget -q "$(readconf ".$1.link$_use_backup" | sed 's/{version}/'$(readconf ".$1.version")'/g')"
fi fi

View File

@ -3,6 +3,7 @@ calendar
ctype ctype
curl curl
dom dom
exif
fileinfo fileinfo
filter filter
gd gd
@ -18,10 +19,13 @@ openssl
pcntl pcntl
pdo pdo
pdo_mysql pdo_mysql
pdo_sqlite
phar phar
posix posix
redis redis
shmop
simplexml simplexml
soap
sockets sockets
sqlite3 sqlite3
swoole swoole

View File

@ -2,7 +2,7 @@
# This script needs alpine linux system. # This script needs alpine linux system.
VER_PHP="7.4.23" VER_PHP="7.4.28"
USE_BACKUP="no" USE_BACKUP="no"
LINK_APK_REPO='mirrors.ustc.edu.cn' LINK_APK_REPO='mirrors.ustc.edu.cn'