menulibre-13.01.4.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. x11-libs/gdk-pixbuf[X,introspection]
  19. x11-libs/gtk+:3[X,introspection]
  20. x11-themes/hicolor-icon-theme"
  21. S=${WORKDIR}/${PN}
  22. python_prepare_all() {
  23. # too many categories
  24. sed -i \
  25. -e 's/X-GNOME-Settings-Panel;X-GNOME-PersonalSettings;DesktopSettings;X-XFCE;//' \
  26. menulibre.desktop.in || die 'sed on menulibre.desktop.in failed'
  27. local i
  28. # fix incorrect behavior when LINGUAS is set to an empty string
  29. # https://bugs.launchpad.net/python-distutils-extra/+bug/1133594
  30. if [[ -n "${LINGUAS+x}" ]] ; then # if LINGUAS is set
  31. for i in $(cd "${S}"/po ; for p in *.po ; do echo ${p%.po} ; done) ; do # for every supported language
  32. if ! has ${i} ${LINGUAS} ; then # if language is disabled
  33. rm po/${i}.po || die
  34. fi
  35. done
  36. fi
  37. distutils-r1_python_prepare_all
  38. }
  39. python_install_all() {
  40. distutils-r1_python_install_all
  41. newicon -s 32 help/C/figures/icon.png menu-editor.png
  42. }
  43. pkg_preinst() {
  44. gnome2_icon_savelist
  45. }
  46. pkg_postinst() {
  47. gnome2_icon_cache_update
  48. elog "optional dependencies: gnome-extra/yelp (view help contents)"
  49. }
  50. pkg_postrm() {
  51. gnome2_icon_cache_update
  52. }