mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
fix freetype lib build (#654)
Co-authored-by: Marc Henderkes <m.henderkes@pc-college.de>
This commit is contained in:
parent
b1931059a5
commit
d86b7c4cec
@ -18,21 +18,17 @@ trait freetype
|
||||
*/
|
||||
protected function build(): void
|
||||
{
|
||||
$suggested = $this->builder->getLib('libpng') ? '--with-png' : '--without-png';
|
||||
$suggested .= ' ';
|
||||
$suggested .= $this->builder->getLib('bzip2') ? ('--with-bzip2=' . BUILD_ROOT_PATH) : '--without-bzip2';
|
||||
$suggested .= ' ';
|
||||
$suggested .= $this->builder->getLib('brotli') ? ('--with-brotli=' . BUILD_ROOT_PATH) : '--without-brotli';
|
||||
$suggested .= ' ';
|
||||
$extra_libs = $this->builder->getLib('libpng') ? '--with-png' : '--without-png';
|
||||
$extra_libs .= ' ';
|
||||
$extra_libs .= $this->builder->getLib('bzip2') ? ('--with-bzip2=' . BUILD_ROOT_PATH) : '--without-bzip2';
|
||||
$extra_libs .= ' ';
|
||||
$extra_libs .= $this->builder->getLib('brotli') ? ('--with-brotli=' . BUILD_ROOT_PATH) : '--without-brotli';
|
||||
$extra_libs .= ' ';
|
||||
|
||||
shell()->cd($this->source_dir)
|
||||
->setEnv(['CFLAGS' => $this->getLibExtraCFlags(), 'LDFLAGS' => $this->getLibExtraLdFlags(), 'LIBS' => $this->getLibExtraLibs()])
|
||||
->exec('sh autogen.sh')
|
||||
->execWithEnv(
|
||||
'./configure ' .
|
||||
'--enable-static --disable-shared --without-harfbuzz --prefix= ' .
|
||||
$suggested
|
||||
)
|
||||
->execWithEnv('./autogen.sh')
|
||||
->execWithEnv('./configure --without-harfbuzz --prefix= ' . $extra_libs)
|
||||
->execWithEnv('make clean')
|
||||
->execWithEnv("make -j{$this->builder->concurrency}")
|
||||
->execWithEnv('make install DESTDIR=' . BUILD_ROOT_PATH);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user