commit:     c59f27ee7d631913a2afd3502b785d6bde76a762
Author:     Jan Chren <dev.rindeal+github.com <AT> gmail <DOT> com>
AuthorDate: Sat Apr 16 11:46:24 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Tue Apr 19 14:00:33 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c59f27ee

app-text/cherrytree: migrate to distutils-r1.eclass

Closes: https://github.com/gentoo/gentoo/pull/1280

Signed-off-by: Ian Delaney <idella4 <AT> gentoo.org>

 app-text/cherrytree/cherrytree-0.36.9.ebuild | 50 +++++++++-------------------
 1 file changed, 15 insertions(+), 35 deletions(-)

diff --git a/app-text/cherrytree/cherrytree-0.36.9.ebuild 
b/app-text/cherrytree/cherrytree-0.36.9.ebuild
index 2c856c0..d952e2d 100644
--- a/app-text/cherrytree/cherrytree-0.36.9.ebuild
+++ b/app-text/cherrytree/cherrytree-0.36.9.ebuild
@@ -5,8 +5,9 @@
 EAPI=6
 
 PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=true
 
-inherit fdo-mime eutils python-single-r1
+inherit fdo-mime distutils-r1
 
 DESCRIPTION='A hierarchical note taking application'
 HOMEPAGE='http://www.giuspen.com/cherrytree'
@@ -18,7 +19,7 @@ 
SRC_URI="https://github.com/giuspen/cherrytree/archive/${PV}.tar.gz -> ${P}.tar.
 KEYWORDS='~amd64 ~x86'
 IUSE='nls'
 
-RDEPEND="${PYTHON_DEPS}
+RDEPEND="
        x11-libs/libX11
        dev-python/dbus-python[${PYTHON_USEDEP}]
        dev-python/pyenchant[${PYTHON_USEDEP}]
@@ -32,44 +33,23 @@ DEPEND="${RDEPEND}
 PLOCALES='cs de es fr hy it ja lt nl pl pt_BR ru sl tr uk zh_CN'
 inherit l10n
 
-src_prepare() {
-       use nls && l10n_find_plocales_changes 'locale' '' '.po'
-
-       sed -i '\|update-desktop-database|d' 'setup.py' || die
+python_prepare_all() {
+       if use nls ; then
+               l10n_find_plocales_changes 'locale' '' '.po'
 
-       default
-}
+               rm_loc() {
+                       rm -v -f "locale/${1}.po" || return 1
+               }
+               l10n_for_each_disabled_locale_do rm_loc
+       fi
 
-src_compile() {
-       local args=()
-       use nls || args+=( '--without-gettext' )
+       sed -i '\|update-desktop-database|d' 'setup.py' || die
 
-       "${EPYTHON}" ./setup.py "${args[@]}" build
+       distutils-r1_python_prepare_all
 }
 
-src_install() {
-       dobin "${PN}"
-
-       doicon -s scalable "glade/svg/${PN}.svg"
-       domenu "linux/${PN}.desktop"
-       doman "linux/${PN}.1"
-
-       insinto "/usr/share/${PN}"
-       doins -r 'glade/' 'modules/' 'language-specs/'
-
-       insinto '/usr/share/mime-info'
-       doins "linux/${PN}".{mime,keys}
-       insinto '/usr/share/mime/packages'
-       doins "linux/${PN}.xml"
-
-       if use nls ; then
-               ins_loc() {
-                       # cannot use domo() as it installs files into a wrong 
dir
-                       insinto "/usr/share/locale/${1}/LC_MESSAGES"
-                       doins "build/mo/${1}/${PN}.mo"
-               }
-               l10n_for_each_locale_do ins_loc
-       fi
+src_configure() {
+       use nls || mydistutilsargs+=( '--without-gettext' )
 }
 
 pkg_postinst() {

Reply via email to