It is possible to build only the command line utilities in the putty package when passing --without-gtk. You then end up with puttygen, psftp, pscp and plink. Since I need only puttygen on a server I patched an ebuild locally according to: --- putty-0.63.ebuild 2013-08-08 14:33:45.000000000 +0200 +++ putty-0.63-r1.ebuild 2013-08-28 16:45:33.000000000 +0200 @@ -14,17 +14,17 @@ LICENSE="MIT" SLOT="0" -KEYWORDS="alpha amd64 ~hppa ppc sparc x86" -IUSE="doc ipv6 kerberos" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86" +IUSE="doc +gtk ipv6 kerberos" RDEPEND=" !net-misc/pssh - dev-libs/glib kerberos? ( virtual/krb5 ) - x11-libs/gdk-pixbuf + gtk? ( x11-libs/gdk-pixbuf x11-libs/gtk+:2 x11-libs/libX11 x11-libs/pango + dev-libs/glib ) " DEPEND=" ${RDEPEND} @@ -44,7 +44,9 @@ src_configure() { cd "${S}"/unix || die - econf $(use_with kerberos gssapi) + econf \ + $(use_with kerberos gssapi) \ + $(use_with gtk) } src_compile() { @@ -62,22 +64,24 @@ cd "${S}"/unix || die default + if use gtk ; then for i in 16 22 24 32 48 64 128 256; do newicon -s ${i} "${WORKDIR}"/${PN}-icons/${PN}-${i}.png ${PN}.png done # install desktop file provided by Gustav Schaffter in #49577 make_desktop_entry ${PN} PuTTY ${PN} Network + fi } pkg_preinst() { - gnome2_icon_savelist + use gtk && gnome2_icon_savelist } pkg_postinst() { - gnome2_icon_cache_update + use gtk && gnome2_icon_cache_update } pkg_postrm() { - gnome2_icon_cache_update + use gtk && gnome2_icon_cache_update } and added the following description to metadata.xml: Index: metadata.xml =================================================================== RCS file: /var/cvsroot/gentoo-x86/net-misc/putty/metadata.xml,v retrieving revision 1.4 diff -r1.4 metadata.xml 14a15,17 > <use> > <flag name='gtk'>Build the GUI tools which use <pkg>x11-libs/gtk+:2</pkg></flag> > </use> Any objections if I commit that to the tree? Would you prefer a different USE flag?
I trust the ebuild patch is OK, but the description should clearly state that USE=gtk means building putty itself, which is what most people would be looking for, rather than the CLI tools.
How about the following? Build the Putty client which requires <pkg>x11-libs/gtk+:2</pkg>. Otherwise only the CLI tools puttygen, plink, pscp and psftp will be built.
(In reply to Tiziano Müller from comment #2) > How about the following? > > Build the Putty client which requires <pkg>x11-libs/gtk+:2</pkg>. Otherwise > only the CLI tools puttygen, plink, pscp and psftp will be built. It's PuTTY, actually. Otherwise that looks fine.
committed with the correction, thanks.