Skip to content

Commit e850df5

Browse files
authored
Merge pull request #671 from crazywhalecc/fix/phpize
fix phpize using wrong paths
2 parents f0a8956 + 918223e commit e850df5

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/SPC/builder/linux/LinuxBuilder.php

+2
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,8 @@ protected function buildEmbed(): void
311311
->exec('sed -i "s|//lib|/lib|g" Makefile')
312312
->exec(getenv('SPC_CMD_PREFIX_PHP_MAKE') . ' INSTALL_ROOT=' . BUILD_ROOT_PATH . " {$vars} install");
313313
FileSystem::replaceFileStr(BUILD_BIN_PATH . '/php-config', 'prefix=""', 'prefix="' . BUILD_ROOT_PATH . '"');
314+
FileSystem::replaceFileStr(BUILD_BIN_PATH . '/phpize', "prefix=''", "prefix='" . BUILD_ROOT_PATH . "'");
315+
FileSystem::replaceFileStr(BUILD_BIN_PATH . '/phpize', 's##', 's#/usr/local#');
314316
}
315317

316318
private function getMakeExtraVars(): array

src/SPC/builder/macos/MacOSBuilder.php

+3
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ protected function buildEmbed(): void
298298
->exec('rm ' . BUILD_ROOT_PATH . '/lib/libphp.a')
299299
->exec('ar rcs ' . BUILD_ROOT_PATH . '/lib/libphp.a *.o')
300300
->exec('rm -Rf ' . BUILD_ROOT_PATH . '/lib/php-o');
301+
FileSystem::replaceFileStr(BUILD_BIN_PATH . '/php-config', 'prefix=""', 'prefix="' . BUILD_ROOT_PATH . '"');
302+
FileSystem::replaceFileStr(BUILD_BIN_PATH . '/phpize', "prefix=''", "prefix='" . BUILD_ROOT_PATH . "'");
303+
FileSystem::replaceFileStr(BUILD_BIN_PATH . '/phpize', 's##', 's#/usr/local#');
301304
}
302305

303306
private function getMakeExtraVars(): array

0 commit comments

Comments
 (0)