shutter-0.93.1-r3.ebuild 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils
  5. DESCRIPTION="Feature-rich screenshot program"
  6. HOMEPAGE="http://shutter-project.org/"
  7. SRC_URI="http://shutter-project.org/wp-content/uploads/releases/tars/${P}.tar.gz"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="drawing"
  12. RDEPEND="dev-lang/perl
  13. drawing? ( dev-perl/Goo-Canvas )
  14. dev-perl/libxml-perl
  15. dev-perl/gnome2-canvas
  16. dev-perl/gnome2-perl
  17. dev-perl/gnome2-wnck
  18. dev-perl/Gtk2-Unique
  19. dev-perl/Gtk2-ImageView
  20. dev-perl/File-DesktopEntry
  21. dev-perl/File-HomeDir
  22. dev-perl/File-Which
  23. dev-perl/JSON
  24. dev-perl/File-Copy-Recursive
  25. dev-perl/File-MimeInfo
  26. dev-perl/Locale-gettext
  27. dev-perl/Net-DBus
  28. dev-perl/Proc-Simple
  29. dev-perl/Proc-ProcessTable
  30. dev-perl/Sort-Naturally
  31. dev-perl/WWW-Mechanize
  32. dev-perl/X11-Protocol
  33. dev-perl/XML-Simple
  34. dev-perl/libwww-perl
  35. virtual/imagemagick-tools[perl]"
  36. src_prepare() {
  37. default
  38. eapply "${FILESDIR}"/${PN}-0.90-webphoto.patch
  39. use drawing || eapply "${FILESDIR}"/${PN}-0.90-goocanvas.patch
  40. # 560426
  41. eapply "${FILESDIR}"/${P}-insecure_use_of_system.patch
  42. #Fix tray icon because it doesn't pick the right icon using various themes
  43. sed -i -e "/\$tray->set_from_icon_name/s:set_from_icon_name:set_from_file:" \
  44. -e "s:shutter-panel:/usr/share/icons/hicolor/scalable/apps/&.svg:" \
  45. bin/shutter || die "failed to fix trayicon"
  46. }
  47. src_install() {
  48. dobin bin/${PN} || die "dobin failed"
  49. insinto /usr/share/${PN}
  50. doins -r share/${PN}/* || die "doins failed"
  51. dodoc README || die "dodoc failed"
  52. domenu share/applications/${PN}.desktop
  53. # Man page is broken. Reconstruct it.
  54. gunzip share/man/man1/${PN}.1.gz || die "gunzip failed"
  55. doman share/man/man1/${PN}.1 || die "doman failed"
  56. doicon share/pixmaps/${PN}.png
  57. doins -r share/locale || die "doins failed"
  58. insinto /usr/share/icons/hicolor
  59. doins -r share/icons/hicolor/* || die "doins failed"
  60. find "${D}"/usr/share/shutter/resources/system/plugins/ -type f ! -name '*.*' -exec chmod 755 {} \; \
  61. || die "failed to make plugins executables"
  62. find "${D}"/usr/share/shutter/resources/system/upload_plugins/upload -type f \
  63. -name "*.pm" -exec chmod 755 {} \; || die "failed to make upload plugins executables"
  64. }
  65. pkg_postinst() {
  66. elog ""
  67. elog "The following optional dependencies can be used to provide"
  68. elog "additional functionality:"
  69. elog ""
  70. elog "- media-libs/exiftool : Writing Exif information"
  71. elog "- dev-libs/libappindicator : Status icon support for Unity"
  72. elog "- dev-perl/{Net-OAuth,Path-Class}: Dropbox support"
  73. elog "- dev-perl/JSON-XS : vgy.me image hosting support"
  74. elog""
  75. }