putty-0.68.ebuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit autotools eutils gnome2-utils toolchain-funcs
  5. DESCRIPTION="A Free Telnet/SSH Client"
  6. HOMEPAGE="http://www.chiark.greenend.org.uk/~sgtatham/putty/"
  7. LICENSE="MIT"
  8. SLOT="0"
  9. KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86"
  10. IUSE="doc +gtk ipv6 kerberos"
  11. SRC_URI="
  12. https://dev.gentoo.org/~jer/${PN}-icons.tar.bz2
  13. http://the.earth.li/~sgtatham/${PN}/latest/${P}.tar.gz
  14. "
  15. RDEPEND="
  16. !net-misc/pssh
  17. gtk? (
  18. dev-libs/glib:2
  19. x11-libs/gdk-pixbuf[X]
  20. x11-libs/gtk+:3
  21. x11-libs/libX11
  22. x11-libs/pango
  23. )
  24. kerberos? ( virtual/krb5 )
  25. "
  26. DEPEND="
  27. ${RDEPEND}
  28. dev-lang/perl
  29. virtual/pkgconfig
  30. "
  31. src_prepare() {
  32. default
  33. sed -i \
  34. -e '/AM_PATH_GTK(/d' \
  35. -e 's|-Werror||g' \
  36. configure.ac || die
  37. eautoreconf
  38. }
  39. src_configure() {
  40. cd "${S}"/unix || die
  41. econf \
  42. $(use_with kerberos gssapi) \
  43. $(use_with gtk)
  44. }
  45. src_compile() {
  46. cd "${S}"/unix || die
  47. emake AR=$(tc-getAR) $(usex ipv6 '' COMPAT=-DNO_IPV6)
  48. }
  49. src_install() {
  50. dodoc doc/puttydoc.txt
  51. if use doc; then
  52. docinto html
  53. dodoc doc/*.html
  54. fi
  55. cd "${S}"/unix || die
  56. default
  57. if use gtk ; then
  58. for i in 16 22 24 32 48 64 128 256; do
  59. newicon -s ${i} "${WORKDIR}"/${PN}-icons/${PN}-${i}.png ${PN}.png
  60. done
  61. # install desktop file provided by Gustav Schaffter in #49577
  62. make_desktop_entry ${PN} PuTTY ${PN} Network
  63. fi
  64. }
  65. pkg_preinst() {
  66. use gtk && gnome2_icon_savelist
  67. }
  68. pkg_postinst() {
  69. use gtk && gnome2_icon_cache_update
  70. }
  71. pkg_postrm() {
  72. use gtk && gnome2_icon_cache_update
  73. }