-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #671 from jingjingxyk/build_native_php
update Build native php
- Loading branch information
Showing
12 changed files
with
233 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,56 @@ | ||
# support extensions (x64) | ||
|
||
| extension name | linux6 | macos | windows(cygwin) | default enabled | | ||
|----------------|--------|-------|-----------------|-----------------| | ||
| curl | ✅ | ✅ | ✅ | ✅ | | ||
| iconv | ✅ | ✅ | ✅ | ✅ | | ||
| bcmath | ✅ | ✅ | ✅ | ✅ | | ||
| pcntl | ✅ | ✅ | ✅ | ✅ | | ||
| filter | ✅ | ✅ | ✅ | ✅ | | ||
| session | ✅ | ✅ | ✅ | ✅ | | ||
| tokenizer | ✅ | ✅ | ✅ | ✅ | | ||
| mbstring | ✅ | ✅ | ✅ | ✅ | | ||
| ctype | ✅ | ✅ | ✅ | ✅ | | ||
| zlib | ✅ | ✅ | ✅ | ✅ | | ||
| zip | ✅ | ✅ | ✅ | ✅ | | ||
| posix | ✅ | ✅ | ✅ | ✅ | | ||
| sockets | ✅ | ✅ | ✅ | ✅ | | ||
| pdo | ✅ | ✅ | ✅ | ✅ | | ||
| sqlite3 | ✅ | ✅ | ✅ | ✅ | | ||
| phar | ✅ | ✅ | ✅ | ✅ | | ||
| mysqlnd | ✅ | ✅ | ✅ | ✅ | | ||
| mysqli | ✅ | ✅ | ✅ | ✅ | | ||
| intl | ✅ | ✅ | ✅ | ✅ | | ||
| fileinfo | ✅ | ✅ | ✅ | ✅ | | ||
| pdo_mysql | ✅ | ✅ | ✅ | ✅ | | ||
| soap | ✅ | ✅ | ✅ | ✅ | | ||
| xsl | ✅ | ✅ | ✅ | ✅ | | ||
| gmp | ✅ | ✅ | ✅ | ✅ | | ||
| exif | ✅ | ✅ | ✅ | ✅ | | ||
| sodium | ✅ | ✅ | ✅ | ✅ | | ||
| openssl | ✅ | ✅ | ✅ | ✅ | | ||
| readline | ✅ | ✅ | ✅ | ✅ | | ||
| libxml | ✅ | ✅ | ✅ | ✅ | | ||
| xml | ✅ | ✅ | ✅ | ✅ | | ||
| xmlreader | ✅ | ✅ | ✅ | ✅ | | ||
| xmlwriter | ✅ | ✅ | ✅ | ✅ | | ||
| dom | ✅ | ✅ | ✅ | ✅ | | ||
| simplexml | ✅ | ✅ | ✅ | ✅ | | ||
| redis | ✅ | ✅ | ✅ | ✅ | | ||
| yaml | ✅ | ✅ | ✅ | ✅ | | ||
| imagick | ✅ | ✅ | ✅ | ✅ | | ||
| gd | ✅ | ✅ | ✅ | ✅ | | ||
| opcache | ✅ | ✅ | ✅ | ✅ | | ||
| swoole | ✅ | ✅ | ✅ | ✅ | | ||
| ssh2 | ✅ | ✅ | ❌ | ❌ | | ||
| apcu | ✅ | ✅ | ❌ | ❌ | | ||
| ds | ✅ | ✅ | ✅ | ❌ | | ||
| inotify | ✅ | ❌ | ❌ | ❌ | | ||
| protobuf | ❌ | ❌ | ❌ | ❌ | | ||
| uuid | ✅ | ✅ | ❌ | ❌ | | ||
| mongodb | ✅ | ❌ | ❌ | ❌ | | ||
|----------------|--------|-------|-----------------|----------------| | ||
| curl | ✅ | ✅ | ✅ | ✅ | | ||
| iconv | ✅ | ✅ | ✅ | ✅ | | ||
| bcmath | ✅ | ✅ | ✅ | ✅ | | ||
| pcntl | ✅ | ✅ | ✅ | ✅ | | ||
| filter | ✅ | ✅ | ✅ | ✅ | | ||
| session | ✅ | ✅ | ✅ | ✅ | | ||
| tokenizer | ✅ | ✅ | ✅ | ✅ | | ||
| mbstring | ✅ | ✅ | ✅ | ✅ | | ||
| ctype | ✅ | ✅ | ✅ | ✅ | | ||
| zlib | ✅ | ✅ | ✅ | ✅ | | ||
| zip | ✅ | ✅ | ✅ | ✅ | | ||
| posix | ✅ | ✅ | ✅ | ✅ | | ||
| sockets | ✅ | ✅ | ✅ | ✅ | | ||
| pdo | ✅ | ✅ | ✅ | ✅ | | ||
| sqlite3 | ✅ | ✅ | ✅ | ✅ | | ||
| phar | ✅ | ✅ | ✅ | ✅ | | ||
| mysqlnd | ✅ | ✅ | ✅ | ✅ | | ||
| mysqli | ✅ | ✅ | ✅ | ✅ | | ||
| intl | ✅ | ✅ | ✅ | ✅ | | ||
| fileinfo | ✅ | ✅ | ✅ | ✅ | | ||
| pdo_mysql | ✅ | ✅ | ✅ | ✅ | | ||
| soap | ✅ | ✅ | ✅ | ✅ | | ||
| xsl | ✅ | ✅ | ✅ | ✅ | | ||
| gmp | ✅ | ✅ | ✅ | ✅ | | ||
| exif | ✅ | ✅ | ✅ | ✅ | | ||
| sodium | ✅ | ✅ | ✅ | ✅ | | ||
| openssl | ✅ | ✅ | ✅ | ✅ | | ||
| readline | ✅ | ✅ | ✅ | ✅ | | ||
| libxml | ✅ | ✅ | ✅ | ✅ | | ||
| xml | ✅ | ✅ | ✅ | ✅ | | ||
| xmlreader | ✅ | ✅ | ✅ | ✅ | | ||
| xmlwriter | ✅ | ✅ | ✅ | ✅ | | ||
| dom | ✅ | ✅ | ✅ | ✅ | | ||
| simplexml | ✅ | ✅ | ✅ | ✅ | | ||
| redis | ✅ | ✅ | ✅ | ✅ | | ||
| yaml | ✅ | ✅ | ✅ | ✅ | | ||
| imagick | ✅ | ✅ | ✅ | ✅ | | ||
| gd | ✅ | ✅ | ✅ | ✅ | | ||
| opcache | ✅ | ✅ | ✅ | ✅ | | ||
| swoole | ✅ | ✅ | ✅ | ✅ | | ||
| ssh2 | ✅ | ✅ | ❌ | ❌ | | ||
| apcu | ✅ | ✅ | ❌ | ❌ | | ||
| ds | ✅ | ✅ | ✅ | ❌ | | ||
| inotify | ✅ | ❌ | ❌ | ❌ | | ||
| protobuf | ❌ | ❌ | ❌ | ❌ | | ||
| uuid | ✅ | ✅ | ❌ | ❌ | | ||
| mailparse | ✅ | ✅ | ❌ | ❌ | | ||
| mongodb | ❌ | ❌ | ❌ | ❌ | | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
use SwooleCli\Preprocessor; | ||
use SwooleCli\Extension; | ||
|
||
return function (Preprocessor $p) { | ||
$p->addExtension( | ||
(new Extension('mailparse')) | ||
->withHomePage('https://pecl.php.net/package/mailparse') | ||
->withLicense('https://github.com/php/pecl-mail-mailparse/blob/v3.1.6/LICENSE', Extension::LICENSE_BSD) | ||
->withManual('https://github.com/php/pecl-mail-mailparse.git') | ||
->withPeclVersion('3.1.6') | ||
->withOptions(' --enable-mailparse ') | ||
->withDependentExtensions('mbstring') | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
use SwooleCli\Library; | ||
use SwooleCli\Preprocessor; | ||
use SwooleCli\Extension; | ||
|
||
return function (Preprocessor $p) { | ||
$depends = ['curl', 'openssl', 'cares', 'zlib', 'brotli', 'nghttp2', 'pgsql', 'unix_odbc', 'sqlite3']; | ||
$options = '--enable-swoole --enable-sockets --enable-mysqlnd --enable-swoole-curl --enable-cares '; | ||
$options .= ' --with-brotli-dir=' . BROTLI_PREFIX; | ||
$options .= ' --with-nghttp2-dir=' . NGHTTP2_PREFIX; | ||
$options .= ' --enable-swoole-pgsql '; | ||
$options .= ' --with-swoole-odbc=unixODBC,' . UNIX_ODBC_PREFIX . ' '; | ||
$options .= ' --enable-swoole-sqlite '; | ||
|
||
$ext = (new Extension('swoole_v5.1.x')) | ||
->withOptions($options) | ||
->withLicense('https://github.com/swoole/swoole-src/blob/master/LICENSE', Extension::LICENSE_APACHE2) | ||
->withHomePage('https://github.com/swoole/swoole-src') | ||
->withManual('https://wiki.swoole.com/#/') | ||
->withFile('swoole-v5.1.x.tar.gz') | ||
->withDownloadScript( | ||
'swoole-src', | ||
<<<EOF | ||
git clone -b 5.1.x --depth=1 https://github.com/swoole/swoole-src.git | ||
EOF | ||
) | ||
->withDependentExtensions('curl', 'openssl', 'sockets', 'mysqlnd', 'pdo' ); | ||
|
||
$ext->withDependentLibraries(...$depends); | ||
$p->addExtension($ext); | ||
|
||
$libs = $p->isMacos() ? '-lc++' : ' -lstdc++ '; | ||
$p->withVariable('LIBS', '$LIBS ' . $libs); | ||
|
||
$p->withExportVariable('CARES_CFLAGS', '$(pkg-config --cflags --static libcares)'); | ||
$p->withExportVariable('CARES_LIBS', '$(pkg-config --libs --static libcares)'); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.