menulibre-2.1.3.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python3_4 )
  5. PYTHON_REQ_USE="xml"
  6. DISTUTILS_IN_SOURCE_BUILD=1
  7. inherit distutils-r1 eutils gnome2-utils versionator
  8. DESCRIPTION="Advanced freedesktop.org compliant menu editor"
  9. HOMEPAGE="http://www.smdavis.us/projects/menulibre/"
  10. SRC_URI="https://launchpad.net/${PN}/$(get_version_component_range 1-2)/${PV}/+download/${P}.tar.gz"
  11. LICENSE="GPL-3"
  12. SLOT="0"
  13. KEYWORDS="~amd64 ~x86"
  14. DEPEND="
  15. dev-python/python-distutils-extra[${PYTHON_USEDEP}]
  16. "
  17. RDEPEND="
  18. dev-libs/gobject-introspection
  19. dev-python/psutil[${PYTHON_USEDEP}]
  20. dev-python/pygobject:3[${PYTHON_USEDEP}]
  21. dev-python/pyxdg[${PYTHON_USEDEP}]
  22. gnome-base/gnome-menus[introspection]
  23. x11-libs/gdk-pixbuf[X,introspection]
  24. x11-libs/gtk+:3[X,introspection]
  25. x11-libs/gtksourceview:3.0[introspection]
  26. x11-themes/hicolor-icon-theme
  27. "
  28. python_prepare_all() {
  29. # too many categories
  30. sed -i \
  31. -e 's/X-GNOME-Settings-Panel;X-GNOME-PersonalSettings;DesktopSettings;X-XFCE;//' \
  32. menulibre.desktop.in || die
  33. local i
  34. # fix incorrect behavior when LINGUAS is set to an empty string
  35. # https://bugs.launchpad.net/python-distutils-extra/+bug/1133594
  36. if [[ -n "${LINGUAS+x}" ]] ; then # if LINGUAS is set
  37. for i in $(cd "${S}"/po ; for p in *.po ; do echo ${p%.po} ; done) ; do # for every supported language
  38. if ! has ${i} ${LINGUAS} ; then # if language is disabled
  39. rm po/${i}.po || die
  40. fi
  41. done
  42. fi
  43. distutils-r1_python_prepare_all
  44. }
  45. python_install_all() {
  46. distutils-r1_python_install_all
  47. }
  48. pkg_preinst() {
  49. gnome2_icon_savelist
  50. }
  51. pkg_postinst() {
  52. gnome2_icon_cache_update
  53. }
  54. pkg_postrm() {
  55. gnome2_icon_cache_update
  56. }