Guest User

Untitled

a guest
Jan 13th, 2016
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: /var/cvsroot/gentoo-x86/dev-util/eric/eric-5.5.2.ebuild,v 1.3 2015/03/01 16:35:19 pesa Exp $
  4.  
  5. EAPI=5
  6.  
  7. PYTHON_COMPAT=( python{2_7,3_3,3_4} )
  8. PYTHON_REQ_USE="sqlite,xml"
  9. PLOCALES="cs de en es fr it pt ru tr zh_CN"
  10.  
  11. inherit eutils l10n python-single-r1 versionator
  12.  
  13. DESCRIPTION="A full featured Python IDE using PyQt4 and QScintilla"
  14. HOMEPAGE="http://eric-ide.python-projects.org/"
  15.  
  16. SLOT=$(get_major_version)
  17. MY_PV=${PV/_rc/-RC}
  18. MY_P=${PN}${SLOT}-${MY_PV}
  19.  
  20. BASE_URI="mirror://sourceforge/eric-ide/${PN}${SLOT}/stable/${MY_PV}"
  21. SRC_URI="${BASE_URI}/${MY_P}.tar.gz"
  22. for L in ${PLOCALES}; do
  23. SRC_URI+=" linguas_${L}? ( ${BASE_URI}/${PN}${SLOT}-i18n-${L/zh_CN/zh_CN.GB2312}-${MY_PV}.tar.gz )"
  24. done
  25. unset L
  26.  
  27. LICENSE="GPL-3"
  28. KEYWORDS="amd64 ~ppc ~ppc64 x86"
  29. IUSE=""
  30.  
  31. DEPEND="
  32. ${PYTHON_DEPS}
  33. >=dev-python/PyQt5-5.3.0[${PYTHON_USEDEP},help,sql,svg,webkit]
  34. >=dev-python/qscintilla-python-2.8.0[${PYTHON_USEDEP}]
  35. "
  36. RDEPEND="${DEPEND}
  37. >=dev-python/chardet-2.2.1[${PYTHON_USEDEP}]
  38. >=dev-python/coverage-3.7.1[${PYTHON_USEDEP}]
  39. >=dev-python/pygments-1.6[${PYTHON_USEDEP}]
  40. "
  41. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  42.  
  43. S=${WORKDIR}/${MY_P}
  44.  
  45. src_prepare() {
  46. # Avoid file collisions between different slots of Eric
  47. sed -i -e 's/^Icon=eric$/&${SLOT}/' eric/eric${SLOT}.desktop || die
  48. sed -i -e 's/\([^[:alnum:]]\)eric\.png\([^[:alnum:]]\)/\1eric'${SLOT}'.png\2/' \
  49. $(grep -lr 'eric\.png' .) || die
  50.  
  51. mv eric/icons/default/eric{,${SLOT}}.png || die
  52. mv eric/pixmaps/eric{,${SLOT}}.png || die
  53. rm -f eric/APIs/Python/zope-*.api
  54. rm -f eric/APIs/Ruby/Ruby-*.api
  55.  
  56. # Delete internal copies of dev-python/chardet and dev-python/pygments
  57. rm -fr eric/ThirdParty
  58.  
  59. # Delete internal copy of dev-python/coverage
  60. rm -fr eric/DebugClients/Python{,3}/coverage
  61. sed -i -e 's/from DebugClients\.Python3\?\.coverage/from coverage/' \
  62. $(grep -lr 'from DebugClients\.Python3\?\.coverage' .) || die
  63.  
  64. # Fix desktop files (bug 458092)
  65. sed -i -e '/^Categories=/s:Python:X-&:' eric/eric${SLOT}{,_webbrowser}.desktop || die
  66. }
  67.  
  68. src_install() {
  69. "${PYTHON}" install.py \
  70. -b "${EPREFIX}/usr/bin" \
  71. -d "$(python_get_sitedir)" \
  72. -i "${D}" \
  73. -c \
  74. -z \
  75. || die
  76.  
  77. python_optimize
  78.  
  79. doicon "eric/icons/default/eric"${SLOT}".png"
  80. dodoc changelog THANKS
  81. }
  82.  
  83. pkg_postinst() {
  84. elog "The following packages will give Eric extended functionality:"
  85. elog " dev-python/cx_Freeze"
  86. elog " dev-python/pyenchant"
  87. elog " dev-python/pylint"
  88. elog " dev-python/pysvn"
  89. elog " dev-vcs/mercurial"
  90. elog
  91. elog "This version has a plugin interface with plugin-autofetch from"
  92. elog "the application itself. You may want to check that as well."
  93. }
Add Comment
Please, Sign In to add comment