mypaint-1.2.1.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=6
  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.org/"
  8. SRC_URI="https://github.com/mypaint/${PN}/releases/download/v${PV}/${P}.tar.xz"
  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/pygobject:3[${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/libmypaint-1.3.0
  25. media-libs/libpng:0=
  26. gnome-base/librsvg
  27. ${PYTHON_DEPS}
  28. "
  29. DEPEND="${RDEPEND}
  30. dev-lang/swig
  31. virtual/pkgconfig"
  32. REQUIRED_USE=${PYTHON_REQUIRED_USE}
  33. pkg_setup() {
  34. python-single-r1_pkg_setup
  35. }
  36. src_prepare() {
  37. default
  38. # multilib support
  39. sed -i -e "s:lib\/${PN}:$(get_libdir)\/${PN}:" \
  40. SConstruct SConscript || die
  41. }
  42. src_compile() {
  43. #workaround scons bug with locales. Bug #352700
  44. export LANG="en_US.UTF-8"
  45. tc-export CC CXX
  46. escons
  47. }
  48. src_install () {
  49. escons prefix="${D}/usr" install
  50. newicon pixmaps/${PN}_logo.png ${PN}.png
  51. for x in ${LANGS}; do
  52. if ! has ${x} ${LINGUAS}; then
  53. rm -rf "${ED}"/usr/share/locale/${x} || die
  54. fi
  55. done
  56. python_optimize "${D}"usr/share/${PN}
  57. # not used and broken
  58. rm -r "${ED}"/usr/{include/,lib/libmypaint.a,lib/pkgconfig/} || die
  59. # already provided by system-libmypaint
  60. rm "${ED}"/usr/share/locale/*/LC_MESSAGES/libmypaint* || die
  61. }
  62. pkg_preinst() {
  63. gnome2_icon_savelist
  64. }
  65. pkg_postinst() {
  66. fdo-mime_desktop_database_update
  67. gnome2_icon_cache_update
  68. }
  69. pkg_postrm() {
  70. fdo-mime_desktop_database_update
  71. }