mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
use the spx upstream version (#931)
This commit is contained in:
commit
9ed77c10e0
@ -1001,7 +1001,7 @@
|
|||||||
"spx": {
|
"spx": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"rev": "master",
|
"rev": "master",
|
||||||
"url": "https://github.com/static-php/php-spx.git",
|
"url": "https://github.com/NoiseByNorthwest/php-spx.git",
|
||||||
"path": "php-src/ext/spx",
|
"path": "php-src/ext/spx",
|
||||||
"license": {
|
"license": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class spx extends Extension
|
|||||||
{
|
{
|
||||||
public function getUnixConfigureArg(bool $shared = false): string
|
public function getUnixConfigureArg(bool $shared = false): string
|
||||||
{
|
{
|
||||||
$arg = '--enable-spx' . ($shared ? '=shared' : '');
|
$arg = '--enable-SPX' . ($shared ? '=shared' : '');
|
||||||
if ($this->builder->getLib('zlib') !== null) {
|
if ($this->builder->getLib('zlib') !== null) {
|
||||||
$arg .= ' --with-zlib-dir=' . BUILD_ROOT_PATH;
|
$arg .= ' --with-zlib-dir=' . BUILD_ROOT_PATH;
|
||||||
}
|
}
|
||||||
@ -29,4 +29,20 @@ class spx extends Extension
|
|||||||
);
|
);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function patchBeforeBuildconf(): bool
|
||||||
|
{
|
||||||
|
FileSystem::replaceFileStr(
|
||||||
|
$this->source_dir . '/config.m4',
|
||||||
|
'CFLAGS="$CFLAGS -Werror -Wall -O3 -pthread -std=gnu90"',
|
||||||
|
'CFLAGS="$CFLAGS -pthread"'
|
||||||
|
);
|
||||||
|
FileSystem::replaceFileStr(
|
||||||
|
$this->source_dir . '/src/php_spx.h',
|
||||||
|
"extern zend_module_entry spx_module_entry;\n",
|
||||||
|
"extern zend_module_entry spx_module_entry;;\n#define phpext_spx_ptr &spx_module_entry\n"
|
||||||
|
);
|
||||||
|
FileSystem::copy($this->source_dir . '/src/php_spx.h', $this->source_dir . '/php_spx.h');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user