mypaint-1.1.0-r2.ebuild 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. inherit fdo-mime gnome2-utils multilib scons-utils toolchain-funcs python-single-r1
  6. DESCRIPTION="fast and easy graphics application for digital painters"
  7. HOMEPAGE="http://mypaint.intilinux.com/"
  8. SRC_URI="http://download.gna.org/${PN}/${P}.tar.bz2"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="amd64 x86"
  12. IUSE=""
  13. LANGS="cs de en_CA en_GB es fr hu id it ja ko nb nn_NO pl pt_BR ro ru sl sv uk zh_CN zh_TW"
  14. for x in ${LANGS}; do
  15. IUSE+="linguas_${x} "
  16. done
  17. RDEPEND="
  18. dev-python/pygtk:2[${PYTHON_USEDEP}]
  19. dev-python/numpy[${PYTHON_USEDEP}]
  20. >=dev-python/pycairo-1.4[${PYTHON_USEDEP}]
  21. dev-libs/protobuf[python,${PYTHON_USEDEP}]
  22. >=dev-libs/json-c-0.11:=
  23. media-libs/lcms:2
  24. media-libs/libpng:0=
  25. ${PYTHON_DEPS}
  26. "
  27. DEPEND="${RDEPEND}
  28. dev-lang/swig
  29. virtual/pkgconfig"
  30. REQUIRED_USE=${PYTHON_REQUIRED_USE}
  31. pkg_setup() {
  32. python-single-r1_pkg_setup
  33. }
  34. src_prepare() {
  35. # multilib support
  36. sed -i -e "s:lib\/${PN}:$(get_libdir)\/${PN}:" \
  37. SConstruct SConscript || die
  38. # respect CXXFLAGS,CXX,LDFLAGS
  39. epatch "${FILESDIR}"/${P}-build-env-vars.patch
  40. # fix mypaint.desktop
  41. epatch "${FILESDIR}"/${P}-desktop.patch
  42. # pkgconfig patch for json-c-0.11. 467322
  43. epatch "${FILESDIR}"/${P}-json-c-0.11.patch
  44. }
  45. src_compile() {
  46. #workaround scons bug with locales. Bug #352700
  47. export LANG="en_US.UTF-8"
  48. tc-export CC CXX
  49. escons
  50. }
  51. src_install () {
  52. escons prefix="${D}/usr" install
  53. newicon pixmaps/${PN}_logo.png ${PN}.png
  54. for x in ${LANGS}; do
  55. if ! has ${x} ${LINGUAS}; then
  56. rm -rf "${ED}"/usr/share/locale/${x} || die
  57. fi
  58. done
  59. python_optimize "${D}"usr/share/${PN}
  60. # not used and broken
  61. rm -rf "${ED}"/usr/{include/,lib/libmypaint.a,lib/pkgconfig/} || die
  62. }
  63. pkg_preinst() {
  64. gnome2_icon_savelist
  65. }
  66. pkg_postinst() {
  67. fdo-mime_desktop_database_update
  68. gnome2_icon_cache_update
  69. }
  70. pkg_postrm() {
  71. fdo-mime_desktop_database_update
  72. }