putty-9999.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 git-r3 toolchain-funcs
  5. DESCRIPTION="A Free Telnet/SSH Client"
  6. HOMEPAGE="http://www.chiark.greenend.org.uk/~sgtatham/putty/"
  7. EGIT_REPO_URI="git://git.tartarus.org/simon/putty.git"
  8. SRC_URI="https://dev.gentoo.org/~jer/${PN}-icons.tar.bz2"
  9. LICENSE="MIT"
  10. SLOT="0"
  11. KEYWORDS=""
  12. IUSE="doc +gtk ipv6 kerberos"
  13. RDEPEND="
  14. !net-misc/pssh
  15. gtk? (
  16. dev-libs/glib:2
  17. x11-libs/gdk-pixbuf[X]
  18. x11-libs/gtk+:3
  19. x11-libs/libX11
  20. x11-libs/pango
  21. )
  22. kerberos? ( virtual/krb5 )
  23. "
  24. DEPEND="
  25. ${RDEPEND}
  26. app-doc/halibut
  27. dev-lang/perl
  28. virtual/pkgconfig
  29. "
  30. src_unpack() {
  31. git-r3_src_unpack
  32. default
  33. }
  34. src_prepare() {
  35. default
  36. sed -i \
  37. -e '/AM_PATH_GTK(/d' \
  38. -e 's|-Werror||g' \
  39. configure.ac || die
  40. ./mkfiles.pl || die
  41. eautoreconf
  42. }
  43. src_configure() {
  44. cd "${S}"/unix || die
  45. econf \
  46. $(use_with kerberos gssapi) \
  47. $(use_with gtk)
  48. }
  49. src_compile() {
  50. emake -C "${S}"/doc
  51. emake -C "${S}"/unix AR=$(tc-getAR) $(usex ipv6 '' COMPAT=-DNO_IPV6)
  52. }
  53. src_install() {
  54. dodoc doc/puttydoc.txt
  55. if use doc; then
  56. docinto html
  57. dodoc doc/*.html
  58. fi
  59. cd "${S}"/unix || die
  60. default
  61. if use gtk ; then
  62. for i in 16 22 24 32 48 64 128 256; do
  63. newicon -s ${i} "${WORKDIR}"/${PN}-icons/${PN}-${i}.png ${PN}.png
  64. done
  65. # install desktop file provided by Gustav Schaffter in #49577
  66. make_desktop_entry ${PN} PuTTY ${PN} Network
  67. fi
  68. }
  69. pkg_preinst() {
  70. use gtk && gnome2_icon_savelist
  71. }
  72. pkg_postinst() {
  73. use gtk && gnome2_icon_cache_update
  74. }
  75. pkg_postrm() {
  76. use gtk && gnome2_icon_cache_update
  77. }