Skip to content

Commit 463a98b

Browse files
committed
Support suggested libs not specified by with-suggested-libs
1 parent 6d1c6d7 commit 463a98b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ protected function build(): void
3131
->optionalLib('curl', ...cmake_boolean_args('WITH_CURL'))
3232
->optionalLib('openssl', ...cmake_boolean_args('WITH_SSL'))
3333
->optionalLib('zlib', ...cmake_boolean_args('WITH_ZLIB'))
34+
->optionalLib('liblz4', ...cmake_boolean_args('ENABLE_LZ4_EXT'))
3435
->addConfigureArgs(
3536
'-DWITH_SASL=OFF',
3637
'-DRDKAFKA_BUILD_STATIC=ON',
3738
'-DRDKAFKA_BUILD_EXAMPLES=OFF',
3839
'-DRDKAFKA_BUILD_TESTS=OFF',
39-
'-DENABLE_LZ4_EXT=OFF',
4040
)
4141
->build();
4242
}

src/SPC/util/SPCConfigUtil.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,10 @@ public function getExtensionConfig(array|Extension $extension, bool $include_sug
146146
if (!is_array($extension)) {
147147
$extension = [$extension];
148148
}
149+
$libs = array_map(fn ($y) => $y->getName(), array_merge(...array_map(fn ($x) => $x->getLibraryDependencies(true), $extension)));
149150
return $this->config(
150151
extensions: array_map(fn ($x) => $x->getName(), $extension),
152+
libraries: $libs,
151153
include_suggest_ext: $include_suggest_ext ?: $this->builder?->getOption('with-suggested-exts') ?? false,
152154
include_suggest_lib: $include_suggest_lib ?: $this->builder?->getOption('with-suggested-libs') ?? false,
153155
);

0 commit comments

Comments
 (0)