Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 593344 - x11-libs/gtk+: add static-libs USE flag
Summary: x11-libs/gtk+: add static-libs USE flag
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-10 07:20 UTC by Marc van der Sluys
Modified: 2020-12-06 16:37 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for gtk+-3.18.9.ebuild (gtk+-static.patch,706 bytes, patch)
2016-09-10 07:20 UTC, Marc van der Sluys
Details | Diff
Example patch for gtk+-3.18.9.ebuild (gtk+-static-libs.patch,760 bytes, patch)
2016-09-11 12:40 UTC, Marc van der Sluys
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc van der Sluys 2016-09-10 07:20:55 UTC
Created attachment 445354 [details, diff]
Patch for gtk+-3.18.9.ebuild

I am interested in statically linking my code against GTK+, and would like to request the addition of the static USE flag to current and future ebuilds for the x11-libs/gtk+ package.  This would involve changing two lines in the ebuild (see attachment) and give users an easy switch to build the static libs.
Comment 1 Felix Janda 2016-09-10 11:40:43 UTC
You mean a "static-libs" use flag. A "static" use flag would control
the linking of the few binaries installed by x11-libs/gtk+.
Comment 2 Marc van der Sluys 2016-09-11 12:40:42 UTC
Created attachment 445470 [details, diff]
Example patch for gtk+-3.18.9.ebuild

Oops, you are correct - I meant a static-libs USE flag. Thank you!
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2016-09-12 21:02:54 UTC
I think we had a conversation long ago that a static gtk+ is basically non-functional, did I misunderstand ?
Comment 4 Marc van der Sluys 2016-09-14 14:45:58 UTC
I am unaware of this earlier discussion.  Do you mean disfunctional technically, or because of the LGPL?  I want a statically linked binary executable to copy to a different (small, embedded) system without installing all the libraries.  Even if releasing the code, I think static linking means you'd need to release the *object files* rather than the source code (third parties must be able to *relink* against a new GTK+ version, not recompile).
Comment 5 Mart Raudsepp gentoo-dev 2016-09-15 07:49:44 UTC
Technically. Though I'm not sure this was correct; the references I find are generally about it not being possible on Windows specifically, but theoretically possible on POSIX systems.
Does it work for you, up to your statically linked application working fine?

Though I'm not sure how you'll plan to meet the LGPL requirements of relinking possibilities when building out of Gentoo packaging. Sounds like some FEATURES=keepwork and some extra management to do anyways; or something else.
Comment 6 Agostino Sarubbo gentoo-dev 2020-05-28 14:55:55 UTC
See also: https://projects.gentoo.org/qa/policy-guide/installed-files.html#pg0302
Comment 7 Mart Raudsepp gentoo-dev 2020-06-01 10:58:03 UTC
ago@, I don't know why you are drive-by adding an invalid blocker here; so removing and CCing for awareness.
Comment 8 Mart Raudsepp gentoo-dev 2020-12-06 16:37:07 UTC
We have no plans to add static-libs support to gtk+ due to aforementioned reasons. Closing the bug for now.