File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed
Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 341341 "ext-depends" : [
342342 " xml"
343343 ],
344+ "build-with-php" : true ,
344345 "target" : [
345346 " static"
346347 ]
461462 "mysqli" : {
462463 "type" : " builtin" ,
463464 "arg-type" : " with" ,
465+ "build-with-php" : true ,
464466 "ext-depends" : [
465467 " mysqlnd"
466468 ]
467469 },
468470 "mysqlnd" : {
469471 "type" : " builtin" ,
470472 "arg-type-windows" : " with" ,
473+ "build-with-php" : true ,
471474 "lib-depends" : [
472475 " zlib"
473476 ]
797800 "type" : " builtin" ,
798801 "arg-type" : " with-path" ,
799802 "arg-type-windows" : " with" ,
803+ "build-with-php" : true ,
800804 "lib-depends" : [
801805 " sqlite"
802806 ]
11771181 "lib-depends" : [
11781182 " zlib"
11791183 ],
1184+ "build-with-php" : true ,
11801185 "target" : [
11811186 " static"
11821187 ]
Original file line number Diff line number Diff line change 77use SPC \builder \unix \UnixBuilderBase ;
88use SPC \exception \PatchException ;
99use SPC \exception \WrongUsageException ;
10+ use SPC \store \Config ;
1011use SPC \store \FileSystem ;
1112use SPC \store \SourcePatcher ;
1213use SPC \util \GlobalEnvManager ;
@@ -283,12 +284,17 @@ protected function buildFpm(): void
283284 */
284285 protected function buildEmbed (): void
285286 {
287+ $ sharedExts = array_filter ($ this ->exts , static fn ($ ext ) => $ ext ->isBuildShared ());
288+ $ sharedExts = array_filter ($ sharedExts , static function ($ ext ) {
289+ return Config::getExt ($ ext ->getName (), 'build-with-php ' ) === true ;
290+ });
291+ $ install_modules = $ sharedExts ? 'install-modules ' : '' ;
286292 $ vars = SystemUtil::makeEnvVarString ($ this ->getMakeExtraVars ());
287293 $ concurrency = getenv ('SPC_CONCURRENCY ' ) ? '-j ' . getenv ('SPC_CONCURRENCY ' ) : '' ;
288294 shell ()->cd (SOURCE_PATH . '/php-src ' )
289295 ->exec ('sed -i "s|//lib|/lib|g" Makefile ' )
290296 ->exec ('sed -i "s|^EXTENSION_DIR = .*|EXTENSION_DIR = / ' . basename (BUILD_MODULES_PATH ) . '|" Makefile ' )
291- ->exec ("make {$ concurrency } INSTALL_ROOT= " . BUILD_ROOT_PATH . " {$ vars } install-sapi install-modules install-build install-headers install-programs " );
297+ ->exec ("make {$ concurrency } INSTALL_ROOT= " . BUILD_ROOT_PATH . " {$ vars } install-sapi { $ install_modules } install-build install-headers install-programs " );
292298
293299 $ ldflags = getenv ('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS ' ) ?: '' ;
294300 $ libDir = BUILD_LIB_PATH ;
Original file line number Diff line number Diff line change 77use SPC \builder \macos \library \MacOSLibraryBase ;
88use SPC \builder \unix \UnixBuilderBase ;
99use SPC \exception \WrongUsageException ;
10+ use SPC \store \Config ;
1011use SPC \store \FileSystem ;
1112use SPC \store \SourcePatcher ;
1213use SPC \util \GlobalEnvManager ;
@@ -264,10 +265,15 @@ protected function buildFpm(): void
264265 */
265266 protected function buildEmbed (): void
266267 {
268+ $ sharedExts = array_filter ($ this ->exts , static fn ($ ext ) => $ ext ->isBuildShared ());
269+ $ sharedExts = array_filter ($ sharedExts , static function ($ ext ) {
270+ return Config::getExt ($ ext ->getName (), 'build-with-php ' ) === true ;
271+ });
272+ $ install_modules = $ sharedExts ? 'install-modules ' : '' ;
267273 $ vars = SystemUtil::makeEnvVarString ($ this ->getMakeExtraVars ());
268274 $ concurrency = getenv ('SPC_CONCURRENCY ' ) ? '-j ' . getenv ('SPC_CONCURRENCY ' ) : '' ;
269275 shell ()->cd (SOURCE_PATH . '/php-src ' )
270- ->exec ("make {$ concurrency } INSTALL_ROOT= " . BUILD_ROOT_PATH . " {$ vars } install-sapi install-modules install-build install-headers install-programs " );
276+ ->exec ("make {$ concurrency } INSTALL_ROOT= " . BUILD_ROOT_PATH . " {$ vars } install-sapi { $ install_modules } install-build install-headers install-programs " );
271277
272278 if (getenv ('SPC_CMD_VAR_PHP_EMBED_TYPE ' ) === 'static ' ) {
273279 $ AR = getenv ('AR ' ) ?: 'ar ' ;
You can’t perform that action at this time.
0 commit comments