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.
[![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 |

View File

@ -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 或镜像站下载的源码 |

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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'