purple-plugin_pack-2.7.0-r1.ebuild 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit eutils python-any-r1
  6. MY_PN=${PN/_/-}
  7. MY_P=${MY_PN}-${PV}
  8. DESCRIPTION="A package with many different plugins for pidgin and libpurple"
  9. HOMEPAGE="https://bitbucket.org/rekkanoryo/purple-plugin-pack/"
  10. SRC_URI="https://bitbucket.org/rekkanoryo/${MY_PN}/downloads/${MY_P}.tar.bz2"
  11. LICENSE="GPL-2"
  12. SLOT="0"
  13. KEYWORDS="amd64 hppa ppc x86"
  14. IUSE="debug gtk ncurses spell talkfilters"
  15. RDEPEND="dev-libs/json-glib
  16. net-im/pidgin[gtk?,ncurses?]
  17. talkfilters? ( app-text/talkfilters )
  18. spell? ( app-text/gtkspell:2 )"
  19. DEPEND="${RDEPEND}
  20. ${PYTHON_DEPS}"
  21. S=${WORKDIR}/${MY_P}
  22. src_prepare() {
  23. sed -e '/CFLAGS=/{s| -g3||}' -i configure || die
  24. }
  25. list_plugins_dep() {
  26. local dependency=${1}
  27. grep -EH "depends.*$dependency" */plugins.cfg | sed 's:/.*::'
  28. }
  29. src_configure() {
  30. local plugins=""
  31. # list all plugins, then pull DISABLED_PLUGINS with the ones we don't need
  32. plugins="$(${EPYTHON} plugin_pack.py -d dist_dirs)"
  33. einfo "List of all possible plugins:"
  34. einfo "${plugins}"
  35. eval DISABLED_PLUGINS="\$${PN//[^a-z]/_}_DISABLED_PLUGINS"
  36. # disable known broken plugins
  37. DISABLED_PLUGINS+=" schedule findip"
  38. use gtk || DISABLED_PLUGINS+=" $(list_plugins_dep pidgin)"
  39. use ncurses || DISABLED_PLUGINS+=" $(list_plugins_dep finch)"
  40. use spell || DISABLED_PLUGINS+=" $(list_plugins_dep gtkspell)"
  41. use talkfilters || DISABLED_PLUGINS+=" $(list_plugins_dep talkfiltersbin)"
  42. for plug in ${DISABLED_PLUGINS}; do
  43. plugins="${plugins//${plug}}"
  44. done
  45. plugins="$(echo ${plugins} | sed 's:[ \t]\+:,:g;s:,$::;s:^,::')"
  46. econf \
  47. --with-plugins="${plugins}" \
  48. $(use_enable debug)
  49. }
  50. src_install() {
  51. emake DESTDIR="${D}" install
  52. dodoc AUTHORS ChangeLog NEWS README VERSION
  53. }
  54. pkg_preinst() {
  55. elog "Note: if you want to disable some plugins in pack, define"
  56. elog "${PN//[^a-z]/_}_DISABLED_PLUGINS with a list of plugins to"
  57. elog "skip during install (for list see einfo in build output)."
  58. }