Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 902485

Summary: app-arch/lzlib: add USE=static-libs
Product: Gentoo Linux Reporter: Israel G. Lugo <israel.lugo>
Component: Current packagesAssignee: Michał Górny <mgorny>
Status: UNCONFIRMED ---    
Severity: normal Keywords: EBUILD
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: New ebuild with static-libs support
Same thing in patch form

Description Israel G. Lugo 2023-03-20 23:07:58 UTC
Created attachment 858501 [details]
New ebuild with static-libs support

Upstream lzlib is capable of building a static library (liblz.a), but the =app-arch/lzlib-1.13-r1 ebuild unconditionally disables this.

I'd like to have the static version of liblz for my own development. I also don't see why the ebuild should disallow other people from having it too.

I'm attaching a new version of the ebuild which builds and installs the static archive, depending on the "static-libs" USE flag.
Comment 1 Israel G. Lugo 2023-03-20 23:08:48 UTC
Created attachment 858503 [details, diff]
Same thing in patch form
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-20 23:11:59 UTC
https://projects.gentoo.org/qa/policy-guide/installed-files.html#pg0302 is why things tend not to include it, but there's kind of a reasonable case for archivers to have it, so..
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-20 23:13:52 UTC
For homebrew configure scripts, we should probably establish some variable like EXTRA_ECONF for people to use.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-03-21 04:50:09 UTC
Doesn't it accept --enable-static?
Comment 5 Israel G. Lugo 2023-03-21 19:24:13 UTC
(In reply to Sam James from comment #2)
> https://projects.gentoo.org/qa/policy-guide/installed-files.html#pg0302 is
> why things tend not to include it, but there's kind of a reasonable case for
> archivers to have it, so..

For me, the use case is in development and packaging. I.e. where one would use a lzlib-dev package in other distributions.

I have a custom tool which will use lzlib, and I want to be able to deploy it unto other machines in a static binary that Just Works.

Part of this involves writing Go bindings for lzlib; I'd like to give future users of these bindings the possibility of building statically as well. Which means I need an existing static version myself, to develop and test.
Comment 6 Israel G. Lugo 2023-03-21 19:26:37 UTC
(In reply to Michał Górny from comment #4)
> Doesn't it accept --enable-static?

Unfortunately, no.

The configure script is mostly a big case switch. It defaults to static=true and shared=false, then accepts (among other unrelated things) --disable-static and --enable-shared.