nih-at/libzip

Incorrect .pc file with 1.10.0 versus 1.9.2

heitbaum opened this issue · 5 comments

Describe the Bug
A clear and concise description of what the bug is.
.pc file with 1.10.0 has the following incorrect line.
Libs.private: -lzstdbz2 -lzstdlzma -lzstdZLIB::ZLIB

Expected Behavior
A clear and concise description of what you expected to happen.

  • compile should have the correct Libs.private

Observed Behavior
A clear and concise description of what actually happened.

  • incorrect generation of .pc file

To Reproduce
Short program or code snippet that reproduces the problem.

  • compile lib zip 1.10.0 and check the .pc file.

libzip Version
Version of libzip or revision repository used.
1.10.0

Operating System
Operating system and version, used compiler.
LibreELEC 12.0

Test Files
If applicable, attach and describe zip archives that trigger the problem.

Additional context
Add any other context about the problem here.
1.9.2

prefix=/usr
exec_prefix=${prefix}
bindir=${prefix}/bin
libdir=${prefix}/lib
includedir=${prefix}/include

zipcmp=${bindir}/zipcmp

Name: libzip
Description: library for handling zip archives
Version: 1.9.2
Libs:  -L${libdir} -lzip
Libs.private:  -lbz2 -llzma -lz
Cflags: -I${includedir}

1.10.0

prefix=/usr
exec_prefix=${prefix}
bindir=${prefix}/bin
libdir=${prefix}/lib
includedir=${prefix}/include

zipcmp=${bindir}/zipcmp

Name: libzip
Description: library for handling zip archives
Version: 1.10.0
Libs:  -L${libdir} -lzip
Libs.private:  -lzstdbz2 -lzstdlzma -lzstdZLIB::ZLIB
Cflags: -I${includedir}

I can't reproduce this.
Please debug this in your environment.
Take a look at CMakeLists where ZLIB::ZLIB is replaced in the pkg-config file - find out how that breaks for you.

Shouldn't that replacement be gated by an ENABLE_ZSTD check?

Please try git head (ccf2ce4), which follows @dktapps's suggestion.

Working for me, thanks!