Skip to content

Commit 330dd2b

Browse files
authored
Added optional zlib and disabled two extension (#545)
asd
1 parent c0b52fc commit 330dd2b

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

config/lib.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,8 @@
427427
"librdkafka++.a",
428428
"librdkafka-static.a"
429429
],
430-
"lib-depends": [
431-
"openssl",
432-
"zlib"
430+
"lib-suggests": [
431+
"zstd"
433432
]
434433
},
435434
"postgresql": {

src/SPC/builder/unix/library/librdkafka.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,19 @@ trait librdkafka
1616
protected function build(): void
1717
{
1818
$builddir = BUILD_ROOT_PATH;
19+
20+
$zstd_option = $this->builder->getLib('zstd') ? ("STATIC_LIB_libzstd={$builddir}/lib/libzstd.a ") : '';
1921
shell()->cd($this->source_dir)
2022
->exec(
23+
$zstd_option .
2124
'./configure ' .
22-
'--enable-static --disable-shared --disable-curl --disable-sasl --disable-valgrind ' .
25+
'--enable-static --disable-shared --disable-curl --disable-sasl --disable-valgrind --disable-zlib --disable-ssl ' .
26+
($zstd_option == '' ? '--disable-zstd ' : '') .
2327
'--prefix='
2428
)
2529
->exec('make clean')
2630
->exec("make -j{$this->builder->concurrency}")
27-
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
31+
->exec("make install DESTDIR={$builddir}");
2832
$this->patchPkgconfPrefix(['rdkafka.pc', 'rdkafka-static.pc', 'rdkafka++.pc', 'rdkafka++-static.pc']);
2933
// remove dynamic libs
3034
shell()

0 commit comments

Comments
 (0)