gedit-plugins-3.22.0.ebuild 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="6"
  4. GNOME2_LA_PUNT="yes" # plugins are dlopened
  5. PYTHON_COMPAT=( python3_{4,5} )
  6. PYTHON_REQ_USE="xml"
  7. VALA_MIN_API_VERSION="0.28"
  8. inherit eutils gnome2 multilib python-single-r1 vala
  9. DESCRIPTION="Official plugins for gedit"
  10. HOMEPAGE="https://wiki.gnome.org/Apps/Gedit/ShippedPlugins"
  11. LICENSE="GPL-2+"
  12. KEYWORDS="amd64 x86"
  13. SLOT="0"
  14. IUSE_plugins="charmap git terminal vala zeitgeist"
  15. IUSE="+python ${IUSE_plugins}"
  16. # python-single-r1 would request disabling PYTHON_TARGETS on libpeas
  17. REQUIRED_USE="
  18. charmap? ( python )
  19. git? ( python )
  20. python? ( ${PYTHON_REQUIRED_USE} )
  21. terminal? ( python )
  22. zeitgeist? ( python )
  23. "
  24. RDEPEND="
  25. >=app-editors/gedit-3.16[python?]
  26. >=dev-libs/glib-2.32:2
  27. >=dev-libs/libpeas-1.7.0[gtk,python?]
  28. >=x11-libs/gtk+-3.9:3
  29. >=x11-libs/gtksourceview-3.21.3:3.0
  30. python? (
  31. ${PYTHON_DEPS}
  32. >=app-editors/gedit-3.16[introspection,${PYTHON_USEDEP}]
  33. dev-libs/libpeas[${PYTHON_USEDEP}]
  34. >=dev-python/dbus-python-0.82[${PYTHON_USEDEP}]
  35. dev-python/pycairo[${PYTHON_USEDEP}]
  36. dev-python/pygobject:3[cairo,${PYTHON_USEDEP}]
  37. >=x11-libs/gtk+-3.9:3[introspection]
  38. >=x11-libs/gtksourceview-3.14:3.0[introspection]
  39. x11-libs/pango[introspection]
  40. x11-libs/gdk-pixbuf:2[introspection]
  41. )
  42. charmap? ( >=gnome-extra/gucharmap-3:2.90[introspection] )
  43. git? ( >=dev-libs/libgit2-glib-0.0.6 )
  44. terminal? ( x11-libs/vte:2.91[introspection] )
  45. vala? ( $(vala_depend) )
  46. zeitgeist? ( >=gnome-extra/zeitgeist-0.9.12[introspection] )
  47. "
  48. DEPEND="${RDEPEND}
  49. app-text/yelp-tools
  50. >=dev-util/intltool-0.40.0
  51. >=sys-devel/gettext-0.17
  52. virtual/pkgconfig
  53. "
  54. pkg_setup() {
  55. use python && [[ ${MERGE_TYPE} != binary ]] && python-single-r1_pkg_setup
  56. }
  57. src_prepare() {
  58. use vala && vala_src_prepare
  59. gnome2_src_prepare
  60. }
  61. src_configure() {
  62. gnome2_src_configure \
  63. $(use_enable python) \
  64. $(use_enable vala) \
  65. $(use_enable zeitgeist)
  66. }
  67. src_install() {
  68. gnome2_src_install
  69. # FIXME: crazy !!!
  70. if use python; then
  71. find "${ED}"/usr/share/gedit -name "*.py*" -delete || die
  72. find "${ED}"/usr/share/gedit -type d -empty -delete || die
  73. fi
  74. # FIXME: upstream made this automagic...
  75. clean_plugin charmap
  76. clean_plugin git
  77. clean_plugin terminal
  78. }
  79. clean_plugin() {
  80. if use !${1} ; then
  81. rm -rf "${ED}"/usr/share/gedit/plugins/${1}*
  82. rm -rf "${ED}"/usr/$(get_libdir)/gedit/plugins/${1}*
  83. fi
  84. }