mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
new build-with-php key for extensions
This commit is contained in:
parent
c29ca9722f
commit
310be957b6
@ -370,6 +370,9 @@
|
|||||||
"ext-depends": [
|
"ext-depends": [
|
||||||
"zlib",
|
"zlib",
|
||||||
"session"
|
"session"
|
||||||
|
],
|
||||||
|
"shared-ext-depends": [
|
||||||
|
"session"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"memcached": {
|
"memcached": {
|
||||||
@ -388,6 +391,9 @@
|
|||||||
"ext-depends": [
|
"ext-depends": [
|
||||||
"session",
|
"session",
|
||||||
"zlib"
|
"zlib"
|
||||||
|
],
|
||||||
|
"shared-ext-depends": [
|
||||||
|
"session"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mongodb": {
|
"mongodb": {
|
||||||
@ -692,7 +698,8 @@
|
|||||||
],
|
],
|
||||||
"ext-depends-windows": [
|
"ext-depends-windows": [
|
||||||
"xml"
|
"xml"
|
||||||
]
|
],
|
||||||
|
"build-with-php": true
|
||||||
},
|
},
|
||||||
"snappy": {
|
"snappy": {
|
||||||
"support": {
|
"support": {
|
||||||
@ -912,7 +919,8 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"tokenizer": {
|
"tokenizer": {
|
||||||
"type": "builtin"
|
"type": "builtin",
|
||||||
|
"build-with-php": true
|
||||||
},
|
},
|
||||||
"uuid": {
|
"uuid": {
|
||||||
"support": {
|
"support": {
|
||||||
@ -995,7 +1003,8 @@
|
|||||||
],
|
],
|
||||||
"ext-depends-windows": [
|
"ext-depends-windows": [
|
||||||
"iconv"
|
"iconv"
|
||||||
]
|
],
|
||||||
|
"build-with-php": true
|
||||||
},
|
},
|
||||||
"xmlreader": {
|
"xmlreader": {
|
||||||
"support": {
|
"support": {
|
||||||
@ -1009,7 +1018,8 @@
|
|||||||
"ext-depends-windows": [
|
"ext-depends-windows": [
|
||||||
"xml",
|
"xml",
|
||||||
"dom"
|
"dom"
|
||||||
]
|
],
|
||||||
|
"build-with-php": true
|
||||||
},
|
},
|
||||||
"xmlwriter": {
|
"xmlwriter": {
|
||||||
"support": {
|
"support": {
|
||||||
@ -1022,7 +1032,8 @@
|
|||||||
],
|
],
|
||||||
"ext-depends-windows": [
|
"ext-depends-windows": [
|
||||||
"xml"
|
"xml"
|
||||||
]
|
],
|
||||||
|
"build-with-php": true
|
||||||
},
|
},
|
||||||
"xsl": {
|
"xsl": {
|
||||||
"support": {
|
"support": {
|
||||||
|
|||||||
@ -262,15 +262,17 @@ abstract class BuilderBase
|
|||||||
if (!$ext->isBuildShared()) {
|
if (!$ext->isBuildShared()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (Config::getExt($ext->getName(), 'type') === 'builtin') {
|
if (Config::getExt($ext->getName(), 'type') === 'builtin' || Config::getExt($ext->getName(), 'build-with-php') === true) {
|
||||||
if (file_exists(BUILD_MODULES_PATH . '/' . $ext->getName() . '.so')) {
|
if (file_exists(BUILD_MODULES_PATH . '/' . $ext->getName() . '.so')) {
|
||||||
logger()->info('Shared extension [' . $ext->getName() . '] was already built by php-src/configure (' . $ext->getName() . '.so)');
|
logger()->info('Shared extension [' . $ext->getName() . '] was already built by php-src/configure (' . $ext->getName() . '.so)');
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
logger()->warning('Shared extension [' . $ext->getName() . '] was built statically by php-src/configure');
|
if (Config::getExt($ext->getName(), 'build-with-php') === true) {
|
||||||
continue;
|
logger()->warning('Shared extension [' . $ext->getName() . '] did not build with php-src/configure (' . $ext->getName() . '.so)');
|
||||||
|
logger()->warning('Try deleting your build and source folders and running `spc build`` again.');
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
logger()->info('Building extension [' . $ext->getName() . '] as shared extension (' . $ext->getName() . '.so)');
|
|
||||||
$ext->buildShared();
|
$ext->buildShared();
|
||||||
}
|
}
|
||||||
} catch (RuntimeException $e) {
|
} catch (RuntimeException $e) {
|
||||||
@ -293,7 +295,11 @@ abstract class BuilderBase
|
|||||||
foreach ($this->getExts() as $ext) {
|
foreach ($this->getExts() as $ext) {
|
||||||
$arg = $ext->getConfigureArg();
|
$arg = $ext->getConfigureArg();
|
||||||
if ($ext->isBuildShared()) {
|
if ($ext->isBuildShared()) {
|
||||||
if (Config::getExt($ext->getName(), 'type') === 'builtin') {
|
if (
|
||||||
|
(Config::getExt($ext->getName(), 'type') === 'builtin' &&
|
||||||
|
!file_exists(SOURCE_PATH . '/php-src/ext/' . $ext->getName() . '/config.m4')) ||
|
||||||
|
Config::getExt($ext->getName(), 'build-with-php') === true
|
||||||
|
) {
|
||||||
$arg = $ext->getConfigureArg(true);
|
$arg = $ext->getConfigureArg(true);
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user