#1082371 libzip-dev: distribute static library with development package

Package:
libzip-dev
Source:
libzip-dev
Description:
library for reading, creating, and modifying zip archives (development)
Submitter:
ryan
Date:
2025-02-12 14:24:01 UTC
Severity:
normal
Tags:
#1082371#5
Date:
2024-09-20 12:36:02 UTC
From:
To:
Dear Maintainer,

I installed libzip-dev and wanted to statically link against it in a project,
but found that libzip-dev does not provide a statically linked library
(libzip.a):

$ dpkg -L libzip-dev | grep '.a$'
$

Would it be possible to add this to the package?

It should be possible to get libzip to emit the static library by configuring
CMake with `-DBUILD_SHARED_LIBS=OFF`.

Thanks!

Ryan

#1082371#10
Date:
2024-10-16 16:01:52 UTC
From:
To:
Hello Ryan,

thanks for the bugreport and your interest in this package.

While this will indeed provide the static library, then the shared
library won't be built anymore. The solution would be to build the
library in two passes: once shared, and once static, and combine the
results. This, however, complicates the packaging in a way that I'd like
to avoid at the moment, at least until 1.11.1 will have migrated to
testing. I'll reconsider in the future, but don't hold your breath.

For reference, a similar bugreport exists in Ubuntu at
<https://bugs.launchpad.net/ubuntu/+source/libzip/+bug/1882297>, and in
the past the package also provided the static library until the support
for that was dropped in version 1.5.1-1, cf.
<https://salsa.debian.org/debian/libzip/-/commit/1c4adf6f2d643dd9dc9d2f741316c4f05f481e82>.

Cheers,
Flo

#1082371#17
Date:
2025-02-12 14:20:47 UTC
From:
To:
Hello again,

just some brief update on this:

I toyed with building in two passes a bit, but I found that this alone
is not sufficient: this would provide the static lib, true, but I'd also
need to provide a separate zipconf.h and separate *.cmake files that
properly reflect the static build. Of course this is not impossible to
do, but still it would complicate the packaging in way that I'd like to
avoid at the moment, so I am postponing this further.

Cheers,
Flo