cropgui-0.1.1-r3.ebuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 1999-2016 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-r1
  6. DESCRIPTION="GUI for lossless cropping of jpeg images"
  7. HOMEPAGE="http://emergent.unpythonic.net/01248401946"
  8. SRC_URI="http://media.unpythonic.net/emergent-files/01248401946/${PN}_${PV}.tar.gz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="amd64 x86"
  12. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  13. DEPEND="${PYTHON_DEPS}"
  14. RDEPEND="${PYTHON_DEPS}
  15. dev-python/pillow[${PYTHON_USEDEP}]
  16. dev-python/pygobject:2[${PYTHON_USEDEP}]
  17. dev-python/pygtk:2[${PYTHON_USEDEP}]
  18. "
  19. S="${WORKDIR}/${PN}"
  20. src_prepare() {
  21. sed -i -e '/Encoding/d' \
  22. -e '/Version/d' \
  23. -e '/MimeType/s/$/&;/' \
  24. -e '/Categories/s/Application;//' \
  25. cropgui.desktop || die 'sed on cropgui.desktop failed'
  26. # bug 471530
  27. epatch "${FILESDIR}/${P}-PIL.patch"
  28. epatch_user
  29. }
  30. install_cropgui_wrapper() {
  31. python_domodule cropgtk.py cropgui_common.py filechooser.py cropgui.glade
  32. make_wrapper "${PN}.tmp" "${PYTHON} $(python_get_sitedir)/${PN}/cropgtk.py"
  33. python_newexe "${ED%/}/usr/bin/${PN}.tmp" "${PN}"
  34. rm "${ED%/}/usr/bin/${PN}.tmp" || die
  35. }
  36. src_install() {
  37. python_moduleinto "${PN}"
  38. python_foreach_impl install_cropgui_wrapper
  39. domenu "${PN}.desktop"
  40. doicon "${PN}.png"
  41. }