mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
parent
c0b52fc2d1
commit
330dd2bfc6
@ -427,9 +427,8 @@
|
|||||||
"librdkafka++.a",
|
"librdkafka++.a",
|
||||||
"librdkafka-static.a"
|
"librdkafka-static.a"
|
||||||
],
|
],
|
||||||
"lib-depends": [
|
"lib-suggests": [
|
||||||
"openssl",
|
"zstd"
|
||||||
"zlib"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"postgresql": {
|
"postgresql": {
|
||||||
|
|||||||
@ -16,15 +16,19 @@ trait librdkafka
|
|||||||
protected function build(): void
|
protected function build(): void
|
||||||
{
|
{
|
||||||
$builddir = BUILD_ROOT_PATH;
|
$builddir = BUILD_ROOT_PATH;
|
||||||
|
|
||||||
|
$zstd_option = $this->builder->getLib('zstd') ? ("STATIC_LIB_libzstd={$builddir}/lib/libzstd.a ") : '';
|
||||||
shell()->cd($this->source_dir)
|
shell()->cd($this->source_dir)
|
||||||
->exec(
|
->exec(
|
||||||
|
$zstd_option .
|
||||||
'./configure ' .
|
'./configure ' .
|
||||||
'--enable-static --disable-shared --disable-curl --disable-sasl --disable-valgrind ' .
|
'--enable-static --disable-shared --disable-curl --disable-sasl --disable-valgrind --disable-zlib --disable-ssl ' .
|
||||||
|
($zstd_option == '' ? '--disable-zstd ' : '') .
|
||||||
'--prefix='
|
'--prefix='
|
||||||
)
|
)
|
||||||
->exec('make clean')
|
->exec('make clean')
|
||||||
->exec("make -j{$this->builder->concurrency}")
|
->exec("make -j{$this->builder->concurrency}")
|
||||||
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
|
->exec("make install DESTDIR={$builddir}");
|
||||||
$this->patchPkgconfPrefix(['rdkafka.pc', 'rdkafka-static.pc', 'rdkafka++.pc', 'rdkafka++-static.pc']);
|
$this->patchPkgconfPrefix(['rdkafka.pc', 'rdkafka-static.pc', 'rdkafka++.pc', 'rdkafka++-static.pc']);
|
||||||
// remove dynamic libs
|
// remove dynamic libs
|
||||||
shell()
|
shell()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user