@@ -110,10 +110,11 @@ public function buildPHP(int $build_target = BUILD_TARGET_NONE): void
110110 $ config_file_scan_dir = $ this ->getOption ('with-config-file-scan-dir ' , false ) ?
111111 ('--with-config-file-scan-dir= ' . $ this ->getOption ('with-config-file-scan-dir ' ) . ' ' ) : '' ;
112112
113- $ enable_cli = ($ build_target & BUILD_TARGET_CLI ) === BUILD_TARGET_CLI ;
114- $ enable_fpm = ($ build_target & BUILD_TARGET_FPM ) === BUILD_TARGET_FPM ;
115- $ enable_micro = ($ build_target & BUILD_TARGET_MICRO ) === BUILD_TARGET_MICRO ;
116- $ enable_embed = ($ build_target & BUILD_TARGET_EMBED ) === BUILD_TARGET_EMBED ;
113+ $ enableCli = ($ build_target & BUILD_TARGET_CLI ) === BUILD_TARGET_CLI ;
114+ $ enableFpm = ($ build_target & BUILD_TARGET_FPM ) === BUILD_TARGET_FPM ;
115+ $ enableMicro = ($ build_target & BUILD_TARGET_MICRO ) === BUILD_TARGET_MICRO ;
116+ $ enableEmbed = ($ build_target & BUILD_TARGET_EMBED ) === BUILD_TARGET_EMBED ;
117+ $ enableFrankenphp = ($ build_target & BUILD_TARGET_FRANKENPHP ) === BUILD_TARGET_FRANKENPHP ;
117118
118119 $ mimallocLibs = $ this ->getLib ('mimalloc ' ) !== null ? BUILD_LIB_PATH . '/mimalloc.o ' : '' ;
119120 // prepare build php envs
@@ -125,7 +126,7 @@ public function buildPHP(int $build_target = BUILD_TARGET_NONE): void
125126 ]);
126127
127128 // process micro upx patch if micro sapi enabled
128- if ($ enable_micro ) {
129+ if ($ enableMicro ) {
129130 if (version_compare ($ this ->getMicroVersion (), '0.2.0 ' ) < 0 ) {
130131 // for phpmicro 0.1.x
131132 $ this ->processMicroUPXLegacy ();
@@ -137,10 +138,10 @@ public function buildPHP(int $build_target = BUILD_TARGET_NONE): void
137138 shell ()->cd (SOURCE_PATH . '/php-src ' )
138139 ->exec (
139140 getenv ('SPC_CMD_PREFIX_PHP_CONFIGURE ' ) . ' ' .
140- ($ enable_cli ? '--enable-cli ' : '--disable-cli ' ) .
141- ($ enable_fpm ? '--enable-fpm ' . ($ this ->getLib ('libacl ' ) !== null ? '--with-fpm-acl ' : '' ) : '--disable-fpm ' ) .
142- ($ enable_embed ? "--enable-embed= {$ embed_type } " : '--disable-embed ' ) .
143- ($ enable_micro ? '--enable-micro=all-static ' : '--disable-micro ' ) .
141+ ($ enableCli ? '--enable-cli ' : '--disable-cli ' ) .
142+ ($ enableFpm ? '--enable-fpm ' . ($ this ->getLib ('libacl ' ) !== null ? '--with-fpm-acl ' : '' ) : '--disable-fpm ' ) .
143+ ($ enableEmbed ? "--enable-embed= {$ embed_type } " : '--disable-embed ' ) .
144+ ($ enableMicro ? '--enable-micro=all-static ' : '--disable-micro ' ) .
144145 $ config_file_path .
145146 $ config_file_scan_dir .
146147 $ disable_jit .
@@ -156,25 +157,29 @@ public function buildPHP(int $build_target = BUILD_TARGET_NONE): void
156157
157158 $ this ->cleanMake ();
158159
159- if ($ enable_cli ) {
160+ if ($ enableCli ) {
160161 logger ()->info ('building cli ' );
161162 $ this ->buildCli ();
162163 }
163- if ($ enable_fpm ) {
164+ if ($ enableFpm ) {
164165 logger ()->info ('building fpm ' );
165166 $ this ->buildFpm ();
166167 }
167- if ($ enable_micro ) {
168+ if ($ enableMicro ) {
168169 logger ()->info ('building micro ' );
169170 $ this ->buildMicro ();
170171 }
171- if ($ enable_embed ) {
172+ if ($ enableEmbed ) {
172173 logger ()->info ('building embed ' );
173- if ($ enable_micro ) {
174+ if ($ enableMicro ) {
174175 FileSystem::replaceFileStr (SOURCE_PATH . '/php-src/Makefile ' , 'OVERALL_TARGET = ' , 'OVERALL_TARGET = libphp.la ' );
175176 }
176177 $ this ->buildEmbed ();
177178 }
179+ if ($ enableFrankenphp ) {
180+ logger ()->info ('building frankenphp ' );
181+ $ this ->buildFrankenphp ();
182+ }
178183 }
179184
180185 public function testPHP (int $ build_target = BUILD_TARGET_NONE )
0 commit comments