menulibre-13.04.17.ebuild 1.8 KB

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