mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-10 10:25:36 +08:00
fpic for liblzma
This commit is contained in:
@@ -16,7 +16,12 @@ trait xz
|
|||||||
public function build(): void
|
public function build(): void
|
||||||
{
|
{
|
||||||
shell()->cd($this->source_dir)
|
shell()->cd($this->source_dir)
|
||||||
->exec(
|
->setEnv([
|
||||||
|
'CFLAGS' => $this->getLibExtraCFlags(),
|
||||||
|
'LDFLAGS' => $this->getLibExtraLdFlags(),
|
||||||
|
'LIBS' => $this->getLibExtraLibs(),
|
||||||
|
])
|
||||||
|
->execWithEnv(
|
||||||
'./configure ' .
|
'./configure ' .
|
||||||
'--enable-static ' .
|
'--enable-static ' .
|
||||||
'--disable-shared ' .
|
'--disable-shared ' .
|
||||||
@@ -26,9 +31,9 @@ trait xz
|
|||||||
'--with-libiconv ' .
|
'--with-libiconv ' .
|
||||||
'--prefix='
|
'--prefix='
|
||||||
)
|
)
|
||||||
->exec('make clean')
|
->execWithEnv('make clean')
|
||||||
->exec("make -j{$this->builder->concurrency}")
|
->execWithEnv("make -j{$this->builder->concurrency}")
|
||||||
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
|
->execWithEnv('make install DESTDIR=' . BUILD_ROOT_PATH);
|
||||||
$this->patchPkgconfPrefix(['liblzma.pc']);
|
$this->patchPkgconfPrefix(['liblzma.pc']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class CraftCommand extends BaseCommand
|
|||||||
}
|
}
|
||||||
if (isset($craft['php-version'])) {
|
if (isset($craft['php-version'])) {
|
||||||
$args[] = '--with-php=' . $craft['php-version'];
|
$args[] = '--with-php=' . $craft['php-version'];
|
||||||
if (!array_key_exists('ignore-cache-sources', $craft['download-options']) || $craft['download-options']['ignore-cache-sources'] === false) {
|
if (!array_key_exists('ignore-cache-sources', $craft['download-options'])) {
|
||||||
$craft['download-options']['ignore-cache-sources'] = 'php-src';
|
$craft['download-options']['ignore-cache-sources'] = 'php-src';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user