refactor to pkg-config and add some add-on libs for gd

This commit is contained in:
crazywhalecc
2023-04-29 18:59:47 +08:00
parent ea055afd3c
commit 8df4ade754
83 changed files with 1001 additions and 1520 deletions

View File

@@ -19,35 +19,36 @@
| event | | | |
| exif | yes | yes | |
| filter | yes | yes | |
| fileinfo | yes | | |
| fileinfo | yes | yes | |
| ftp | yes | yes | |
| gd | yes, untested | yes | |
| gd | yes | yes | |
| gettext | | | |
| gmp | yes, untested | yes, untested | |
| iconv | yes | | |
| gmp | yes | yes | |
| iconv | yes | yes | |
| inotify | yes | yes | |
| mbstring | yes | yes | |
| mbregex | yes | yes | |
| mcrypt | | [faulty](https://github.com/crazywhalecc/static-php-cli/issues/32) | |
| mongodb | yes, untested | | |
| mysqli | | | |
| mongodb | yes | yes | |
| mysqli | yes | yes | |
| mysqlnd | yes | yes | |
| openssl | yes | yes | |
| pcntl | yes, untested | yes | |
| pcntl | yes | yes | |
| pdo | yes | yes | |
| pdo_mysql | yes | yes | |
| pdo_sqlite | yes | yes | |
| pdo_pgsql | | | |
| phar | yes | yes | |
| posix | yes | yes | |
| protobuf | yes, untested | | |
| protobuf | yes | yes | |
| readline | | | |
| redis | yes | yes | |
| session | yes | yes | |
| shmop | yes, untested | | |
| simplexml | yes, untested | yes, untested | |
| soap | yes, untested | | |
| shmop | yes | yes | |
| simplexml | yes | yes | |
| soap | yes | yes | |
| sockets | yes | yes | |
| sqlite3 | yes, untested | yes, untested | |
| sqlite3 | yes | yes | |
| swow | yes | [no](https://github.com/crazywhalecc/static-php-cli/issues/32) | |
| swoole | [no](https://github.com/crazywhalecc/static-php-cli/issues/32) | [partial](https://github.com/crazywhalecc/static-php-cli/issues/32) | |
| tokenizer | yes | yes | |
@@ -56,6 +57,7 @@
| xmlwriter | yes, untested | yes, untested | |
| zip | yes, untested | yes | |
| zlib | yes | yes | |
| zstd | yes | yes | |
## Additional Requirements
@@ -72,6 +74,24 @@ Here are some extension list example for different use.
- For static-php-cli self (with dev dependencies): `"posix,pcntl,phar,tokenizer,iconv,zlib,xml,dom,xmlwriter,xmlreader,fileinfo"`
- Minimum, with no extension: `""`
Compile with all supported extensions (exclude `swow`, `swoole` due to c++ extension):
```bash
bin/spc build --build-all bcmath,bz2,calendar,ctype,curl,dba,dom,exif,fileinfo,filter,ftp,gd,gmp,iconv,mbregex,mbstring,mongodb,mysqli,mysqlnd,openssl,pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,protobuf,redis,session,shmop,simplexml,soap,sockets,sqlite3,tokenizer,xml,xmlreader,xmlwriter,yaml,zip,zlib,zstd --with-libs=libjpeg,freetype,libwebp,libavif --debug
```
## Additional Libraries
Some extensions have soft dependencies, you can enable extra features by adding these libs using `--with-libs`.
For example, to compile with gd extension, with `libwebp, libgif, libavif, libjpeg, freetype` extra features:
```bash
bin/spc build gd --with-libs=libjpeg,freetype,libwebp,libavif --build-cli
```
> If you don't add them, your compilation will not enable these features.
## Limitations
- swow and swoole cannot be compiled at the same time.